Documentation
¶
Index ¶
- type Repository
- func (r Repository) DeleteAll(ctx context.Context, uniqueID string, action authentity.Action) error
- func (r Repository) DeleteValidateAttempt(ctx context.Context, uniqueID string) error
- func (r Repository) GetLast(ctx context.Context, uniqueID string, action authentity.Action) (otpentity.OTP, error)
- func (r Repository) IncreaseValidateAttempt(ctx context.Context, uniqueID string, amount int) (int, error)
- func (r Repository) Len(ctx context.Context, uniqueID string, action authentity.Action) (int, error)
- func (r Repository) Save(ctx context.Context, otp otpentity.OTP) error
- func (r Repository) SetLast(ctx context.Context, otp otpentity.OTP) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository for otp
func (Repository) DeleteAll ¶
func (r Repository) DeleteAll(ctx context.Context, uniqueID string, action authentity.Action) error
DeleteAll otp from a given user with uniqueID and authentication action
func (Repository) DeleteValidateAttempt ¶
func (r Repository) DeleteValidateAttempt(ctx context.Context, uniqueID string) error
DeleteValidateAttempt to delete the attempt of validation this usually happened when people finally able to validate their OTP
func (Repository) GetLast ¶
func (r Repository) GetLast(ctx context.Context, uniqueID string, action authentity.Action) (otpentity.OTP, error)
GetLast OTP
func (Repository) IncreaseValidateAttempt ¶
func (r Repository) IncreaseValidateAttempt(ctx context.Context, uniqueID string, amount int) (int, error)
IncreaseValidateAttempt to increase number when people trying to validate their otp
func (Repository) Len ¶
func (r Repository) Len(ctx context.Context, uniqueID string, action authentity.Action) (int, error)
Len of the otp
Click to show internal directories.
Click to hide internal directories.