Documentation ¶
Index ¶
- Constants
- Variables
- func Accounts(connector Connector, logger *zap.Logger) ([]model.Account, error)
- func IsLocalhostTestURL(urlStr string) bool
- func ParseAccountType(s string) accountType
- func Register(drivers ...Driver)
- func Statement(connector Connector, start, end time.Time, requestors []Requestor, ...) ([]ledger.Transaction, error)
- func Validate(account Account) error
- func ValidateConnector(connector Connector) error
- func Verify(connector Connector, requestor Requestor, parser model.TransactionParser) error
- type Account
- type Bank
- type Config
- type Connector
- type CreditCard
- type Driver
- type DriverMessage
- type Requestor
Constants ¶
const ( // CheckingType refers to a bank checking account CheckingType accountType = iota + 1 // SavingsType refers to a bank savings account SavingsType )
Variables ¶
var ( // ErrAuthFailed is returned whenever a signon request fails with an authentication problem ErrAuthFailed = errors.New("Username or password is incorrect") )
Functions ¶
func IsLocalhostTestURL ¶
IsLocalhostTestURL returns true if this is a valid URL and starts with http://localhost
func ParseAccountType ¶
func ParseAccountType(s string) accountType
ParseAccountType parses s as a bank account type, like checking or savings
func Statement ¶
func Statement(connector Connector, start, end time.Time, requestors []Requestor, parser model.TransactionParser) ([]ledger.Transaction, error)
Statement downloads and returns transactions from a direct connector for the given time period
func ValidateConnector ¶
ValidateConnector checks the state of the direct connector for correctness
Types ¶
type Account ¶
Account is a direct connect enabled account
func NewCheckingAccount ¶
NewCheckingAccount creates an account from checking details
func NewCreditCard ¶
NewCreditCard creates an account from credit card details
func NewSavingsAccount ¶
NewSavingsAccount creates an account from savings details
func UnmarshalAccount ¶
UnmarshalAccount attempts to unmarshal the given bytes into a known Direct Connect account type
type Config ¶
type Config struct { AppID string AppVersion string ClientID string `json:",omitempty"` OFXVersion string NoIndent bool `json:",omitempty"` }
Config contains financial institution connection details
type Connector ¶
type Connector interface { model.Institution URL() string Username() string Password() redactor.String SetPassword(redactor.String) Config() Config }
Connector downloads statements directly from an institution's OFX/QFX API
func UnmarshalConnector ¶
UnmarshalConnector unmarshals the given bytes into a direct connector
type CreditCard ¶
type CreditCard struct {
// contains filtered or unexported fields
}
CreditCard represents a credit card account
func (*CreditCard) Description ¶
func (d *CreditCard) Description() string
Description implements model.Account
func (*CreditCard) Institution ¶
func (d *CreditCard) Institution() model.Institution
Institution implements model.Account
func (*CreditCard) Type ¶
func (cc *CreditCard) Type() string
func (*CreditCard) UnmarshalJSON ¶
type Driver ¶ added in v0.7.0
type DriverMessage ¶ added in v0.7.0
type DriverMessage int
const ( MessageSignon DriverMessage = iota + 1 MessageBank MessageCreditCard )