domain

package
v0.0.0-...-a9d3047 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	CreateMonthData(int, time.Month) MonthData
	AddExpense(Expense) error
	RemoveExpense(int) error
	InsertBudgetMonth(string, string) error
	UpdateDefaultBudget(string) error
}

type Expense

type Expense struct {
	Id       int
	Name     string
	Date     string
	Amount   float64
	Category string
}

STRUCTS

type MonthData

type MonthData struct {
	Year           int
	Month          time.Month
	Expenses       []Expense
	Budget         float64
	TotalSpendings float64
	MoneyLeft      float64
}

type Storage

type Storage interface {
	GetExpensesWithYearMonth(string) []Expense
	InsertExpense(Expense) error
	GetDefaultBudget() string
	GetBudgetWithYearMonth(string) string
	InsertBudget(string, string) error
	UpdateDefaultBudget(string) error
	DeleteExpense(int) error
}

INTERFACES

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL