Documentation ¶
Index ¶
- type App
- type Application
- type Commands
- type MockApp
- func (_m *MockApp) AddProduct(ctx context.Context, cmd commands.AddProduct) error
- func (_m *MockApp) CreateStore(ctx context.Context, cmd commands.CreateStore) error
- func (_m *MockApp) DecreaseProductPrice(ctx context.Context, cmd commands.DecreaseProductPrice) error
- func (_m *MockApp) DisableParticipation(ctx context.Context, cmd commands.DisableParticipation) error
- func (_m *MockApp) EnableParticipation(ctx context.Context, cmd commands.EnableParticipation) error
- func (_m *MockApp) GetCatalog(ctx context.Context, query queries.GetCatalog) ([]*domain.CatalogProduct, error)
- func (_m *MockApp) GetParticipatingStores(ctx context.Context, query queries.GetParticipatingStores) ([]*domain.MallStore, error)
- func (_m *MockApp) GetProduct(ctx context.Context, query queries.GetProduct) (*domain.CatalogProduct, error)
- func (_m *MockApp) GetStore(ctx context.Context, query queries.GetStore) (*domain.MallStore, error)
- func (_m *MockApp) GetStores(ctx context.Context, query queries.GetStores) ([]*domain.MallStore, error)
- func (_m *MockApp) IncreaseProductPrice(ctx context.Context, cmd commands.IncreaseProductPrice) error
- func (_m *MockApp) RebrandProduct(ctx context.Context, cmd commands.RebrandProduct) error
- func (_m *MockApp) RebrandStore(ctx context.Context, cmd commands.RebrandStore) error
- func (_m *MockApp) RemoveProduct(ctx context.Context, cmd commands.RemoveProduct) error
- type MockCommands
- func (_m *MockCommands) AddProduct(ctx context.Context, cmd commands.AddProduct) error
- func (_m *MockCommands) CreateStore(ctx context.Context, cmd commands.CreateStore) error
- func (_m *MockCommands) DecreaseProductPrice(ctx context.Context, cmd commands.DecreaseProductPrice) error
- func (_m *MockCommands) DisableParticipation(ctx context.Context, cmd commands.DisableParticipation) error
- func (_m *MockCommands) EnableParticipation(ctx context.Context, cmd commands.EnableParticipation) error
- func (_m *MockCommands) IncreaseProductPrice(ctx context.Context, cmd commands.IncreaseProductPrice) error
- func (_m *MockCommands) RebrandProduct(ctx context.Context, cmd commands.RebrandProduct) error
- func (_m *MockCommands) RebrandStore(ctx context.Context, cmd commands.RebrandStore) error
- func (_m *MockCommands) RemoveProduct(ctx context.Context, cmd commands.RemoveProduct) error
- type MockQueries
- func (_m *MockQueries) GetCatalog(ctx context.Context, query queries.GetCatalog) ([]*domain.CatalogProduct, error)
- func (_m *MockQueries) GetParticipatingStores(ctx context.Context, query queries.GetParticipatingStores) ([]*domain.MallStore, error)
- func (_m *MockQueries) GetProduct(ctx context.Context, query queries.GetProduct) (*domain.CatalogProduct, error)
- func (_m *MockQueries) GetStore(ctx context.Context, query queries.GetStore) (*domain.MallStore, error)
- func (_m *MockQueries) GetStores(ctx context.Context, query queries.GetStores) ([]*domain.MallStore, error)
- type Queries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(stores domain.StoreRepository, products domain.ProductRepository, catalog domain.CatalogRepository, mall domain.MallRepository, publisher ddd.EventPublisher[ddd.Event], ) *Application
type Commands ¶
type Commands interface { CreateStore(ctx context.Context, cmd commands.CreateStore) error EnableParticipation(ctx context.Context, cmd commands.EnableParticipation) error DisableParticipation(ctx context.Context, cmd commands.DisableParticipation) error RebrandStore(ctx context.Context, cmd commands.RebrandStore) error AddProduct(ctx context.Context, cmd commands.AddProduct) error RebrandProduct(ctx context.Context, cmd commands.RebrandProduct) error IncreaseProductPrice(ctx context.Context, cmd commands.IncreaseProductPrice) error DecreaseProductPrice(ctx context.Context, cmd commands.DecreaseProductPrice) error RemoveProduct(ctx context.Context, cmd commands.RemoveProduct) error }
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) AddProduct ¶
AddProduct provides a mock function with given fields: ctx, cmd
func (*MockApp) CreateStore ¶
CreateStore provides a mock function with given fields: ctx, cmd
func (*MockApp) DecreaseProductPrice ¶
func (_m *MockApp) DecreaseProductPrice(ctx context.Context, cmd commands.DecreaseProductPrice) error
DecreaseProductPrice provides a mock function with given fields: ctx, cmd
func (*MockApp) DisableParticipation ¶
func (_m *MockApp) DisableParticipation(ctx context.Context, cmd commands.DisableParticipation) error
DisableParticipation provides a mock function with given fields: ctx, cmd
func (*MockApp) EnableParticipation ¶
EnableParticipation provides a mock function with given fields: ctx, cmd
func (*MockApp) GetCatalog ¶
func (_m *MockApp) GetCatalog(ctx context.Context, query queries.GetCatalog) ([]*domain.CatalogProduct, error)
GetCatalog provides a mock function with given fields: ctx, query
func (*MockApp) GetParticipatingStores ¶
func (_m *MockApp) GetParticipatingStores(ctx context.Context, query queries.GetParticipatingStores) ([]*domain.MallStore, error)
GetParticipatingStores provides a mock function with given fields: ctx, query
func (*MockApp) GetProduct ¶
func (_m *MockApp) GetProduct(ctx context.Context, query queries.GetProduct) (*domain.CatalogProduct, error)
GetProduct provides a mock function with given fields: ctx, query
func (*MockApp) GetStores ¶
func (_m *MockApp) GetStores(ctx context.Context, query queries.GetStores) ([]*domain.MallStore, error)
GetStores provides a mock function with given fields: ctx, query
func (*MockApp) IncreaseProductPrice ¶
func (_m *MockApp) IncreaseProductPrice(ctx context.Context, cmd commands.IncreaseProductPrice) error
IncreaseProductPrice provides a mock function with given fields: ctx, cmd
func (*MockApp) RebrandProduct ¶
RebrandProduct provides a mock function with given fields: ctx, cmd
func (*MockApp) RebrandStore ¶
RebrandStore provides a mock function with given fields: ctx, cmd
func (*MockApp) RemoveProduct ¶
RemoveProduct provides a mock function with given fields: ctx, cmd
type MockCommands ¶
MockCommands is an autogenerated mock type for the Commands type
func NewMockCommands ¶
func NewMockCommands(t mockConstructorTestingTNewMockCommands) *MockCommands
NewMockCommands creates a new instance of MockCommands. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockCommands) AddProduct ¶
func (_m *MockCommands) AddProduct(ctx context.Context, cmd commands.AddProduct) error
AddProduct provides a mock function with given fields: ctx, cmd
func (*MockCommands) CreateStore ¶
func (_m *MockCommands) CreateStore(ctx context.Context, cmd commands.CreateStore) error
CreateStore provides a mock function with given fields: ctx, cmd
func (*MockCommands) DecreaseProductPrice ¶
func (_m *MockCommands) DecreaseProductPrice(ctx context.Context, cmd commands.DecreaseProductPrice) error
DecreaseProductPrice provides a mock function with given fields: ctx, cmd
func (*MockCommands) DisableParticipation ¶
func (_m *MockCommands) DisableParticipation(ctx context.Context, cmd commands.DisableParticipation) error
DisableParticipation provides a mock function with given fields: ctx, cmd
func (*MockCommands) EnableParticipation ¶
func (_m *MockCommands) EnableParticipation(ctx context.Context, cmd commands.EnableParticipation) error
EnableParticipation provides a mock function with given fields: ctx, cmd
func (*MockCommands) IncreaseProductPrice ¶
func (_m *MockCommands) IncreaseProductPrice(ctx context.Context, cmd commands.IncreaseProductPrice) error
IncreaseProductPrice provides a mock function with given fields: ctx, cmd
func (*MockCommands) RebrandProduct ¶
func (_m *MockCommands) RebrandProduct(ctx context.Context, cmd commands.RebrandProduct) error
RebrandProduct provides a mock function with given fields: ctx, cmd
func (*MockCommands) RebrandStore ¶
func (_m *MockCommands) RebrandStore(ctx context.Context, cmd commands.RebrandStore) error
RebrandStore provides a mock function with given fields: ctx, cmd
func (*MockCommands) RemoveProduct ¶
func (_m *MockCommands) RemoveProduct(ctx context.Context, cmd commands.RemoveProduct) error
RemoveProduct provides a mock function with given fields: ctx, cmd
type MockQueries ¶
MockQueries is an autogenerated mock type for the Queries type
func NewMockQueries ¶
func NewMockQueries(t mockConstructorTestingTNewMockQueries) *MockQueries
NewMockQueries creates a new instance of MockQueries. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockQueries) GetCatalog ¶
func (_m *MockQueries) GetCatalog(ctx context.Context, query queries.GetCatalog) ([]*domain.CatalogProduct, error)
GetCatalog provides a mock function with given fields: ctx, query
func (*MockQueries) GetParticipatingStores ¶
func (_m *MockQueries) GetParticipatingStores(ctx context.Context, query queries.GetParticipatingStores) ([]*domain.MallStore, error)
GetParticipatingStores provides a mock function with given fields: ctx, query
func (*MockQueries) GetProduct ¶
func (_m *MockQueries) GetProduct(ctx context.Context, query queries.GetProduct) (*domain.CatalogProduct, error)
GetProduct provides a mock function with given fields: ctx, query
type Queries ¶
type Queries interface { GetStore(ctx context.Context, query queries.GetStore) (*domain.MallStore, error) GetStores(ctx context.Context, query queries.GetStores) ([]*domain.MallStore, error) GetParticipatingStores(ctx context.Context, query queries.GetParticipatingStores) ([]*domain.MallStore, error) GetCatalog(ctx context.Context, query queries.GetCatalog) ([]*domain.CatalogProduct, error) GetProduct(ctx context.Context, query queries.GetProduct) (*domain.CatalogProduct, error) }