gstat/commands/executor.go

10 lines
360 B
Go
Raw Permalink Normal View History

2020-05-30 20:14:08 +02:00
package commands
2020-05-31 16:32:45 +02:00
import "github.com/hamburghammer/gstat/args"
// Executor is a functional interface to execute a command and return the result as a json string ([]byte).
2020-05-30 20:14:08 +02:00
type Executor interface {
// Exec executes something and returns the result as a byte array of json and an error if something unexpected happened.
2020-05-31 16:32:45 +02:00
Exec(args.Arguments) ([]byte, error)
2020-05-30 20:14:08 +02:00
}