sqlc

package
v0.26.2-beta Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 GetLoopInSwapRow

type GetLoopInSwapRow struct {
	ID                     int32
	SwapHash               []byte
	Preimage               []byte
	InitiationTime         time.Time
	AmountRequested        int64
	CltvExpiry             int32
	MaxMinerFee            int64
	MaxSwapFee             int64
	InitiationHeight       int32
	ProtocolVersion        int32
	Label                  string
	SwapHash_2             []byte
	HtlcConfTarget         int32
	LastHop                []byte
	ExternalHtlc           bool
	SwapHash_3             []byte
	SenderScriptPubkey     []byte
	ReceiverScriptPubkey   []byte
	SenderInternalPubkey   []byte
	ReceiverInternalPubkey []byte
	ClientKeyFamily        int32
	ClientKeyIndex         int32
}

type GetLoopInSwapsRow

type GetLoopInSwapsRow struct {
	ID                     int32
	SwapHash               []byte
	Preimage               []byte
	InitiationTime         time.Time
	AmountRequested        int64
	CltvExpiry             int32
	MaxMinerFee            int64
	MaxSwapFee             int64
	InitiationHeight       int32
	ProtocolVersion        int32
	Label                  string
	SwapHash_2             []byte
	HtlcConfTarget         int32
	LastHop                []byte
	ExternalHtlc           bool
	SwapHash_3             []byte
	SenderScriptPubkey     []byte
	ReceiverScriptPubkey   []byte
	SenderInternalPubkey   []byte
	ReceiverInternalPubkey []byte
	ClientKeyFamily        int32
	ClientKeyIndex         int32
}

type GetLoopOutSwapRow

type GetLoopOutSwapRow struct {
	ID                     int32
	SwapHash               []byte
	Preimage               []byte
	InitiationTime         time.Time
	AmountRequested        int64
	CltvExpiry             int32
	MaxMinerFee            int64
	MaxSwapFee             int64
	InitiationHeight       int32
	ProtocolVersion        int32
	Label                  string
	SwapHash_2             []byte
	DestAddress            string
	SwapInvoice            string
	MaxSwapRoutingFee      int64
	SweepConfTarget        int32
	HtlcConfirmations      int32
	OutgoingChanSet        string
	PrepayInvoice          string
	MaxPrepayRoutingFee    int64
	PublicationDeadline    time.Time
	SwapHash_3             []byte
	SenderScriptPubkey     []byte
	ReceiverScriptPubkey   []byte
	SenderInternalPubkey   []byte
	ReceiverInternalPubkey []byte
	ClientKeyFamily        int32
	ClientKeyIndex         int32
}

type GetLoopOutSwapsRow

type GetLoopOutSwapsRow struct {
	ID                     int32
	SwapHash               []byte
	Preimage               []byte
	InitiationTime         time.Time
	AmountRequested        int64
	CltvExpiry             int32
	MaxMinerFee            int64
	MaxSwapFee             int64
	InitiationHeight       int32
	ProtocolVersion        int32
	Label                  string
	SwapHash_2             []byte
	DestAddress            string
	SwapInvoice            string
	MaxSwapRoutingFee      int64
	SweepConfTarget        int32
	HtlcConfirmations      int32
	OutgoingChanSet        string
	PrepayInvoice          string
	MaxPrepayRoutingFee    int64
	PublicationDeadline    time.Time
	SwapHash_3             []byte
	SenderScriptPubkey     []byte
	ReceiverScriptPubkey   []byte
	SenderInternalPubkey   []byte
	ReceiverInternalPubkey []byte
	ClientKeyFamily        int32
	ClientKeyIndex         int32
}

type HtlcKey

type HtlcKey struct {
	SwapHash               []byte
	SenderScriptPubkey     []byte
	ReceiverScriptPubkey   []byte
	SenderInternalPubkey   []byte
	ReceiverInternalPubkey []byte
	ClientKeyFamily        int32
	ClientKeyIndex         int32
}

type InsertHtlcKeysParams

type InsertHtlcKeysParams struct {
	SwapHash               []byte
	SenderScriptPubkey     []byte
	ReceiverScriptPubkey   []byte
	SenderInternalPubkey   []byte
	ReceiverInternalPubkey []byte
	ClientKeyFamily        int32
	ClientKeyIndex         int32
}

type InsertLoopInParams

type InsertLoopInParams struct {
	SwapHash       []byte
	HtlcConfTarget int32
	LastHop        []byte
	ExternalHtlc   bool
}

type InsertLoopOutParams

type InsertLoopOutParams struct {
	SwapHash            []byte
	DestAddress         string
	SwapInvoice         string
	MaxSwapRoutingFee   int64
	SweepConfTarget     int32
	HtlcConfirmations   int32
	OutgoingChanSet     string
	PrepayInvoice       string
	MaxPrepayRoutingFee int64
	PublicationDeadline time.Time
}

type InsertSwapParams

type InsertSwapParams struct {
	SwapHash         []byte
	Preimage         []byte
	InitiationTime   time.Time
	AmountRequested  int64
	CltvExpiry       int32
	MaxMinerFee      int64
	MaxSwapFee       int64
	InitiationHeight int32
	ProtocolVersion  int32
	Label            string
}

type InsertSwapUpdateParams

type InsertSwapUpdateParams struct {
	SwapHash        []byte
	UpdateTimestamp time.Time
	UpdateState     int32
	HtlcTxhash      string
	ServerCost      int64
	OnchainCost     int64
	OffchainCost    int64
}

type LiquidityParam

type LiquidityParam struct {
	ID     int32
	Params []byte
}

type LoopinSwap

type LoopinSwap struct {
	SwapHash       []byte
	HtlcConfTarget int32
	LastHop        []byte
	ExternalHtlc   bool
}

type LoopoutSwap

type LoopoutSwap struct {
	SwapHash            []byte
	DestAddress         string
	SwapInvoice         string
	MaxSwapRoutingFee   int64
	SweepConfTarget     int32
	HtlcConfirmations   int32
	OutgoingChanSet     string
	PrepayInvoice       string
	MaxPrepayRoutingFee int64
	PublicationDeadline time.Time
}

type Querier

type Querier interface {
	FetchLiquidityParams(ctx context.Context) ([]byte, error)
	GetLoopInSwap(ctx context.Context, swapHash []byte) (GetLoopInSwapRow, error)
	GetLoopInSwaps(ctx context.Context) ([]GetLoopInSwapsRow, error)
	GetLoopOutSwap(ctx context.Context, swapHash []byte) (GetLoopOutSwapRow, error)
	GetLoopOutSwaps(ctx context.Context) ([]GetLoopOutSwapsRow, error)
	GetSwapUpdates(ctx context.Context, swapHash []byte) ([]SwapUpdate, error)
	InsertHtlcKeys(ctx context.Context, arg InsertHtlcKeysParams) error
	InsertLoopIn(ctx context.Context, arg InsertLoopInParams) error
	InsertLoopOut(ctx context.Context, arg InsertLoopOutParams) error
	InsertSwap(ctx context.Context, arg InsertSwapParams) error
	InsertSwapUpdate(ctx context.Context, arg InsertSwapUpdateParams) error
	UpsertLiquidityParams(ctx context.Context, params []byte) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) FetchLiquidityParams

func (q *Queries) FetchLiquidityParams(ctx context.Context) ([]byte, error)

func (*Queries) GetLoopInSwap

func (q *Queries) GetLoopInSwap(ctx context.Context, swapHash []byte) (GetLoopInSwapRow, error)

func (*Queries) GetLoopInSwaps

func (q *Queries) GetLoopInSwaps(ctx context.Context) ([]GetLoopInSwapsRow, error)

func (*Queries) GetLoopOutSwap

func (q *Queries) GetLoopOutSwap(ctx context.Context, swapHash []byte) (GetLoopOutSwapRow, error)

func (*Queries) GetLoopOutSwaps

func (q *Queries) GetLoopOutSwaps(ctx context.Context) ([]GetLoopOutSwapsRow, error)

func (*Queries) GetSwapUpdates

func (q *Queries) GetSwapUpdates(ctx context.Context, swapHash []byte) ([]SwapUpdate, error)

func (*Queries) InsertHtlcKeys

func (q *Queries) InsertHtlcKeys(ctx context.Context, arg InsertHtlcKeysParams) error

func (*Queries) InsertLoopIn

func (q *Queries) InsertLoopIn(ctx context.Context, arg InsertLoopInParams) error

func (*Queries) InsertLoopOut

func (q *Queries) InsertLoopOut(ctx context.Context, arg InsertLoopOutParams) error

func (*Queries) InsertSwap

func (q *Queries) InsertSwap(ctx context.Context, arg InsertSwapParams) error

func (*Queries) InsertSwapUpdate

func (q *Queries) InsertSwapUpdate(ctx context.Context, arg InsertSwapUpdateParams) error

func (*Queries) UpsertLiquidityParams

func (q *Queries) UpsertLiquidityParams(ctx context.Context, params []byte) error

func (*Queries) WithTx

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

type Swap

type Swap struct {
	ID               int32
	SwapHash         []byte
	Preimage         []byte
	InitiationTime   time.Time
	AmountRequested  int64
	CltvExpiry       int32
	MaxMinerFee      int64
	MaxSwapFee       int64
	InitiationHeight int32
	ProtocolVersion  int32
	Label            string
}

type SwapUpdate

type SwapUpdate struct {
	ID              int32
	SwapHash        []byte
	UpdateTimestamp time.Time
	UpdateState     int32
	HtlcTxhash      string
	ServerCost      int64
	OnchainCost     int64
	OffchainCost    int64
}

Jump to

Keyboard shortcuts

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