paymentrequest

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPaymentRequestAlreadyExists = errors.New("payment request record already exists")
	ErrPaymentRequestNotFound      = errors.New("no payment request records could be found")
)

Functions

This section is empty.

Types

type Record

type Record struct {
	Id uint64

	Intent string

	DestinationTokenAccount string

	ExchangeCurrency currency.Code
	NativeAmount     float64
	ExchangeRate     *float64
	Quantity         *uint64

	Domain     *string
	IsVerified bool

	CreatedAt time.Time
}

func (*Record) Clone

func (r *Record) Clone() Record

func (*Record) CopyTo

func (r *Record) CopyTo(dst *Record)

func (*Record) Validate

func (r *Record) Validate() error

type Store

type Store interface {
	// Put creates a new payment request record
	Put(ctx context.Context, record *Record) error

	// Get gets a paymen request record by its intent ID
	Get(ctx context.Context, intentId string) (*Record, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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