apistatistics

package
v2.8.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

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 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

Jump to

Keyboard shortcuts

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