sqlc

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmpSubInvoice

type AmpSubInvoice struct {
	SetID       []byte
	State       int16
	CreatedAt   time.Time
	SettledAt   sql.NullTime
	SettleIndex sql.NullInt64
	InvoiceID   int64
}

type AmpSubInvoiceHtlc

type AmpSubInvoiceHtlc struct {
	InvoiceID  int64
	SetID      []byte
	HtlcID     int64
	RootShare  []byte
	ChildIndex int64
	Hash       []byte
	Preimage   []byte
}

type Channel added in v1.0.10

type Channel struct {
	ID                int64
	Version           int16
	Scid              []byte
	NodeID1           int64
	NodeID2           int64
	Outpoint          string
	Capacity          sql.NullInt64
	BitcoinKey1       []byte
	BitcoinKey2       []byte
	Node1Signature    []byte
	Node2Signature    []byte
	Bitcoin1Signature []byte
	Bitcoin2Signature []byte
}

type ChannelExtraType added in v1.0.10

type ChannelExtraType struct {
	ChannelID int64
	Type      int64
	Value     []byte
}

type ChannelFeature added in v1.0.10

type ChannelFeature struct {
	ChannelID  int64
	FeatureBit int32
}

type CreateChannelExtraTypeParams added in v1.0.10

type CreateChannelExtraTypeParams struct {
	ChannelID int64
	Type      int64
	Value     []byte
}

type CreateChannelParams added in v1.0.10

type CreateChannelParams struct {
	Version           int16
	Scid              []byte
	NodeID1           int64
	NodeID2           int64
	Outpoint          string
	Capacity          sql.NullInt64
	BitcoinKey1       []byte
	BitcoinKey2       []byte
	Node1Signature    []byte
	Node2Signature    []byte
	Bitcoin1Signature []byte
	Bitcoin2Signature []byte
}

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 DeleteExtraNodeTypeParams added in v1.0.10

type DeleteExtraNodeTypeParams struct {
	NodeID int64
	Type   int64
}

type DeleteInvoiceParams

type DeleteInvoiceParams struct {
	AddIndex    sql.NullInt64
	Hash        []byte
	SettleIndex sql.NullInt64
	PaymentAddr []byte
}

type DeleteNodeByPubKeyParams added in v1.0.10

type DeleteNodeByPubKeyParams struct {
	PubKey  []byte
	Version int16
}

type DeleteNodeFeatureParams added in v1.0.10

type DeleteNodeFeatureParams struct {
	NodeID     int64
	FeatureBit int32
}

type FetchAMPSubInvoiceHTLCsParams

type FetchAMPSubInvoiceHTLCsParams struct {
	InvoiceID int64
	SetID     []byte
}

type FetchAMPSubInvoiceHTLCsRow

type FetchAMPSubInvoiceHTLCsRow struct {
	SetID        []byte
	RootShare    []byte
	ChildIndex   int64
	Hash         []byte
	Preimage     []byte
	ID           int64
	ChanID       string
	HtlcID       int64
	AmountMsat   int64
	TotalMppMsat sql.NullInt64
	AcceptHeight int32
	AcceptTime   time.Time
	ExpiryHeight int32
	State        int16
	ResolveTime  sql.NullTime
	InvoiceID    int64
}

type FetchAMPSubInvoicesParams

type FetchAMPSubInvoicesParams struct {
	InvoiceID int64
	SetID     []byte
}

type FetchSettledAMPSubInvoicesParams

type FetchSettledAMPSubInvoicesParams struct {
	SettleIndexGet sql.NullInt64
	SettleIndexLet sql.NullInt64
}

type FetchSettledAMPSubInvoicesRow

type FetchSettledAMPSubInvoicesRow struct {
	SetID              []byte
	AmpSettleIndex     sql.NullInt64
	AmpSettledAt       sql.NullTime
	ID                 int64
	Hash               []byte
	Preimage           []byte
	SettleIndex        sql.NullInt64
	SettledAt          sql.NullTime
	Memo               sql.NullString
	AmountMsat         int64
	CltvDelta          sql.NullInt32
	Expiry             int32
	PaymentAddr        []byte
	PaymentRequest     sql.NullString
	PaymentRequestHash []byte
	State              int16
	AmountPaidMsat     int64
	IsAmp              bool
	IsHodl             bool
	IsKeysend          bool
	CreatedAt          time.Time
}

type FilterInvoicesParams

type FilterInvoicesParams struct {
	AddIndexGet    sql.NullInt64
	AddIndexLet    sql.NullInt64
	SettleIndexGet sql.NullInt64
	SettleIndexLet sql.NullInt64
	State          sql.NullInt16
	CreatedAfter   sql.NullTime
	CreatedBefore  sql.NullTime
	PendingOnly    interface{}
	Reverse        interface{}
	NumOffset      int32
	NumLimit       int32
}

type GetChannelBySCIDParams added in v1.0.10

type GetChannelBySCIDParams struct {
	Scid    []byte
	Version int16
}

type GetInvoiceHTLCCustomRecordsRow

type GetInvoiceHTLCCustomRecordsRow struct {
	HtlcID int64
	Key    int64
	Value  []byte
}

type GetInvoiceParams

type GetInvoiceParams struct {
	SetID       []byte
	AddIndex    sql.NullInt64
	Hash        []byte
	PaymentAddr []byte
}

type GetNodeAddressesByPubKeyParams added in v1.0.10

type GetNodeAddressesByPubKeyParams struct {
	PubKey  []byte
	Version int16
}

type GetNodeAddressesByPubKeyRow added in v1.0.10

type GetNodeAddressesByPubKeyRow struct {
	Type    sql.NullInt16
	Address sql.NullString
}

type GetNodeByPubKeyParams added in v1.0.10

type GetNodeByPubKeyParams struct {
	PubKey  []byte
	Version int16
}

type GetNodeFeaturesByPubKeyParams added in v1.0.10

type GetNodeFeaturesByPubKeyParams struct {
	PubKey  []byte
	Version int16
}

type GetNodesByLastUpdateRangeParams added in v1.0.10

type GetNodesByLastUpdateRangeParams struct {
	StartTime sql.NullInt64
	EndTime   sql.NullInt64
}

type GetSourceNodesByVersionRow added in v1.0.10

type GetSourceNodesByVersionRow struct {
	NodeID int64
	PubKey []byte
}

type InsertAMPSubInvoiceHTLCParams

type InsertAMPSubInvoiceHTLCParams struct {
	InvoiceID  int64
	SetID      []byte
	HtlcID     int64
	RootShare  []byte
	ChildIndex int64
	Hash       []byte
	Preimage   []byte
}

type InsertAMPSubInvoiceParams added in v1.0.7

type InsertAMPSubInvoiceParams struct {
	SetID       []byte
	State       int16
	CreatedAt   time.Time
	SettledAt   sql.NullTime
	SettleIndex sql.NullInt64
	InvoiceID   int64
}

type InsertChannelFeatureParams added in v1.0.10

type InsertChannelFeatureParams struct {
	ChannelID  int64
	FeatureBit int32
}

type InsertInvoiceFeatureParams

type InsertInvoiceFeatureParams struct {
	InvoiceID int64
	Feature   int32
}

type InsertInvoiceHTLCCustomRecordParams

type InsertInvoiceHTLCCustomRecordParams struct {
	Key    int64
	Value  []byte
	HtlcID int64
}

type InsertInvoiceHTLCParams

type InsertInvoiceHTLCParams struct {
	HtlcID       int64
	ChanID       string
	AmountMsat   int64
	TotalMppMsat sql.NullInt64
	AcceptHeight int32
	AcceptTime   time.Time
	ExpiryHeight int32
	State        int16
	ResolveTime  sql.NullTime
	InvoiceID    int64
}

type InsertInvoiceParams

type InsertInvoiceParams struct {
	Hash               []byte
	Preimage           []byte
	Memo               sql.NullString
	AmountMsat         int64
	CltvDelta          sql.NullInt32
	Expiry             int32
	PaymentAddr        []byte
	PaymentRequest     sql.NullString
	PaymentRequestHash []byte
	State              int16
	AmountPaidMsat     int64
	IsAmp              bool
	IsHodl             bool
	IsKeysend          bool
	CreatedAt          time.Time
}

type InsertKVInvoiceKeyAndAddIndexParams added in v1.0.7

type InsertKVInvoiceKeyAndAddIndexParams struct {
	ID       int64
	AddIndex int64
}

type InsertMigratedInvoiceParams added in v1.0.7

type InsertMigratedInvoiceParams struct {
	Hash               []byte
	Preimage           []byte
	SettleIndex        sql.NullInt64
	SettledAt          sql.NullTime
	Memo               sql.NullString
	AmountMsat         int64
	CltvDelta          sql.NullInt32
	Expiry             int32
	PaymentAddr        []byte
	PaymentRequest     sql.NullString
	PaymentRequestHash []byte
	State              int16
	AmountPaidMsat     int64
	IsAmp              bool
	IsHodl             bool
	IsKeysend          bool
	CreatedAt          time.Time
}

type InsertNodeAddressParams added in v1.0.10

type InsertNodeAddressParams struct {
	NodeID   int64
	Type     int16
	Address  string
	Position int32
}

type InsertNodeFeatureParams added in v1.0.10

type InsertNodeFeatureParams struct {
	NodeID     int64
	FeatureBit int32
}

type Invoice

type Invoice struct {
	ID                 int64
	Hash               []byte
	Preimage           []byte
	SettleIndex        sql.NullInt64
	SettledAt          sql.NullTime
	Memo               sql.NullString
	AmountMsat         int64
	CltvDelta          sql.NullInt32
	Expiry             int32
	PaymentAddr        []byte
	PaymentRequest     sql.NullString
	PaymentRequestHash []byte
	State              int16
	AmountPaidMsat     int64
	IsAmp              bool
	IsHodl             bool
	IsKeysend          bool
	CreatedAt          time.Time
}

type InvoiceEvent

type InvoiceEvent struct {
	ID        int64
	AddedAt   time.Time
	EventType int32
	InvoiceID int64
	SetID     []byte
}

type InvoiceEventType

type InvoiceEventType struct {
	ID          int64
	Description string
}

type InvoiceFeature

type InvoiceFeature struct {
	Feature   int32
	InvoiceID int64
}

type InvoiceHtlc

type InvoiceHtlc struct {
	ID           int64
	ChanID       string
	HtlcID       int64
	AmountMsat   int64
	TotalMppMsat sql.NullInt64
	AcceptHeight int32
	AcceptTime   time.Time
	ExpiryHeight int32
	State        int16
	ResolveTime  sql.NullTime
	InvoiceID    int64
}

type InvoiceHtlcCustomRecord

type InvoiceHtlcCustomRecord struct {
	Key    int64
	Value  []byte
	HtlcID int64
}

type InvoicePaymentHash added in v1.0.7

type InvoicePaymentHash struct {
	ID       int64
	AddIndex int64
	Hash     []byte
}

type InvoiceSequence

type InvoiceSequence struct {
	Name         string
	CurrentValue int64
}

type MigrationTracker added in v1.0.7

type MigrationTracker struct {
	Version       int32
	MigrationTime time.Time
}

type Node added in v1.0.10

type Node struct {
	ID         int64
	Version    int16
	PubKey     []byte
	Alias      sql.NullString
	LastUpdate sql.NullInt64
	Color      sql.NullString
	Signature  []byte
}

type NodeAddress added in v1.0.10

type NodeAddress struct {
	NodeID   int64
	Type     int16
	Position int32
	Address  string
}

type NodeExtraType added in v1.0.10

type NodeExtraType struct {
	NodeID int64
	Type   int64
	Value  []byte
}

type NodeFeature added in v1.0.10

type NodeFeature struct {
	NodeID     int64
	FeatureBit int32
}

type OnAMPSubInvoiceCanceledParams

type OnAMPSubInvoiceCanceledParams struct {
	AddedAt   time.Time
	InvoiceID int64
	SetID     []byte
}

type OnAMPSubInvoiceCreatedParams

type OnAMPSubInvoiceCreatedParams struct {
	AddedAt   time.Time
	InvoiceID int64
	SetID     []byte
}

type OnAMPSubInvoiceSettledParams

type OnAMPSubInvoiceSettledParams struct {
	AddedAt   time.Time
	InvoiceID int64
	SetID     []byte
}

type OnInvoiceCanceledParams

type OnInvoiceCanceledParams struct {
	AddedAt   time.Time
	InvoiceID int64
}

type OnInvoiceCreatedParams

type OnInvoiceCreatedParams struct {
	AddedAt   time.Time
	InvoiceID int64
}

type OnInvoiceSettledParams

type OnInvoiceSettledParams struct {
	AddedAt   time.Time
	InvoiceID int64
}

type Querier

type Querier interface {
	AddSourceNode(ctx context.Context, nodeID int64) error
	ClearKVInvoiceHashIndex(ctx context.Context) error
	CreateChannel(ctx context.Context, arg CreateChannelParams) (int64, error)
	CreateChannelExtraType(ctx context.Context, arg CreateChannelExtraTypeParams) error
	DeleteCanceledInvoices(ctx context.Context) (sql.Result, error)
	DeleteExtraNodeType(ctx context.Context, arg DeleteExtraNodeTypeParams) error
	DeleteInvoice(ctx context.Context, arg DeleteInvoiceParams) (sql.Result, error)
	DeleteNodeAddresses(ctx context.Context, nodeID int64) error
	DeleteNodeByPubKey(ctx context.Context, arg DeleteNodeByPubKeyParams) (sql.Result, error)
	DeleteNodeFeature(ctx context.Context, arg DeleteNodeFeatureParams) error
	FetchAMPSubInvoiceHTLCs(ctx context.Context, arg FetchAMPSubInvoiceHTLCsParams) ([]FetchAMPSubInvoiceHTLCsRow, error)
	FetchAMPSubInvoices(ctx context.Context, arg FetchAMPSubInvoicesParams) ([]AmpSubInvoice, error)
	FetchSettledAMPSubInvoices(ctx context.Context, arg FetchSettledAMPSubInvoicesParams) ([]FetchSettledAMPSubInvoicesRow, error)
	FilterInvoices(ctx context.Context, arg FilterInvoicesParams) ([]Invoice, error)
	GetAMPInvoiceID(ctx context.Context, setID []byte) (int64, error)
	GetChannelBySCID(ctx context.Context, arg GetChannelBySCIDParams) (Channel, error)
	GetDatabaseVersion(ctx context.Context) (int32, error)
	GetExtraNodeTypes(ctx context.Context, nodeID int64) ([]NodeExtraType, error)
	// This method may return more than one invoice if filter using multiple fields
	// from different invoices. It is the caller's responsibility to ensure that
	// we bubble up an error in those cases.
	GetInvoice(ctx context.Context, arg GetInvoiceParams) ([]Invoice, error)
	GetInvoiceByHash(ctx context.Context, hash []byte) (Invoice, error)
	GetInvoiceBySetID(ctx context.Context, setID []byte) ([]Invoice, error)
	GetInvoiceFeatures(ctx context.Context, invoiceID int64) ([]InvoiceFeature, error)
	GetInvoiceHTLCCustomRecords(ctx context.Context, invoiceID int64) ([]GetInvoiceHTLCCustomRecordsRow, error)
	GetInvoiceHTLCs(ctx context.Context, invoiceID int64) ([]InvoiceHtlc, error)
	GetKVInvoicePaymentHashByAddIndex(ctx context.Context, addIndex int64) ([]byte, error)
	GetMigration(ctx context.Context, version int32) (time.Time, error)
	GetNodeAddressesByPubKey(ctx context.Context, arg GetNodeAddressesByPubKeyParams) ([]GetNodeAddressesByPubKeyRow, error)
	GetNodeByPubKey(ctx context.Context, arg GetNodeByPubKeyParams) (Node, error)
	GetNodeFeatures(ctx context.Context, nodeID int64) ([]NodeFeature, error)
	GetNodeFeaturesByPubKey(ctx context.Context, arg GetNodeFeaturesByPubKeyParams) ([]int32, error)
	GetNodesByLastUpdateRange(ctx context.Context, arg GetNodesByLastUpdateRangeParams) ([]Node, error)
	GetSourceNodesByVersion(ctx context.Context, version int16) ([]GetSourceNodesByVersionRow, error)
	HighestSCID(ctx context.Context, version int16) ([]byte, error)
	InsertAMPSubInvoice(ctx context.Context, arg InsertAMPSubInvoiceParams) error
	InsertAMPSubInvoiceHTLC(ctx context.Context, arg InsertAMPSubInvoiceHTLCParams) error
	InsertChannelFeature(ctx context.Context, arg InsertChannelFeatureParams) error
	InsertInvoice(ctx context.Context, arg InsertInvoiceParams) (int64, error)
	InsertInvoiceFeature(ctx context.Context, arg InsertInvoiceFeatureParams) error
	InsertInvoiceHTLC(ctx context.Context, arg InsertInvoiceHTLCParams) (int64, error)
	InsertInvoiceHTLCCustomRecord(ctx context.Context, arg InsertInvoiceHTLCCustomRecordParams) error
	InsertKVInvoiceKeyAndAddIndex(ctx context.Context, arg InsertKVInvoiceKeyAndAddIndexParams) error
	InsertMigratedInvoice(ctx context.Context, arg InsertMigratedInvoiceParams) (int64, error)
	InsertNodeAddress(ctx context.Context, arg InsertNodeAddressParams) error
	InsertNodeFeature(ctx context.Context, arg InsertNodeFeatureParams) error
	NextInvoiceSettleIndex(ctx context.Context) (int64, error)
	OnAMPSubInvoiceCanceled(ctx context.Context, arg OnAMPSubInvoiceCanceledParams) error
	OnAMPSubInvoiceCreated(ctx context.Context, arg OnAMPSubInvoiceCreatedParams) error
	OnAMPSubInvoiceSettled(ctx context.Context, arg OnAMPSubInvoiceSettledParams) error
	OnInvoiceCanceled(ctx context.Context, arg OnInvoiceCanceledParams) error
	OnInvoiceCreated(ctx context.Context, arg OnInvoiceCreatedParams) error
	OnInvoiceSettled(ctx context.Context, arg OnInvoiceSettledParams) error
	SetKVInvoicePaymentHash(ctx context.Context, arg SetKVInvoicePaymentHashParams) error
	SetMigration(ctx context.Context, arg SetMigrationParams) error
	UpdateAMPSubInvoiceHTLCPreimage(ctx context.Context, arg UpdateAMPSubInvoiceHTLCPreimageParams) (sql.Result, error)
	UpdateAMPSubInvoiceState(ctx context.Context, arg UpdateAMPSubInvoiceStateParams) error
	UpdateInvoiceAmountPaid(ctx context.Context, arg UpdateInvoiceAmountPaidParams) (sql.Result, error)
	UpdateInvoiceHTLC(ctx context.Context, arg UpdateInvoiceHTLCParams) error
	UpdateInvoiceHTLCs(ctx context.Context, arg UpdateInvoiceHTLCsParams) error
	UpdateInvoiceState(ctx context.Context, arg UpdateInvoiceStateParams) (sql.Result, error)
	UpsertAMPSubInvoice(ctx context.Context, arg UpsertAMPSubInvoiceParams) (sql.Result, error)
	UpsertNode(ctx context.Context, arg UpsertNodeParams) (int64, error)
	UpsertNodeExtraType(ctx context.Context, arg UpsertNodeExtraTypeParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AddSourceNode added in v1.0.10

func (q *Queries) AddSourceNode(ctx context.Context, nodeID int64) error

func (*Queries) ClearKVInvoiceHashIndex added in v1.0.7

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

func (*Queries) CreateChannel added in v1.0.10

func (q *Queries) CreateChannel(ctx context.Context, arg CreateChannelParams) (int64, error)

func (*Queries) CreateChannelExtraType added in v1.0.10

func (q *Queries) CreateChannelExtraType(ctx context.Context, arg CreateChannelExtraTypeParams) error

func (*Queries) DeleteCanceledInvoices

func (q *Queries) DeleteCanceledInvoices(ctx context.Context) (sql.Result, error)

func (*Queries) DeleteExtraNodeType added in v1.0.10

func (q *Queries) DeleteExtraNodeType(ctx context.Context, arg DeleteExtraNodeTypeParams) error

func (*Queries) DeleteInvoice

func (q *Queries) DeleteInvoice(ctx context.Context, arg DeleteInvoiceParams) (sql.Result, error)

func (*Queries) DeleteNodeAddresses added in v1.0.10

func (q *Queries) DeleteNodeAddresses(ctx context.Context, nodeID int64) error

func (*Queries) DeleteNodeByPubKey added in v1.0.10

func (q *Queries) DeleteNodeByPubKey(ctx context.Context, arg DeleteNodeByPubKeyParams) (sql.Result, error)

func (*Queries) DeleteNodeFeature added in v1.0.10

func (q *Queries) DeleteNodeFeature(ctx context.Context, arg DeleteNodeFeatureParams) error

func (*Queries) FetchAMPSubInvoiceHTLCs

func (q *Queries) FetchAMPSubInvoiceHTLCs(ctx context.Context, arg FetchAMPSubInvoiceHTLCsParams) ([]FetchAMPSubInvoiceHTLCsRow, error)

func (*Queries) FetchAMPSubInvoices

func (q *Queries) FetchAMPSubInvoices(ctx context.Context, arg FetchAMPSubInvoicesParams) ([]AmpSubInvoice, error)

func (*Queries) FetchSettledAMPSubInvoices

func (q *Queries) FetchSettledAMPSubInvoices(ctx context.Context, arg FetchSettledAMPSubInvoicesParams) ([]FetchSettledAMPSubInvoicesRow, error)

func (*Queries) FilterInvoices

func (q *Queries) FilterInvoices(ctx context.Context, arg FilterInvoicesParams) ([]Invoice, error)

func (*Queries) GetAMPInvoiceID

func (q *Queries) GetAMPInvoiceID(ctx context.Context, setID []byte) (int64, error)

func (*Queries) GetChannelBySCID added in v1.0.10

func (q *Queries) GetChannelBySCID(ctx context.Context, arg GetChannelBySCIDParams) (Channel, error)

func (*Queries) GetDatabaseVersion added in v1.0.7

func (q *Queries) GetDatabaseVersion(ctx context.Context) (int32, error)

func (*Queries) GetExtraNodeTypes added in v1.0.10

func (q *Queries) GetExtraNodeTypes(ctx context.Context, nodeID int64) ([]NodeExtraType, error)

func (*Queries) GetInvoice

func (q *Queries) GetInvoice(ctx context.Context, arg GetInvoiceParams) ([]Invoice, error)

This method may return more than one invoice if filter using multiple fields from different invoices. It is the caller's responsibility to ensure that we bubble up an error in those cases.

func (*Queries) GetInvoiceByHash added in v1.0.7

func (q *Queries) GetInvoiceByHash(ctx context.Context, hash []byte) (Invoice, error)

func (*Queries) GetInvoiceBySetID added in v1.0.4

func (q *Queries) GetInvoiceBySetID(ctx context.Context, setID []byte) ([]Invoice, error)

func (*Queries) GetInvoiceFeatures

func (q *Queries) GetInvoiceFeatures(ctx context.Context, invoiceID int64) ([]InvoiceFeature, error)

func (*Queries) GetInvoiceHTLCCustomRecords

func (q *Queries) GetInvoiceHTLCCustomRecords(ctx context.Context, invoiceID int64) ([]GetInvoiceHTLCCustomRecordsRow, error)

func (*Queries) GetInvoiceHTLCs

func (q *Queries) GetInvoiceHTLCs(ctx context.Context, invoiceID int64) ([]InvoiceHtlc, error)

func (*Queries) GetKVInvoicePaymentHashByAddIndex added in v1.0.7

func (q *Queries) GetKVInvoicePaymentHashByAddIndex(ctx context.Context, addIndex int64) ([]byte, error)

func (*Queries) GetMigration added in v1.0.7

func (q *Queries) GetMigration(ctx context.Context, version int32) (time.Time, error)

func (*Queries) GetNodeAddressesByPubKey added in v1.0.10

func (q *Queries) GetNodeAddressesByPubKey(ctx context.Context, arg GetNodeAddressesByPubKeyParams) ([]GetNodeAddressesByPubKeyRow, error)

func (*Queries) GetNodeByPubKey added in v1.0.10

func (q *Queries) GetNodeByPubKey(ctx context.Context, arg GetNodeByPubKeyParams) (Node, error)

func (*Queries) GetNodeFeatures added in v1.0.10

func (q *Queries) GetNodeFeatures(ctx context.Context, nodeID int64) ([]NodeFeature, error)

func (*Queries) GetNodeFeaturesByPubKey added in v1.0.10

func (q *Queries) GetNodeFeaturesByPubKey(ctx context.Context, arg GetNodeFeaturesByPubKeyParams) ([]int32, error)

func (*Queries) GetNodesByLastUpdateRange added in v1.0.10

func (q *Queries) GetNodesByLastUpdateRange(ctx context.Context, arg GetNodesByLastUpdateRangeParams) ([]Node, error)

func (*Queries) GetSourceNodesByVersion added in v1.0.10

func (q *Queries) GetSourceNodesByVersion(ctx context.Context, version int16) ([]GetSourceNodesByVersionRow, error)

func (*Queries) HighestSCID added in v1.0.10

func (q *Queries) HighestSCID(ctx context.Context, version int16) ([]byte, error)

func (*Queries) InsertAMPSubInvoice added in v1.0.7

func (q *Queries) InsertAMPSubInvoice(ctx context.Context, arg InsertAMPSubInvoiceParams) error

func (*Queries) InsertAMPSubInvoiceHTLC

func (q *Queries) InsertAMPSubInvoiceHTLC(ctx context.Context, arg InsertAMPSubInvoiceHTLCParams) error

func (*Queries) InsertChannelFeature added in v1.0.10

func (q *Queries) InsertChannelFeature(ctx context.Context, arg InsertChannelFeatureParams) error

func (*Queries) InsertInvoice

func (q *Queries) InsertInvoice(ctx context.Context, arg InsertInvoiceParams) (int64, error)

func (*Queries) InsertInvoiceFeature

func (q *Queries) InsertInvoiceFeature(ctx context.Context, arg InsertInvoiceFeatureParams) error

func (*Queries) InsertInvoiceHTLC

func (q *Queries) InsertInvoiceHTLC(ctx context.Context, arg InsertInvoiceHTLCParams) (int64, error)

func (*Queries) InsertInvoiceHTLCCustomRecord

func (q *Queries) InsertInvoiceHTLCCustomRecord(ctx context.Context, arg InsertInvoiceHTLCCustomRecordParams) error

func (*Queries) InsertKVInvoiceKeyAndAddIndex added in v1.0.7

func (q *Queries) InsertKVInvoiceKeyAndAddIndex(ctx context.Context, arg InsertKVInvoiceKeyAndAddIndexParams) error

func (*Queries) InsertMigratedInvoice added in v1.0.7

func (q *Queries) InsertMigratedInvoice(ctx context.Context, arg InsertMigratedInvoiceParams) (int64, error)

func (*Queries) InsertNodeAddress added in v1.0.10

func (q *Queries) InsertNodeAddress(ctx context.Context, arg InsertNodeAddressParams) error

func (*Queries) InsertNodeFeature added in v1.0.10

func (q *Queries) InsertNodeFeature(ctx context.Context, arg InsertNodeFeatureParams) error

func (*Queries) NextInvoiceSettleIndex

func (q *Queries) NextInvoiceSettleIndex(ctx context.Context) (int64, error)

func (*Queries) OnAMPSubInvoiceCanceled

func (q *Queries) OnAMPSubInvoiceCanceled(ctx context.Context, arg OnAMPSubInvoiceCanceledParams) error

func (*Queries) OnAMPSubInvoiceCreated

func (q *Queries) OnAMPSubInvoiceCreated(ctx context.Context, arg OnAMPSubInvoiceCreatedParams) error

func (*Queries) OnAMPSubInvoiceSettled

func (q *Queries) OnAMPSubInvoiceSettled(ctx context.Context, arg OnAMPSubInvoiceSettledParams) error

func (*Queries) OnInvoiceCanceled

func (q *Queries) OnInvoiceCanceled(ctx context.Context, arg OnInvoiceCanceledParams) error

func (*Queries) OnInvoiceCreated

func (q *Queries) OnInvoiceCreated(ctx context.Context, arg OnInvoiceCreatedParams) error

func (*Queries) OnInvoiceSettled

func (q *Queries) OnInvoiceSettled(ctx context.Context, arg OnInvoiceSettledParams) error

func (*Queries) SetKVInvoicePaymentHash added in v1.0.7

func (q *Queries) SetKVInvoicePaymentHash(ctx context.Context, arg SetKVInvoicePaymentHashParams) error

func (*Queries) SetMigration added in v1.0.7

func (q *Queries) SetMigration(ctx context.Context, arg SetMigrationParams) error

func (*Queries) UpdateAMPSubInvoiceHTLCPreimage

func (q *Queries) UpdateAMPSubInvoiceHTLCPreimage(ctx context.Context, arg UpdateAMPSubInvoiceHTLCPreimageParams) (sql.Result, error)

func (*Queries) UpdateAMPSubInvoiceState

func (q *Queries) UpdateAMPSubInvoiceState(ctx context.Context, arg UpdateAMPSubInvoiceStateParams) error

func (*Queries) UpdateInvoiceAmountPaid

func (q *Queries) UpdateInvoiceAmountPaid(ctx context.Context, arg UpdateInvoiceAmountPaidParams) (sql.Result, error)

func (*Queries) UpdateInvoiceHTLC

func (q *Queries) UpdateInvoiceHTLC(ctx context.Context, arg UpdateInvoiceHTLCParams) error

func (*Queries) UpdateInvoiceHTLCs

func (q *Queries) UpdateInvoiceHTLCs(ctx context.Context, arg UpdateInvoiceHTLCsParams) error

func (*Queries) UpdateInvoiceState

func (q *Queries) UpdateInvoiceState(ctx context.Context, arg UpdateInvoiceStateParams) (sql.Result, error)

func (*Queries) UpsertAMPSubInvoice

func (q *Queries) UpsertAMPSubInvoice(ctx context.Context, arg UpsertAMPSubInvoiceParams) (sql.Result, error)

func (*Queries) UpsertNode added in v1.0.10

func (q *Queries) UpsertNode(ctx context.Context, arg UpsertNodeParams) (int64, error)

func (*Queries) UpsertNodeExtraType added in v1.0.10

func (q *Queries) UpsertNodeExtraType(ctx context.Context, arg UpsertNodeExtraTypeParams) error

func (*Queries) WithTx

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

type SetKVInvoicePaymentHashParams added in v1.0.7

type SetKVInvoicePaymentHashParams struct {
	ID   int64
	Hash []byte
}

type SetMigrationParams added in v1.0.7

type SetMigrationParams struct {
	Version       int32
	MigrationTime time.Time
}

type SourceNode added in v1.0.10

type SourceNode struct {
	NodeID int64
}

type UpdateAMPSubInvoiceHTLCPreimageParams

type UpdateAMPSubInvoiceHTLCPreimageParams struct {
	InvoiceID int64
	SetID     []byte
	ChanID    string
	HtlcID    int64
	Preimage  []byte
}

type UpdateAMPSubInvoiceStateParams

type UpdateAMPSubInvoiceStateParams struct {
	SetID       []byte
	State       int16
	SettleIndex sql.NullInt64
	SettledAt   sql.NullTime
}

type UpdateInvoiceAmountPaidParams

type UpdateInvoiceAmountPaidParams struct {
	ID             int64
	AmountPaidMsat int64
}

type UpdateInvoiceHTLCParams

type UpdateInvoiceHTLCParams struct {
	HtlcID      int64
	ChanID      string
	InvoiceID   int64
	State       int16
	ResolveTime sql.NullTime
}

type UpdateInvoiceHTLCsParams

type UpdateInvoiceHTLCsParams struct {
	InvoiceID   int64
	State       int16
	ResolveTime sql.NullTime
}

type UpdateInvoiceStateParams

type UpdateInvoiceStateParams struct {
	ID          int64
	State       int16
	Preimage    []byte
	SettleIndex sql.NullInt64
	SettledAt   sql.NullTime
}

type UpsertAMPSubInvoiceParams

type UpsertAMPSubInvoiceParams struct {
	SetID     []byte
	State     int16
	CreatedAt time.Time
	InvoiceID int64
}

type UpsertNodeExtraTypeParams added in v1.0.10

type UpsertNodeExtraTypeParams struct {
	NodeID int64
	Type   int64
	Value  []byte
}

type UpsertNodeParams added in v1.0.10

type UpsertNodeParams struct {
	Version    int16
	PubKey     []byte
	Alias      sql.NullString
	LastUpdate sql.NullInt64
	Color      sql.NullString
	Signature  []byte
}

Jump to

Keyboard shortcuts

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