Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidDecimalMark = errors.New("invalid decimal mark")
View Source
var ErrInvalidPostingType = errors.New("invalid posting type")
View Source
var ErrInvalidPriceType = errors.New("invalid price type")
View Source
var ErrInvalidSide = errors.New("invalid side")
View Source
var ErrInvalidStatus = errors.New("invalid status")
Functions ¶
This section is empty.
Types ¶
type Amount ¶
type Amount struct { Commodity string `json:"acommodity"` Quantity Quantity `json:"aquantity"` Style AmountStyle `json:"astyle"` Price *AmountPrice `json:"aprice"` }
type AmountPrice ¶
type AmountStyle ¶
type AmountStyle struct { CommoditySide Side `json:"ascommodityside"` CommoditySpaced bool `json:"ascommodityspaced"` Precision *uint8 `json:"asprecision"` DecimalPoint *DecimalMark `json:"asdecimalpoint"` DigitGroups *DigitGroupStyle `json:"asdigitgroups"` }
type BalanceAssertion ¶
type BalanceAssertion struct { Amount Amount `json:"baamount"` Total bool `json:"batotal"` Inclusive bool `json:"bainclusive"` Position SourcePosition `json:"baposition"` }
type DecimalMark ¶
type DecimalMark uint8
const ( Period DecimalMark = iota Comma )
func (*DecimalMark) MarshalJSON ¶
func (self *DecimalMark) MarshalJSON() ([]byte, error)
func (*DecimalMark) UnmarshalJSON ¶
func (self *DecimalMark) UnmarshalJSON(data []byte) error
type DigitGroupStyle ¶
type DigitGroupStyle struct { Separator DecimalMark Groups []uint8 }
func (*DigitGroupStyle) MarshalJSON ¶
func (self *DigitGroupStyle) MarshalJSON() ([]byte, error)
func (*DigitGroupStyle) UnmarshalJSON ¶
func (self *DigitGroupStyle) UnmarshalJSON(data []byte) error
type Posting ¶
type Posting struct { Date *Date `json:"pdate"` Date2 *Date `json:"pdate2"` Status Status `json:"pstatus"` Account string `json:"paccount"` Amounts []Amount `json:"pamount"` Comment string `json:"pcomment"` Type PostingType `json:"ptype"` Tags []Tag `json:"ptags"` BalanceAssertion *BalanceAssertion `json:"pbalanceassertion"` }
type PostingType ¶
type PostingType uint8
const ( RegularPosting PostingType = iota VirtualPosting BalancedVirtualPosting )
func (*PostingType) MarshalJSON ¶
func (self *PostingType) MarshalJSON() ([]byte, error)
func (*PostingType) UnmarshalJSON ¶
func (self *PostingType) UnmarshalJSON(data []byte) error
type PriceType ¶
type PriceType uint8
func (*PriceType) MarshalJSON ¶
func (*PriceType) UnmarshalJSON ¶
type SourcePosition ¶
type Transaction ¶
type Transaction struct { Index uint64 `json:"tindex"` PrecedingComment string `json:"tprecedingcomment"` Position [2]SourcePosition `json:"tsourcepos"` Date Date `json:"tdate"` Date2 *Date `json:"tdate2"` Status Status `json:"tstatus"` Code string `json:"tcode"` Description string `json:"tdescription"` Comment string `json:"tcomment"` Tags []Tag `json:"ttags"` Postings []Posting `json:"tpostings"` }
Click to show internal directories.
Click to hide internal directories.