data

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxStatusPending    = "pending"
	TxStatusInProgress = "in progress"
	TxStatusCompleted  = "completed"
	TxStatusFailed     = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Airdrop

type Airdrop struct {
	ID        string    `db:"id"`
	Nullifier string    `db:"nullifier"`
	Address   string    `db:"address"`
	TxHash    *string   `db:"tx_hash"`
	Error     *string   `db:"error"`
	Amount    string    `db:"amount"`
	Status    string    `db:"status"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type AirdropsQ

type AirdropsQ struct {
	// contains filtered or unexported fields
}

func NewAirdropsQ

func NewAirdropsQ(db *pgdb.DB) *AirdropsQ

func (*AirdropsQ) Delete

func (q *AirdropsQ) Delete(id string) error

func (*AirdropsQ) FilterByNullifier

func (q *AirdropsQ) FilterByNullifier(nullifier string) *AirdropsQ

func (*AirdropsQ) FilterByStatuses added in v0.1.1

func (q *AirdropsQ) FilterByStatuses(statuses ...string) *AirdropsQ

func (*AirdropsQ) Get

func (q *AirdropsQ) Get() (*Airdrop, error)

func (*AirdropsQ) Insert

func (q *AirdropsQ) Insert(p Airdrop) (*Airdrop, error)

func (*AirdropsQ) Limit

func (q *AirdropsQ) Limit(limit uint64) *AirdropsQ

func (*AirdropsQ) New

func (q *AirdropsQ) New() *AirdropsQ

func (*AirdropsQ) Select

func (q *AirdropsQ) Select() ([]Airdrop, error)

func (*AirdropsQ) Transaction

func (q *AirdropsQ) Transaction(fn func() error) error

func (*AirdropsQ) Update

func (q *AirdropsQ) Update(id string, values map[string]any) error

Jump to

Keyboard shortcuts

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