Documentation
¶
Index ¶
- func Aggregate(typ cqrs.AggregateType, factory cqrs.AggregateFactory)
- func Event(typ cqrs.EventType, proto cqrs.EventData)
- func New(ctx context.Context, options ...Option) (cqrs.Container, error)
- func NewWithConfigs(ctx context.Context, aggregateConfig cqrs.AggregateConfig, ...) (cqrs.Container, error)
- type AggregateRepositoryFactory
- type CommandBusFactory
- type CommandHandlerFactory
- type EventBusFactory
- type EventStoreFactory
- type Option
- func WithAggregate(typ cqrs.AggregateType, factory cqrs.AggregateFactory) Option
- func WithAggregateRepositoryFactory(f AggregateRepositoryFactory) Option
- func WithCommand(typ cqrs.CommandType, handler cqrs.CommandHandler) Option
- func WithCommandBusFactory(f CommandBusFactory) Option
- func WithCommandHandlerFactory(factories ...CommandHandlerFactory) Option
- func WithEvent(typ cqrs.EventType, proto cqrs.EventData) Option
- func WithEventBusFactory(f EventBusFactory) Option
- func WithEventStoreFactory(f EventStoreFactory) Option
- func WithLogger(logger *log.Logger) Option
- func WithSnapshotRepositoryFactory(f SnapshotRepositoryFactory) Option
- type Setup
- type SnapshotRepositoryFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Aggregate ¶ added in v0.6.2
func Aggregate(typ cqrs.AggregateType, factory cqrs.AggregateFactory)
Aggregate ...
func NewWithConfigs ¶
func NewWithConfigs( ctx context.Context, aggregateConfig cqrs.AggregateConfig, eventConfig cqrs.EventConfig, commandConfig cqrs.CommandConfig, options ...Option, ) (cqrs.Container, error)
NewWithConfigs ...
Types ¶
type AggregateRepositoryFactory ¶
AggregateRepositoryFactory ...
type CommandBusFactory ¶
CommandBusFactory ...
type CommandHandlerFactory ¶
type CommandHandlerFactory func(context.Context, Setup) (cqrs.CommandHandler, []cqrs.CommandType, error)
CommandHandlerFactory ...
type EventBusFactory ¶
EventBusFactory ...
type EventStoreFactory ¶
EventStoreFactory ...
type Option ¶
type Option func(Setup)
Option ...
func WithAggregate ¶
func WithAggregate(typ cqrs.AggregateType, factory cqrs.AggregateFactory) Option
WithAggregate ...
func WithAggregateRepositoryFactory ¶
func WithAggregateRepositoryFactory(f AggregateRepositoryFactory) Option
WithAggregateRepositoryFactory ...
func WithCommand ¶
func WithCommand(typ cqrs.CommandType, handler cqrs.CommandHandler) Option
WithCommand ...
func WithCommandBusFactory ¶
func WithCommandBusFactory(f CommandBusFactory) Option
WithCommandBusFactory ...
func WithCommandHandlerFactory ¶
func WithCommandHandlerFactory(factories ...CommandHandlerFactory) Option
WithCommandHandlerFactory ...
func WithEventBusFactory ¶
func WithEventBusFactory(f EventBusFactory) Option
WithEventBusFactory ...
func WithEventStoreFactory ¶
func WithEventStoreFactory(f EventStoreFactory) Option
WithEventStoreFactory ...
func WithSnapshotRepositoryFactory ¶
func WithSnapshotRepositoryFactory(f SnapshotRepositoryFactory) Option
WithSnapshotRepositoryFactory ...
type Setup ¶
type Setup interface { SetLogger(*log.Logger) AggregateConfig() cqrs.AggregateConfig EventConfig() cqrs.EventConfig CommandConfig() cqrs.CommandConfig SetEventStoreFactory(EventStoreFactory) SetEventBusFactory(EventBusFactory) SetCommandBusFactory(CommandBusFactory) AddCommandHandlerFactory(...CommandHandlerFactory) SetSnapshotRepositoryFactory(SnapshotRepositoryFactory) SetAggregateRepositoryFactory(AggregateRepositoryFactory) EventStore() cqrs.EventStore EventBus() cqrs.EventBus CommandBus() cqrs.CommandBus SnapshotRepository() cqrs.SnapshotRepository AggregateRepository() cqrs.AggregateRepository EventStoreResolver() func() (cqrs.EventStore, bool) EventBusResolver() func() (cqrs.EventBus, bool) EventPublisherResolver() func() (cqrs.EventPublisher, bool) EventSubscriberResolver() func() (cqrs.EventSubscriber, bool) CommandBusResolver() func() (cqrs.CommandBus, bool) SnapshotRepositoryResolver() func() (cqrs.SnapshotRepository, bool) AggregateRepositoryResolver() func() (cqrs.AggregateRepository, bool) RegisterAggregate(cqrs.AggregateType, cqrs.AggregateFactory) RegisterEvent(cqrs.EventType, cqrs.EventData) RegisterCommand(cqrs.CommandType, cqrs.CommandHandler) }
Setup ...
type SnapshotRepositoryFactory ¶
SnapshotRepositoryFactory ...
Click to show internal directories.
Click to hide internal directories.