ledger

package
v0.0.0-...-082a807 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID string `json:"id" csv:"id"`

	CreatedAt time.Time  `json:"created_at" csv:"created_at"`
	SettledAt *time.Time `json:"settled_at" csv:"settled_at"`

	Description string  `json:"description" csv:"description"`
	Message     *string `json:"message" csv:"message"`

	Amount       int `json:"amount" csv:"amount"`
	BalanceAfter int `json:"balance_after" csv:"balance_after"`
}

type Ledger

type Ledger struct {
	CurrentBalance int
	AccountName    string
	Entries        []Entry
}

func FromTransactions

func FromTransactions(accountName string, xacts []upapi.Transaction) *Ledger

func (*Ledger) DumpCSV

func (l *Ledger) DumpCSV() error

func (*Ledger) HighWaterMark

func (l *Ledger) HighWaterMark() int

Jump to

Keyboard shortcuts

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