Documentation ¶
Index ¶
- type App
- type Application
- func (a Application) AuthorizeCustomer(ctx context.Context, authorize AuthorizeCustomer) error
- func (a Application) DisableCustomer(ctx context.Context, disable DisableCustomer) error
- func (a Application) EnableCustomer(ctx context.Context, enable EnableCustomer) error
- func (a Application) GetCustomer(ctx context.Context, get GetCustomer) (*domain.Customer, error)
- func (a Application) RegisterCustomer(ctx context.Context, register RegisterCustomer) error
- type AuthorizeCustomer
- type DisableCustomer
- type EnableCustomer
- type GetCustomer
- type MockApp
- func (_m *MockApp) AuthorizeCustomer(ctx context.Context, authorize AuthorizeCustomer) error
- func (_m *MockApp) DisableCustomer(ctx context.Context, disable DisableCustomer) error
- func (_m *MockApp) EnableCustomer(ctx context.Context, enable EnableCustomer) error
- func (_m *MockApp) GetCustomer(ctx context.Context, get GetCustomer) (*domain.Customer, error)
- func (_m *MockApp) RegisterCustomer(ctx context.Context, register RegisterCustomer) error
- type RegisterCustomer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { RegisterCustomer(ctx context.Context, register RegisterCustomer) error AuthorizeCustomer(ctx context.Context, authorize AuthorizeCustomer) error GetCustomer(ctx context.Context, get GetCustomer) (*domain.Customer, error) EnableCustomer(ctx context.Context, enable EnableCustomer) error DisableCustomer(ctx context.Context, disable DisableCustomer) error }
func NewInstrumentedApp ¶
func NewInstrumentedApp(app App, customersRegistered prometheus.Counter) App
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(customers domain.CustomerRepository, domainPublisher ddd.EventPublisher[ddd.AggregateEvent]) *Application
func (Application) AuthorizeCustomer ¶
func (a Application) AuthorizeCustomer(ctx context.Context, authorize AuthorizeCustomer) error
func (Application) DisableCustomer ¶
func (a Application) DisableCustomer(ctx context.Context, disable DisableCustomer) error
func (Application) EnableCustomer ¶
func (a Application) EnableCustomer(ctx context.Context, enable EnableCustomer) error
func (Application) GetCustomer ¶
func (a Application) GetCustomer(ctx context.Context, get GetCustomer) (*domain.Customer, error)
func (Application) RegisterCustomer ¶
func (a Application) RegisterCustomer(ctx context.Context, register RegisterCustomer) error
type AuthorizeCustomer ¶
type AuthorizeCustomer struct {
ID string
}
type DisableCustomer ¶
type DisableCustomer struct {
ID string
}
type EnableCustomer ¶
type EnableCustomer struct {
ID string
}
type GetCustomer ¶
type GetCustomer struct {
ID string
}
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) AuthorizeCustomer ¶
func (_m *MockApp) AuthorizeCustomer(ctx context.Context, authorize AuthorizeCustomer) error
AuthorizeCustomer provides a mock function with given fields: ctx, authorize
func (*MockApp) DisableCustomer ¶
func (_m *MockApp) DisableCustomer(ctx context.Context, disable DisableCustomer) error
DisableCustomer provides a mock function with given fields: ctx, disable
func (*MockApp) EnableCustomer ¶
func (_m *MockApp) EnableCustomer(ctx context.Context, enable EnableCustomer) error
EnableCustomer provides a mock function with given fields: ctx, enable
func (*MockApp) GetCustomer ¶
GetCustomer provides a mock function with given fields: ctx, get
func (*MockApp) RegisterCustomer ¶
func (_m *MockApp) RegisterCustomer(ctx context.Context, register RegisterCustomer) error
RegisterCustomer provides a mock function with given fields: ctx, register
type RegisterCustomer ¶
Click to show internal directories.
Click to hide internal directories.