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 ¶
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 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,omitempty"`
LastDay int64 `json:"lastDay,omitempty"`
LastWeek int64 `json:"lastWeek,omitempty"`
LastMonth int64 `json:"lastMonth,omitempty"`
LastYear int64 `json:"lastYear,omitempty"`
}
StatisticsConnectionsRepresentation are elements used in StatisticsRepresentation
type StatisticsRepresentation ¶
type StatisticsRepresentation struct {
LastConnection int64 `json:"lastConnection,omitempty"`
TotalConnections StatisticsConnectionsRepresentation `json:"totalConnections,omitempty"`
}
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
Click to show internal directories.
Click to hide internal directories.