package ht
import "git.sr.ht/~dhruvin/go-hledger-types"
Index ¶
- Variables
- type Amount
- type AmountPrice
- type AmountStyle
- type BalanceAssertion
- type Date
- type DecimalMark
- func (self *DecimalMark) MarshalJSON() ([]byte, error)
- func (self *DecimalMark) UnmarshalJSON(data []byte) error
- type DigitGroupStyle
- func (self *DigitGroupStyle) MarshalJSON() ([]byte, error)
- func (self *DigitGroupStyle) UnmarshalJSON(data []byte) error
- type Posting
- type PostingType
- func (self *PostingType) MarshalJSON() ([]byte, error)
- func (self *PostingType) UnmarshalJSON(data []byte) error
- type PriceType
- func (self *PriceType) MarshalJSON() ([]byte, error)
- func (self *PriceType) UnmarshalJSON(data []byte) error
- type Quantity
- type Side
- type SourcePosition
- type Status
- func (self *Status) MarshalJSON() ([]byte, error)
- func (self *Status) UnmarshalJSON(data []byte) error
- type Tag
- type Transaction
Variables ¶
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 Date ¶
func (*Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
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 Quantity ¶
type Quantity struct { DecimalMantissa int64 `json:"decimalMantissa"` DecimalPlaces int `json:"decimalPlaces"` FloatingPoint float64 `json:"floatingPoint"` }
type Side ¶
type Side uint8
func (*Side) MarshalJSON ¶
func (*Side) UnmarshalJSON ¶
type SourcePosition ¶
type SourcePosition struct { Name string `json:"sourceName"` Column uint64 `json:"sourceColumn"` Line uint64 `json:"sourceLine"` }
type Status ¶
type Status uint8
func (*Status) MarshalJSON ¶
func (*Status) UnmarshalJSON ¶
type Tag ¶
func (*Tag) MarshalJSON ¶
func (*Tag) UnmarshalJSON ¶
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"` }
Source Files ¶
ht.go
- Version
- v0.0.0-20220603202322-e3a058da519a (latest)
- Published
- Jun 3, 2022
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 1 week ago –
Tools for package owners.