Documentation ¶
Index ¶
- type AddItem
- type App
- type Application
- func (a Application) AddItem(ctx context.Context, add AddItem) error
- func (a Application) CancelBasket(ctx context.Context, cancel CancelBasket) error
- func (a Application) CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error
- func (a Application) GetBasket(ctx context.Context, get GetBasket) (*domain.Basket, error)
- func (a Application) RemoveItem(ctx context.Context, remove RemoveItem) error
- func (a Application) StartBasket(ctx context.Context, start StartBasket) error
- type CancelBasket
- type CheckoutBasket
- type GetBasket
- type OrderHandlers
- type ProductHandlers
- type RemoveItem
- type StartBasket
- type StoreHandlers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { StartBasket(ctx context.Context, start StartBasket) error CancelBasket(ctx context.Context, cancel CancelBasket) error CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error AddItem(ctx context.Context, add AddItem) error RemoveItem(ctx context.Context, remove RemoveItem) error GetBasket(ctx context.Context, get GetBasket) (*domain.Basket, error) }
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(baskets domain.BasketRepository, stores domain.StoreRepository, products domain.ProductRepository, orders domain.OrderRepository, ) *Application
func (Application) CancelBasket ¶
func (a Application) CancelBasket(ctx context.Context, cancel CancelBasket) error
func (Application) CheckoutBasket ¶
func (a Application) CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error
func (Application) RemoveItem ¶
func (a Application) RemoveItem(ctx context.Context, remove RemoveItem) error
func (Application) StartBasket ¶
func (a Application) StartBasket(ctx context.Context, start StartBasket) error
type CancelBasket ¶
type CancelBasket struct {
ID string
}
type CheckoutBasket ¶
type OrderHandlers ¶
type OrderHandlers[T ddd.AggregateEvent] struct { // contains filtered or unexported fields }
func NewOrderHandlers ¶
func NewOrderHandlers(orders domain.OrderRepository) OrderHandlers[ddd.AggregateEvent]
func (OrderHandlers[T]) HandleEvent ¶
func (h OrderHandlers[T]) HandleEvent(ctx context.Context, event T) error
type ProductHandlers ¶
func NewProductHandlers ¶
func NewProductHandlers(cache domain.ProductCacheRepository) ProductHandlers[ddd.Event]
func (ProductHandlers[T]) HandleEvent ¶
func (h ProductHandlers[T]) HandleEvent(ctx context.Context, event T) error
type RemoveItem ¶
type StartBasket ¶
type StoreHandlers ¶
func NewStoreHandlers ¶
func NewStoreHandlers(cache domain.StoreCacheRepository) StoreHandlers[ddd.Event]
func (StoreHandlers[T]) HandleEvent ¶
func (h StoreHandlers[T]) HandleEvent(ctx context.Context, event T) error
Click to show internal directories.
Click to hide internal directories.