ofx

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *gorm.DB) provider.Provider

Types

type Account

type Account struct {
	gorm.Model
	Currency     string
	BankID       string
	AccountID    string
	Type         string
	Transactions []Transaction
}

func (Account) Conditions

func (a Account) Conditions() map[string]interface{}

func (Account) TableName

func (Account) TableName() string

func (*Account) UnmarshalXML

func (a *Account) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

type DateTime

type DateTime ofxgo.Date

func (*DateTime) Scan

func (dt *DateTime) Scan(src interface{}) error

func (*DateTime) UnmarshalXML

func (dt *DateTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (DateTime) Value

func (dt DateTime) Value() (driver.Value, error)

type OFX

type OFX struct {
	database.Database
}

func (OFX) ImportDescription

func (OFX) ImportDescription() string

func (*OFX) ImportFns

func (p *OFX) ImportFns(inputPath string) ([]provider.ImportFn, error)

func (*OFX) Migrate

func (p *OFX) Migrate() error

func (OFX) Name

func (OFX) Name() string

func (OFX) TablePrefix

func (OFX) TablePrefix() string

type Transaction

type Transaction struct {
	gorm.Model
	Type         string   `xml:"TRNTYPE"`
	Time         DateTime `xml:"DTPOSTED"`
	Amount       float32  `xml:"TRNAMT"`
	FITID        string   `xml:"FITID"`
	Name         string   `xml:"NAME"`
	Memo         string   `xml:"MEMO"`
	Currency     string
	CurrencyRate float32
	AccountID    uint
	Account      Account
}

func (Transaction) Conditions

func (t Transaction) Conditions() map[string]interface{}

func (Transaction) TableName

func (Transaction) TableName() string

func (*Transaction) UnmarshalXML

func (t *Transaction) UnmarshalXML(decoder *xml.Decoder, start xml.StartElement) error

Jump to

Keyboard shortcuts

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