Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ChangeGranularityOfOldHitMetrics ¶
func ChangeGranularityOfOldHitMetrics(now MonthData)
Changes the granularity of old items. After a month, the day-level granularity will be compressed into month-level granularity. Month-level granularity is stored forever.
func GetNumberOfHitsToProtectedRoutesInMonth ¶
Gets the number of hits to a protected route in a given month. Initializing the "Hits" property is redundant in this function.
func TotalUsers ¶
func TotalUsers() int64
Returns the total number of users in the goth/users MongoDB collection.
Types ¶
type DayData ¶
type DayData struct { Year uint32 `json:"year"` Month string `json:"month"` Day uint32 `json:"day"` Hits int `json:"hits"` }
Data model for which is stored every day in the database
Click to show internal directories.
Click to hide internal directories.