Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CategoryReport ¶
type Finances ¶
type Finances interface { Expense( ctx context.Context, Description string, Amount int64, Date string, Category string, Id int64, ) (err error) // ExpenseEdit( // ctx context.Context, // ID int64, // expense ID in the database, not the ID in the gRPC request // Description string, // Amount int64, // in cents // Date string, // YYYY-MM-DD // Category string, // "food", "groceries", "transport", "misc" // ) (err error) ExpensesList( ctx context.Context, category string, month int64, year int64, ) (list []Expense, totalAmount int64, err error) CreateCategory(context.Context, string) (string, error) CategoriesList(context.Context) ([]Category, error) Report(context.Context, ReportFilter, int, int) (int64, int64, int64, []CategoryReport, error) }
type ReportFilter ¶
type ReportFilter string
const ( Week ReportFilter = "week" Month ReportFilter = "month" Year ReportFilter = "year" // TODO: make this an enum? )
func (ReportFilter) String ¶
func (f ReportFilter) String() string
Click to show internal directories.
Click to hide internal directories.