Documentation ¶
Index ¶
- Variables
- func Compare(a1, a2 *Account) compare.Order
- func Remap(reg *Registry, rs regex.Regexes) mapper.Mapper[*Account]
- func Shorten(reg *Registry, m Mapping) mapper.Mapper[*Account]
- type Account
- type Mapping
- type Registry
- func (as *Registry) Create(a syntax.Account) (*Account, error)
- func (as *Registry) Get(name string) (*Account, error)
- func (as *Registry) GetPath(segments []string) (*Account, error)
- func (as *Registry) MustGet(name string) *Account
- func (as *Registry) MustGetPath(ss []string) *Account
- func (as *Registry) SwapType(a *Account) *Account
- func (as *Registry) TBDAccount() *Account
- func (as *Registry) ValuationAccountFor(a *Account) *Account
- type Rule
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var Types = []Type{ASSETS, LIABILITIES, EQUITY, INCOME, EXPENSES}
Types is an array with the ordered accont types.
Functions ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account represents an account which can be used in bookings.
type Mapping ¶
type Mapping []Rule
Mapping is a set of mapping rules.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is a thread-safe collection of accounts.
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry creates a new thread-safe collection of accounts.
func (*Registry) MustGetPath ¶
func (*Registry) TBDAccount ¶
TBDAccount returns the TBD account.
func (*Registry) ValuationAccountFor ¶
ValuationAccountFor returns the valuation account which corresponds to the given Asset or Liability account.
Click to show internal directories.
Click to hide internal directories.