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 MockApp
- func (_m *MockApp) AddItem(ctx context.Context, add AddItem) error
- func (_m *MockApp) CancelBasket(ctx context.Context, cancel CancelBasket) error
- func (_m *MockApp) CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error
- func (_m *MockApp) GetBasket(ctx context.Context, get GetBasket) (*domain.Basket, error)
- func (_m *MockApp) RemoveItem(ctx context.Context, remove RemoveItem) error
- func (_m *MockApp) StartBasket(ctx context.Context, start StartBasket) error
- type RemoveItem
- type StartBasket
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) }
func NewInstrumentedApp ¶
func NewInstrumentedApp(app App, basketsStarted, basketsCheckedOut, baksetsCanceled prometheus.Counter) App
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(baskets domain.BasketRepository, stores domain.StoreRepository, products domain.ProductRepository, publisher ddd.EventPublisher[ddd.Event]) *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 MockApp ¶
MockApp is an autogenerated mock type for the App type
func NewMockApp ¶
func NewMockApp(t mockConstructorTestingTNewMockApp) *MockApp
NewMockApp creates a new instance of MockApp. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockApp) CancelBasket ¶
func (_m *MockApp) CancelBasket(ctx context.Context, cancel CancelBasket) error
CancelBasket provides a mock function with given fields: ctx, cancel
func (*MockApp) CheckoutBasket ¶
func (_m *MockApp) CheckoutBasket(ctx context.Context, checkout CheckoutBasket) error
CheckoutBasket provides a mock function with given fields: ctx, checkout
func (*MockApp) RemoveItem ¶
func (_m *MockApp) RemoveItem(ctx context.Context, remove RemoveItem) error
RemoveItem provides a mock function with given fields: ctx, remove
func (*MockApp) StartBasket ¶
func (_m *MockApp) StartBasket(ctx context.Context, start StartBasket) error
StartBasket provides a mock function with given fields: ctx, start
type RemoveItem ¶
type StartBasket ¶
Click to show internal directories.
Click to hide internal directories.