Documentation
¶
Index ¶
- type TOTPRepository
- func (r *TOTPRepository) CompareAndSwapBackupCodes(ctx context.Context, userID, expectedBackupCodes, newBackupCodes string) (bool, error)
- func (r *TOTPRepository) Create(ctx context.Context, userID, secret, backupCodes string) (*types.TOTPRecord, error)
- func (r *TOTPRepository) CreateTrustedDevice(ctx context.Context, userID, token, userAgent string, expiresAt time.Time) (*types.TrustedDevice, error)
- func (r *TOTPRepository) DeleteByUserID(ctx context.Context, userID string) error
- func (r *TOTPRepository) DeleteExpiredTrustedDevices(ctx context.Context) error
- func (r *TOTPRepository) DeleteTrustedDevicesByUserID(ctx context.Context, userID string) error
- func (r *TOTPRepository) GetByUserID(ctx context.Context, userID string) (*types.TOTPRecord, error)
- func (r *TOTPRepository) GetTrustedDeviceByToken(ctx context.Context, token string) (*types.TrustedDevice, error)
- func (r *TOTPRepository) IsEnabled(ctx context.Context, userID string) (bool, error)
- func (r *TOTPRepository) RefreshTrustedDevice(ctx context.Context, token string, expiresAt time.Time) error
- func (r *TOTPRepository) SetEnabled(ctx context.Context, userID string, enabled bool) error
- func (r *TOTPRepository) UpdateBackupCodes(ctx context.Context, userID, backupCodes string) error
- func (r *TOTPRepository) WithTx(tx bun.IDB) *TOTPRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TOTPRepository ¶
type TOTPRepository struct {
// contains filtered or unexported fields
}
func NewTOTPRepository ¶
func NewTOTPRepository(db bun.IDB) *TOTPRepository
func (*TOTPRepository) CompareAndSwapBackupCodes ¶
func (*TOTPRepository) Create ¶
func (r *TOTPRepository) Create(ctx context.Context, userID, secret, backupCodes string) (*types.TOTPRecord, error)
func (*TOTPRepository) CreateTrustedDevice ¶
func (r *TOTPRepository) CreateTrustedDevice(ctx context.Context, userID, token, userAgent string, expiresAt time.Time) (*types.TrustedDevice, error)
func (*TOTPRepository) DeleteByUserID ¶
func (r *TOTPRepository) DeleteByUserID(ctx context.Context, userID string) error
func (*TOTPRepository) DeleteExpiredTrustedDevices ¶
func (r *TOTPRepository) DeleteExpiredTrustedDevices(ctx context.Context) error
func (*TOTPRepository) DeleteTrustedDevicesByUserID ¶
func (r *TOTPRepository) DeleteTrustedDevicesByUserID(ctx context.Context, userID string) error
func (*TOTPRepository) GetByUserID ¶
func (r *TOTPRepository) GetByUserID(ctx context.Context, userID string) (*types.TOTPRecord, error)
func (*TOTPRepository) GetTrustedDeviceByToken ¶
func (r *TOTPRepository) GetTrustedDeviceByToken(ctx context.Context, token string) (*types.TrustedDevice, error)
func (*TOTPRepository) RefreshTrustedDevice ¶
func (*TOTPRepository) SetEnabled ¶
func (*TOTPRepository) UpdateBackupCodes ¶
func (r *TOTPRepository) UpdateBackupCodes(ctx context.Context, userID, backupCodes string) error
func (*TOTPRepository) WithTx ¶
func (r *TOTPRepository) WithTx(tx bun.IDB) *TOTPRepository
Click to show internal directories.
Click to hide internal directories.