Documentation ¶
Index ¶
- Variables
- func CloseDB() error
- func DownloadDatabase() (string, error)
- func GetDatabase(forceUpdate bool) (*sql.DB, *sqlx.DB, error)
- func InitTables(db *sql.DB) error
- func UploadDatabase() (*sql.DB, error)
- type Account
- type SqliteStore
- func (store SqliteStore) AddCategories(usernameHash string, categories []models.Category) ([]models.Category, error)
- func (store SqliteStore) AddDeviceToken(usernameHash string, deviceToken string) ([]string, error)
- func (store SqliteStore) Close() error
- func (store SqliteStore) GetAccounts(usernamehash string) (models.BankResponse, error)
- func (store SqliteStore) GetBankData(usernamehash string) (models.BankResponse, error)
- func (store SqliteStore) GetCategories(usernameHash string) ([]models.Category, error)
- func (store SqliteStore) GetCredentials(usernameHash string) (string, error)
- func (store SqliteStore) GetDeviceTokens(usernameHash string) ([]string, error)
- func (store SqliteStore) GetExclusions(usernameHash string) ([]models.Transaction, error)
- func (store SqliteStore) GetInvocations(usernamehash string) (models.InvocationsResponse, error)
- func (store SqliteStore) GetStoredPassword(usernamehash string) (string, error)
- func (store SqliteStore) GetTransactions(usernamehash string) (models.BankResponse, error)
- func (store SqliteStore) PatchTransaction(usernameHash string, transactionId int64, ...) (models.Transaction, error)
- func (store SqliteStore) PutUser(usernameHash string, password string) error
- func (store SqliteStore) SetCredentials(usernameHash string, credentials string) error
- type Transaction
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDBFileNotFound = errors.New("DB files not found")
Functions ¶
func DownloadDatabase ¶
func InitTables ¶
func UploadDatabase ¶
Types ¶
type Account ¶
type Account struct { BankID int64 `db:"bank_id"` UsernameHash string `db:"user"` DateRecorded int64 `db:"date_recorded"` Bank string `db:"bank"` Type string `db:"type"` AccountName string `db:"account_name"` BSB string `db:"bsb"` AccountNumber int64 `db:"account_number"` CurrentBalance decimal.Decimal `db:"current_balance"` AvailableBalance decimal.Decimal `db:"available_balance"` }
type SqliteStore ¶
type SqliteStore struct {
// contains filtered or unexported fields
}
func New ¶
func New() (*SqliteStore, error)
func (SqliteStore) AddCategories ¶
func (SqliteStore) AddDeviceToken ¶
func (store SqliteStore) AddDeviceToken(usernameHash string, deviceToken string) ([]string, error)
func (SqliteStore) Close ¶
func (store SqliteStore) Close() error
func (SqliteStore) GetAccounts ¶
func (store SqliteStore) GetAccounts(usernamehash string) (models.BankResponse, error)
func (SqliteStore) GetBankData ¶
func (store SqliteStore) GetBankData(usernamehash string) (models.BankResponse, error)
func (SqliteStore) GetCategories ¶
func (store SqliteStore) GetCategories(usernameHash string) ([]models.Category, error)
func (SqliteStore) GetCredentials ¶
func (store SqliteStore) GetCredentials(usernameHash string) (string, error)
func (SqliteStore) GetDeviceTokens ¶
func (store SqliteStore) GetDeviceTokens(usernameHash string) ([]string, error)
func (SqliteStore) GetExclusions ¶
func (store SqliteStore) GetExclusions(usernameHash string) ([]models.Transaction, error)
func (SqliteStore) GetInvocations ¶
func (store SqliteStore) GetInvocations(usernamehash string) (models.InvocationsResponse, error)
func (SqliteStore) GetStoredPassword ¶
func (store SqliteStore) GetStoredPassword(usernamehash string) (string, error)
func (SqliteStore) GetTransactions ¶
func (store SqliteStore) GetTransactions(usernamehash string) (models.BankResponse, error)
func (SqliteStore) PatchTransaction ¶
func (store SqliteStore) PatchTransaction(usernameHash string, transactionId int64, transactionPatch models.TransactionPatch) (models.Transaction, error)
func (SqliteStore) PutUser ¶
func (store SqliteStore) PutUser(usernameHash string, password string) error
func (SqliteStore) SetCredentials ¶
func (store SqliteStore) SetCredentials(usernameHash string, credentials string) error
type Transaction ¶
type Transaction struct { TransactionID int64 `db:"transaction_id"` UsernameHash string `db:"user"` DateRecorded int64 `db:"date_recorded"` Date int64 `db:"date"` Account int64 `db:"account"` Bank string `db:"bank"` Description string `db:"description"` DisplayableDescription string `db:"displayable_description"` Credit decimal.Decimal `db:"credit"` Debit decimal.Decimal `db:"debit"` Type string `db:"type"` Location string `db:"location"` Card string `db:"card"` Status string `db:"status"` Exclude int `db:"exclude"` }
Click to show internal directories.
Click to hide internal directories.