Documentation
¶
Index ¶
- func CheckExistingAccount(db *pgxpool.Pool, params CheckExistingAccountParams) (bool, error)
- func CreateNewAccount(db *pgxpool.Pool, params CreateNewAccountParams) (bool, error)
- func CreateNewCashRecord(db *pgxpool.Pool, params CreateNewCashRecordParams) (bool, error)
- func CreateNewClient(db *pgxpool.Pool, params CreateNewClientParams) (string, error)
- func CreateNewFuturePayment(db *pgxpool.Pool, params CreateNewFuturePaymentParams) (bool, error)
- func CreateNewStockHolding(db *pgxpool.Pool, params CreateNewStockHoldingParams) (bool, error)
- func CreateNewTransaction(db *pgxpool.Pool, params CreateNewTransactionParams) (bool, error)
- func DeleteAccount(db *pgxpool.Pool, accountId string) (bool, error)
- func DeleteCashRecord(db *pgxpool.Pool, cashId string, clientId string) (bool, error)
- func DeleteFuturePayment(db *pgxpool.Pool, futurePaymentId string, clientId string) (bool, error)
- func DeleteStockHolding(db *pgxpool.Pool, accountStockId string) (bool, error)
- func DeleteTransaction(db *pgxpool.Pool, transactionId string, clientId string) (bool, error)
- func GetAccountBalance(db *pgxpool.Pool, accountId string) (string, error)
- func GetDefaultCurrency(db *pgxpool.Pool) (string, error)
- func UpdateAccount(db *pgxpool.Pool, params UpdateAccountParams) (bool, error)
- func UpdateAccountBalance(db *pgxpool.Pool, balance string, accountId string) (bool, error)
- func UpdateCashRecord(db *pgxpool.Pool, params UpdateCashRecordParams) (bool, error)
- func UpdateClientSettings(db *pgxpool.Pool, params UpdateClientSettingsParams) (bool, error)
- func UpdateExchangeRate(db *pgxpool.Pool, params UpdateExchangeRateParams) (bool, error)
- func UpdateFuturePayment(db *pgxpool.Pool, params UpdateFuturePaymentParams) (bool, error)
- func UpdateFuturePaymentSchedule(db *pgxpool.Pool, scheduledAt time.Time, id string) (bool, error)
- func UpdateStockHoldingCost(db *pgxpool.Pool, params UpdateStockHoldingCostParams) (bool, error)
- func UpdateStockPrice(db *pgxpool.Pool, params UpdateStockPriceParams) (bool, error)
- type Account
- type AccountDetails
- type AccountStock
- type AccountSummary
- type AssetProvider
- type AssetProviderAccountType
- type Cash
- type CheckExistingAccountParams
- type Client
- type Country
- type CreateNewAccountParams
- type CreateNewCashRecordParams
- type CreateNewClientParams
- type CreateNewFuturePaymentParams
- type CreateNewStockHoldingParams
- type CreateNewTransactionParams
- type Currency
- type ExchangeRate
- type FuturePayment
- type ProviderDetail
- type Stock
- type Transaction
- type TransactionAndAccountBalance
- type UpdateAccountParams
- type UpdateCashRecordParams
- type UpdateClientSettingsParams
- type UpdateExchangeRateParams
- type UpdateFuturePaymentParams
- type UpdateStockHoldingCostParams
- type UpdateStockPriceParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExistingAccount ¶
func CheckExistingAccount(db *pgxpool.Pool, params CheckExistingAccountParams) (bool, error)
func CreateNewAccount ¶
func CreateNewAccount(db *pgxpool.Pool, params CreateNewAccountParams) (bool, error)
func CreateNewCashRecord ¶
func CreateNewCashRecord(db *pgxpool.Pool, params CreateNewCashRecordParams) (bool, error)
func CreateNewClient ¶
func CreateNewClient(db *pgxpool.Pool, params CreateNewClientParams) (string, error)
func CreateNewFuturePayment ¶
func CreateNewFuturePayment(db *pgxpool.Pool, params CreateNewFuturePaymentParams) (bool, error)
func CreateNewStockHolding ¶
func CreateNewStockHolding(db *pgxpool.Pool, params CreateNewStockHoldingParams) (bool, error)
func CreateNewTransaction ¶
func CreateNewTransaction(db *pgxpool.Pool, params CreateNewTransactionParams) (bool, error)
func DeleteCashRecord ¶
func DeleteFuturePayment ¶
func DeleteStockHolding ¶
func DeleteTransaction ¶
func UpdateAccount ¶
func UpdateAccount(db *pgxpool.Pool, params UpdateAccountParams) (bool, error)
func UpdateAccountBalance ¶
func UpdateCashRecord ¶
func UpdateCashRecord(db *pgxpool.Pool, params UpdateCashRecordParams) (bool, error)
func UpdateClientSettings ¶
func UpdateClientSettings(db *pgxpool.Pool, params UpdateClientSettingsParams) (bool, error)
func UpdateExchangeRate ¶
func UpdateExchangeRate(db *pgxpool.Pool, params UpdateExchangeRateParams) (bool, error)
func UpdateFuturePayment ¶
func UpdateFuturePayment(db *pgxpool.Pool, params UpdateFuturePaymentParams) (bool, error)
func UpdateStockHoldingCost ¶
func UpdateStockHoldingCost(db *pgxpool.Pool, params UpdateStockHoldingCostParams) (bool, error)
func UpdateStockPrice ¶
func UpdateStockPrice(db *pgxpool.Pool, params UpdateStockPriceParams) (bool, error)
Types ¶
type Account ¶
type Account struct { Id string `json:"id"` ClientId string `json:"client_id"` AssetProviderAccountTypeId string `json:"asset_provider_account_type_id"` CurrencyId string `json:"currency_id"` Balance string `json:"balance"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type AccountDetails ¶
type AccountStock ¶
type AccountStock struct { Id string `json:"id"` AccountId string `json:"account_id"` StockId string `json:"stock_id"` Unit string `json:"unit"` Cost string `json:"cost"` }
func GetAllStockHoldings ¶
func GetAllStockHoldings(db *pgxpool.Pool, clientId string) ([]AccountStock, error)
type AccountSummary ¶
type AccountSummary struct { Id string `json:"id"` Name string `json:"name"` Balance string `json:"balance"` CurrencyId string `json:"currencyId"` AccountTypeId string `json:"accountTypeId"` AssetProviderId string `json:"assetProviderId"` }
func GetAccountSummary ¶
func GetAccountSummary(db *pgxpool.Pool, accountId string) (AccountSummary, error)
type AssetProvider ¶
type Cash ¶
type Client ¶
type CreateNewAccountParams ¶
type CreateNewClientParams ¶
type CreateNewFuturePaymentParams ¶
type CreateNewFuturePaymentParams struct { Id string `json:"id"` Name string `json:"name"` Income bool `json:"income"` Amount string `json:"amount"` Remarks *string `json:"remarks"` Rolling bool `json:"rolling"` Category string `json:"category"` Frequency *int64 `json:"frequency"` ClientId string `json:"client_id"` AccountId string `json:"account_id"` CurrencyId string `json:"currency_id"` ScheduledAt time.Time `json:"scheduled_at"` }
type CreateNewTransactionParams ¶
type CreateNewTransactionParams struct { Name string `json:"name"` Income bool `json:"income"` Amount string `json:"amount"` Remarks *string `json:"remarks"` Category string `json:"category"` ClientId string `json:"client_id"` AccountId string `json:"account_id"` CurrencyId string `json:"currency_id"` ExecutedAt time.Time `json:"executed_at"` }
type Currency ¶
type ExchangeRate ¶
type ExchangeRate struct { Id string `json:"id"` BaseCurrencyId string `json:"base_currency_id"` TargetCurrencyId string `json:"target_currency_id"` Rate string `json:"rate"` }
func GetAllExchangeRates ¶
func GetAllExchangeRates(db *pgxpool.Pool) ([]ExchangeRate, error)
type FuturePayment ¶
type FuturePayment struct { Id string `json:"id"` ClientId string `json:"client_id"` AccountId string `json:"account_id"` CurrencyId string `json:"currency_id"` Name string `json:"name"` Amount string `json:"amount"` Income bool `json:"income"` Rolling bool `json:"rolling"` Category string `json:"category"` Frequency sql.NullInt64 `json:"frequency"` Remarks sql.NullString `json:"remarks"` ScheduledAt time.Time `json:"scheduled_at"` }
func GetAllFuturePayments ¶
func GetAllFuturePayments(db *pgxpool.Pool) ([]FuturePayment, error)
func GetAllFuturePaymentsByClientId ¶
func GetAllFuturePaymentsByClientId(db *pgxpool.Pool, clientId string) ([]FuturePayment, error)
type ProviderDetail ¶
type ProviderDetail struct { Id string `json:"id"` Name string `json:"name"` Icon string `json:"icon"` CountryId string `json:"countryId"` }
func GetAllProvidersByType ¶
func GetAllProvidersByType(db *pgxpool.Pool, providerType string) ([]ProviderDetail, error)
type Stock ¶
type Transaction ¶
type Transaction struct { Id string `json:"id"` Name string `json:"name"` Income bool `json:"income"` ClientId string `json:"client_id"` AccountId sql.NullString `json:"account_id"` CurrencyId string `json:"currency_id"` Category string `json:"category"` Amount string `json:"amount"` Remarks sql.NullString `json:"remarks"` ExecutedAt time.Time `json:"executed_at"` }
func GetAllTransactions ¶
func GetAllTransactions(db *pgxpool.Pool, clientId string) ([]Transaction, error)
type TransactionAndAccountBalance ¶
type TransactionAndAccountBalance struct { Income bool `json:"income"` Amount string `json:"amount"` Balance string `json:"balance"` AccountId string `json:"account_id"` }
func GetTransactionAndAccountBalanceById ¶
func GetTransactionAndAccountBalanceById(db *pgxpool.Pool, transactionId string) (TransactionAndAccountBalance, error)
type UpdateAccountParams ¶
type UpdateCashRecordParams ¶
type UpdateFuturePaymentParams ¶
type UpdateFuturePaymentParams struct { Id string `json:"id"` Name string `json:"name"` Income bool `json:"income"` Amount string `json:"amount"` Remarks *string `json:"remarks"` Rolling bool `json:"rolling"` Category string `json:"category"` Frequency *int64 `json:"frequency"` AccountId string `json:"account_id"` CurrencyId string `json:"currency_id"` ScheduledAt time.Time `json:"scheduled_at"` }
type UpdateStockPriceParams ¶
Click to show internal directories.
Click to hide internal directories.