Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyValueExpected = errors.New("key/value expected") UnknownCommand = errors.New("unknown command") )
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is and executor of the commands, provided as text
func NewExecutor ¶
NewExecutor creates new executor
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor processes stream of incoming commands
func NewProcessor ¶
NewProcessor creates new Processor
type Responder ¶
type Responder interface { // Error reports an error Error(err error) // Ok reports success Ok() // Bye reports shutdown Bye() // Help shows help Help() }
Responder is responsible for providing feedback on command execution
func NewBatchResponder ¶
func NewBatchResponder() Responder
NewBatchResponder returns new batch responder, used when input taken from file
func NewInteractiveResponder ¶
func NewInteractiveResponder() Responder
NewInteractiveResponder returns new interactive responder, used when input taken from stdin
Click to show internal directories.
Click to hide internal directories.