Documentation ¶
Index ¶
- type DatabaseRepository
- func (_m *DatabaseRepository) CreateCategory(e *entities.Category) (*entities.Category, error)
- func (_m *DatabaseRepository) CreateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)
- func (_m *DatabaseRepository) CreateProduct(e *entities.Product) (*entities.Product, error)
- func (_m *DatabaseRepository) DeleteCategory(id entities.ID) error
- func (_m *DatabaseRepository) DeleteImage(id entities.ID) error
- func (_m *DatabaseRepository) DeleteManufacturer(id entities.ID) error
- func (_m *DatabaseRepository) DeleteProduct(id entities.ID) error
- func (_m *DatabaseRepository) GetCategory(id entities.ID) (*entities.Category, error)
- func (_m *DatabaseRepository) GetImage(id entities.ID) (*entities.Image, error)
- func (_m *DatabaseRepository) GetManufacturer(id entities.ID) (*entities.Manufacturer, error)
- func (_m *DatabaseRepository) GetProduct(id entities.ID) (*entities.Product, error)
- func (_m *DatabaseRepository) ListCategories() ([]*entities.Category, error)
- func (_m *DatabaseRepository) ListManufacturers() ([]*entities.Manufacturer, error)
- func (_m *DatabaseRepository) ListProducts() ([]*entities.Product, error)
- func (_m *DatabaseRepository) UpdateCategory(e *entities.Category) (*entities.Category, error)
- func (_m *DatabaseRepository) UpdateImage(id entities.ID, ownerID entities.ID, newOrder int) ([]*entities.Image, error)
- func (_m *DatabaseRepository) UpdateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)
- func (_m *DatabaseRepository) UpdateProduct(e *entities.Product) (*entities.Product, error)
- func (_m *DatabaseRepository) UpdateProductImages(id entities.ID, images []*entities.Image) ([]*entities.Image, error)
- type StorageRepository
- type Usecase
- func (_m *Usecase) AddProductImages(id entities.ID, images map[string][]byte, ...) (*entities.Product, error)
- func (_m *Usecase) CreateCategory(_a0 *entities.Category) (*entities.Category, error)
- func (_m *Usecase) CreateManufacturer(_a0 *entities.Manufacturer) (*entities.Manufacturer, error)
- func (_m *Usecase) CreateProduct(_a0 *entities.Product) (*entities.Product, error)
- func (_m *Usecase) DeleteCategory(id entities.ID) error
- func (_m *Usecase) DeleteCategoryImage(categoryID entities.ID) error
- func (_m *Usecase) DeleteManufacturer(id entities.ID) error
- func (_m *Usecase) DeleteManufacturerImage(manufacturerID entities.ID) error
- func (_m *Usecase) DeleteProduct(id entities.ID) error
- func (_m *Usecase) DeleteProductImage(productID entities.ID, imageID entities.ID) error
- func (_m *Usecase) GetCategory(id entities.ID, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Category, error)
- func (_m *Usecase) GetManufacturer(id entities.ID, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Manufacturer, error)
- func (_m *Usecase) GetProduct(id entities.ID, resolved bool, imageConfigs map[string]imageproxy.ImageConfig) (*entities.ResolvedProduct, error)
- func (_m *Usecase) ListCategories(imageConfigs map[string]imageproxy.ImageConfig) ([]*entities.Category, error)
- func (_m *Usecase) ListManufacturers(imageConfigs map[string]imageproxy.ImageConfig) ([]*entities.Manufacturer, error)
- func (_m *Usecase) ListProducts(imageConfigs map[string]imageproxy.ImageConfig) ([]*entities.Product, error)
- func (_m *Usecase) UpdateCategory(e *entities.Category) (*entities.Category, error)
- func (_m *Usecase) UpdateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)
- func (_m *Usecase) UpdateProduct(e *entities.Product) (*entities.Product, error)
- func (_m *Usecase) UpdateProductImage(productID entities.ID, imageID entities.ID, order int) ([]*entities.Image, error)
- func (_m *Usecase) UpsertCategoryImage(categoryID entities.ID, imageName string, imageContent []byte, ...) (*entities.Category, error)
- func (_m *Usecase) UpsertManufacturerImage(manufacturerID entities.ID, imageName string, imageContent []byte, ...) (*entities.Manufacturer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseRepository ¶
DatabaseRepository is an autogenerated mock type for the DatabaseRepository type
func NewDatabaseRepository ¶ added in v0.5.0
func NewDatabaseRepository(t testing.TB) *DatabaseRepository
NewDatabaseRepository creates a new instance of DatabaseRepository. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func (*DatabaseRepository) CreateCategory ¶
CreateCategory provides a mock function with given fields: e
func (*DatabaseRepository) CreateManufacturer ¶
func (_m *DatabaseRepository) CreateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)
CreateManufacturer provides a mock function with given fields: e
func (*DatabaseRepository) CreateProduct ¶
CreateProduct provides a mock function with given fields: e
func (*DatabaseRepository) DeleteCategory ¶
func (_m *DatabaseRepository) DeleteCategory(id entities.ID) error
DeleteCategory provides a mock function with given fields: id
func (*DatabaseRepository) DeleteImage ¶
func (_m *DatabaseRepository) DeleteImage(id entities.ID) error
DeleteImage provides a mock function with given fields: id
func (*DatabaseRepository) DeleteManufacturer ¶
func (_m *DatabaseRepository) DeleteManufacturer(id entities.ID) error
DeleteManufacturer provides a mock function with given fields: id
func (*DatabaseRepository) DeleteProduct ¶
func (_m *DatabaseRepository) DeleteProduct(id entities.ID) error
DeleteProduct provides a mock function with given fields: id
func (*DatabaseRepository) GetCategory ¶
GetCategory provides a mock function with given fields: id
func (*DatabaseRepository) GetManufacturer ¶
func (_m *DatabaseRepository) GetManufacturer(id entities.ID) (*entities.Manufacturer, error)
GetManufacturer provides a mock function with given fields: id
func (*DatabaseRepository) GetProduct ¶
GetProduct provides a mock function with given fields: id
func (*DatabaseRepository) ListCategories ¶
func (_m *DatabaseRepository) ListCategories() ([]*entities.Category, error)
ListCategories provides a mock function with given fields:
func (*DatabaseRepository) ListManufacturers ¶
func (_m *DatabaseRepository) ListManufacturers() ([]*entities.Manufacturer, error)
ListManufacturers provides a mock function with given fields:
func (*DatabaseRepository) ListProducts ¶
func (_m *DatabaseRepository) ListProducts() ([]*entities.Product, error)
ListProducts provides a mock function with given fields:
func (*DatabaseRepository) UpdateCategory ¶
UpdateCategory provides a mock function with given fields: e
func (*DatabaseRepository) UpdateImage ¶
func (_m *DatabaseRepository) UpdateImage(id entities.ID, ownerID entities.ID, newOrder int) ([]*entities.Image, error)
UpdateImage provides a mock function with given fields: id, ownerID, newOrder
func (*DatabaseRepository) UpdateManufacturer ¶
func (_m *DatabaseRepository) UpdateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)
UpdateManufacturer provides a mock function with given fields: e
func (*DatabaseRepository) UpdateProduct ¶
UpdateProduct provides a mock function with given fields: e
func (*DatabaseRepository) UpdateProductImages ¶ added in v0.5.0
func (_m *DatabaseRepository) UpdateProductImages(id entities.ID, images []*entities.Image) ([]*entities.Image, error)
UpdateProductImages provides a mock function with given fields: id, images
type StorageRepository ¶
StorageRepository is an autogenerated mock type for the StorageRepository type
func NewStorageRepository ¶ added in v0.5.0
func NewStorageRepository(t testing.TB) *StorageRepository
NewStorageRepository creates a new instance of StorageRepository. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func (*StorageRepository) DeleteFile ¶
func (_m *StorageRepository) DeleteFile(filename string) error
DeleteFile provides a mock function with given fields: filename
type Usecase ¶
Usecase is an autogenerated mock type for the Usecase type
func NewUsecase ¶ added in v0.5.0
NewUsecase creates a new instance of Usecase. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func (*Usecase) AddProductImages ¶
func (_m *Usecase) AddProductImages(id entities.ID, images map[string][]byte, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Product, error)
AddProductImages provides a mock function with given fields: id, images, imageConfigs
func (*Usecase) CreateCategory ¶
CreateCategory provides a mock function with given fields: _a0
func (*Usecase) CreateManufacturer ¶
func (_m *Usecase) CreateManufacturer(_a0 *entities.Manufacturer) (*entities.Manufacturer, error)
CreateManufacturer provides a mock function with given fields: _a0
func (*Usecase) CreateProduct ¶
CreateProduct provides a mock function with given fields: _a0
func (*Usecase) DeleteCategory ¶
DeleteCategory provides a mock function with given fields: id
func (*Usecase) DeleteCategoryImage ¶
DeleteCategoryImage provides a mock function with given fields: categoryID
func (*Usecase) DeleteManufacturer ¶
DeleteManufacturer provides a mock function with given fields: id
func (*Usecase) DeleteManufacturerImage ¶
DeleteManufacturerImage provides a mock function with given fields: manufacturerID
func (*Usecase) DeleteProduct ¶
DeleteProduct provides a mock function with given fields: id
func (*Usecase) DeleteProductImage ¶
DeleteProductImage provides a mock function with given fields: productID, imageID
func (*Usecase) GetCategory ¶
func (_m *Usecase) GetCategory(id entities.ID, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Category, error)
GetCategory provides a mock function with given fields: id, imageConfigs
func (*Usecase) GetManufacturer ¶
func (_m *Usecase) GetManufacturer(id entities.ID, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Manufacturer, error)
GetManufacturer provides a mock function with given fields: id, imageConfigs
func (*Usecase) GetProduct ¶
func (_m *Usecase) GetProduct(id entities.ID, resolved bool, imageConfigs map[string]imageproxy.ImageConfig) (*entities.ResolvedProduct, error)
GetProduct provides a mock function with given fields: id, resolved, imageConfigs
func (*Usecase) ListCategories ¶
func (_m *Usecase) ListCategories(imageConfigs map[string]imageproxy.ImageConfig) ([]*entities.Category, error)
ListCategories provides a mock function with given fields: imageConfigs
func (*Usecase) ListManufacturers ¶
func (_m *Usecase) ListManufacturers(imageConfigs map[string]imageproxy.ImageConfig) ([]*entities.Manufacturer, error)
ListManufacturers provides a mock function with given fields: imageConfigs
func (*Usecase) ListProducts ¶
func (_m *Usecase) ListProducts(imageConfigs map[string]imageproxy.ImageConfig) ([]*entities.Product, error)
ListProducts provides a mock function with given fields: imageConfigs
func (*Usecase) UpdateCategory ¶
UpdateCategory provides a mock function with given fields: e
func (*Usecase) UpdateManufacturer ¶
func (_m *Usecase) UpdateManufacturer(e *entities.Manufacturer) (*entities.Manufacturer, error)
UpdateManufacturer provides a mock function with given fields: e
func (*Usecase) UpdateProduct ¶
UpdateProduct provides a mock function with given fields: e
func (*Usecase) UpdateProductImage ¶
func (_m *Usecase) UpdateProductImage(productID entities.ID, imageID entities.ID, order int) ([]*entities.Image, error)
UpdateProductImage provides a mock function with given fields: productID, imageID, order
func (*Usecase) UpsertCategoryImage ¶
func (_m *Usecase) UpsertCategoryImage(categoryID entities.ID, imageName string, imageContent []byte, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Category, error)
UpsertCategoryImage provides a mock function with given fields: categoryID, imageName, imageContent, imageConfigs
func (*Usecase) UpsertManufacturerImage ¶
func (_m *Usecase) UpsertManufacturerImage(manufacturerID entities.ID, imageName string, imageContent []byte, imageConfigs map[string]imageproxy.ImageConfig) (*entities.Manufacturer, error)
UpsertManufacturerImage provides a mock function with given fields: manufacturerID, imageName, imageContent, imageConfigs