Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNotExecutable is thrown if no command creator was created ErrNotExecutable = errors.ThrowInvalidArgument(nil, "PREPA-pH70n", "Errors.Internal") )
Functions ¶
func PrepareCommands ¶
func PrepareCommands(ctx context.Context, filter FilterToQueryReducer, validations ...Validation) (cmds []eventstore.Command, err error)
PrepareCommands checks the passed validations and if ok creates the commands
Types ¶
type CreateCommands ¶
type CreateCommands func(context.Context, FilterToQueryReducer) ([]eventstore.Command, error)
CreateCommands builds the commands the filter param is an extended version of the eventstore filter method it filters for events including the commands on the current context
type FilterToQueryReducer ¶
type FilterToQueryReducer func(ctx context.Context, queryFactory *eventstore.SearchQueryBuilder) ([]eventstore.Event, error)
FilterToQueryReducer is an abstraction of the eventstore method
type Validation ¶
type Validation func() (CreateCommands, error)
Validation of the input values of the command and if correct returns the function to create commands or if not valid an error
Click to show internal directories.
Click to hide internal directories.