mock

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepo

type MockRepo struct {
	// contains filtered or unexported fields
}

func NewMockRepo

func NewMockRepo() *MockRepo

func (*MockRepo) Create

func (m *MockRepo) Create(ctx context.Context, tf *twofactor.TwoFactor) error

func (*MockRepo) CreateAccount

func (m *MockRepo) CreateAccount(ctx context.Context, account *entity.Account) error

Account Methods

func (*MockRepo) CreateSession

func (m *MockRepo) CreateSession(ctx context.Context, sessionCtx *dto.CreateSessionParams) (*entity.Session, error)

Session Methods

func (*MockRepo) CreateUser

func (m *MockRepo) CreateUser(ctx context.Context, params *dto.CreateUserParams) (*entity.User, error)

User Methods

func (*MockRepo) CreateVerificationToken

func (m *MockRepo) CreateVerificationToken(ctx context.Context, token *entity.VerificationToken) error

Verification Token Methods

func (*MockRepo) DeleteByUserID

func (m *MockRepo) DeleteByUserID(ctx context.Context, userID string) error

func (*MockRepo) DeleteOTPChallenge

func (m *MockRepo) DeleteOTPChallenge(ctx context.Context, key string) error

func (*MockRepo) DeleteSession

func (m *MockRepo) DeleteSession(ctx context.Context, token string) error

func (*MockRepo) DeleteVerificationToken

func (m *MockRepo) DeleteVerificationToken(ctx context.Context, token string) error

func (*MockRepo) FindByUserID

func (m *MockRepo) FindByUserID(ctx context.Context, userID string) (*twofactor.TwoFactor, error)

func (*MockRepo) GetAccountByUserIDAndProvider

func (m *MockRepo) GetAccountByUserIDAndProvider(ctx context.Context, userID, provider string) (*entity.Account, error)

func (*MockRepo) GetOTPChallenge

func (m *MockRepo) GetOTPChallenge(ctx context.Context, key string) (*twofactor.OTPChallenge, error)

func (*MockRepo) GetSessionByToken

func (m *MockRepo) GetSessionByToken(ctx context.Context, token string) (*entity.Session, error)

func (*MockRepo) GetTOTPSecret

func (m *MockRepo) GetTOTPSecret(ctx context.Context, userID string) (string, error)

func (*MockRepo) GetUserByEmail

func (m *MockRepo) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)

func (*MockRepo) GetUserByID

func (m *MockRepo) GetUserByID(ctx context.Context, id string) (*entity.User, error)

func (*MockRepo) GetVerificationToken

func (m *MockRepo) GetVerificationToken(ctx context.Context, token string) (*entity.VerificationToken, error)

func (*MockRepo) SaveOTPChallenge

func (m *MockRepo) SaveOTPChallenge(ctx context.Context, challenge *twofactor.OTPChallenge) error

func (*MockRepo) SaveTOTPSecret

func (m *MockRepo) SaveTOTPSecret(ctx context.Context, userID string, secret string) error

2FA TOTP Methods

func (*MockRepo) Update

func (m *MockRepo) Update(ctx context.Context, tf *twofactor.TwoFactor) error

func (*MockRepo) UpdateAccountPassword

func (m *MockRepo) UpdateAccountPassword(ctx context.Context, accountID, hashedPassword string) error

func (*MockRepo) UpdateUser

func (m *MockRepo) UpdateUser(ctx context.Context, u *entity.User) error

Jump to

Keyboard shortcuts

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