queries

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 2 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 {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GetSettingsRow

type GetSettingsRow struct {
	ApiRoot     string
	ServerUrl   string
	EsploraUrl  sql.NullString
	Currency    string
	EventServer string
	FullNode    string
	LnUrl       sql.NullString
	Unit        string
}

type InsertVHTLCParams

type InsertVHTLCParams struct {
	PreimageHash                              string
	Sender                                    string
	Receiver                                  string
	Server                                    string
	RefundLocktime                            int64
	UnilateralClaimDelayType                  int64
	UnilateralClaimDelayValue                 int64
	UnilateralRefundDelayType                 int64
	UnilateralRefundDelayValue                int64
	UnilateralRefundWithoutReceiverDelayType  int64
	UnilateralRefundWithoutReceiverDelayValue int64
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteSettings

func (q *Queries) DeleteSettings(ctx context.Context) error

func (*Queries) DeleteVHTLC

func (q *Queries) DeleteVHTLC(ctx context.Context, preimageHash string) error

func (*Queries) DeleteVtxoRollover

func (q *Queries) DeleteVtxoRollover(ctx context.Context, address string) error

func (*Queries) GetSettings

func (q *Queries) GetSettings(ctx context.Context) (GetSettingsRow, error)

func (*Queries) GetVHTLC

func (q *Queries) GetVHTLC(ctx context.Context, preimageHash string) (Vhtlc, error)

func (*Queries) GetVtxoRollover

func (q *Queries) GetVtxoRollover(ctx context.Context, address string) (VtxoRollover, error)

func (*Queries) InsertVHTLC

func (q *Queries) InsertVHTLC(ctx context.Context, arg InsertVHTLCParams) error

VHTLC queries

func (*Queries) ListVHTLC

func (q *Queries) ListVHTLC(ctx context.Context) ([]Vhtlc, error)

func (*Queries) ListVtxoRollover

func (q *Queries) ListVtxoRollover(ctx context.Context) ([]VtxoRollover, error)

func (*Queries) UpsertSettings

func (q *Queries) UpsertSettings(ctx context.Context, arg UpsertSettingsParams) error

Settings queries

func (*Queries) UpsertVtxoRollover

func (q *Queries) UpsertVtxoRollover(ctx context.Context, arg UpsertVtxoRolloverParams) error

VtxoRollover queries

func (*Queries) WithTx

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

type Setting

type Setting struct {
	ID          int64
	ApiRoot     string
	ServerUrl   string
	EsploraUrl  sql.NullString
	Currency    string
	EventServer string
	FullNode    string
	LnUrl       sql.NullString
	Unit        string
}

type UpsertSettingsParams

type UpsertSettingsParams struct {
	ApiRoot     string
	ServerUrl   string
	EsploraUrl  sql.NullString
	Currency    string
	EventServer string
	FullNode    string
	LnUrl       sql.NullString
	Unit        string
}

type UpsertVtxoRolloverParams

type UpsertVtxoRolloverParams struct {
	Address            string
	TaprootTree        string
	DestinationAddress string
}

type Vhtlc

type Vhtlc struct {
	PreimageHash                              string
	Sender                                    string
	Receiver                                  string
	Server                                    string
	RefundLocktime                            int64
	UnilateralClaimDelayType                  int64
	UnilateralClaimDelayValue                 int64
	UnilateralRefundDelayType                 int64
	UnilateralRefundDelayValue                int64
	UnilateralRefundWithoutReceiverDelayType  int64
	UnilateralRefundWithoutReceiverDelayValue int64
}

type VtxoRollover

type VtxoRollover struct {
	Address            string
	TaprootTree        string
	DestinationAddress string
}

Jump to

Keyboard shortcuts

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