models

package
v0.0.0-...-fca3b85 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvoicesToProto

func InvoicesToProto(invoices []*Invoice) []*desc.Invoice

Types

type Invoice

type Invoice struct {
	ID             uuid.UUID          `db:"id" json:"id"`
	ClientID       uuid.UUID          `db:"client_id" json:"client_id"`
	UsdCentsAmount int64              `db:"usd_cents_amount" json:"usd_cents_amount"`
	TokenAmount    *float64           `db:"token_amount" json:"token_amount"`
	Chain          string             `db:"chain" json:"chain"`
	Token          string             `db:"token" json:"token"`
	Status         desc.InvoiceStatus `db:"status" json:"status"`
	Address        string             `db:"address" json:"address"`
	CreatedAt      time.Time          `db:"created_at" json:"created_at"`
	PayerClientID  *string            `db:"payer_client_id" json:"payer_client_id"`
	GasLimit       *int               `db:"gas_limit" json:"gas_limit"`
}

func (*Invoice) Proto

func (i *Invoice) Proto() *desc.Invoice

func (*Invoice) TableName

func (i *Invoice) TableName() string

func (*Invoice) ToInsertMap

func (i *Invoice) ToInsertMap() map[string]interface{}

func (*Invoice) ToUpdateMap

func (i *Invoice) ToUpdateMap() map[string]interface{}

type Transaction

type Transaction struct {
	Hash     string  `json:"hash"`
	Sender   string  `json:"sender"`
	Receiver string  `json:"receiver"`
	Amount   float64 `json:"amount"`
	Chain    string  `json:"chain"`
	Token    string  `json:"token"`
}

type WalletMessage

type WalletMessage struct {
	Address string `json:"address"`
	Balance int64  `json:"balance"`
	Chain   string `json:"chain"`
	Token   string `json:"token"`
}

Jump to

Keyboard shortcuts

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