Documentation
¶
Index ¶
- Variables
- type Postgresql
- func (pql Postgresql) AddLiquiditySwap(tx pgx.Tx, swap utils.LiquiditySwap) error
- func (pql Postgresql) AddPreimageMeltRequest(tx pgx.Tx, quote string, preimage string) error
- func (pql Postgresql) ChangeCheckingId(tx pgx.Tx, quote string, checking_id string) error
- func (pql Postgresql) ChangeLiquiditySwapState(tx pgx.Tx, id string, state utils.SwapState) error
- func (pql Postgresql) ChangeMeltRequestState(tx pgx.Tx, quote string, state cashu.ACTION_STATE, melted bool, ...) error
- func (pql Postgresql) ChangeMintRequestState(tx pgx.Tx, quote string, state cashu.ACTION_STATE, minted bool) error
- func (pql Postgresql) Close()
- func (pql Postgresql) Commit(ctx context.Context, tx pgx.Tx) error
- func (pql Postgresql) DeleteChangeByQuote(tx pgx.Tx, quote string) error
- func (pql Postgresql) DeleteProofs(tx pgx.Tx, proofs cashu.Proofs) error
- func (pql Postgresql) GetAllLiquiditySwaps() ([]utils.LiquiditySwap, error)
- func (pql Postgresql) GetAllSeeds() ([]cashu.Seed, error)
- func (pql Postgresql) GetAuthUser(tx pgx.Tx, sub string) (database.AuthUser, error)
- func (pql Postgresql) GetBlindSigStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.KeysetStatsRow, error)
- func (pql Postgresql) GetConfig(tx pgx.Tx) (utils.Config, error)
- func (pql Postgresql) GetLatestStatsSnapshot(ctx context.Context) (*database.StatsSnapshot, error)
- func (pql Postgresql) GetLiquiditySwapById(tx pgx.Tx, id string) (utils.LiquiditySwap, error)
- func (pql Postgresql) GetLiquiditySwaps(swap utils.LiquiditySwap) ([]utils.LiquiditySwap, error)
- func (pql Postgresql) GetLiquiditySwapsByStates(tx pgx.Tx, states []utils.SwapState) ([]string, error)
- func (pql Postgresql) GetMeltChangeByQuote(tx pgx.Tx, quote string) ([]cashu.MeltChange, error)
- func (pql Postgresql) GetMeltQuotesByState(state cashu.ACTION_STATE) ([]cashu.MeltRequestDB, error)
- func (pql Postgresql) GetMeltRequestById(tx pgx.Tx, id string) (cashu.MeltRequestDB, error)
- func (pql Postgresql) GetMeltRequestsByTime(ctx context.Context, since time.Time) ([]cashu.MeltRequestDB, error)
- func (pql Postgresql) GetMeltStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.MeltStatsRow, error)
- func (pql Postgresql) GetMintRequestById(tx pgx.Tx, id string) (cashu.MintRequestDB, error)
- func (pql Postgresql) GetMintRequestByRequest(tx pgx.Tx, request string) (cashu.MintRequestDB, error)
- func (pql Postgresql) GetMintRequestsByTime(ctx context.Context, since time.Time) ([]cashu.MintRequestDB, error)
- func (pql Postgresql) GetMintStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.MintStatsRow, error)
- func (pql Postgresql) GetNostrAuth(tx pgx.Tx, nonce string) (database.NostrLoginAuth, error)
- func (pql Postgresql) GetNostrNotificationConfig(tx pgx.Tx) (*utils.NostrNotificationConfig, error)
- func (pql Postgresql) GetProofStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.KeysetStatsRow, error)
- func (pql Postgresql) GetProofsFromQuote(tx pgx.Tx, quote string) (cashu.Proofs, error)
- func (pql Postgresql) GetProofsFromSecret(tx pgx.Tx, SecretList []string) (cashu.Proofs, error)
- func (pql Postgresql) GetProofsFromSecretCurve(tx pgx.Tx, Ys []cashu.WrappedPublicKey) (cashu.Proofs, error)
- func (pql Postgresql) GetRestoreSigsFromBlindedMessages(tx pgx.Tx, B_ []cashu.WrappedPublicKey) ([]cashu.RecoverSigDB, error)
- func (pql Postgresql) GetSeedsByUnit(tx pgx.Tx, unit cashu.Unit) ([]cashu.Seed, error)
- func (pql Postgresql) GetStatsFeeRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.KeysetFeeRow, error)
- func (pql Postgresql) GetStatsSnapshotsBySince(ctx context.Context, since int64) ([]database.StatsSnapshot, error)
- func (pql Postgresql) GetTx(ctx context.Context) (pgx.Tx, error)
- func (pql Postgresql) InsertStatsSnapshot(ctx context.Context, snapshot database.StatsSnapshot) error
- func (pql Postgresql) MakeAuthUser(tx pgx.Tx, auth database.AuthUser) error
- func (pql Postgresql) Rollback(ctx context.Context, tx pgx.Tx) error
- func (pql Postgresql) SaveMeltChange(tx pgx.Tx, change []cashu.BlindedMessage, quote string) error
- func (pql Postgresql) SaveMeltRequest(tx pgx.Tx, request cashu.MeltRequestDB) error
- func (pql Postgresql) SaveMintRequest(tx pgx.Tx, request cashu.MintRequestDB) error
- func (pql Postgresql) SaveNewSeed(tx pgx.Tx, seed cashu.Seed) error
- func (pql Postgresql) SaveNewSeeds(seeds []cashu.Seed) error
- func (pql Postgresql) SaveNostrAuth(auth database.NostrLoginAuth) error
- func (pql Postgresql) SaveProof(tx pgx.Tx, proofs []cashu.Proof) error
- func (pql Postgresql) SaveRestoreSigs(tx pgx.Tx, recover_sigs []cashu.RecoverSigDB) error
- func (pql Postgresql) SearchLightningRequests(ctx context.Context, query string, since time.Time, limit int) ([]database.LightningActivityRow, error)
- func (pql Postgresql) SetConfig(tx pgx.Tx, config utils.Config) error
- func (pql Postgresql) SetProofsState(tx pgx.Tx, proofs cashu.Proofs, state cashu.ProofState) error
- func (pql Postgresql) UpdateConfig(tx pgx.Tx, config utils.Config) error
- func (pql Postgresql) UpdateLastLoggedIn(tx pgx.Tx, sub string, lastLoggedIn uint64) error
- func (pql Postgresql) UpdateNostrAuthActivation(tx pgx.Tx, nonce string, activated bool) error
- func (pql Postgresql) UpdateNostrNotificationConfig(tx pgx.Tx, config utils.NostrNotificationConfig) error
- func (pql Postgresql) UpdateSeedsActiveStatus(tx pgx.Tx, seeds []cashu.Seed) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DATABASE_URL_ENV = "DATABASE_URL"
View Source
var ErrDB = errors.New("ERROR DATABASE")
Functions ¶
This section is empty.
Types ¶
type Postgresql ¶
type Postgresql struct {
// contains filtered or unexported fields
}
func DatabaseSetup ¶
func DatabaseSetup(ctx context.Context, migrationDir string) (Postgresql, error)
func (Postgresql) AddLiquiditySwap ¶
func (pql Postgresql) AddLiquiditySwap(tx pgx.Tx, swap utils.LiquiditySwap) error
func (Postgresql) AddPreimageMeltRequest ¶
func (Postgresql) ChangeCheckingId ¶
func (Postgresql) ChangeLiquiditySwapState ¶
func (Postgresql) ChangeMeltRequestState ¶
func (pql Postgresql) ChangeMeltRequestState(tx pgx.Tx, quote string, state cashu.ACTION_STATE, melted bool, fee_paid uint64) error
func (Postgresql) ChangeMintRequestState ¶
func (pql Postgresql) ChangeMintRequestState(tx pgx.Tx, quote string, state cashu.ACTION_STATE, minted bool) error
func (Postgresql) Close ¶
func (pql Postgresql) Close()
func (Postgresql) DeleteChangeByQuote ¶
func (pql Postgresql) DeleteChangeByQuote(tx pgx.Tx, quote string) error
func (Postgresql) DeleteProofs ¶
func (Postgresql) GetAllLiquiditySwaps ¶
func (pql Postgresql) GetAllLiquiditySwaps() ([]utils.LiquiditySwap, error)
func (Postgresql) GetAllSeeds ¶
func (pql Postgresql) GetAllSeeds() ([]cashu.Seed, error)
func (Postgresql) GetAuthUser ¶
func (Postgresql) GetBlindSigStatsRows ¶ added in v0.6.0
func (pql Postgresql) GetBlindSigStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.KeysetStatsRow, error)
func (Postgresql) GetLatestStatsSnapshot ¶ added in v0.6.0
func (pql Postgresql) GetLatestStatsSnapshot(ctx context.Context) (*database.StatsSnapshot, error)
func (Postgresql) GetLiquiditySwapById ¶
func (pql Postgresql) GetLiquiditySwapById(tx pgx.Tx, id string) (utils.LiquiditySwap, error)
func (Postgresql) GetLiquiditySwaps ¶
func (pql Postgresql) GetLiquiditySwaps(swap utils.LiquiditySwap) ([]utils.LiquiditySwap, error)
func (Postgresql) GetLiquiditySwapsByStates ¶
func (Postgresql) GetMeltChangeByQuote ¶
func (pql Postgresql) GetMeltChangeByQuote(tx pgx.Tx, quote string) ([]cashu.MeltChange, error)
func (Postgresql) GetMeltQuotesByState ¶
func (pql Postgresql) GetMeltQuotesByState(state cashu.ACTION_STATE) ([]cashu.MeltRequestDB, error)
func (Postgresql) GetMeltRequestById ¶
func (pql Postgresql) GetMeltRequestById(tx pgx.Tx, id string) (cashu.MeltRequestDB, error)
func (Postgresql) GetMeltRequestsByTime ¶ added in v0.6.0
func (pql Postgresql) GetMeltRequestsByTime(ctx context.Context, since time.Time) ([]cashu.MeltRequestDB, error)
func (Postgresql) GetMeltStatsRows ¶ added in v0.6.0
func (pql Postgresql) GetMeltStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.MeltStatsRow, error)
func (Postgresql) GetMintRequestById ¶
func (pql Postgresql) GetMintRequestById(tx pgx.Tx, id string) (cashu.MintRequestDB, error)
func (Postgresql) GetMintRequestByRequest ¶
func (pql Postgresql) GetMintRequestByRequest(tx pgx.Tx, request string) (cashu.MintRequestDB, error)
func (Postgresql) GetMintRequestsByTime ¶ added in v0.6.0
func (pql Postgresql) GetMintRequestsByTime(ctx context.Context, since time.Time) ([]cashu.MintRequestDB, error)
func (Postgresql) GetMintStatsRows ¶ added in v0.6.0
func (pql Postgresql) GetMintStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.MintStatsRow, error)
func (Postgresql) GetNostrAuth ¶
func (pql Postgresql) GetNostrAuth(tx pgx.Tx, nonce string) (database.NostrLoginAuth, error)
func (Postgresql) GetNostrNotificationConfig ¶ added in v0.6.0
func (pql Postgresql) GetNostrNotificationConfig(tx pgx.Tx) (*utils.NostrNotificationConfig, error)
func (Postgresql) GetProofStatsRows ¶ added in v0.6.0
func (pql Postgresql) GetProofStatsRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.KeysetStatsRow, error)
func (Postgresql) GetProofsFromQuote ¶
func (Postgresql) GetProofsFromSecret ¶
func (Postgresql) GetProofsFromSecretCurve ¶
func (pql Postgresql) GetProofsFromSecretCurve(tx pgx.Tx, Ys []cashu.WrappedPublicKey) (cashu.Proofs, error)
func (Postgresql) GetRestoreSigsFromBlindedMessages ¶
func (pql Postgresql) GetRestoreSigsFromBlindedMessages(tx pgx.Tx, B_ []cashu.WrappedPublicKey) ([]cashu.RecoverSigDB, error)
func (Postgresql) GetSeedsByUnit ¶
func (Postgresql) GetStatsFeeRows ¶ added in v0.6.0
func (pql Postgresql) GetStatsFeeRows(ctx context.Context, tx pgx.Tx, startDate, endDate int64) ([]database.KeysetFeeRow, error)
func (Postgresql) GetStatsSnapshotsBySince ¶ added in v0.6.0
func (pql Postgresql) GetStatsSnapshotsBySince(ctx context.Context, since int64) ([]database.StatsSnapshot, error)
func (Postgresql) InsertStatsSnapshot ¶ added in v0.6.0
func (pql Postgresql) InsertStatsSnapshot(ctx context.Context, snapshot database.StatsSnapshot) error
func (Postgresql) MakeAuthUser ¶
func (Postgresql) SaveMeltChange ¶
func (pql Postgresql) SaveMeltChange(tx pgx.Tx, change []cashu.BlindedMessage, quote string) error
func (Postgresql) SaveMeltRequest ¶
func (pql Postgresql) SaveMeltRequest(tx pgx.Tx, request cashu.MeltRequestDB) error
func (Postgresql) SaveMintRequest ¶
func (pql Postgresql) SaveMintRequest(tx pgx.Tx, request cashu.MintRequestDB) error
func (Postgresql) SaveNewSeed ¶
func (Postgresql) SaveNewSeeds ¶
func (pql Postgresql) SaveNewSeeds(seeds []cashu.Seed) error
func (Postgresql) SaveNostrAuth ¶
func (pql Postgresql) SaveNostrAuth(auth database.NostrLoginAuth) error
func (Postgresql) SaveRestoreSigs ¶
func (pql Postgresql) SaveRestoreSigs(tx pgx.Tx, recover_sigs []cashu.RecoverSigDB) error
func (Postgresql) SearchLightningRequests ¶ added in v0.6.0
func (pql Postgresql) SearchLightningRequests(ctx context.Context, query string, since time.Time, limit int) ([]database.LightningActivityRow, error)
func (Postgresql) SetProofsState ¶
func (pql Postgresql) SetProofsState(tx pgx.Tx, proofs cashu.Proofs, state cashu.ProofState) error
func (Postgresql) UpdateConfig ¶
func (Postgresql) UpdateLastLoggedIn ¶
func (Postgresql) UpdateNostrAuthActivation ¶
func (Postgresql) UpdateNostrNotificationConfig ¶ added in v0.6.0
func (pql Postgresql) UpdateNostrNotificationConfig(tx pgx.Tx, config utils.NostrNotificationConfig) error
func (Postgresql) UpdateSeedsActiveStatus ¶
Click to show internal directories.
Click to hide internal directories.