mocks

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseRepository

type DatabaseRepository struct {
	mock.Mock
}

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

func (_m *DatabaseRepository) CreateCategory(e *entities.Category) (*entities.Category, error)

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

func (_m *DatabaseRepository) CreateProduct(e *entities.Product) (*entities.Product, error)

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

func (_m *DatabaseRepository) GetCategory(id entities.ID) (*entities.Category, error)

GetCategory provides a mock function with given fields: id

func (*DatabaseRepository) GetImage

func (_m *DatabaseRepository) GetImage(id entities.ID) (*entities.Image, error)

GetImage 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

func (_m *DatabaseRepository) GetProduct(id entities.ID) (*entities.Product, error)

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

func (_m *DatabaseRepository) UpdateCategory(e *entities.Category) (*entities.Category, error)

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

func (_m *DatabaseRepository) UpdateProduct(e *entities.Product) (*entities.Product, error)

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

type StorageRepository struct {
	mock.Mock
}

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

func (*StorageRepository) SaveFile

func (_m *StorageRepository) SaveFile(filename string, content []byte) error

SaveFile provides a mock function with given fields: filename, content

type Usecase

type Usecase struct {
	mock.Mock
}

Usecase is an autogenerated mock type for the Usecase type

func NewUsecase added in v0.5.0

func NewUsecase(t testing.TB) *Usecase

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

func (_m *Usecase) CreateCategory(_a0 *entities.Category) (*entities.Category, error)

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

func (_m *Usecase) CreateProduct(_a0 *entities.Product) (*entities.Product, error)

CreateProduct provides a mock function with given fields: _a0

func (*Usecase) DeleteCategory

func (_m *Usecase) DeleteCategory(id entities.ID) error

DeleteCategory provides a mock function with given fields: id

func (*Usecase) DeleteCategoryImage

func (_m *Usecase) DeleteCategoryImage(categoryID entities.ID) error

DeleteCategoryImage provides a mock function with given fields: categoryID

func (*Usecase) DeleteManufacturer

func (_m *Usecase) DeleteManufacturer(id entities.ID) error

DeleteManufacturer provides a mock function with given fields: id

func (*Usecase) DeleteManufacturerImage

func (_m *Usecase) DeleteManufacturerImage(manufacturerID entities.ID) error

DeleteManufacturerImage provides a mock function with given fields: manufacturerID

func (*Usecase) DeleteProduct

func (_m *Usecase) DeleteProduct(id entities.ID) error

DeleteProduct provides a mock function with given fields: id

func (*Usecase) DeleteProductImage

func (_m *Usecase) DeleteProductImage(productID entities.ID, imageID entities.ID) error

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

func (_m *Usecase) UpdateCategory(e *entities.Category) (*entities.Category, error)

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

func (_m *Usecase) UpdateProduct(e *entities.Product) (*entities.Product, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL