Versions in this module Expand all Collapse all v1 v1.0.0 Jan 26, 2023 Changes in this version + var ErrHtlcAlreadySettled = errors.New("htlc already settled") + type Invoice struct + SequenceNum uint64 + SettleRequestedAt time.Time + Settled bool + SettledAt time.Time + type InvoiceCreationData struct + type InvoiceState int + const InvoiceStateAccepted + const InvoiceStateSettleRequested + type PostgresPersister struct + func NewPostgresPersisterFromDSN(dsn string, logger *zap.SugaredLogger) (*PostgresPersister, error) + func NewPostgresPersisterFromOptions(options *pg.Options, logger *zap.SugaredLogger) *PostgresPersister + func (p *PostgresPersister) Close() error + func (p *PostgresPersister) Get(ctx context.Context, hash lntypes.Hash) (*Invoice, map[types.HtlcKey]int64, error) + func (p *PostgresPersister) GetInvoices(ctx context.Context, maxInvoicesCount, sequenceStart int) ([]*Invoice, error) + func (p *PostgresPersister) MarkHtlcSettled(ctx context.Context, key types.HtlcKey) (bool, error) + func (p *PostgresPersister) Ping(ctx context.Context) error + func (p *PostgresPersister) RequestSettle(ctx context.Context, invoice *InvoiceCreationData, ...) error