Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandEndpoint ¶ added in v1.2.5
func CommandEndpoint[C any](h CommandHandler[C]) endpoint.Endpoint[C, struct{}]
CommandEndpoint convert CommandHandler to Endpoint
func QueryEndpoint ¶ added in v1.2.5
func QueryEndpoint[Q any, R any](h QueryHandler[Q, R]) endpoint.Endpoint[Q, R]
QueryEndpoint convert QueryHandler to Endpoint
Types ¶
type CommandHandler ¶
CommandHandler is a command handler that to update data. Commands should be task-based, rather than data centric. Commands may be placed on a queue for asynchronous processing, rather than being processed synchronously.
type CommandHandlerFunc ¶
type CommandHandlerFunc[C any] struct { // contains filtered or unexported fields }
The CommandHandlerFunc type is an adapter to allow the use of ordinary functions as CommandHandler.
type NoopQuery ¶ added in v1.2.5
NoopQuery is an QueryHandler that does nothing and returns a nil error.
type QueryHandler ¶
QueryHandler is a query handler that to queries to read data. Queries never modify the database. A query returns a DTO that does not encapsulate any domain knowledge.
type QueryHandlerFunc ¶
The QueryHandlerFunc type is an adapter to allow the use of ordinary functions as QueryHandler.