csv

package
v0.0.0-...-7756bb0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package csv translates qif/reader data to CSV.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Line                 int
	Type                 string
	Name                 string
	CreditLimit          string
	Description          string
	StatementBalance     string
	StatementBalanceDate string
}

type CSV

type CSV struct {
	Accounts     []*Account
	Transactions []*Transaction `json:"transactions"`
	Map          struct {
		Accounts map[string]*Account
	}
}

func Translate

func Translate(r *reader.Reader) (*CSV, error)

func (*CSV) Len

func (c *CSV) Len() int

func (*CSV) Less

func (c *CSV) Less(i, j int) bool

func (*CSV) Swap

func (c *CSV) Swap(i, j int)

func (*CSV) Write

func (c *CSV) Write(w io.Writer) error

type Split

type Split struct {
	Line     int
	Account  string
	Amount   string
	Category string
	IsZero   bool
	Memo     string
}

type Transaction

type Transaction struct {
	Line          int
	Type          string
	Date          string
	Account       *Account
	ToAccount     string
	Amount        string
	Category      string
	ClearedStatus string
	IsLinked      bool
	IsZero        bool
	Memo          string
	Payee         string
	RefNo         string
	Split         []Split
}

Jump to

Keyboard shortcuts

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