Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeUnspecified = Type{""} TypeAsset = Type{"asset"} TypeLiability = Type{"liability"} TypeEquity = Type{"equity"} TypeRevenue = Type{"revenue"} TypeExpense = Type{"expense"} TypeGain = Type{"gain"} TypeLoss = Type{"loss"} )
safer enums for Type enum
View Source
var ( BasisUnspecified = Basis{""} BasisDebit = Basis{"debit"} BasisCredit = Basis{"credit"} )
View Source
var ErrParseType = errors.New("error parsing string as type")
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID string `validate:"required,KSUID"` ParentID string `validate:"omitempty,KSUID"` Name string `validate:"required"` Type Type `validate:"required"` Basis Basis `validate:"required"` CreatedAt time.Time `validate:"required"` }
Account represents a collection of entries into a logical grouping
type Basis ¶
type Basis struct { // Slug should not be accessed by dependent code. It is exported for validation reasons Slug string `validate:"oneof=debit credit"` }
func ParseBasis ¶
Click to show internal directories.
Click to hide internal directories.