Documentation
¶
Index ¶
- type MockRepo
- func (m *MockRepo) Create(ctx context.Context, tf *twofactor.TwoFactor) error
- func (m *MockRepo) CreateAccount(ctx context.Context, account *entity.Account) error
- func (m *MockRepo) CreateSession(ctx context.Context, sessionCtx *dto.CreateSessionParams) (*entity.Session, error)
- func (m *MockRepo) CreateUser(ctx context.Context, params *dto.CreateUserParams) (*entity.User, error)
- func (m *MockRepo) CreateVerificationToken(ctx context.Context, token *entity.VerificationToken) error
- func (m *MockRepo) DeleteByUserID(ctx context.Context, userID string) error
- func (m *MockRepo) DeleteOTPChallenge(ctx context.Context, key string) error
- func (m *MockRepo) DeleteSession(ctx context.Context, token string) error
- func (m *MockRepo) DeleteVerificationToken(ctx context.Context, token string) error
- func (m *MockRepo) FindByUserID(ctx context.Context, userID string) (*twofactor.TwoFactor, error)
- func (m *MockRepo) GetAccountByUserIDAndProvider(ctx context.Context, userID, provider string) (*entity.Account, error)
- func (m *MockRepo) GetOTPChallenge(ctx context.Context, key string) (*twofactor.OTPChallenge, error)
- func (m *MockRepo) GetSessionByToken(ctx context.Context, token string) (*entity.Session, error)
- func (m *MockRepo) GetTOTPSecret(ctx context.Context, userID string) (string, error)
- func (m *MockRepo) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (m *MockRepo) GetUserByID(ctx context.Context, id string) (*entity.User, error)
- func (m *MockRepo) GetVerificationToken(ctx context.Context, token string) (*entity.VerificationToken, error)
- func (m *MockRepo) SaveOTPChallenge(ctx context.Context, challenge *twofactor.OTPChallenge) error
- func (m *MockRepo) SaveTOTPSecret(ctx context.Context, userID string, secret string) error
- func (m *MockRepo) Update(ctx context.Context, tf *twofactor.TwoFactor) error
- func (m *MockRepo) UpdateAccountPassword(ctx context.Context, accountID, hashedPassword string) error
- func (m *MockRepo) UpdateUser(ctx context.Context, u *entity.User) error
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) CreateAccount ¶
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 (*MockRepo) DeleteOTPChallenge ¶
func (*MockRepo) DeleteSession ¶
func (*MockRepo) DeleteVerificationToken ¶
func (*MockRepo) FindByUserID ¶
func (*MockRepo) GetAccountByUserIDAndProvider ¶
func (*MockRepo) GetOTPChallenge ¶
func (*MockRepo) GetSessionByToken ¶
func (*MockRepo) GetTOTPSecret ¶
func (*MockRepo) GetUserByEmail ¶
func (*MockRepo) GetUserByID ¶
func (*MockRepo) GetVerificationToken ¶
func (*MockRepo) SaveOTPChallenge ¶
func (*MockRepo) SaveTOTPSecret ¶
2FA TOTP Methods
func (*MockRepo) UpdateAccountPassword ¶
Click to show internal directories.
Click to hide internal directories.