ledger

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Beancount added in v0.5.5

type Beancount struct{}

func (Beancount) Parse added in v0.5.5

func (Beancount) Parse(journalPath string, prices []price.Price) ([]*posting.Posting, error)

func (Beancount) Prices added in v0.5.5

func (Beancount) Prices(journalPath string) ([]price.Price, error)

func (Beancount) ValidateFile added in v0.5.5

func (Beancount) ValidateFile(journalPath string) ([]LedgerFileError, string, error)

type HLedgerCLI added in v0.3.6

type HLedgerCLI struct{}

func (HLedgerCLI) Parse added in v0.3.6

func (HLedgerCLI) Parse(journalPath string, prices []price.Price) ([]*posting.Posting, error)

func (HLedgerCLI) Prices added in v0.3.9

func (HLedgerCLI) Prices(journalPath string) ([]price.Price, error)

func (HLedgerCLI) ValidateFile added in v0.3.6

func (HLedgerCLI) ValidateFile(journalPath string) ([]LedgerFileError, string, error)

type HLedgerPosting added in v0.6.4

type HLedgerPosting struct {
	Account string     `json:"paccount"`
	Comment string     `json:"pcomment"`
	Tags    [][]string `json:"ptags"`
	Amount  []struct {
		Commodity string `json:"acommodity"`
		Quantity  struct {
			Value float64 `json:"floatingPoint"`
		} `json:"aquantity"`
		Price struct {
			Contents struct {
				Commodity string `json:"acommodity"`
				Quantity  struct {
					Value float64 `json:"floatingPoint"`
				} `json:"aquantity"`
			} `json:"contents"`
			Tag string `json:"tag"`
		} `json:"aprice"`
	} `json:"pamount"`
}

type HLedgerTransaction added in v0.6.4

type HLedgerTransaction struct {
	Date        string     `json:"tdate"`
	Description string     `json:"tdescription"`
	ID          int64      `json:"tindex"`
	Status      string     `json:"tstatus"`
	Comment     string     `json:"tcomment"`
	Tags        [][]string `json:"ttags"`
	TSourcePos  []struct {
		SourceColumn uint64 `json:"sourceColumn"`
		SourceLine   uint64 `json:"sourceLine"`
		SourceName   string `json:"sourceName"`
	} `json:"tsourcepos"`
	Postings []HLedgerPosting `json:"tpostings"`
}

type Ledger added in v0.3.6

type Ledger interface {
	ValidateFile(journalPath string) ([]LedgerFileError, string, error)
	Parse(journalPath string, prices []price.Price) ([]*posting.Posting, error)
	Prices(jornalPath string) ([]price.Price, error)
}

func Cli added in v0.3.6

func Cli() Ledger

type LedgerCLI added in v0.3.6

type LedgerCLI struct{}

func (LedgerCLI) Parse added in v0.3.6

func (LedgerCLI) Parse(journalPath string, _prices []price.Price) ([]*posting.Posting, error)

func (LedgerCLI) Prices added in v0.3.9

func (LedgerCLI) Prices(journalPath string) ([]price.Price, error)

func (LedgerCLI) ValidateFile added in v0.3.6

func (LedgerCLI) ValidateFile(journalPath string) ([]LedgerFileError, string, error)

type LedgerFileError added in v0.3.1

type LedgerFileError struct {
	LineFrom uint64 `json:"line_from"`
	LineTo   uint64 `json:"line_to"`
	Error    string `json:"error"`
	Message  string `json:"message"`
}

Jump to

Keyboard shortcuts

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