queries

package
v0.0.0-...-21b82e8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Erc20Transfer

type Erc20Transfer struct {
	Timestamp    pgtype.Timestamptz
	Sender       string
	Recipient    string
	Amount       pgtype.Numeric
	TxHash       string
	TokenAddress string
}

type Erc20TransfersSum5Min

type Erc20TransfersSum5Min struct {
	Time         interface{}
	TokenAddress string
	TotalAmount  int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetLastEvents

func (q *Queries) GetLastEvents(ctx context.Context, limit int32) ([]Erc20Transfer, error)

func (*Queries) SaveTransfer

func (q *Queries) SaveTransfer(ctx context.Context, arg SaveTransferParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type SaveTransferParams

type SaveTransferParams struct {
	Timestamp    pgtype.Timestamptz
	Sender       string
	Recipient    string
	Amount       pgtype.Numeric
	TxHash       string
	TokenAddress string
}

Jump to

Keyboard shortcuts

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