Documentation
¶
Index ¶
- func ExecuteQuery[Q core.Query, R core.QueryResponse](ctx context.Context, bus core.QueryBus, query Q) (R, error)
- func RegisterCommand[C core.Command, H core.CommandHandler[C]](app *Application, handler H) error
- func RegisterEndpoint[R core.Request, Res core.Response](app *Application, method, path string, handler core.HandlerInterface[R, Res])
- func RegisterEvent[E core.Event](app *Application, handler core.EventHandler[E]) error
- func RegisterQuery[Q core.Query, R core.QueryResponse](app *Application, handler core.QueryHandler[Q, R]) error
- type Application
- func (app *Application) GetCommandBus() core.CommandBus
- func (app *Application) GetEventBus() core.EventBus
- func (app *Application) GetQueryBus() core.QueryBus
- func (app *Application) GetScheduler() core.Scheduler
- func (app *Application) Run(ctx context.Context) error
- func (app *Application) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteQuery ¶
func RegisterCommand ¶
func RegisterCommand[C core.Command, H core.CommandHandler[C]](app *Application, handler H) error
func RegisterEndpoint ¶
func RegisterEndpoint[R core.Request, Res core.Response](app *Application, method, path string, handler core.HandlerInterface[R, Res])
func RegisterEvent ¶
func RegisterEvent[E core.Event](app *Application, handler core.EventHandler[E]) error
func RegisterQuery ¶
func RegisterQuery[Q core.Query, R core.QueryResponse](app *Application, handler core.QueryHandler[Q, R]) error
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New() (*Application, error)
func (*Application) GetCommandBus ¶
func (app *Application) GetCommandBus() core.CommandBus
func (*Application) GetEventBus ¶
func (app *Application) GetEventBus() core.EventBus
func (*Application) GetQueryBus ¶
func (app *Application) GetQueryBus() core.QueryBus
func (*Application) GetScheduler ¶
func (app *Application) GetScheduler() core.Scheduler
Click to show internal directories.
Click to hide internal directories.