ofx

package module
v0.0.0-...-090298d Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: Apache-2.0 Imports: 8 Imported by: 1

README

ofx

OFX library in Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountType

type AccountType int

AccountType indicates type of account represented by OFX document.

const (
	// UNKNOWN - Account type could not be determined
	UNKNOWN AccountType = iota
	// CHECKING - Checking account
	CHECKING AccountType = iota
	// SAVING - Savings account
	SAVING AccountType = iota
)

type Amount

type Amount struct {
	Value big.Rat
}

func (*Amount) ParseFromString

func (a *Amount) ParseFromString(s string) error

type Ofx

type Ofx struct {
	Type          AccountType
	BankCode      string
	BranchCode    string
	AccountNumber string
	Transactions  []*Transaction
}

Ofx contains a parsed Ofx document.

func Parse

func Parse(f io.Reader) (*Ofx, error)

Parse parses an input stream and produces an Ofx instance summarizing it. In case of any errors during the parse, a non-nil error is returned.

func (Ofx) String

func (o Ofx) String() string

type Transaction

type Transaction struct {
	Type        TransactionType
	Description string
	Memo        string
	PostedDate  time.Time
	UserDate    time.Time
	ID          string
	Amount      Amount
}

func (Transaction) String

func (t Transaction) String() string

type TransactionType

type TransactionType int

TransactionType indicates type of transaction (Debit/Credit).

const (
	DEBIT  TransactionType = iota
	CREDIT TransactionType = iota
)

func (TransactionType) String

func (i TransactionType) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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