mocks

package
v0.0.0-...-fa0bdc9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAuthRepository

type MockAuthRepository struct {
	mock.Mock
}

func (*MockAuthRepository) GetByLogin

func (mar *MockAuthRepository) GetByLogin(ctx context.Context, login string) (*domain.Auth, error)

func (*MockAuthRepository) StoreWithUser

func (mar *MockAuthRepository) StoreWithUser(ctx context.Context, a *domain.Auth, u *domain.User) error

func (*MockAuthRepository) Update

func (mar *MockAuthRepository) Update(ctx context.Context, a *domain.Auth) error

type MockAuthService

type MockAuthService struct {
	mock.Mock
}

func (*MockAuthService) EncodePass

func (mas *MockAuthService) EncodePass(ctx context.Context, pass string) string

func (*MockAuthService) PassIsEqualHashedPass

func (mas *MockAuthService) PassIsEqualHashedPass(ctx context.Context, pass string, hashedPass string) bool

type MockAuthUsecase

type MockAuthUsecase struct {
	mock.Mock
}

func (*MockAuthUsecase) ForgotPassCode

func (m *MockAuthUsecase) ForgotPassCode(ctx context.Context, login string) error

func (*MockAuthUsecase) ForgotPassReset

func (m *MockAuthUsecase) ForgotPassReset(ctx context.Context, code *domain.Code, newPass string) (domain.Token, error)

func (*MockAuthUsecase) Login

func (m *MockAuthUsecase) Login(ctx context.Context, a *domain.Auth) (domain.Token, error)

func (*MockAuthUsecase) SignUp

func (m *MockAuthUsecase) SignUp(ctx context.Context, a *domain.Auth, u *domain.User) (domain.Token, error)

type MockAuthValidator

type MockAuthValidator struct {
	mock.Mock
}

func (*MockAuthValidator) Validate

func (*MockAuthValidator) ValidateLogin

func (mav *MockAuthValidator) ValidateLogin(ctx context.Context, login string) (domain.IsValid, domain.Message)

type MockCodeRepository

type MockCodeRepository struct {
	mock.Mock
}

func (*MockCodeRepository) DeleteByValue

func (mcr *MockCodeRepository) DeleteByValue(ctx context.Context, value string) error

func (*MockCodeRepository) GetByValue

func (mcr *MockCodeRepository) GetByValue(ctx context.Context, value string) (*domain.Code, error)

func (*MockCodeRepository) Store

func (mcr *MockCodeRepository) Store(ctx context.Context, code *domain.Code) error

type MockCodeService

type MockCodeService struct {
	mock.Mock
}

func (*MockCodeService) GenerateNewCode

func (mcs *MockCodeService) GenerateNewCode(ctx context.Context, identifier string, length int8, number bool, symbol bool) (*domain.Code, error)

func (*MockCodeService) GenerateNewCodeFake

func (mcs *MockCodeService) GenerateNewCodeFake(ctx context.Context)

func (*MockCodeService) ValidateCode

func (mcs *MockCodeService) ValidateCode(ctx context.Context, c *domain.Code) (domain.IsValid, error)

type MockMessageService

type MockMessageService struct {
	mock.Mock
}

func (*MockMessageService) SendMessage

func (mms *MockMessageService) SendMessage(ctx context.Context, mc *domain.MessageConfig) error

func (*MockMessageService) SendMessageFake

func (mms *MockMessageService) SendMessageFake(ctx context.Context)

type MockProductRepository

type MockProductRepository struct {
	mock.Mock
}

func (*MockProductRepository) GetByUUID

func (mpr *MockProductRepository) GetByUUID(ctx context.Context, uuid string) (*domain.Product, error)

type MockProductUsecase

type MockProductUsecase struct {
	mock.Mock
}

func (*MockProductUsecase) Get

func (mpu *MockProductUsecase) Get(ctx context.Context, uuid string) (*domain.Product, error)

type MockTokenService

type MockTokenService struct {
	mock.Mock
}

func (*MockTokenService) IsValid

func (mts *MockTokenService) IsValid(ctx context.Context, token domain.Token) (domain.IsValid, error)

func (*MockTokenService) Sign

func (mts *MockTokenService) Sign(ctx context.Context, info domain.TokenInfo, expirationInMinutes int64) (domain.Token, error)

type MockUserRepository

type MockUserRepository struct {
	mock.Mock
}

func (*MockUserRepository) GetByEmail

func (mur *MockUserRepository) GetByEmail(ctx context.Context, email string) (*domain.User, error)

type MockUserValidator

type MockUserValidator struct {
	mock.Mock
}

func (*MockUserValidator) Validate

Jump to

Keyboard shortcuts

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