Documentation ¶
Index ¶
- type Client
- func (c *Client) AddTransaction(chatID int, amount float64, category string, kind string) error
- func (c *Client) CreateUserDocument(chatID int) error
- func (c *Client) DeleteTransaction(chatID int, transactionNumber string, kind string) error
- func (c *Client) GetTransactions(chatID int) ([]Transaction, []Transaction)
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
MongoDB client structure
func (*Client) AddTransaction ¶
Add expense or income transaction
func (*Client) CreateUserDocument ¶
Create user document if it doesn't exist
func (*Client) DeleteTransaction ¶
Delete expense or income transaction
func (*Client) GetTransactions ¶
func (c *Client) GetTransactions(chatID int) ([]Transaction, []Transaction)
Get user's expenses and income transactions
Click to show internal directories.
Click to hide internal directories.