stats

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: MPL-2.0, MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store adapter

Store is the package state variable which contains database connections

Functions

func GetAggregatedDevices

func GetAggregatedDevices(w http.ResponseWriter, r *http.Request)

GetAggregatedDevices returns device stats (total devices, mobile devices, total browsers)

func GetAggregatedFailedReasons

func GetAggregatedFailedReasons(w http.ResponseWriter, r *http.Request)

GetAggregatedFailedReasons aggregates authentication according to failed reasons

func GetAggregatedIDPServices

func GetAggregatedIDPServices(w http.ResponseWriter, r *http.Request)

GetAggregatedIDPServices aggregates services according to IDP

func GetAggregatedLoginHours

func GetAggregatedLoginHours(w http.ResponseWriter, r *http.Request)

GetAggregatedLoginHours aggregates authentications according to hour

func GetAggregatedServices

func GetAggregatedServices(w http.ResponseWriter, r *http.Request)

GetAggregatedServices aggregates services according to type

func GetAggregatedUsers

func GetAggregatedUsers(w http.ResponseWriter, r *http.Request)

GetAggregatedUsers returns user aggregations It returns stats like total users in IDP, admin users, disabled users etc

func GetCAStats

func GetCAStats(w http.ResponseWriter, r *http.Request)

GetCAStats returns CA stats

func GetIPAggs

func GetIPAggs(w http.ResponseWriter, r *http.Request)

GetIPAggs aggregates authentications according to client IP

func GetLoginsByType

func GetLoginsByType(w http.ResponseWriter, r *http.Request)

GetLoginsByType aggregates authentications by service type

func GetMapPlotData

func GetMapPlotData(w http.ResponseWriter, r *http.Request)

GetMapPlotData returns city name, total population (total count), and cooardinates of login source.

func GetPoliciesStats

func GetPoliciesStats(w http.ResponseWriter, r *http.Request)

GetPoliciesStats returns policy stats

func GetServicePermStats

func GetServicePermStats(w http.ResponseWriter, r *http.Request)

func GetSuccessAndFailedEvents

func GetSuccessAndFailedEvents(w http.ResponseWriter, r *http.Request)

GetSuccessAndFailedEvents returns total number of logins, total failed logins and total successful logins aggregated stats

func GetTotalLoginsByDate

func GetTotalLoginsByDate(w http.ResponseWriter, r *http.Request)

GetTotalLoginsByDate returns array of GetSuccessAndFailedEvents per day

func GetTotalManagedUsers

func GetTotalManagedUsers(w http.ResponseWriter, r *http.Request)

GetTotalManagedUsers returns total managed users (password stored in vault)

func HexaEvents

func HexaEvents(w http.ResponseWriter, r *http.Request)

func InitStore

func InitStore(state *global.State)

InitStore initialises package state

Types

type AggIps

type AggIps struct {
	Key      string       `json:"-"`
	Name     string       `json:"name"`
	Value    int          `json:"value"`
	Children []firstOctet `json:"children"`
}

type AllServices

type AllServices struct {
	TotalServices  int         `json:"totalServices"`
	ServicesByType []nameValue `json:"servicesByType"`
	TotalGroups    int         `json:"totalGroups"`
	//TODO
	DynamicService                bool `json:"dynamicService"`
	SessionRecordingDisabledCount int  `json:"sessionRecordingDisabledCount"`
}

type AllUserDevices

type AllUserDevices struct {
	TotalUserdeivce   int            `json:"totalUserdevices"`
	TotalBrowsers     int            `json:"totalBrowsers"`
	TotalMobiles      int            `json:"totalMobiles"`
	TotalWorkstations int            `json:"totalWorkstations"`
	BrowserByType     []deviceByType `json:"browserByType"`
	MobileByType      []deviceByType `json:"mobileByType"`
	WorkstationByType []deviceByType `json:"workstationsByType"`
}

type FailedReasonsByType

type FailedReasonsByType struct {
	// using Name and Value instead of Type and Count because echart expects such.
	Name  string `json:"name"`
	Label string `json:"label"`
	Value int    `json:"value"`
}

type LoginsByHour

type LoginsByHour struct {
	Hour  string `json:"name"`
	Count string `json:"value"`
}

type PermStats

type PermStats struct {
	Users      int `json:"users"`
	Policies   int `json:"policy"`
	Groups     int `json:"groups"`
	Secrets    int `json:"secrets"`
	Privileges int `json:"privileges"`
}

type TotalUsers

type TotalUsers struct {
	Users         int `json:"users"`
	Admins        int `json:"admins"`
	Groups        int `json:"groups"`
	DisabledUsers int `json:"disabledUsers"`
	// TotalUserdevices represents all of user devices present in organization.
	Idps []idpUsers `json:"totalIdps"`
}

Jump to

Keyboard shortcuts

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