mocks

package
v0.0.0-...-a70ed68 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 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 ConsumptionRepository

type ConsumptionRepository struct {
	mock.Mock
}

ConsumptionRepository is an autogenerated mock type for the ConsumptionRepository type

func NewConsumptionRepository

func NewConsumptionRepository(t mockConstructorTestingTNewConsumptionRepository) *ConsumptionRepository

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

func (*ConsumptionRepository) FindByID

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

func (*ConsumptionRepository) FindByPeriod

func (_m *ConsumptionRepository) FindByPeriod(c context.Context, period_type string, start string, end string, meterIDs []int, pagination *domain.Pagination) (*domain.Response, error)

FindByPeriod provides a mock function with given fields: c, period_type, start, end, meterIDs, pagination

func (*ConsumptionRepository) Save

func (_m *ConsumptionRepository) Save(ctx context.Context, consumption *domain.Consumption) error

Save provides a mock function with given fields: ctx, consumption

type ConsumptionUsecase

type ConsumptionUsecase struct {
	mock.Mock
}

ConsumptionUsecase is an autogenerated mock type for the ConsumptionUsecase type

func NewConsumptionUsecase

func NewConsumptionUsecase(t mockConstructorTestingTNewConsumptionUsecase) *ConsumptionUsecase

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

func (*ConsumptionUsecase) GetConsumptionByID

func (_m *ConsumptionUsecase) GetConsumptionByID(id uuid.UUID) (*domain.Consumption, error)

GetConsumptionByID provides a mock function with given fields: id

func (*ConsumptionUsecase) GetConsumptionsByPeriod

func (_m *ConsumptionUsecase) GetConsumptionsByPeriod(period_type string, start string, end string, meterIDs []int, pagination *domain.Pagination) (*domain.Response, error)

GetConsumptionsByPeriod provides a mock function with given fields: period_type, start, end, meterIDs, pagination

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 MeterRepository

type MeterRepository struct {
	mock.Mock
}

MeterRepository is an autogenerated mock type for the MeterRepository type

func NewMeterRepository

func NewMeterRepository(t mockConstructorTestingTNewMeterRepository) *MeterRepository

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

func (*MeterRepository) FindByID

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

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

func (*MeterRepository) FindMany

func (_m *MeterRepository) FindMany(ctx context.Context, pagination *domain.Pagination) ([]*domain.Meter, error)

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

type MeterUsecase

type MeterUsecase struct {
	mock.Mock
}

MeterUsecase is an autogenerated mock type for the MeterUsecase type

func NewMeterUsecase

func NewMeterUsecase(t mockConstructorTestingTNewMeterUsecase) *MeterUsecase

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

func (*MeterUsecase) GetManyMeters

func (_m *MeterUsecase) GetManyMeters(pagination *domain.Pagination) ([]*domain.Meter, error)

GetManyMeters provides a mock function with given fields: pagination

func (*MeterUsecase) GetMeterById

func (_m *MeterUsecase) GetMeterById(id uuid.UUID) (*domain.Meter, error)

GetMeterById 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) 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

Jump to

Keyboard shortcuts

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