hledger

package
v0.0.0-...-fb7d8ed Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Parent   string   `json:"parent"`
	Children []string `json:"children"`
	Name     string   `json:"name"`
	Balance  Balance  `json:"balance"`
}

type Balance

type Balance struct {
	Commodity string `json:"commodity"`
	Quantity  int64  `json:"quantity"`
}

type DateRange

type DateRange struct {
	From int64 `json:"from"`
	To   int64 `json:"to"`
}

type HledgerProxy

type HledgerProxy struct {
	// contains filtered or unexported fields
}

func New

func New(apiUrl, journalPath string) *HledgerProxy

func (*HledgerProxy) Accounts

func (p *HledgerProxy) Accounts() func(http.ResponseWriter, *http.Request)

func (*HledgerProxy) Cashflow

func (p *HledgerProxy) Cashflow() func(http.ResponseWriter, *http.Request)

func (*HledgerProxy) ExpenseSummary

func (p *HledgerProxy) ExpenseSummary() func(http.ResponseWriter, *http.Request)

func (*HledgerProxy) JournalPath

func (p *HledgerProxy) JournalPath() string

func (*HledgerProxy) Transactions

func (p *HledgerProxy) Transactions() func(http.ResponseWriter, *http.Request)

func (*HledgerProxy) Url

func (p *HledgerProxy) Url(str string) string

type Posting

type Posting struct {
	Amount  Balance `json:"amount"`
	Account string  `json:"account"`
}

type SimpleAccount

type SimpleAccount struct {
	Name    string `json:"name"`
	Balance int64  `json:"balance"`
}

type SimpleAccounts

type SimpleAccounts struct {
	Accounts []SimpleAccount `json:"accounts"`
}

type Transaction

type Transaction struct {
	Postings    []Posting `json:"postings"`
	Timestamp   int64     `json:"timestamp"`
	Description string    `json:"description"`
}

Jump to

Keyboard shortcuts

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