Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { Payload() interface{} Type() string }
Command Create custom Command
type CommandBus ¶
type CommandBus struct {
// contains filtered or unexported fields
}
CommandBus Contains handlers
func NewCommandBus ¶
func NewCommandBus() *CommandBus
NewCommandBus Initialize empty handlers in bus
func (*CommandBus) AddHandler ¶
func (bus *CommandBus) AddHandler(handler CommandHandler, command interface{}) error
AddHandler to bus
func (*CommandBus) Dispatch ¶
func (bus *CommandBus) Dispatch(command Command) error
Dispatch Calls good command process
func (*CommandBus) GetCommandsName ¶
func (bus *CommandBus) GetCommandsName() []string
GetCommandsName of registred command
func (*CommandBus) GetLength ¶
func (bus *CommandBus) GetLength() int
GetLength of registred command
type CommandHandler ¶
CommandHandler Allows to manage Command
type CommandImpl ¶
type CommandImpl struct {
// contains filtered or unexported fields
}
CommandImpl Overrides Command
func NewCommandImpl ¶
func NewCommandImpl(command interface{}) *CommandImpl
NewCommandImpl Initialize an Command implementation
func (*CommandImpl) Payload ¶
func (c *CommandImpl) Payload() interface{}
Payload returns the actual command payload of the message.
type QueryBus ¶
type QueryBus struct {
// contains filtered or unexported fields
}
QueryBus Contains handlers
func (*QueryBus) AddHandler ¶
func (bus *QueryBus) AddHandler(handler QueryHandler, Query interface{}) error
AddHandler to bus
func (*QueryBus) GetQueriesName ¶
GetQueriesName of registred command
type QueryHandler ¶
QueryHandler Allows to manage Query
type QueryImpl ¶
type QueryImpl struct {
Query interface{}
}
QueryImpl Overrides Query
func NewQueryImpl ¶
func NewQueryImpl(Query interface{}) *QueryImpl
NewQueryImpl Initialize an Query implementation
Click to show internal directories.
Click to hide internal directories.