Documentation
¶
Index ¶
- func GetRawByCurrency(ctx context.Context, id, kind string, cur currency.Type, test bool) ([]*transaction.Transaction, error)
- type TransactionData
- type TransactionDatas
- func GetTransactions(ctx context.Context, id, kind string, test bool) (*TransactionDatas, error)
- func GetTransactionsByCurrency(ctx context.Context, id, kind string, cur currency.Type, test bool) (*TransactionDatas, error)
- func TallyTransactions(ctx context.Context, id, kind string, transs []*transaction.Transaction) (*TransactionDatas, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRawByCurrency ¶ added in v1.46.25
func GetRawByCurrency(ctx context.Context, id, kind string, cur currency.Type, test bool) ([]*transaction.Transaction, error)
GetRawByCurrency returns the RAW source- and destination-side transactions for a subject in one currency — the same union GetTransactionsByCurrency tallies, but WITHOUT filtering expired deposits or rolling up a balance. The bucket split (billing/bucket) needs the raw ledger so it can count granted-but-expired credit separately from still-spendable credit. ONE central store, org-scoped by the namespace bound on ctx (identical to GetTransactionsByCurrency).
Types ¶
type TransactionData ¶
type TransactionData struct {
Balance currency.Cents `json:"balance"`
Holds currency.Cents `json:"holds"`
Transactions []*transaction.Transaction `json:"transactions"`
}
type TransactionDatas ¶
type TransactionDatas struct {
Id string `json:"id"`
Kind string `json:"kind"`
Data map[currency.Type]*TransactionData `json:"data"`
}
func GetTransactions ¶
func TallyTransactions ¶
func TallyTransactions(ctx context.Context, id, kind string, transs []*transaction.Transaction) (*TransactionDatas, error)
Click to show internal directories.
Click to hide internal directories.