Documentation ¶
Index ¶
- func NewDB() (*sqlx.DB, error)
- type Account
- type Postgres
- func (p *Postgres) AddCategories(usernameHash string, categories []models.Category) ([]models.Category, error)
- func (p *Postgres) AddDeviceToken(usernameHash string, deviceToken string) ([]string, error)
- func (p *Postgres) Close() error
- func (p *Postgres) GetAccounts(usernamehash string) (models.BankResponse, error)
- func (p *Postgres) GetBankData(usernamehash string) (models.BankResponse, error)
- func (p *Postgres) GetCategories(usernameHash string) ([]models.Category, error)
- func (p *Postgres) GetCredentials(usernameHash string) (string, error)
- func (p *Postgres) GetDeviceTokens(usernameHash string) ([]string, error)
- func (p *Postgres) GetExclusions(usernameHash string) ([]models.Transaction, error)
- func (p *Postgres) GetInvocations(usernamehash string) (models.InvocationsResponse, error)
- func (p *Postgres) GetStoredPassword(usernamehash string) (string, error)
- func (p *Postgres) GetTransactions(usernamehash string) (models.BankResponse, error)
- func (p *Postgres) PatchTransaction(usernameHash string, transactionId int64, ...) (models.Transaction, error)
- func (p *Postgres) PutUser(usernameHash string, password string) error
- func (p *Postgres) SetCredentials(usernameHash string, credentials string) error
- type Transaction
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { BankID int64 `db:"bank_id"` UsernameHash string `db:"username_hash"` DateRecorded time.Time `db:"date_recorded"` Bank string `db:"bank"` Type string `db:"type"` AccountName string `db:"account_name"` BSB string `db:"bsb"` AccountNumber string `db:"account_number"` CurrentBalance decimal.Decimal `db:"current_balance"` AvailableBalance decimal.Decimal `db:"available_balance"` }
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func (*Postgres) AddCategories ¶
func (*Postgres) AddDeviceToken ¶
func (*Postgres) GetAccounts ¶
func (p *Postgres) GetAccounts(usernamehash string) (models.BankResponse, error)
func (*Postgres) GetBankData ¶
func (p *Postgres) GetBankData(usernamehash string) (models.BankResponse, error)
func (*Postgres) GetCategories ¶
func (*Postgres) GetCredentials ¶
func (*Postgres) GetDeviceTokens ¶
func (*Postgres) GetExclusions ¶
func (p *Postgres) GetExclusions(usernameHash string) ([]models.Transaction, error)
func (*Postgres) GetInvocations ¶
func (p *Postgres) GetInvocations(usernamehash string) (models.InvocationsResponse, error)
func (*Postgres) GetStoredPassword ¶
func (*Postgres) GetTransactions ¶
func (p *Postgres) GetTransactions(usernamehash string) (models.BankResponse, error)
func (*Postgres) PatchTransaction ¶
func (p *Postgres) PatchTransaction(usernameHash string, transactionId int64, transactionPatch models.TransactionPatch) (models.Transaction, error)
type Transaction ¶
type Transaction struct { TransactionID int64 `db:"transaction_id"` UsernameHash string `db:"username_hash"` DateRecorded time.Time `db:"date_recorded"` Date time.Time `db:"date"` Account string `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"` }
Click to show internal directories.
Click to hide internal directories.