Documentation ¶
Index ¶
- type Account
- type AccountNames
- type AccountTransaction
- type AccountTransactions
- type Accounts
- type AddTransaction
- type AddTransactionArg
- type AddTransactionMultiArg
- type AddTransactionPosting
- type AddTransactionPostingAmount
- type AddTransactionPostingArg
- type AddTransactionPostingMultiArg
- type Commodities
- type HLedgerSdk
- func (s *HLedgerSdk) AddTransaction(add AddTransactionArg) error
- func (s *HLedgerSdk) AddTransactionMulti(add AddTransactionMultiArg) error
- func (s *HLedgerSdk) GetAccountNames() (*AccountNames, error)
- func (s *HLedgerSdk) GetAccountTransactions(name string) (*AccountTransactions, error)
- func (s *HLedgerSdk) GetAccounts() (*Accounts, error)
- func (s *HLedgerSdk) GetCommodities() (*Commodities, error)
- func (s *HLedgerSdk) GetTransactions() (*Transactions, error)
- func (s *HLedgerSdk) GetVersion() (*string, error)
- type MixedAmount
- type Posting
- type Quantity
- type SourceRepo
- type Style
- type Transaction
- type Transactions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Aname string `json:"aname"` // Adeclarationinfo any `json:"adeclarationinfo"` // Aebalance []any `json:"aebalance"` Aibalance []struct { Acommodity string `json:"acommodity"` // Aprice any `json:"aprice"` Aquantity Quantity `json:"aquantity"` } `json:"aibalance"` Anumpostings int `json:"anumpostings"` // Aboring bool `json:"aboring"` Aparent string `json:"aparent_"` }
type AccountNames ¶
type AccountNames = []string
type AccountTransaction ¶
type AccountTransaction struct { // the transaction, unmodified Transaction Transaction `json:"transaction"` // the transaction, as seen from the current account RelativeTransaction Transaction `json:"relative_transaction"` // is this a split (more than one posting to other accounts) ? Split bool `json:"split"` // a display string describing the other account(s), if any // parents are shortened! // AccountNameDisplay string `json:"account_name_display"` // the amount posted to the current account(s) (or total amount posted) PostedAmount []MixedAmount `json:"posted_amount"` // the register's running total or the current account(s)'s historical balance, after this transaction TotalAmount []MixedAmount `json:"total_amount"` }
func (*AccountTransaction) UnmarshalJSON ¶
func (r *AccountTransaction) UnmarshalJSON(p []byte) error
type AddTransaction ¶
type AddTransaction struct { Tcode string `json:"tcode"` Tcomment string `json:"tcomment"` Tdate string `json:"tdate"` Tdate2 any `json:"tdate2"` Tdescription string `json:"tdescription"` Tindex int `json:"tindex"` Tpostings []AddTransactionPosting `json:"tpostings"` Tprecedingcomment string `json:"tprecedingcomment"` Tsourcepos []SourceRepo `json:"tsourcepos"` Tstatus string `json:"tstatus"` }
type AddTransactionArg ¶
type AddTransactionArg struct { Comment string Date string Postings []AddTransactionPostingArg }
type AddTransactionMultiArg ¶ added in v1.0.3
type AddTransactionMultiArg struct { Comment string Date string Postings []AddTransactionPostingMultiArg }
type AddTransactionPosting ¶
type AddTransactionPosting struct { Paccount string `json:"paccount"` Pamount []AddTransactionPostingAmount `json:"pamount"` Pbalanceassertion any `json:"pbalanceassertion"` Pcomment string `json:"pcomment"` Pdate any `json:"pdate"` Pdate2 any `json:"pdate2"` Poriginal any `json:"poriginal"` Pstatus string `json:"pstatus"` Ptransaction string `json:"ptransaction_"` Ptype string `json:"ptype"` }
type AddTransactionPostingMultiArg ¶ added in v1.0.3
type Commodities ¶
type Commodities = []string
type HLedgerSdk ¶
type HLedgerSdk struct {
// contains filtered or unexported fields
}
func New ¶
func New(baseURL string) *HLedgerSdk
func (*HLedgerSdk) AddTransaction ¶
func (s *HLedgerSdk) AddTransaction(add AddTransactionArg) error
func (*HLedgerSdk) AddTransactionMulti ¶ added in v1.0.3
func (s *HLedgerSdk) AddTransactionMulti(add AddTransactionMultiArg) error
func (*HLedgerSdk) GetAccountNames ¶
func (s *HLedgerSdk) GetAccountNames() (*AccountNames, error)
func (*HLedgerSdk) GetAccountTransactions ¶
func (s *HLedgerSdk) GetAccountTransactions(name string) (*AccountTransactions, error)
func (*HLedgerSdk) GetAccounts ¶
func (s *HLedgerSdk) GetAccounts() (*Accounts, error)
func (*HLedgerSdk) GetCommodities ¶
func (s *HLedgerSdk) GetCommodities() (*Commodities, error)
func (*HLedgerSdk) GetTransactions ¶
func (s *HLedgerSdk) GetTransactions() (*Transactions, error)
func (*HLedgerSdk) GetVersion ¶
func (s *HLedgerSdk) GetVersion() (*string, error)
type MixedAmount ¶
type SourceRepo ¶
type Transaction ¶
type Transactions ¶
type Transactions = []Transaction
Click to show internal directories.
Click to hide internal directories.