mocks

package
v1.0.0-with-auth Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BcryptPassword

type BcryptPassword struct {
	mock.Mock
}

func (*BcryptPassword) Hash

func (m *BcryptPassword) Hash(password string) (*string, error)

func (*BcryptPassword) Verify

func (m *BcryptPassword) Verify(password string, hashedPassword string) error

type CounterUseCase

type CounterUseCase struct {
	mock.Mock
}

func (*CounterUseCase) Execute

func (m *CounterUseCase) Execute(limit int) (int, error)

type JWTAuth

type JWTAuth struct {
	mock.Mock
}

func (*JWTAuth) IssueAccessToken

func (m *JWTAuth) IssueAccessToken(id string) (*jwt.Token, error)

func (*JWTAuth) IssueRefreshToken

func (m *JWTAuth) IssueRefreshToken(id string) (*jwt.Token, error)

func (*JWTAuth) VerifyAccessToken

func (m *JWTAuth) VerifyAccessToken(token string) (*jwt.Token, error)

func (*JWTAuth) VerifyRefreshToken

func (m *JWTAuth) VerifyRefreshToken(token string) (*jwt.Token, error)

type Logger

type Logger struct {
	mock.Mock
}

func (*Logger) Debug

func (m *Logger) Debug(msg string, tags map[string]interface{})

func (*Logger) Error

func (m *Logger) Error(msg string, err error, tags map[string]interface{})

func (*Logger) Info

func (m *Logger) Info(msg string, tags map[string]interface{})

func (*Logger) Instance

func (m *Logger) Instance() zerolog.Logger

func (*Logger) SetGlobalValue

func (m *Logger) SetGlobalValue(key string, value any)

func (*Logger) Trace

func (m *Logger) Trace(msg string, tags map[string]interface{})

func (*Logger) Warn

func (m *Logger) Warn(msg string, tags map[string]interface{})

type SignInGateway

type SignInGateway struct {
	mock.Mock
}

func (*SignInGateway) GetUser

func (m *SignInGateway) GetUser(ctx context.Context, email string) (*domain.User, error)

type SignInUseCase

type SignInUseCase struct {
	mock.Mock
}

func (*SignInUseCase) Execute

func (m *SignInUseCase) Execute(ctx context.Context, user domain.User) (accessToken, refreshToken *string, err error)

type SignUpGateway

type SignUpGateway struct {
	mock.Mock
}

func (*SignUpGateway) SaveUser

func (m *SignUpGateway) SaveUser(ctx context.Context, user domain.User) error

func (*SignUpGateway) UserExists

func (m *SignUpGateway) UserExists(ctx context.Context, email string) (*bool, error)

type SignUpUseCase

type SignUpUseCase struct {
	mock.Mock
}

func (*SignUpUseCase) Execute

func (m *SignUpUseCase) Execute(ctx context.Context, user domain.User) error

type UserRepositoryMock

type UserRepositoryMock struct {
	mock.Mock
}

func (*UserRepositoryMock) Exists

func (m *UserRepositoryMock) Exists(ctx context.Context, email string) (*bool, error)

func (*UserRepositoryMock) Get

func (m *UserRepositoryMock) Get(ctx context.Context, email string) (*models.User, error)

func (*UserRepositoryMock) Save

func (m *UserRepositoryMock) Save(ctx context.Context, user models.User) error

Jump to

Keyboard shortcuts

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