parser

package
v0.0.0-...-737f61f Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Posting

type Posting struct {
	Account string
	Amount  string
}

Posting represents an account the movement of value into or out of it.

func (Posting) String

func (p Posting) String() string

type Transaction

type Transaction struct {
	Line     int
	Date     time.Time
	Payee    string
	Comment  string
	Postings []Posting
}

Transaction represents the movement of value between one or more accounts

func ParseLedger

func ParseLedger(reader io.Reader) (ledger []Transaction, err error)

ParseLedger parses a Register file. It is expected to be in exactly the format that is output by reckon (https://github.com/cantino/reckon)

func (Transaction) String

func (t Transaction) String() string

func (*Transaction) Validate

func (t *Transaction) Validate() (err error)

Validate checks to see if we have what appears to be a full transaction

Jump to

Keyboard shortcuts

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