accounts

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AccountTypes is an array with the ordered accont types.

Functions

This section is empty.

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

Account represents an account which can be used in bookings.

func EquityAccount added in v0.0.7

func EquityAccount() *Account

EquityAccount is the equity account used for trades

func Get

func Get(name string) (*Account, error)

Get creates a new account.

func RetainedEarningsAccount

func RetainedEarningsAccount() *Account

RetainedEarningsAccount returns the account for automatic valuation bookings.

func TBDAccount

func TBDAccount() *Account

TBDAccount returns the TBD account.

func ValuationAccount

func ValuationAccount() *Account

ValuationAccount returns the account for automatic valuation bookings.

func (Account) Split

func (a Account) Split() []string

Split returns the account name split into segments.

func (Account) String

func (a Account) String() string

func (Account) Type

func (a Account) Type() AccountType

Type returns the account type.

func (Account) WriteTo

func (a Account) WriteTo(w io.Writer) (int64, error)

WriteTo writes the account to the writer.

type AccountType

type AccountType int

AccountType is the type of an account.

const (
	// ASSETS represents an asset account.
	ASSETS AccountType = iota
	// LIABILITIES represents a liability account.
	LIABILITIES
	// EQUITY represents an equity account.
	EQUITY
	// INCOME represents an income account.
	INCOME
	// EXPENSES represents an expenses account.
	EXPENSES
)

func (AccountType) String

func (t AccountType) String() string

Jump to

Keyboard shortcuts

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