idbank

package
v0.0.0-...-40e78dd Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BcaParserOpts

type BcaParserOpts struct {
	Year     int
	Currency string
}

type CSVFileExporterOpts

type CSVFileExporterOpts struct {
	FilePath string
}

type Exporter

type Exporter interface {
	Export(records []Record) error
}

func NewCSVFileExporter

func NewCSVFileExporter(opts CSVFileExporterOpts) Exporter

type Record

type Record struct {
	Date   civil.Date `json:"date"`
	Amount float64    `json:"amount"`
	Unit   string     `json:"unit"`
	Debit  bool       `json:"debit"`
	Notes  string     `json:"notes"`
}

func ParseFile

func ParseFile(parser StatementParser, path string) ([]Record, error)

type StatementParser

type StatementParser interface {
	Parse(r io.Reader) ([]Record, error)
}

func NewBcaParser

func NewBcaParser(opts BcaParserOpts) (StatementParser, error)

Jump to

Keyboard shortcuts

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