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) GetBlindSigsCountByKeyset(since time.Time) (map[string]database.BlindSigsCountByKeyset, error)
- func (pql Postgresql) GetBlindSigsTimeSeries(since int64, bucketMinutes int) ([]database.ProofTimeSeriesPoint, error)
- func (pql Postgresql) GetConfig() (utils.Config, 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) GetMeltRequestsByTimeAndId(ctx context.Context, since time.Time, id *string) ([]cashu.MeltRequestDB, error)
- func (pql Postgresql) GetMintMeltBalanceByTime(time int64) (database.MintMeltBalance, 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) GetMintRequestsByTimeAndId(ctx context.Context, since time.Time, id *string) ([]cashu.MintRequestDB, error)
- func (pql Postgresql) GetNostrAuth(tx pgx.Tx, nonce string) (database.NostrLoginAuth, error)
- func (pql Postgresql) GetProofsCountByKeyset(since time.Time) (map[string]database.ProofsCountByKeyset, 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) GetProofsTimeSeries(since int64, bucketMinutes int) ([]database.ProofTimeSeriesPoint, 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) GetTx(ctx context.Context) (pgx.Tx, 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) SetConfig(config utils.Config) error
- func (pql Postgresql) SetProofsState(tx pgx.Tx, proofs cashu.Proofs, state cashu.ProofState) error
- func (pql Postgresql) SubTx(ctx context.Context, tx pgx.Tx) (pgx.Tx, error)
- func (pql Postgresql) UpdateConfig(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) 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) GetBlindSigsCountByKeyset ¶ added in v0.4.0
func (pql Postgresql) GetBlindSigsCountByKeyset(since time.Time) (map[string]database.BlindSigsCountByKeyset, error)
func (Postgresql) GetBlindSigsTimeSeries ¶ added in v0.4.0
func (pql Postgresql) GetBlindSigsTimeSeries(since int64, bucketMinutes int) ([]database.ProofTimeSeriesPoint, 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) GetMeltRequestsByTimeAndId ¶ added in v0.4.2
func (pql Postgresql) GetMeltRequestsByTimeAndId(ctx context.Context, since time.Time, id *string) ([]cashu.MeltRequestDB, error)
func (Postgresql) GetMintMeltBalanceByTime ¶
func (pql Postgresql) GetMintMeltBalanceByTime(time int64) (database.MintMeltBalance, 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) GetMintRequestsByTimeAndId ¶ added in v0.4.2
func (pql Postgresql) GetMintRequestsByTimeAndId(ctx context.Context, since time.Time, id *string) ([]cashu.MintRequestDB, error)
func (Postgresql) GetNostrAuth ¶
func (pql Postgresql) GetNostrAuth(tx pgx.Tx, nonce string) (database.NostrLoginAuth, error)
func (Postgresql) GetProofsCountByKeyset ¶ added in v0.4.0
func (pql Postgresql) GetProofsCountByKeyset(since time.Time) (map[string]database.ProofsCountByKeyset, 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) GetProofsTimeSeries ¶ added in v0.4.0
func (pql Postgresql) GetProofsTimeSeries(since int64, bucketMinutes int) ([]database.ProofTimeSeriesPoint, error)
func (Postgresql) GetRestoreSigsFromBlindedMessages ¶
func (pql Postgresql) GetRestoreSigsFromBlindedMessages(tx pgx.Tx, B_ []cashu.WrappedPublicKey) ([]cashu.RecoverSigDB, error)
func (Postgresql) GetSeedsByUnit ¶
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) SetProofsState ¶
func (pql Postgresql) SetProofsState(tx pgx.Tx, proofs cashu.Proofs, state cashu.ProofState) error
func (Postgresql) UpdateConfig ¶
func (pql Postgresql) UpdateConfig(config utils.Config) error
func (Postgresql) UpdateLastLoggedIn ¶
func (Postgresql) UpdateNostrAuthActivation ¶
func (Postgresql) UpdateSeedsActiveStatus ¶
Click to show internal directories.
Click to hide internal directories.