Documentation
¶
Index ¶
Constants ¶
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 ¶
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 ¶
func (dbc *DbConnectionRepresentation) ToConnRepresentation() StatisticsConnectionRepresentation
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