Documentation
¶
Index ¶
- func Migrate(databaseUrl string) error
- func PgConnect(databaseUrl string) (*pgxpool.Pool, error)
- type ExportedForward
- type HistoryStore
- func (s *HistoryStore) AddOpenChannelHtlc(ctx context.Context, htlc *history.OpenChannelHtlc) error
- func (s *HistoryStore) FetchClnForwardOffsets(ctx context.Context, nodeId []byte) (uint64, uint64, error)
- func (s *HistoryStore) FetchLndForwardOffset(ctx context.Context, nodeId []byte) (*time.Time, error)
- func (s *HistoryStore) InsertForwards(ctx context.Context, forwards []*history.Forward, nodeid []byte) error
- func (s *HistoryStore) SetClnForwardOffsets(ctx context.Context, nodeId []byte, created uint64, updated uint64) error
- func (s *HistoryStore) UpdateChannels(ctx context.Context, updates []*history.ChannelUpdate) error
- func (s *HistoryStore) UpdateForwards(ctx context.Context, forwards []*history.Forward, nodeid []byte) error
- type Lsps2Store
- func (s *Lsps2Store) GetBuyRegistration(ctx context.Context, scid lightning.ShortChannelID) (*lsps2.BuyRegistration, error)
- func (s *Lsps2Store) RegisterBuy(ctx context.Context, req *lsps2.RegisterBuy) error
- func (s *Lsps2Store) RemoveUnusedExpired(ctx context.Context, before time.Time) error
- func (s *Lsps2Store) SavePromises(ctx context.Context, req *lsps2.SavePromises) error
- func (s *Lsps2Store) SetChannelOpened(ctx context.Context, channelOpened *lsps2.ChannelOpened) error
- func (s *Lsps2Store) SetCompleted(ctx context.Context, registrationId uuid7.UUID) error
- type MigrationLogger
- type NotificationsStore
- func (s *NotificationsStore) GetRegistrations(ctx context.Context, pubkey string) ([]string, error)
- func (s *NotificationsStore) Register(ctx context.Context, pubkey string, url string) error
- func (s *NotificationsStore) RemoveExpired(ctx context.Context, before time.Time) error
- func (s *NotificationsStore) Unsubscribe(ctx context.Context, pubkey string, url string) error
- type OpenChannelHtlc
- type PostgresInterceptStore
- func (s *PostgresInterceptStore) PaymentInfo(htlcPaymentHash []byte) (string, *common.OpeningFeeParams, []byte, []byte, []byte, int64, int64, ...)
- func (s *PostgresInterceptStore) RegisterPayment(token string, params *common.OpeningFeeParams, ...) error
- func (s *PostgresInterceptStore) SetFundingTx(paymentHash []byte, channelPoint *wire.OutPoint) error
- type PostgresOpeningStore
- type RevenueCliStore
- func (s *RevenueCliStore) ExportTokenForwardsForExternalNode(ctx context.Context, startNs uint64, endNs uint64, node []byte, ...) ([]*ExportedForward, error)
- func (s *RevenueCliStore) GetForwards(ctx context.Context, startNs uint64, endNs uint64) ([]*RevenueForward, error)
- func (s *RevenueCliStore) GetOpenChannelHtlcs(ctx context.Context, startNs uint64, endNs uint64) ([]*OpenChannelHtlc, error)
- type RevenueForward
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExportedForward ¶
type ExportedForward struct { Token string NodeId []byte ExternalNodeId []byte ResolvedTime time.Time // Direction is 'send' if the client associated to the token sent a payment. // Direction is 'receive' if the client associated to the token sent a payment. Direction string // The amount forwarded to/from the external node AmountMsat uint64 }
type HistoryStore ¶
type HistoryStore struct {
// contains filtered or unexported fields
}
func NewHistoryStore ¶
func NewHistoryStore(pool *pgxpool.Pool) *HistoryStore
func (*HistoryStore) AddOpenChannelHtlc ¶
func (s *HistoryStore) AddOpenChannelHtlc(ctx context.Context, htlc *history.OpenChannelHtlc) error
func (*HistoryStore) FetchClnForwardOffsets ¶
func (*HistoryStore) FetchLndForwardOffset ¶
func (*HistoryStore) InsertForwards ¶
func (*HistoryStore) SetClnForwardOffsets ¶
func (*HistoryStore) UpdateChannels ¶
func (s *HistoryStore) UpdateChannels( ctx context.Context, updates []*history.ChannelUpdate, ) error
func (*HistoryStore) UpdateForwards ¶
type Lsps2Store ¶
type Lsps2Store struct {
// contains filtered or unexported fields
}
func NewLsps2Store ¶
func NewLsps2Store(pool *pgxpool.Pool) *Lsps2Store
func (*Lsps2Store) GetBuyRegistration ¶
func (s *Lsps2Store) GetBuyRegistration(ctx context.Context, scid lightning.ShortChannelID) (*lsps2.BuyRegistration, error)
func (*Lsps2Store) RegisterBuy ¶
func (s *Lsps2Store) RegisterBuy( ctx context.Context, req *lsps2.RegisterBuy, ) error
func (*Lsps2Store) RemoveUnusedExpired ¶
func (*Lsps2Store) SavePromises ¶
func (s *Lsps2Store) SavePromises( ctx context.Context, req *lsps2.SavePromises, ) error
func (*Lsps2Store) SetChannelOpened ¶
func (s *Lsps2Store) SetChannelOpened(ctx context.Context, channelOpened *lsps2.ChannelOpened) error
func (*Lsps2Store) SetCompleted ¶
type MigrationLogger ¶
type MigrationLogger struct { }
func (*MigrationLogger) Printf ¶
func (l *MigrationLogger) Printf(format string, v ...interface{})
func (*MigrationLogger) Verbose ¶
func (l *MigrationLogger) Verbose() bool
Verbose should return true when verbose logging output is wanted
type NotificationsStore ¶
type NotificationsStore struct {
// contains filtered or unexported fields
}
func NewNotificationsStore ¶
func NewNotificationsStore(pool *pgxpool.Pool) *NotificationsStore
func (*NotificationsStore) GetRegistrations ¶
func (*NotificationsStore) RemoveExpired ¶
func (*NotificationsStore) Unsubscribe ¶
type OpenChannelHtlc ¶
type PostgresInterceptStore ¶
type PostgresInterceptStore struct {
// contains filtered or unexported fields
}
func NewPostgresInterceptStore ¶
func NewPostgresInterceptStore(pool *pgxpool.Pool) *PostgresInterceptStore
func (*PostgresInterceptStore) PaymentInfo ¶
func (*PostgresInterceptStore) RegisterPayment ¶
func (s *PostgresInterceptStore) RegisterPayment(token string, params *common.OpeningFeeParams, destination, paymentHash, paymentSecret []byte, incomingAmountMsat, outgoingAmountMsat int64, tag string) error
func (*PostgresInterceptStore) SetFundingTx ¶
func (s *PostgresInterceptStore) SetFundingTx(paymentHash []byte, channelPoint *wire.OutPoint) error
type PostgresOpeningStore ¶
type PostgresOpeningStore struct {
// contains filtered or unexported fields
}
func NewPostgresOpeningStore ¶
func NewPostgresOpeningStore(pool *pgxpool.Pool) *PostgresOpeningStore
func (*PostgresOpeningStore) GetFeeParamsSettings ¶
func (s *PostgresOpeningStore) GetFeeParamsSettings(token string) ([]*common.OpeningFeeParamsSetting, error)
type RevenueCliStore ¶
type RevenueCliStore struct {
// contains filtered or unexported fields
}
func NewCliStore ¶
func NewCliStore(pool *pgxpool.Pool) *RevenueCliStore
func (*RevenueCliStore) ExportTokenForwardsForExternalNode ¶
func (s *RevenueCliStore) ExportTokenForwardsForExternalNode( ctx context.Context, startNs uint64, endNs uint64, node []byte, externalNode []byte, ) ([]*ExportedForward, error)
func (*RevenueCliStore) GetForwards ¶
func (s *RevenueCliStore) GetForwards( ctx context.Context, startNs uint64, endNs uint64, ) ([]*RevenueForward, error)
Gets all settled forwards in the defined time range. Ordered by nodeid, peerid_in, amt_msat_in, resolved_time
func (*RevenueCliStore) GetOpenChannelHtlcs ¶
func (s *RevenueCliStore) GetOpenChannelHtlcs( ctx context.Context, startNs uint64, endNs uint64, ) ([]*OpenChannelHtlc, error)
type RevenueForward ¶
Click to show internal directories.
Click to hide internal directories.