Documentation ¶
Index ¶
- type APIError
- type Account
- type Balance
- type Budget
- type CacheClient
- func (c *CacheClient) Budget(ctx context.Context, budgetID string) (Budget, error)
- func (c *CacheClient) Budgets(ctx context.Context, includeAccounts bool) ([]Budget, error)
- func (c *CacheClient) Categories(ctx context.Context, budgetID string) ([]CategoryGroup, error)
- func (c *CacheClient) Transactions(ctx context.Context, budgetID, accountID, sinceDate string) ([]Transaction, error)
- type Category
- type CategoryGroup
- type Client
- func (c *Client) Accounts(ctx context.Context, budgetID string) ([]Account, error)
- func (c *Client) Budget(ctx context.Context, budgetID string) (Budget, error)
- func (c *Client) Budgets(ctx context.Context, includeAccounts bool) ([]Budget, error)
- func (c *Client) Categories(ctx context.Context, budgetID string) ([]CategoryGroup, error)
- func (c *Client) Test(ctx context.Context) error
- func (c *Client) Transactions(ctx context.Context, budgetID, accountID, sinceDate string) ([]Transaction, error)
- type CurrencyFormat
- type Subtransaction
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type Account ¶
type Account struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` OnBudget bool `json:"on_budget,omitempty"` Closed bool `json:"closed,omitempty"` Note string `json:"note,omitempty"` Balance int64 `json:"balance,omitempty"` ClearedBalance int64 `json:"cleared_balance,omitempty"` UnclearedBalance int64 `json:"uncleared_balance,omitempty"` TransferPayeeID string `json:"transfer_payee_id,omitempty"` DirectImportLinked bool `json:"direct_import_linked,omitempty"` DirectImportInError bool `json:"direct_import_in_error,omitempty"` Deleted bool `json:"deleted,omitempty"` }
type Balance ¶
func RunningBalance ¶
func RunningBalance(txs []Transaction) ([]Balance, error)
type Budget ¶
type Budget struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Accounts []Account `json:"accounts,omitempty"` CurrencyFormat CurrencyFormat `json:"currency_format"` }
type CacheClient ¶
type CacheClient struct { *Client // contains filtered or unexported fields }
func NewCacheClient ¶
func NewCacheClient(client *Client) *CacheClient
func (*CacheClient) Categories ¶
func (c *CacheClient) Categories(ctx context.Context, budgetID string) ([]CategoryGroup, error)
func (*CacheClient) Transactions ¶
func (c *CacheClient) Transactions(ctx context.Context, budgetID, accountID, sinceDate string) ([]Transaction, error)
type Category ¶
type Category struct { ID string `json:"id,omitempty"` CategoryGroupID string `json:"category_group_id,omitempty"` Name string `json:"name,omitempty"` OriginalCategoryGroupID string `json:"original_category_group_id,omitempty"` Budgeted int64 `json:"budgeted,omitempty"` Activity int64 `json:"activity,omitempty"` Balance int64 `json:"balance,omitempty"` }
type CategoryGroup ¶
type Client ¶
type Client struct { BaseURL string // contains filtered or unexported fields }
func (*Client) Categories ¶
func (*Client) Transactions ¶
type CurrencyFormat ¶ added in v0.1.2
type Subtransaction ¶
type Subtransaction struct { ID string `json:"id,omitempty"` TransactionID string `json:"transaction_id,omitempty"` Amount int64 `json:"amount,omitempty"` Memo string `json:"memo,omitempty"` PayeeID string `json:"payee_id,omitempty"` PayeeName string `json:"payee_name,omitempty"` CategoryID string `json:"category_id,omitempty"` CategoryName string `json:"category_name,omitempty"` TransferAccountID string `json:"transfer_account_id,omitempty"` TransferTransactionID string `json:"transfer_transaction_id,omitempty"` Deleted bool `json:"deleted,omitempty"` }
type Transaction ¶
type Transaction struct { ID string `json:"id,omitempty"` Date string `json:"date,omitempty"` Amount int64 `json:"amount,omitempty"` Memo string `json:"memo,omitempty"` Cleared string `json:"cleared,omitempty"` Approved bool `json:"approved,omitempty"` FlagColor string `json:"flag_color,omitempty"` AccountID string `json:"account_id,omitempty"` PayeeID string `json:"payee_id,omitempty"` CategoryID string `json:"category_id,omitempty"` TransferAccountID string `json:"transfer_account_id,omitempty"` TransferTransactionID string `json:"transfer_transaction_id,omitempty"` MatchedTransactionID string `json:"matched_transaction_id,omitempty"` ImportID string `json:"import_id,omitempty"` Deleted bool `json:"deleted,omitempty"` AccountName string `json:"account_name,omitempty"` PayeeName string `json:"payee_name,omitempty"` CategoryName string `json:"category_name,omitempty"` Subtransactions []Transaction `json:"subtransactions,omitempty"` }
Click to show internal directories.
Click to hide internal directories.