Documentation
¶
Index ¶
- type MockRepo
- func (m *MockRepo) ConsumePasskeyChallenge(ctx context.Context, token string) (*passkey.PasskeyChallenge, error)
- 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) CreatePasskey(ctx context.Context, pk *entity.Passkey) 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) DeleteChallenge(ctx context.Context, token string) error
- func (m *MockRepo) DeleteOTPChallenge(ctx context.Context, key string) error
- func (m *MockRepo) DeletePasskey(ctx context.Context, id string) error
- func (m *MockRepo) DeletePasskeyChallenge(ctx context.Context, token string) error
- func (m *MockRepo) DeletePasskeysByUserID(ctx context.Context, userID string) error
- func (m *MockRepo) DeleteSession(ctx context.Context, token string) error
- func (m *MockRepo) DeleteSessionsByUserID(ctx context.Context, userID string) error
- func (m *MockRepo) DeleteTrustDevice(ctx context.Context, userID, deviceID string) error
- func (m *MockRepo) DeleteTrustDevicesByUserID(ctx context.Context, userID string) error
- func (m *MockRepo) DeleteUser(ctx context.Context, id 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) FindTrustDevice(ctx context.Context, userID, deviceID string) (*twofactor.TrustDeviceRecord, error)
- func (m *MockRepo) GetAccountByUserIDAndProvider(ctx context.Context, userID, provider string) (*entity.Account, error)
- func (m *MockRepo) GetChallenge(ctx context.Context, token string) (*twofactor.ChallengeRecord, error)
- func (m *MockRepo) GetOTPChallenge(ctx context.Context, key string) (*twofactor.OTPChallenge, error)
- func (m *MockRepo) GetPasskeyByCredentialID(ctx context.Context, credentialID string) (*entity.Passkey, error)
- func (m *MockRepo) GetPasskeyByID(ctx context.Context, id string) (*entity.Passkey, error)
- func (m *MockRepo) GetPasskeyChallenge(ctx context.Context, token string) (*passkey.PasskeyChallenge, 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) LinkCredentialAccount(ctx context.Context, userID, passwordHash string) error
- func (m *MockRepo) ListPasskeysByUserID(ctx context.Context, userID string) ([]*entity.Passkey, error)
- func (m *MockRepo) ListSessionsByUserID(ctx context.Context, userID string) ([]*entity.Session, error)
- func (m *MockRepo) ListUsers(ctx context.Context, filter admin.ListUsersFilter) ([]*entity.User, int64, error)
- func (m *MockRepo) SaveChallenge(ctx context.Context, challenge *twofactor.ChallengeRecord) error
- func (m *MockRepo) SaveOTPChallenge(ctx context.Context, challenge *twofactor.OTPChallenge) error
- func (m *MockRepo) SavePasskeyChallenge(ctx context.Context, challenge *passkey.PasskeyChallenge) error
- func (m *MockRepo) SaveTOTPSecret(ctx context.Context, userID string, secret string) error
- func (m *MockRepo) SaveTrustDevice(ctx context.Context, record *twofactor.TrustDeviceRecord) 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) UpdatePasskey(ctx context.Context, pk *entity.Passkey) error
- func (m *MockRepo) UpdatePasskeyCounter(ctx context.Context, id string, newCounter uint32) 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) ConsumePasskeyChallenge ¶ added in v0.9.0
func (*MockRepo) CreateAccount ¶
Account Methods
func (*MockRepo) CreatePasskey ¶ added in v0.9.0
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) DeleteChallenge ¶ added in v0.7.0
func (*MockRepo) DeleteOTPChallenge ¶
func (*MockRepo) DeletePasskey ¶ added in v0.9.0
func (*MockRepo) DeletePasskeyChallenge ¶ added in v0.9.0
func (*MockRepo) DeletePasskeysByUserID ¶ added in v0.9.0
func (*MockRepo) DeleteSession ¶
func (*MockRepo) DeleteSessionsByUserID ¶ added in v0.8.0
func (*MockRepo) DeleteTrustDevice ¶ added in v0.7.0
func (*MockRepo) DeleteTrustDevicesByUserID ¶ added in v0.7.0
func (*MockRepo) DeleteUser ¶ added in v0.8.0
func (*MockRepo) DeleteVerificationToken ¶
func (*MockRepo) FindByUserID ¶
func (*MockRepo) FindTrustDevice ¶ added in v0.7.0
func (*MockRepo) GetAccountByUserIDAndProvider ¶
func (*MockRepo) GetChallenge ¶ added in v0.7.0
func (*MockRepo) GetOTPChallenge ¶
func (*MockRepo) GetPasskeyByCredentialID ¶ added in v0.9.0
func (*MockRepo) GetPasskeyByID ¶ added in v0.9.0
func (*MockRepo) GetPasskeyChallenge ¶ added in v0.9.0
func (*MockRepo) GetSessionByToken ¶
func (*MockRepo) GetTOTPSecret ¶
func (*MockRepo) GetUserByEmail ¶
func (*MockRepo) GetUserByID ¶
func (*MockRepo) GetVerificationToken ¶
func (*MockRepo) LinkCredentialAccount ¶ added in v0.8.0
func (*MockRepo) ListPasskeysByUserID ¶ added in v0.9.0
func (*MockRepo) ListSessionsByUserID ¶ added in v0.8.0
func (*MockRepo) SaveChallenge ¶ added in v0.7.0
Challenge Methods
func (*MockRepo) SaveOTPChallenge ¶
func (*MockRepo) SavePasskeyChallenge ¶ added in v0.9.0
func (*MockRepo) SaveTOTPSecret ¶
2FA TOTP Methods
func (*MockRepo) SaveTrustDevice ¶ added in v0.7.0
Trusted Devices Methods
func (*MockRepo) UpdateAccountPassword ¶
func (*MockRepo) UpdatePasskey ¶ added in v0.9.0
func (*MockRepo) UpdatePasskeyCounter ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.