mocks

package
v0.0.0-...-536d685 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.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 CustomerRepository

type CustomerRepository struct {
	mock.Mock
}

CustomerRepository is an autogenerated mock type for the CustomerRepository type

func NewCustomerRepository

func NewCustomerRepository(t mockConstructorTestingTNewCustomerRepository) *CustomerRepository

NewCustomerRepository creates a new instance of CustomerRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CustomerRepository) Delete

func (_m *CustomerRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*CustomerRepository) FindByID

func (_m *CustomerRepository) FindByID(ctx context.Context, id uuid.UUID) (*domain.Customer, error)

FindByID provides a mock function with given fields: ctx, id

func (*CustomerRepository) FindMany

func (_m *CustomerRepository) FindMany(ctx context.Context, pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Customer, error)

FindMany provides a mock function with given fields: ctx, pagination, filters

func (*CustomerRepository) Store

Store provides a mock function with given fields: ctx, c

func (*CustomerRepository) Update

Update provides a mock function with given fields: ctx, c, id

type CustomerUsecase

type CustomerUsecase struct {
	mock.Mock
}

CustomerUsecase is an autogenerated mock type for the CustomerUsecase type

func NewCustomerUsecase

func NewCustomerUsecase(t mockConstructorTestingTNewCustomerUsecase) *CustomerUsecase

NewCustomerUsecase creates a new instance of CustomerUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CustomerUsecase) Create

func (_m *CustomerUsecase) Create(c *domain.Customer) (*domain.Customer, error)

Create provides a mock function with given fields: c

func (*CustomerUsecase) GetByID

func (_m *CustomerUsecase) GetByID(id uuid.UUID) (*domain.Customer, error)

GetByID provides a mock function with given fields: id

func (*CustomerUsecase) GetMany

func (_m *CustomerUsecase) GetMany(pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Customer, error)

GetMany provides a mock function with given fields: pagination, filters

func (*CustomerUsecase) Modify

func (_m *CustomerUsecase) Modify(c *domain.Customer, id uuid.UUID) (*domain.Customer, error)

Modify provides a mock function with given fields: c, id

func (*CustomerUsecase) Remove

func (_m *CustomerUsecase) Remove(id uuid.UUID) error

Remove provides a mock function with given fields: id

type DiscountRepository

type DiscountRepository struct {
	mock.Mock
}

DiscountRepository is an autogenerated mock type for the DiscountRepository type

func NewDiscountRepository

func NewDiscountRepository(t mockConstructorTestingTNewDiscountRepository) *DiscountRepository

NewDiscountRepository creates a new instance of DiscountRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DiscountRepository) Delete

func (_m *DiscountRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*DiscountRepository) FindByID

func (_m *DiscountRepository) FindByID(ctx context.Context, id uuid.UUID) (*domain.Discount, error)

FindByID provides a mock function with given fields: ctx, id

func (*DiscountRepository) FindByTypeAndQuantity

func (_m *DiscountRepository) FindByTypeAndQuantity(ctx context.Context, dtype domain.LogisticsType, quantity int) (*domain.Discount, error)

FindByTypeAndQuantity provides a mock function with given fields: ctx, dtype, quantity

func (*DiscountRepository) FindMany

func (_m *DiscountRepository) FindMany(ctx context.Context, pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Discount, error)

FindMany provides a mock function with given fields: ctx, pagination, filters

func (*DiscountRepository) Store

Store provides a mock function with given fields: ctx, d

func (*DiscountRepository) Update

Update provides a mock function with given fields: ctx, d, id

type DiscountUsecase

type DiscountUsecase struct {
	mock.Mock
}

DiscountUsecase is an autogenerated mock type for the DiscountUsecase type

func NewDiscountUsecase

func NewDiscountUsecase(t mockConstructorTestingTNewDiscountUsecase) *DiscountUsecase

NewDiscountUsecase creates a new instance of DiscountUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DiscountUsecase) Create

func (_m *DiscountUsecase) Create(d *domain.Discount) (*domain.Discount, error)

Create provides a mock function with given fields: d

func (*DiscountUsecase) GetByTypeAndQuantity

func (_m *DiscountUsecase) GetByTypeAndQuantity(dtype domain.LogisticsType, quantity int) (*domain.Discount, error)

GetByTypeAndQuantity provides a mock function with given fields: dtype, quantity

func (*DiscountUsecase) GetMany

func (_m *DiscountUsecase) GetMany(pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Discount, error)

GetMany provides a mock function with given fields: pagination, filters

func (*DiscountUsecase) Modify

func (_m *DiscountUsecase) Modify(d *domain.Discount, id uuid.UUID) (*domain.Discount, error)

Modify provides a mock function with given fields: d, id

func (*DiscountUsecase) Remove

func (_m *DiscountUsecase) Remove(id uuid.UUID) error

Remove provides a mock function with given fields: id

type LoginUsecase

type LoginUsecase struct {
	mock.Mock
}

LoginUsecase is an autogenerated mock type for the LoginUsecase type

func NewLoginUsecase

func NewLoginUsecase(t mockConstructorTestingTNewLoginUsecase) *LoginUsecase

NewLoginUsecase creates a new instance of LoginUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LoginUsecase) CreateAccessToken

func (_m *LoginUsecase) CreateAccessToken(user *domain.User, secret string, expiry int) (string, error)

CreateAccessToken provides a mock function with given fields: user, secret, expiry

func (*LoginUsecase) CreateRefreshToken

func (_m *LoginUsecase) CreateRefreshToken(user *domain.User, secret string, expiry int) (string, error)

CreateRefreshToken provides a mock function with given fields: user, secret, expiry

func (*LoginUsecase) GetUserByEmail

func (_m *LoginUsecase) GetUserByEmail(c context.Context, email string) (*domain.User, error)

GetUserByEmail provides a mock function with given fields: c, email

type LogisticsRepository

type LogisticsRepository struct {
	mock.Mock
}

LogisticsRepository is an autogenerated mock type for the LogisticsRepository type

func NewLogisticsRepository

func NewLogisticsRepository(t mockConstructorTestingTNewLogisticsRepository) *LogisticsRepository

NewLogisticsRepository creates a new instance of LogisticsRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LogisticsRepository) Delete

func (_m *LogisticsRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*LogisticsRepository) FindByID

func (_m *LogisticsRepository) FindByID(ctx context.Context, id uuid.UUID) (*domain.Logistics, error)

FindByID provides a mock function with given fields: ctx, id

func (*LogisticsRepository) FindMany

func (_m *LogisticsRepository) FindMany(ctx context.Context, pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Logistics, error)

FindMany provides a mock function with given fields: ctx, pagination, filters

func (*LogisticsRepository) Store

Store provides a mock function with given fields: ctx, ll

func (*LogisticsRepository) Update

Update provides a mock function with given fields: ctx, ll, id

type LogisticsUsecase

type LogisticsUsecase struct {
	mock.Mock
}

LogisticsUsecase is an autogenerated mock type for the LogisticsUsecase type

func NewLogisticsUsecase

func NewLogisticsUsecase(t mockConstructorTestingTNewLogisticsUsecase) *LogisticsUsecase

NewLogisticsUsecase creates a new instance of LogisticsUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*LogisticsUsecase) Create

func (_m *LogisticsUsecase) Create(ll *domain.Logistics) (*domain.Logistics, error)

Create provides a mock function with given fields: ll

func (*LogisticsUsecase) GetByID

func (_m *LogisticsUsecase) GetByID(id uuid.UUID) (*domain.Logistics, error)

GetByID provides a mock function with given fields: id

func (*LogisticsUsecase) GetMany

func (_m *LogisticsUsecase) GetMany(pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Logistics, error)

GetMany provides a mock function with given fields: pagination, filters

func (*LogisticsUsecase) Modify

func (_m *LogisticsUsecase) Modify(ll *domain.Logistics, id uuid.UUID) (*domain.Logistics, error)

Modify provides a mock function with given fields: ll, id

func (*LogisticsUsecase) Remove

func (_m *LogisticsUsecase) Remove(id uuid.UUID) error

Remove provides a mock function with given fields: id

type ProductRepository

type ProductRepository struct {
	mock.Mock
}

ProductRepository is an autogenerated mock type for the ProductRepository type

func NewProductRepository

func NewProductRepository(t mockConstructorTestingTNewProductRepository) *ProductRepository

NewProductRepository creates a new instance of ProductRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ProductRepository) Delete

func (_m *ProductRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*ProductRepository) FindByID

func (_m *ProductRepository) FindByID(ctx context.Context, id uuid.UUID) (*domain.Product, error)

FindByID provides a mock function with given fields: ctx, id

func (*ProductRepository) FindMany

func (_m *ProductRepository) FindMany(ctx context.Context, pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Product, error)

FindMany provides a mock function with given fields: ctx, pagination, filters

func (*ProductRepository) Store

Store provides a mock function with given fields: ctx, p

func (*ProductRepository) Update

Update provides a mock function with given fields: ctx, p, id

type ProductUsecase

type ProductUsecase struct {
	mock.Mock
}

ProductUsecase is an autogenerated mock type for the ProductUsecase type

func NewProductUsecase

func NewProductUsecase(t mockConstructorTestingTNewProductUsecase) *ProductUsecase

NewProductUsecase creates a new instance of ProductUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ProductUsecase) Create

func (_m *ProductUsecase) Create(p *domain.Product) (*domain.Product, error)

Create provides a mock function with given fields: p

func (*ProductUsecase) GetByID

func (_m *ProductUsecase) GetByID(id uuid.UUID) (*domain.Product, error)

GetByID provides a mock function with given fields: id

func (*ProductUsecase) GetMany

func (_m *ProductUsecase) GetMany(pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.Product, error)

GetMany provides a mock function with given fields: pagination, filters

func (*ProductUsecase) Modify

func (_m *ProductUsecase) Modify(p *domain.Product, id uuid.UUID) (*domain.Product, error)

Modify provides a mock function with given fields: p, id

func (*ProductUsecase) Remove

func (_m *ProductUsecase) Remove(id uuid.UUID) error

Remove provides a mock function with given fields: id

type RefreshTokenUsecase

type RefreshTokenUsecase struct {
	mock.Mock
}

RefreshTokenUsecase is an autogenerated mock type for the RefreshTokenUsecase type

func NewRefreshTokenUsecase

func NewRefreshTokenUsecase(t mockConstructorTestingTNewRefreshTokenUsecase) *RefreshTokenUsecase

NewRefreshTokenUsecase creates a new instance of RefreshTokenUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RefreshTokenUsecase) CreateAccessToken

func (_m *RefreshTokenUsecase) CreateAccessToken(user *domain.User, secret string, expiry int) (string, error)

CreateAccessToken provides a mock function with given fields: user, secret, expiry

func (*RefreshTokenUsecase) CreateRefreshToken

func (_m *RefreshTokenUsecase) CreateRefreshToken(user *domain.User, secret string, expiry int) (string, error)

CreateRefreshToken provides a mock function with given fields: user, secret, expiry

func (*RefreshTokenUsecase) ExtractIDFromToken

func (_m *RefreshTokenUsecase) ExtractIDFromToken(requestToken string, secret string) (string, error)

ExtractIDFromToken provides a mock function with given fields: requestToken, secret

func (*RefreshTokenUsecase) GetUserByEmail

func (_m *RefreshTokenUsecase) GetUserByEmail(c context.Context, id string) (*domain.User, error)

GetUserByEmail provides a mock function with given fields: c, id

type SignupUsecase

type SignupUsecase struct {
	mock.Mock
}

SignupUsecase is an autogenerated mock type for the SignupUsecase type

func NewSignupUsecase

func NewSignupUsecase(t mockConstructorTestingTNewSignupUsecase) *SignupUsecase

NewSignupUsecase creates a new instance of SignupUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SignupUsecase) Create

func (_m *SignupUsecase) Create(c context.Context, user *domain.User) (*domain.User, error)

Create provides a mock function with given fields: c, user

func (*SignupUsecase) CreateAccessToken

func (_m *SignupUsecase) CreateAccessToken(user *domain.User, secret string, expiry int) (string, error)

CreateAccessToken provides a mock function with given fields: user, secret, expiry

func (*SignupUsecase) CreateRefreshToken

func (_m *SignupUsecase) CreateRefreshToken(user *domain.User, secret string, expiry int) (string, error)

CreateRefreshToken provides a mock function with given fields: user, secret, expiry

func (*SignupUsecase) GetUserByEmail

func (_m *SignupUsecase) GetUserByEmail(c context.Context, email string) (*domain.User, error)

GetUserByEmail provides a mock function with given fields: c, email

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func NewUserRepository

func NewUserRepository(t mockConstructorTestingTNewUserRepository) *UserRepository

NewUserRepository creates a new instance of UserRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserRepository) Create

func (_m *UserRepository) Create(ctx context.Context, user *domain.User) (*domain.User, error)

Create provides a mock function with given fields: ctx, user

func (*UserRepository) Delete

func (_m *UserRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*UserRepository) FindByEmail

func (_m *UserRepository) FindByEmail(ctx context.Context, email string) (*domain.User, error)

FindByEmail provides a mock function with given fields: ctx, email

func (*UserRepository) FindByID

func (_m *UserRepository) FindByID(ctx context.Context, id uuid.UUID) (*domain.User, error)

FindByID provides a mock function with given fields: ctx, id

func (*UserRepository) Update

func (_m *UserRepository) Update(ctx context.Context, user *domain.User) (*domain.User, error)

Update provides a mock function with given fields: ctx, user

type UserUseCase

type UserUseCase struct {
	mock.Mock
}

UserUseCase is an autogenerated mock type for the UserUseCase type

func NewUserUseCase

func NewUserUseCase(t mockConstructorTestingTNewUserUseCase) *UserUseCase

NewUserUseCase creates a new instance of UserUseCase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserUseCase) Create

func (_m *UserUseCase) Create(ctx context.Context, user *domain.User) error

Create provides a mock function with given fields: ctx, user

func (*UserUseCase) Delete

func (_m *UserUseCase) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*UserUseCase) GetByEmail

func (_m *UserUseCase) GetByEmail(ctx context.Context, email string) (*domain.User, error)

GetByEmail provides a mock function with given fields: ctx, email

func (*UserUseCase) GetByID

func (_m *UserUseCase) GetByID(ctx context.Context, id uuid.UUID) (*domain.User, error)

GetByID provides a mock function with given fields: ctx, id

func (*UserUseCase) Update

func (_m *UserUseCase) Update(ctx context.Context, user *domain.User) error

Update provides a mock function with given fields: ctx, user

type WarehousePortRepository

type WarehousePortRepository struct {
	mock.Mock
}

WarehousePortRepository is an autogenerated mock type for the WarehousePortRepository type

func NewWarehousePortRepository

func NewWarehousePortRepository(t mockConstructorTestingTNewWarehousePortRepository) *WarehousePortRepository

NewWarehousePortRepository creates a new instance of WarehousePortRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*WarehousePortRepository) Delete

func (_m *WarehousePortRepository) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*WarehousePortRepository) FindByID

FindByID provides a mock function with given fields: ctx, id

func (*WarehousePortRepository) FindMany

func (_m *WarehousePortRepository) FindMany(ctx context.Context, pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.WarehousesAndPorts, error)

FindMany provides a mock function with given fields: ctx, pagination, filters

func (*WarehousePortRepository) Store

Store provides a mock function with given fields: ctx, wp

func (*WarehousePortRepository) Update

Update provides a mock function with given fields: ctx, wp, id

type WarehousePortUsecase

type WarehousePortUsecase struct {
	mock.Mock
}

WarehousePortUsecase is an autogenerated mock type for the WarehousePortUsecase type

func NewWarehousePortUsecase

func NewWarehousePortUsecase(t mockConstructorTestingTNewWarehousePortUsecase) *WarehousePortUsecase

NewWarehousePortUsecase creates a new instance of WarehousePortUsecase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*WarehousePortUsecase) Create

Create provides a mock function with given fields: wp

func (*WarehousePortUsecase) GetByID

GetByID provides a mock function with given fields: id

func (*WarehousePortUsecase) GetMany

func (_m *WarehousePortUsecase) GetMany(pagination *domain.Pagination, filters map[string]interface{}) ([]*domain.WarehousesAndPorts, error)

GetMany provides a mock function with given fields: pagination, filters

func (*WarehousePortUsecase) Modify

Modify provides a mock function with given fields: wp, id

func (*WarehousePortUsecase) Remove

func (_m *WarehousePortUsecase) Remove(id uuid.UUID) error

Remove provides a mock function with given fields: id

Jump to

Keyboard shortcuts

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