sqlc

package
v0.1.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const GetPaySwap = `` /* 568-byte string literal not displayed */
View Source
const GetReceiveSwap = `` /* 673-byte string literal not displayed */
View Source
const ListPaySwaps = `` /* 568-byte string literal not displayed */
View Source
const ListPendingPaySwaps = `` /* 668-byte string literal not displayed */
View Source
const ListPendingReceiveSwaps = `` /* 755-byte string literal not displayed */
View Source
const ListReceiveSwaps = `` /* 673-byte string literal not displayed */
View Source
const UpsertPaySwap = `` /* 2135-byte string literal not displayed */
View Source
const UpsertReceiveSwap = `` /* 2470-byte string literal not displayed */

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 PaySwap

type PaySwap struct {
	PaymentHash                          []byte
	Invoice                              string
	MaxFeeSat                            int64
	State                                string
	AmountSat                            int64
	FeeSat                               int64
	ExpiryUnix                           int64
	ClientPubkey                         []byte
	OperatorPubkey                       []byte
	ServerPubkey                         []byte
	RefundLocktime                       int64
	UnilateralClaimDelay                 int64
	UnilateralRefundDelay                int64
	UnilateralRefundWithoutReceiverDelay int64
	VhtlcPkscript                        []byte
	VhtlcPolicyTemplate                  []byte
	VhtlcOutpoint                        string
	VhtlcAmount                          int64
	FundingSessionID                     string
	RefundReceivePubkey                  []byte
	RefundReceivePkscript                []byte
	RefundSessionID                      string
	RefundRecoveryID                     string
	Preimage                             []byte
	InterventionReason                   string
	CreatedAtUnix                        int64
	UpdatedAtUnix                        int64
	SettlementType                       string
}

type Querier

type Querier interface {
	GetPaySwap(ctx context.Context, paymentHash []byte) (PaySwap, error)
	GetReceiveSwap(ctx context.Context, paymentHash []byte) (ReceiveSwap, error)
	ListPaySwaps(ctx context.Context) ([]PaySwap, error)
	ListPendingPaySwaps(ctx context.Context) ([]PaySwap, error)
	ListPendingReceiveSwaps(ctx context.Context) ([]ReceiveSwap, error)
	ListReceiveSwaps(ctx context.Context) ([]ReceiveSwap, error)
	UpsertPaySwap(ctx context.Context, arg UpsertPaySwapParams) error
	UpsertReceiveSwap(ctx context.Context, arg UpsertReceiveSwapParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetPaySwap

func (q *Queries) GetPaySwap(ctx context.Context, paymentHash []byte) (PaySwap, error)

func (*Queries) GetReceiveSwap

func (q *Queries) GetReceiveSwap(ctx context.Context, paymentHash []byte) (ReceiveSwap, error)

func (*Queries) ListPaySwaps

func (q *Queries) ListPaySwaps(ctx context.Context) ([]PaySwap, error)

func (*Queries) ListPendingPaySwaps

func (q *Queries) ListPendingPaySwaps(ctx context.Context) ([]PaySwap, error)

func (*Queries) ListPendingReceiveSwaps

func (q *Queries) ListPendingReceiveSwaps(ctx context.Context) ([]ReceiveSwap, error)

func (*Queries) ListReceiveSwaps

func (q *Queries) ListReceiveSwaps(ctx context.Context) ([]ReceiveSwap, error)

func (*Queries) UpsertPaySwap

func (q *Queries) UpsertPaySwap(ctx context.Context, arg UpsertPaySwapParams) error

func (*Queries) UpsertReceiveSwap

func (q *Queries) UpsertReceiveSwap(ctx context.Context, arg UpsertReceiveSwapParams) error

func (*Queries) WithTx

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

type ReceiveSwap

type ReceiveSwap struct {
	PaymentHash                          []byte
	AmountSat                            int64
	PayerFeeMsat                         int64
	State                                string
	Invoice                              string
	Preimage                             []byte
	DeadlineUnix                         int64
	ClientPubkey                         []byte
	PaymentAddr                          []byte
	OperatorPubkey                       []byte
	SwapServerPubkey                     []byte
	RefundLocktime                       int64
	UnilateralClaimDelay                 int64
	UnilateralRefundDelay                int64
	UnilateralRefundWithoutReceiverDelay int64
	VhtlcPkscript                        []byte
	VhtlcPolicyTemplate                  []byte
	VhtlcOutpoint                        string
	VhtlcAmount                          int64
	PendingHtlcAckCursor                 int64
	ClaimReceivePubkey                   []byte
	ClaimReceivePkscript                 []byte
	ClaimSessionID                       string
	ClaimRecoveryID                      string
	InterventionReason                   string
	CreatedAtUnix                        int64
	UpdatedAtUnix                        int64
	SettlementType                       string
	RequestedAmountSat                   int64
	AvailableCreditSat                   int64
	AttachedCreditSat                    int64
	DustLimitSat                         int64
}

type UpsertPaySwapParams

type UpsertPaySwapParams struct {
	PaymentHash                          []byte
	Invoice                              string
	MaxFeeSat                            int64
	State                                string
	AmountSat                            int64
	FeeSat                               int64
	ExpiryUnix                           int64
	ClientPubkey                         []byte
	OperatorPubkey                       []byte
	ServerPubkey                         []byte
	SettlementType                       string
	RefundLocktime                       int64
	UnilateralClaimDelay                 int64
	UnilateralRefundDelay                int64
	UnilateralRefundWithoutReceiverDelay int64
	VhtlcPkscript                        []byte
	VhtlcPolicyTemplate                  []byte
	VhtlcOutpoint                        string
	VhtlcAmount                          int64
	FundingSessionID                     string
	RefundReceivePubkey                  []byte
	RefundReceivePkscript                []byte
	RefundSessionID                      string
	RefundRecoveryID                     string
	Preimage                             []byte
	InterventionReason                   string
	CreatedAtUnix                        int64
	UpdatedAtUnix                        int64
}

type UpsertReceiveSwapParams

type UpsertReceiveSwapParams struct {
	PaymentHash                          []byte
	AmountSat                            int64
	PayerFeeMsat                         int64
	State                                string
	Invoice                              string
	Preimage                             []byte
	DeadlineUnix                         int64
	ClientPubkey                         []byte
	PaymentAddr                          []byte
	OperatorPubkey                       []byte
	SwapServerPubkey                     []byte
	SettlementType                       string
	RefundLocktime                       int64
	UnilateralClaimDelay                 int64
	UnilateralRefundDelay                int64
	UnilateralRefundWithoutReceiverDelay int64
	VhtlcPkscript                        []byte
	VhtlcPolicyTemplate                  []byte
	VhtlcOutpoint                        string
	VhtlcAmount                          int64
	PendingHtlcAckCursor                 int64
	ClaimReceivePubkey                   []byte
	ClaimReceivePkscript                 []byte
	ClaimSessionID                       string
	ClaimRecoveryID                      string
	InterventionReason                   string
	RequestedAmountSat                   int64
	AvailableCreditSat                   int64
	AttachedCreditSat                    int64
	DustLimitSat                         int64
	CreatedAtUnix                        int64
	UpdatedAtUnix                        int64
}

Jump to

Keyboard shortcuts

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