sqlc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseMPPSessionParams added in v0.5.0

type CloseMPPSessionParams struct {
	UpdatedAt time.Time
	SessionID string
}

type CloseMPPSessionReturningBalanceParams added in v0.5.0

type CloseMPPSessionReturningBalanceParams struct {
	UpdatedAt time.Time
	SessionID string
}

type CountL402TransactionsByDateRangeParams added in v0.5.0

type CountL402TransactionsByDateRangeParams struct {
	SettledAt   sql.NullTime
	SettledAt_2 sql.NullTime
}

type CountL402TransactionsFilteredParams added in v0.5.0

type CountL402TransactionsFilteredParams struct {
	FilterService  interface{}
	FilterState    interface{}
	FilterAuthType interface{}
	HasDateRange   interface{}
	DateFrom       sql.NullTime
	DateTo         sql.NullTime
}

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 GetL402RevenueByServiceAndDateRangeParams added in v0.5.0

type GetL402RevenueByServiceAndDateRangeParams struct {
	SettledAt   sql.NullTime
	SettledAt_2 sql.NullTime
}

type GetL402RevenueByServiceAndDateRangeRow added in v0.5.0

type GetL402RevenueByServiceAndDateRangeRow struct {
	ServiceName  string
	TotalRevenue int64
}

type GetL402RevenueByServiceRow added in v0.5.0

type GetL402RevenueByServiceRow struct {
	ServiceName  string
	TotalRevenue int64
}

type GetL402TotalRevenueByDateRangeParams added in v0.5.0

type GetL402TotalRevenueByDateRangeParams struct {
	SettledAt   sql.NullTime
	SettledAt_2 sql.NullTime
}

type InsertL402TransactionParams added in v0.5.0

type InsertL402TransactionParams struct {
	TokenID        []byte
	PaymentHash    []byte
	ServiceName    string
	PriceSats      int64
	State          string
	AuthType       string
	CreatedAt      time.Time
	IdentifierHash []byte
}

type InsertMPPSessionParams added in v0.5.0

type InsertMPPSessionParams struct {
	SessionID     string
	PaymentHash   []byte
	DepositSats   int64
	SpentSats     int64
	ReturnInvoice string
	Status        string
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type InsertSecretParams

type InsertSecretParams struct {
	Hash      []byte
	Secret    []byte
	CreatedAt time.Time
}

type InsertSessionParams

type InsertSessionParams struct {
	PassphraseWords    string
	PassphraseEntropy  []byte
	LocalStaticPrivKey []byte
	MailboxAddr        string
	CreatedAt          time.Time
	Expiry             sql.NullTime
	DevServer          bool
}

type L402Transaction added in v0.5.0

type L402Transaction struct {
	ID             int32
	TokenID        []byte
	PaymentHash    []byte
	IdentifierHash []byte
	ServiceName    string
	PriceSats      int64
	State          string
	AuthType       string
	CreatedAt      time.Time
	SettledAt      sql.NullTime
}

type ListL402TransactionsByDateRangeParams added in v0.5.0

type ListL402TransactionsByDateRangeParams struct {
	SettledAt   sql.NullTime
	SettledAt_2 sql.NullTime
	Limit       int32
	Offset      int32
}

type ListL402TransactionsByServiceParams added in v0.5.0

type ListL402TransactionsByServiceParams struct {
	ServiceName string
	Limit       int32
	Offset      int32
}

type ListL402TransactionsByStateParams added in v0.5.0

type ListL402TransactionsByStateParams struct {
	State  string
	Limit  int32
	Offset int32
}

type ListL402TransactionsFilteredParams added in v0.5.0

type ListL402TransactionsFilteredParams struct {
	FilterService  interface{}
	FilterState    interface{}
	FilterAuthType interface{}
	HasDateRange   interface{}
	DateFrom       sql.NullTime
	DateTo         sql.NullTime
	RowOffset      int32
	RowLimit       int32
}

type ListL402TransactionsParams added in v0.5.0

type ListL402TransactionsParams struct {
	Limit  int32
	Offset int32
}

type LncSession

type LncSession struct {
	ID                 int32
	PassphraseWords    string
	PassphraseEntropy  []byte
	RemoteStaticPubKey []byte
	LocalStaticPrivKey []byte
	MailboxAddr        string
	CreatedAt          time.Time
	Expiry             sql.NullTime
	DevServer          bool
}

type MppSession added in v0.5.0

type MppSession struct {
	ID            int32
	SessionID     string
	PaymentHash   []byte
	DepositSats   int64
	SpentSats     int64
	ReturnInvoice string
	Status        string
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type Onion

type Onion struct {
	PrivateKey []byte
	CreatedAt  time.Time
}

type Querier

type Querier interface {
	CloseMPPSession(ctx context.Context, arg CloseMPPSessionParams) (sql.Result, error)
	CloseMPPSessionReturningBalance(ctx context.Context, arg CloseMPPSessionReturningBalanceParams) (int64, error)
	CountL402Transactions(ctx context.Context) (int64, error)
	CountL402TransactionsByDateRange(ctx context.Context, arg CountL402TransactionsByDateRangeParams) (int64, error)
	CountL402TransactionsByService(ctx context.Context, serviceName string) (int64, error)
	CountL402TransactionsFiltered(ctx context.Context, arg CountL402TransactionsFilteredParams) (int64, error)
	DeleteL402TransactionByTokenID(ctx context.Context, tokenID []byte) (int64, error)
	DeleteOnionPrivateKey(ctx context.Context) error
	DeleteSecretByHash(ctx context.Context, hash []byte) (int64, error)
	DeleteService(ctx context.Context, name string) (int64, error)
	GetL402RevenueByService(ctx context.Context) ([]GetL402RevenueByServiceRow, error)
	GetL402RevenueByServiceAndDateRange(ctx context.Context, arg GetL402RevenueByServiceAndDateRangeParams) ([]GetL402RevenueByServiceAndDateRangeRow, error)
	GetL402SettledTransactionByTokenID(ctx context.Context, tokenID []byte) (L402Transaction, error)
	GetL402TotalRevenue(ctx context.Context) (int64, error)
	GetL402TotalRevenueByDateRange(ctx context.Context, arg GetL402TotalRevenueByDateRangeParams) (int64, error)
	GetL402TransactionByIdentifierHash(ctx context.Context, identifierHash []byte) (L402Transaction, error)
	GetL402TransactionsByPaymentHash(ctx context.Context, paymentHash []byte) ([]L402Transaction, error)
	GetMPPSessionByID(ctx context.Context, sessionID string) (MppSession, error)
	GetSecretByHash(ctx context.Context, hash []byte) ([]byte, error)
	GetSession(ctx context.Context, passphraseEntropy []byte) (LncSession, error)
	InsertL402Transaction(ctx context.Context, arg InsertL402TransactionParams) (int32, error)
	InsertMPPSession(ctx context.Context, arg InsertMPPSessionParams) (int32, error)
	InsertSecret(ctx context.Context, arg InsertSecretParams) (int32, error)
	InsertSession(ctx context.Context, arg InsertSessionParams) error
	ListL402Transactions(ctx context.Context, arg ListL402TransactionsParams) ([]L402Transaction, error)
	ListL402TransactionsByDateRange(ctx context.Context, arg ListL402TransactionsByDateRangeParams) ([]L402Transaction, error)
	ListL402TransactionsByService(ctx context.Context, arg ListL402TransactionsByServiceParams) ([]L402Transaction, error)
	ListL402TransactionsByState(ctx context.Context, arg ListL402TransactionsByStateParams) ([]L402Transaction, error)
	ListL402TransactionsFiltered(ctx context.Context, arg ListL402TransactionsFilteredParams) ([]L402Transaction, error)
	ListServices(ctx context.Context) ([]Service, error)
	SelectOnionPrivateKey(ctx context.Context) ([]byte, error)
	SetExpiry(ctx context.Context, arg SetExpiryParams) error
	SetRemotePubKey(ctx context.Context, arg SetRemotePubKeyParams) error
	UpdateL402TransactionState(ctx context.Context, arg UpdateL402TransactionStateParams) (int64, error)
	UpdateMPPSessionDeposit(ctx context.Context, arg UpdateMPPSessionDepositParams) (sql.Result, error)
	UpdateMPPSessionSpent(ctx context.Context, arg UpdateMPPSessionSpentParams) (sql.Result, error)
	UpsertOnion(ctx context.Context, arg UpsertOnionParams) error
	UpsertService(ctx context.Context, arg UpsertServiceParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CloseMPPSession added in v0.5.0

func (q *Queries) CloseMPPSession(ctx context.Context, arg CloseMPPSessionParams) (sql.Result, error)

func (*Queries) CloseMPPSessionReturningBalance added in v0.5.0

func (q *Queries) CloseMPPSessionReturningBalance(ctx context.Context, arg CloseMPPSessionReturningBalanceParams) (int64, error)

func (*Queries) CountL402Transactions added in v0.5.0

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

func (*Queries) CountL402TransactionsByDateRange added in v0.5.0

func (q *Queries) CountL402TransactionsByDateRange(ctx context.Context, arg CountL402TransactionsByDateRangeParams) (int64, error)

func (*Queries) CountL402TransactionsByService added in v0.5.0

func (q *Queries) CountL402TransactionsByService(ctx context.Context, serviceName string) (int64, error)

func (*Queries) CountL402TransactionsFiltered added in v0.5.0

func (q *Queries) CountL402TransactionsFiltered(ctx context.Context, arg CountL402TransactionsFilteredParams) (int64, error)

func (*Queries) DeleteL402TransactionByTokenID added in v0.5.0

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

func (*Queries) DeleteOnionPrivateKey

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

func (*Queries) DeleteSecretByHash

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

func (*Queries) DeleteService added in v0.5.0

func (q *Queries) DeleteService(ctx context.Context, name string) (int64, error)

func (*Queries) GetL402RevenueByService added in v0.5.0

func (q *Queries) GetL402RevenueByService(ctx context.Context) ([]GetL402RevenueByServiceRow, error)

func (*Queries) GetL402RevenueByServiceAndDateRange added in v0.5.0

func (*Queries) GetL402SettledTransactionByTokenID added in v0.5.0

func (q *Queries) GetL402SettledTransactionByTokenID(ctx context.Context, tokenID []byte) (L402Transaction, error)

func (*Queries) GetL402TotalRevenue added in v0.5.0

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

func (*Queries) GetL402TotalRevenueByDateRange added in v0.5.0

func (q *Queries) GetL402TotalRevenueByDateRange(ctx context.Context, arg GetL402TotalRevenueByDateRangeParams) (int64, error)

func (*Queries) GetL402TransactionByIdentifierHash added in v0.5.0

func (q *Queries) GetL402TransactionByIdentifierHash(ctx context.Context, identifierHash []byte) (L402Transaction, error)

func (*Queries) GetL402TransactionsByPaymentHash added in v0.5.0

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

func (*Queries) GetMPPSessionByID added in v0.5.0

func (q *Queries) GetMPPSessionByID(ctx context.Context, sessionID string) (MppSession, error)

func (*Queries) GetSecretByHash

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

func (*Queries) GetSession

func (q *Queries) GetSession(ctx context.Context, passphraseEntropy []byte) (LncSession, error)

func (*Queries) InsertL402Transaction added in v0.5.0

func (q *Queries) InsertL402Transaction(ctx context.Context, arg InsertL402TransactionParams) (int32, error)

func (*Queries) InsertMPPSession added in v0.5.0

func (q *Queries) InsertMPPSession(ctx context.Context, arg InsertMPPSessionParams) (int32, error)

func (*Queries) InsertSecret

func (q *Queries) InsertSecret(ctx context.Context, arg InsertSecretParams) (int32, error)

func (*Queries) InsertSession

func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) error

func (*Queries) ListL402Transactions added in v0.5.0

func (q *Queries) ListL402Transactions(ctx context.Context, arg ListL402TransactionsParams) ([]L402Transaction, error)

func (*Queries) ListL402TransactionsByDateRange added in v0.5.0

func (q *Queries) ListL402TransactionsByDateRange(ctx context.Context, arg ListL402TransactionsByDateRangeParams) ([]L402Transaction, error)

func (*Queries) ListL402TransactionsByService added in v0.5.0

func (q *Queries) ListL402TransactionsByService(ctx context.Context, arg ListL402TransactionsByServiceParams) ([]L402Transaction, error)

func (*Queries) ListL402TransactionsByState added in v0.5.0

func (q *Queries) ListL402TransactionsByState(ctx context.Context, arg ListL402TransactionsByStateParams) ([]L402Transaction, error)

func (*Queries) ListL402TransactionsFiltered added in v0.5.0

func (q *Queries) ListL402TransactionsFiltered(ctx context.Context, arg ListL402TransactionsFilteredParams) ([]L402Transaction, error)

func (*Queries) ListServices added in v0.5.0

func (q *Queries) ListServices(ctx context.Context) ([]Service, error)

func (*Queries) SelectOnionPrivateKey

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

func (*Queries) SetExpiry

func (q *Queries) SetExpiry(ctx context.Context, arg SetExpiryParams) error

func (*Queries) SetRemotePubKey

func (q *Queries) SetRemotePubKey(ctx context.Context, arg SetRemotePubKeyParams) error

func (*Queries) UpdateL402TransactionState added in v0.5.0

func (q *Queries) UpdateL402TransactionState(ctx context.Context, arg UpdateL402TransactionStateParams) (int64, error)

func (*Queries) UpdateMPPSessionDeposit added in v0.5.0

func (q *Queries) UpdateMPPSessionDeposit(ctx context.Context, arg UpdateMPPSessionDepositParams) (sql.Result, error)

func (*Queries) UpdateMPPSessionSpent added in v0.5.0

func (q *Queries) UpdateMPPSessionSpent(ctx context.Context, arg UpdateMPPSessionSpentParams) (sql.Result, error)

func (*Queries) UpsertOnion

func (q *Queries) UpsertOnion(ctx context.Context, arg UpsertOnionParams) error

func (*Queries) UpsertService added in v0.5.0

func (q *Queries) UpsertService(ctx context.Context, arg UpsertServiceParams) error

func (*Queries) WithTx

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

type Secret

type Secret struct {
	ID        int32
	Hash      []byte
	Secret    []byte
	CreatedAt time.Time
}

type Service added in v0.5.0

type Service struct {
	ID         int32
	Name       string
	Address    string
	Protocol   string
	HostRegexp string
	PathRegexp string
	Price      int64
	Auth       string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	AuthScheme string
}

type SetExpiryParams

type SetExpiryParams struct {
	Expiry            sql.NullTime
	PassphraseEntropy []byte
}

type SetRemotePubKeyParams

type SetRemotePubKeyParams struct {
	RemoteStaticPubKey []byte
	PassphraseEntropy  []byte
}

type UpdateL402TransactionStateParams added in v0.5.0

type UpdateL402TransactionStateParams struct {
	State       string
	SettledAt   sql.NullTime
	PaymentHash []byte
}

type UpdateMPPSessionDepositParams added in v0.5.0

type UpdateMPPSessionDepositParams struct {
	DepositSats int64
	UpdatedAt   time.Time
	SessionID   string
}

type UpdateMPPSessionSpentParams added in v0.5.0

type UpdateMPPSessionSpentParams struct {
	SpentSats int64
	UpdatedAt time.Time
	SessionID string
}

type UpsertOnionParams

type UpsertOnionParams struct {
	PrivateKey []byte
	CreatedAt  time.Time
}

type UpsertServiceParams added in v0.5.0

type UpsertServiceParams struct {
	Name       string
	Address    string
	Protocol   string
	HostRegexp string
	PathRegexp string
	Price      int64
	Auth       string
	AuthScheme string
	CreatedAt  time.Time
	UpdatedAt  time.Time
}

Jump to

Keyboard shortcuts

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