Documentation
¶
Index ¶
- type Context
- type Database
- type Expense
- type ExpenseEditable
- type Service
- func (s Service) CreateExpense(expense *Expense) error
- func (s Service) GetAllExpensesOfAnAccount(accountId string) ([]*Expense, error)
- func (s Service) GetExpensesOfAnAccountBetween(accountId, from, to string) ([]*Expense, error)
- func (s Service) ProcessCSVFile(filedata [][]string, account *account.Account) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
func NewHandler ¶
func NewHandler(ctx *handler.Context, db *postgresql.DatabasePostgreSQL) *Context
func (*Context) CreateAnExpense ¶
func (*Context) DeleteExpense ¶
func (*Context) GetAllExpenses ¶
func (*Context) GetAnExpenses ¶
func (*Context) ImportExpenseFromCSV ¶
type Database ¶
type Database struct {
*postgresql.DatabasePostgreSQL
}
func NewDatabase ¶
func NewDatabase(db *postgresql.DatabasePostgreSQL) *Database
func (*Database) CreateExpense ¶
func (Database) GetAllExpensesOfAnAccount ¶
type Expense ¶
type Expense struct {
ExpenseEditable
AccountId string `json:"accountId,omitempty"`
}
type ExpenseEditable ¶
type ExpenseEditable struct {
ID string `json:"id,omitempty"`
Value float32 `json:"value"`
Libelle string `json:"libelle"`
TypeExpense string `json:"typeExpense"`
ExpenseDate time.Time `json:"expenseDate,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (Service) CreateExpense ¶
func (Service) GetAllExpensesOfAnAccount ¶
func (Service) GetExpensesOfAnAccountBetween ¶
Click to show internal directories.
Click to hide internal directories.