store

package
v0.0.0-...-0ad7c06 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountMissingError

type AccountMissingError struct{}

func (AccountMissingError) Error

func (ame AccountMissingError) Error() string

type AccountStore

type AccountStore interface {
	InsertAccount(account *models.Account) error
	GetAccount(accountid int64, userid int64) (*models.Account, error)
	GetAccounts(userid int64) (*[]*models.Account, error)
	FindMatchingAccounts(account *models.Account) (*[]*models.Account, error)
	UpdateAccount(account *models.Account) error
	DeleteAccount(account *models.Account) error
}

type CircularAccountsError

type CircularAccountsError struct{}

func (CircularAccountsError) Error

func (cae CircularAccountsError) Error() string

type ParentAccountMissingError

type ParentAccountMissingError struct{}

func (ParentAccountMissingError) Error

func (pame ParentAccountMissingError) Error() string

type PriceStore

type PriceStore interface {
	PriceExists(price *models.Price) (bool, error)
	InsertPrice(price *models.Price) error
	GetPrice(priceid, securityid int64) (*models.Price, error)
	GetPrices(securityid int64) (*[]*models.Price, error)
	GetLatestPrice(security, currency *models.Security, date *time.Time) (*models.Price, error)
	GetEarliestPrice(security, currency *models.Security, date *time.Time) (*models.Price, error)
	UpdatePrice(price *models.Price) error
	DeletePrice(price *models.Price) error
}

type ReportStore

type ReportStore interface {
	InsertReport(report *models.Report) error
	GetReport(reportid int64, userid int64) (*models.Report, error)
	GetReports(userid int64) (*[]*models.Report, error)
	UpdateReport(report *models.Report) error
	DeleteReport(report *models.Report) error
}

type SecurityInUseError

type SecurityInUseError struct {
	Message string
}

func (SecurityInUseError) Error

func (e SecurityInUseError) Error() string

type SecurityStore

type SecurityStore interface {
	InsertSecurity(security *models.Security) error
	GetSecurity(securityid int64, userid int64) (*models.Security, error)
	GetSecurities(userid int64) (*[]*models.Security, error)
	FindMatchingSecurities(security *models.Security) (*[]*models.Security, error)
	UpdateSecurity(security *models.Security) error
	DeleteSecurity(security *models.Security) error
}

type SessionStore

type SessionStore interface {
	SessionExists(secret string) (bool, error)
	InsertSession(session *models.Session) error
	GetSession(secret string) (*models.Session, error)
	DeleteSession(session *models.Session) error
}

type Store

type Store interface {
	Empty() error
	Begin() (Tx, error)
	Close() error
}

type TooMuchNestingError

type TooMuchNestingError struct{}

func (TooMuchNestingError) Error

func (tmne TooMuchNestingError) Error() string

type TransactionStore

type TransactionStore interface {
	SplitExists(s *models.Split) (bool, error)
	InsertTransaction(t *models.Transaction, user *models.User) error
	GetTransaction(transactionid int64, userid int64) (*models.Transaction, error)
	GetTransactions(userid int64) (*[]*models.Transaction, error)
	UpdateTransaction(t *models.Transaction, user *models.User) error
	DeleteTransaction(t *models.Transaction, user *models.User) error
	GetAccountBalance(user *models.User, accountid int64) (*models.Amount, error)
	GetAccountBalanceDate(user *models.User, accountid int64, date *time.Time) (*models.Amount, error)
	GetAccountBalanceDateRange(user *models.User, accountid int64, begin, end *time.Time) (*models.Amount, error)
	GetAccountTransactions(user *models.User, accountid int64, sort string, page uint64, limit uint64) (*models.AccountTransactionsList, error)
}

type UserStore

type UserStore interface {
	UsernameExists(username string) (bool, error)
	InsertUser(user *models.User) error
	GetUser(userid int64) (*models.User, error)
	GetUserByUsername(username string) (*models.User, error)
	UpdateUser(user *models.User) error
	DeleteUser(user *models.User) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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