apistatistics

package
v3.22.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RegExpPeriod          = `^hours|days|months$`
	RegExpNumber          = `^\d+$`
	RegExpTimeshift       = `^[+-]\d{1,4}$`
	RegExpTwoDigitsNumber = `^\d{1,2}$`
)

RegExp for parameters of statistics API

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionRepresentation

type ActionRepresentation struct {
	Name  *string `json:"name"`
	Scope *string `json:"scope"`
}

ActionRepresentation struct

type DbConnectionRepresentation

type DbConnectionRepresentation struct {
	Date   sql.NullString
	Result sql.NullString
	User   sql.NullString
	IP     string
}

DbConnectionRepresentation is a non serializable StatisticsConnectionRepresentation read from database

func (*DbConnectionRepresentation) ToConnRepresentation

ToConnRepresentation converts a DbConnectionRepresentation to a serializable value

type IdentificationStatisticsRepresentation

type IdentificationStatisticsRepresentation struct {
	VideoIdentifications int `json:"videoIdentifications"`
}

IdentificationStatisticsRepresentation elements returned by GetStatistics

type StatisticsConnectionRepresentation

type StatisticsConnectionRepresentation struct {
	Date   string `json:"date"`
	Result string `json:"result"`
	User   string `json:"user"`
	IP     string `json:"IP"`
}

StatisticsConnectionRepresentation elements returned by GetStatisticsAuthenticationsLog

type StatisticsConnectionsRepresentation

type StatisticsConnectionsRepresentation struct {
	LastTwelveHours int64 `json:"lastTwelveHours"`
	LastDay         int64 `json:"lastDay"`
	LastWeek        int64 `json:"lastWeek"`
	LastMonth       int64 `json:"lastMonth"`
	LastYear        int64 `json:"lastYear"`
}

StatisticsConnectionsRepresentation are elements used in StatisticsRepresentation

type StatisticsRepresentation

type StatisticsRepresentation struct {
	LastConnection   int64                               `json:"lastConnection"`
	TotalConnections StatisticsConnectionsRepresentation `json:"totalConnections"`
}

StatisticsRepresentation elements returned by GetStatistics

type StatisticsUsersRepresentation

type StatisticsUsersRepresentation struct {
	Total    int64 `json:"total"`
	Disabled int64 `json:"disabled"`
	Inactive int64 `json:"inactive"`
}

StatisticsUsersRepresentation elements returned by GetStatisticsUsers

func ConvertToAPIStatisticsUsers

func ConvertToAPIStatisticsUsers(statistics kc.StatisticsUsersRepresentation) StatisticsUsersRepresentation

ConvertToAPIStatisticsUsers converts users statistics from KC model to API one

Jump to

Keyboard shortcuts

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