util

package
v1.48.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 GetTransactions(ctx context.Context, id, kind string, test bool) (*TransactionDatas, error)

func GetTransactionsByCurrency

func GetTransactionsByCurrency(ctx context.Context, id, kind string, cur currency.Type, test bool) (*TransactionDatas, error)

func TallyTransactions

func TallyTransactions(ctx context.Context, id, kind string, transs []*transaction.Transaction) (*TransactionDatas, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL