common

package
v0.0.0-...-c8274e7 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account interface {
	Login(id, password string, options map[string]interface{}) error // Internal use only. see: bankpkg.Login(...)
	Logout() error
	AccountInfo() *BankAccount
	TotalBalance() (int64, error)
	LastLogin() (time.Time, error)
	Recent() ([]*Transaction, error)
	History(from, to time.Time) ([]*Transaction, error)
	NewTransferToRegisteredAccount(targetName string, amount int64) (TransferState, error)
	CommitTransfer(tr TransferState, passwd string) (string, error)
}

type BankAccount

type BankAccount struct {
	BankName   string
	BankCode   string
	BranchName string
	BranchCode string
	AccountNum string
	OwnerName  string
}

type Transaction

type Transaction struct {
	Date        time.Time `json:"date"`
	Amount      int64     `json:"amount"`
	Balance     int64     `json:"balance"`
	Description string    `json:"description"`
}

type TransferState

type TransferState interface {
	Amount() int64
	FeeMessage() string
}

Jump to

Keyboard shortcuts

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