statistics

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CostInterval

type CostInterval struct {
	From money.Money `json:"from"`
	To   money.Money `json:"to"`

	Count int         `json:"count"`
	Total money.Money `json:"total"`
}

func CalculateCostIntervals

func CalculateCostIntervals(spends []db.Spend, maxIntervalNumber int) (intervals []CostInterval)

type SpentByDayData

type SpentByDayData struct {
	Year  int        `json:"year"`
	Month time.Month `json:"month"`
	Day   int        `json:"day"`

	Spent money.Money `json:"spent"`
}

type SpentByDayDataset

type SpentByDayDataset []SpentByDayData

func CalculateSpentByDay

func CalculateSpentByDay(spends []db.Spend, startDate, endDate time.Time) SpentByDayDataset

type SpentBySpendTypeData

type SpentBySpendTypeData struct {
	SpendTypeName string      `json:"spend_type_name"`
	Spent         money.Money `json:"spent"`
}

type SpentBySpendTypeDataset

type SpentBySpendTypeDataset []SpentBySpendTypeData

func CalculateSpentBySpendType

func CalculateSpentBySpendType(spendTypes []db.SpendType, spends []db.Spend) []SpentBySpendTypeDataset

Jump to

Keyboard shortcuts

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