model

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowListEntry

type AllowListEntry struct {
	PaymentID uuid.UUID `db:"payment_id"`
	CreatedAt time.Time `db:"created_at"`
}

func (AllowListEntry) IsAllowed

func (a AllowListEntry) IsAllowed(paymentID uuid.UUID) bool

type Challenge

type Challenge struct {
	PaymentID uuid.UUID `db:"payment_id"`
	CreatedAt time.Time `db:"created_at"`
	Nonce     string    `db:"nonce"`
}

func NewChallenge

func NewChallenge(paymentID uuid.UUID) Challenge

func (*Challenge) IsValid

func (c *Challenge) IsValid(now time.Time) error

type Error

type Error string
const (
	ErrWalletNotWhitelisted Error = "model: wallet not whitelisted"
	ErrNotFound             Error = "model: not found"
	ErrChallengeNotFound    Error = "model: challenge not found"
	ErrChallengeExpired     Error = "model: challenge expired"
	ErrNoRowsDeleted        Error = "model: no rows deleted"
	ErrNotInserted          Error = "model: not inserted"
	ErrNoWalletCustodian    Error = "model: no linked wallet custodian"
	ErrInternalServer       Error = "model: internal server error"
	ErrWalletNotFound       Error = "model: wallet not found"
)

func (Error) Error

func (e Error) Error() string

Jump to

Keyboard shortcuts

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