Documentation ¶
Index ¶
- type AccountInterface
- type ApiKeyInterface
- type BudgetInterface
- type DB
- func (db *DB) AcceptInvite(invite *types.Invite, userId string) error
- func (db *DB) AddBalance(account *types.Account, date time.Time) error
- func (db *DB) AddBalances(accounts []*types.Account, date time.Time) error
- func (db *DB) AddNativeBalanceCost(account *types.Account, date time.Time) error
- func (db *DB) AddNativeBalanceNearestInTime(account *types.Account, date time.Time) error
- func (db *DB) AddNativeBalancesCost(accounts []*types.Account, date time.Time) error
- func (db *DB) AddNativeBalancesNearestInTime(accounts []*types.Account, date time.Time) error
- func (db *DB) CreateOrg(org *types.Org, userId string, accounts []*types.Account) (err error)
- func (db *DB) DeleteAccount(id string) error
- func (db *DB) DeleteAndInsertTransaction(oldId string, transaction *types.Transaction) (err error)
- func (db *DB) DeleteApiKey(id string, userId string) error
- func (db *DB) DeleteBudget(orgId string) error
- func (db *DB) DeleteInvite(id string) error
- func (db *DB) DeletePrice(id string) error
- func (db *DB) DeleteSession(id string, userId string) error
- func (db *DB) DeleteTransaction(id string) (err error)
- func (db *DB) Escape(sql string) string
- func (db *DB) GetAccount(id string) (*types.Account, error)
- func (db *DB) GetAccountsByOrgId(orgId string) ([]*types.Account, error)
- func (db *DB) GetApiKeys(userId string) ([]*types.ApiKey, error)
- func (db *DB) GetBudget(orgId string) (*types.Budget, error)
- func (db *DB) GetChildCountByAccountId(id string) (int64, error)
- func (db *DB) GetInvite(id string) (*types.Invite, error)
- func (db *DB) GetInvites(orgId string) ([]*types.Invite, error)
- func (db *DB) GetOrg(orgId string, userId string) (*types.Org, error)
- func (db *DB) GetOrgAdmins(orgId string) ([]*types.User, error)
- func (db *DB) GetOrgUserIds(orgId string) ([]string, error)
- func (db *DB) GetOrgs(userId string) ([]*types.Org, error)
- func (db *DB) GetPermissionedAccountIds(orgId string, userId string, tokenId string) ([]string, error)
- func (db *DB) GetPriceById(id string) (*types.Price, error)
- func (db *DB) GetPricesByCurrency(orgId string, currency string) ([]*types.Price, error)
- func (db *DB) GetPricesNearestInTime(orgId string, date time.Time) ([]*types.Price, error)
- func (db *DB) GetRootAccount(orgId string) (*types.Account, error)
- func (db *DB) GetSplitCountByAccountId(id string) (int64, error)
- func (db *DB) GetTransactionById(id string) (*types.Transaction, error)
- func (db *DB) GetTransactionsByAccount(accountId string, options *types.QueryOptions) ([]*types.Transaction, error)
- func (db *DB) GetTransactionsByOrg(orgId string, options *types.QueryOptions, accountIds []string) ([]*types.Transaction, error)
- func (db *DB) GetUserByActiveSession(sessionId string) (*types.User, error)
- func (db *DB) GetUserByApiKey(keyId string) (*types.User, error)
- func (db *DB) GetUserByEmailVerifyCode(code string) (*types.User, error)
- func (db *DB) GetUserByResetCode(code string) (*types.User, error)
- func (db *DB) GetVerifiedUserByEmail(email string) (*types.User, error)
- func (db *DB) InsertAccount(account *types.Account) error
- func (db *DB) InsertAndReplaceBudget(budget *types.Budget) (err error)
- func (db *DB) InsertApiKey(key *types.ApiKey) error
- func (db *DB) InsertInvite(invite *types.Invite) error
- func (db *DB) InsertPrice(price *types.Price) error
- func (db *DB) InsertSession(session *types.Session) error
- func (db *DB) InsertTransaction(transaction *types.Transaction) (err error)
- func (db *DB) InsertUser(user *types.User) error
- func (db *DB) UpdateAccount(account *types.Account) error
- func (db *DB) UpdateApiKey(key *types.ApiKey) error
- func (db *DB) UpdateApiKeyActivity(id string) error
- func (db *DB) UpdateOrg(org *types.Org) error
- func (db *DB) UpdateSessionActivity(id string) error
- func (db *DB) UpdateUser(user *types.User) error
- func (db *DB) UpdateUserResetPassword(user *types.User) error
- func (db *DB) VerifyUser(code string) error
- type Datastore
- type OrgInterface
- type PriceInterface
- type SessionInterface
- type SystemHealthInteface
- type TransactionInterface
- type UserInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInterface ¶
type AccountInterface interface { InsertAccount(account *types.Account) error UpdateAccount(account *types.Account) error GetAccount(string) (*types.Account, error) GetAccountsByOrgId(orgId string) ([]*types.Account, error) GetPermissionedAccountIds(string, string, string) ([]string, error) GetSplitCountByAccountId(id string) (int64, error) GetChildCountByAccountId(id string) (int64, error) DeleteAccount(id string) error AddBalances([]*types.Account, time.Time) error AddNativeBalancesCost([]*types.Account, time.Time) error AddNativeBalancesNearestInTime([]*types.Account, time.Time) error AddBalance(*types.Account, time.Time) error AddNativeBalanceCost(*types.Account, time.Time) error AddNativeBalanceNearestInTime(*types.Account, time.Time) error GetRootAccount(string) (*types.Account, error) }
type ApiKeyInterface ¶
type BudgetInterface ¶
type DB ¶
func (*DB) AddNativeBalanceCost ¶
func (*DB) AddNativeBalanceNearestInTime ¶
func (*DB) AddNativeBalancesCost ¶
func (*DB) AddNativeBalancesNearestInTime ¶
func (*DB) DeleteAccount ¶
func (*DB) DeleteAndInsertTransaction ¶
func (db *DB) DeleteAndInsertTransaction(oldId string, transaction *types.Transaction) (err error)
func (*DB) DeleteBudget ¶
func (*DB) DeleteInvite ¶
func (*DB) DeletePrice ¶
func (*DB) DeleteTransaction ¶
func (*DB) GetAccountsByOrgId ¶
func (*DB) GetChildCountByAccountId ¶
func (*DB) GetPermissionedAccountIds ¶
func (*DB) GetPricesByCurrency ¶
func (*DB) GetPricesNearestInTime ¶
func (*DB) GetSplitCountByAccountId ¶
func (*DB) GetTransactionById ¶
func (db *DB) GetTransactionById(id string) (*types.Transaction, error)
func (*DB) GetTransactionsByAccount ¶
func (db *DB) GetTransactionsByAccount(accountId string, options *types.QueryOptions) ([]*types.Transaction, error)
func (*DB) GetTransactionsByOrg ¶
func (db *DB) GetTransactionsByOrg(orgId string, options *types.QueryOptions, accountIds []string) ([]*types.Transaction, error)
func (*DB) GetUserByActiveSession ¶
func (*DB) GetUserByEmailVerifyCode ¶
func (*DB) GetVerifiedUserByEmail ¶
func (*DB) InsertAndReplaceBudget ¶
func (*DB) InsertTransaction ¶
func (db *DB) InsertTransaction(transaction *types.Transaction) (err error)
func (*DB) UpdateApiKeyActivity ¶
func (*DB) UpdateSessionActivity ¶
func (*DB) VerifyUser ¶
type Datastore ¶
type Datastore interface { Escape(string) string UserInterface OrgInterface AccountInterface TransactionInterface PriceInterface SessionInterface ApiKeyInterface SystemHealthInteface BudgetInterface }
type OrgInterface ¶
type OrgInterface interface { CreateOrg(*types.Org, string, []*types.Account) error UpdateOrg(*types.Org) error GetOrg(string, string) (*types.Org, error) GetOrgs(string) ([]*types.Org, error) GetOrgUserIds(string) ([]string, error) InsertInvite(*types.Invite) error AcceptInvite(*types.Invite, string) error GetInvites(string) ([]*types.Invite, error) GetInvite(string) (*types.Invite, error) DeleteInvite(string) error }
type PriceInterface ¶
type SessionInterface ¶
type SystemHealthInteface ¶
type SystemHealthInteface interface {
Ping() error
}
type TransactionInterface ¶
type TransactionInterface interface { InsertTransaction(*types.Transaction) error GetTransactionById(string) (*types.Transaction, error) GetTransactionsByAccount(string, *types.QueryOptions) ([]*types.Transaction, error) GetTransactionsByOrg(string, *types.QueryOptions, []string) ([]*types.Transaction, error) DeleteTransaction(string) error DeleteAndInsertTransaction(string, *types.Transaction) error }
type UserInterface ¶
type UserInterface interface { InsertUser(*types.User) error VerifyUser(string) error UpdateUser(*types.User) error UpdateUserResetPassword(*types.User) error GetVerifiedUserByEmail(string) (*types.User, error) GetUserByActiveSession(string) (*types.User, error) GetUserByApiKey(string) (*types.User, error) GetUserByResetCode(string) (*types.User, error) GetUserByEmailVerifyCode(string) (*types.User, error) GetOrgAdmins(string) ([]*types.User, error) }
Click to show internal directories.
Click to hide internal directories.