stats

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeriodStats

type PeriodStats struct {
	TotalCustomers int
	TotalMonths    int
	TotalQuantity  int
	TotalAverage   int
}

func GetPeriodStats

func GetPeriodStats(currentPeriod models.Period, totalCustomers int) (stats PeriodStats)

type Stats

type Stats struct {
	User   UserStats
	Period PeriodStats
}

func GetStats

func GetStats(uid uint, currentPeriod models.Period, currentBill models.Bill, totalCustomers int) (stats Stats, err error)

type UserStats

type UserStats struct {
	Rank                   string
	CurrentAverageCoffees  int
	PrevAverageCoffees     int
	PrevTotalCoffees       int
	PrevTotalMonths        int
	CoffeeConsumptionTrend string
}

func GetUserStats

func GetUserStats(uid uint, currentPeriod models.Period, currentBill models.Bill) (stats UserStats, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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