storage

package
v0.0.0-...-8a10f5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowList

type AllowList struct{}

func NewAllowList

func NewAllowList() *AllowList

func (*AllowList) GetAllowListEntry

func (a *AllowList) GetAllowListEntry(ctx context.Context, dbi sqlx.QueryerContext, paymentID uuid.UUID) (model.AllowListEntry, error)

GetAllowListEntry retrieves a model.AllowListEntry from the database for the given paymentID.

type Challenge

type Challenge struct{}

func NewChallenge

func NewChallenge() *Challenge

func (*Challenge) Delete

func (c *Challenge) Delete(ctx context.Context, dbi sqlx.ExecerContext, paymentID uuid.UUID) error

Delete removes a model.Challenge from the database identified by the paymentID.

func (*Challenge) DeleteAfter

func (c *Challenge) DeleteAfter(ctx context.Context, dbi sqlx.ExecerContext, interval time.Duration) error

DeleteAfter removes model.Challenge's from the database where their created at plus the specified interval it less than the current time. The interval should be specified in minutes.

func (*Challenge) Get

func (c *Challenge) Get(ctx context.Context, dbi sqlx.QueryerContext, paymentID uuid.UUID) (model.Challenge, error)

Get retrieves a model.Challenge from the database by the given paymentID.

func (*Challenge) Upsert

func (c *Challenge) Upsert(ctx context.Context, dbi sqlx.ExecerContext, chl model.Challenge) error

Upsert persists a model.Challenge to the database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL