Documentation
¶
Overview ¶
Package memory provides an in-memory repository implementation suitable for development and testing.
Index ¶
- type Store
- func (s *Store) Create(ctx context.Context, tf *twofactor.TwoFactor) error
- func (s *Store) CreateAccount(ctx context.Context, account *entity.Account) error
- func (s *Store) CreateSession(ctx context.Context, session *dto.CreateSessionParams) (*entity.Session, error)
- func (s *Store) CreateUser(ctx context.Context, params *dto.CreateUserParams) (*entity.User, error)
- func (s *Store) CreateVerificationToken(ctx context.Context, token *entity.VerificationToken) error
- func (s *Store) DeleteByUserID(ctx context.Context, userID string) error
- func (s *Store) DeleteOTPChallenge(ctx context.Context, key string) error
- func (s *Store) DeleteSession(ctx context.Context, token string) error
- func (s *Store) DeleteVerificationToken(ctx context.Context, token string) error
- func (s *Store) FindByUserID(ctx context.Context, userID string) (*twofactor.TwoFactor, error)
- func (s *Store) GetAccountByUserIDAndProvider(ctx context.Context, userID, provider string) (*entity.Account, error)
- func (s *Store) GetOTPChallenge(ctx context.Context, key string) (*twofactor.OTPChallenge, error)
- func (s *Store) GetSessionByToken(ctx context.Context, token string) (*entity.Session, error)
- func (s *Store) GetTOTPSecret(ctx context.Context, userID string) (string, error)
- func (s *Store) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (s *Store) GetUserByID(ctx context.Context, id string) (*entity.User, error)
- func (s *Store) GetVerificationToken(ctx context.Context, token string) (*entity.VerificationToken, error)
- func (s *Store) SaveOTPChallenge(ctx context.Context, challenge *twofactor.OTPChallenge) error
- func (s *Store) SaveTOTPSecret(ctx context.Context, userID string, secret string) error
- func (s *Store) Update(ctx context.Context, tf *twofactor.TwoFactor) error
- func (s *Store) UpdateAccountPassword(ctx context.Context, accountID, hashedPassword string) error
- func (s *Store) UpdateUser(ctx context.Context, user *entity.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a thread-safe in-memory implementation of authentication storage interfaces.
func (*Store) CreateAccount ¶
Account Methods
func (*Store) CreateSession ¶
func (s *Store) CreateSession(ctx context.Context, session *dto.CreateSessionParams) (*entity.Session, error)
Session Methods
func (*Store) CreateUser ¶
User Methods
func (*Store) CreateVerificationToken ¶
Verification Token Methods
func (*Store) DeleteByUserID ¶
func (*Store) DeleteOTPChallenge ¶
func (*Store) DeleteSession ¶
func (*Store) DeleteVerificationToken ¶
func (*Store) FindByUserID ¶
func (*Store) GetAccountByUserIDAndProvider ¶
func (*Store) GetOTPChallenge ¶
func (*Store) GetSessionByToken ¶
func (*Store) GetTOTPSecret ¶
func (*Store) GetUserByEmail ¶
func (*Store) GetUserByID ¶
func (*Store) GetVerificationToken ¶
func (*Store) SaveOTPChallenge ¶
func (*Store) SaveTOTPSecret ¶
2FA TOTP Methods
func (*Store) UpdateAccountPassword ¶
Click to show internal directories.
Click to hide internal directories.