Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OneTimeLinkPostgres ¶
OneTimeLinkPostgres stores entity.OneTimeLink-s in postgres
func NewPostgres ¶
func NewPostgres(pg *postgres.Postgres) *OneTimeLinkPostgres
NewPostgres - create new OneTimeLinkPostgres
func (*OneTimeLinkPostgres) Get ¶
func (r *OneTimeLinkPostgres) Get(ctx context.Context, link string) (entity.OneTimeLink, error)
Get entity.OneTimeLink by link and expire this record. Returns empty entity.OneTimeLink if no data found
func (*OneTimeLinkPostgres) Store ¶
func (r *OneTimeLinkPostgres) Store(ctx context.Context, t entity.OneTimeLink) error
Store entity.OneTimeLink in repo
Click to show internal directories.
Click to hide internal directories.