stats

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package stats produces statistics.

Package stats produces statistics.

Package stats produces statistics.

Package stats produces statistics.

Package stats produces statistics.

Package stats produces statistics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeDay added in v0.23.0

type CompositeDay struct {
	Day            time.Time
	RealmStats     *database.RealmStat
	KeyServerStats *keyserver.StatsDay
}

CompositeData represents a single day of composite stats.

type CompositeStats added in v0.23.0

type CompositeStats []*CompositeDay

CompositeStats is an internal type for collecting unifed realm and key server stats.

func (CompositeStats) MarshalCSV added in v0.23.0

func (c CompositeStats) MarshalCSV() ([]byte, error)

MarshalCSV returns bytes in CSV format.

func (CompositeStats) MarshalJSON added in v0.23.0

func (c CompositeStats) MarshalJSON() ([]byte, error)

MarshalJSON is a custom JSON marshaller.

func (*CompositeStats) UnmarshalJSON added in v0.23.0

func (c *CompositeStats) UnmarshalJSON(b []byte) error

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller is a stats controller.

func New

func New(cacher cache.Cacher, db *database.Database, h *render.Renderer) *Controller

New creates a new stats controller.

func (*Controller) HandleComposite added in v0.23.0

func (c *Controller) HandleComposite(typ Type) http.Handler

HandleComposite returns composite states for realm + key server The key server stats may be omitted if that is not enabled on the realm.

func (*Controller) HandleKeyServerStats added in v0.21.0

func (c *Controller) HandleKeyServerStats(typ Type) http.Handler

HandleKeyServerStats renders statistics for the current realm's associate key-server.

func (*Controller) HandleRealmAuthorizedAppStats added in v0.21.0

func (c *Controller) HandleRealmAuthorizedAppStats(typ Type) http.Handler

HandleRealmAuthorizedAppStats renders statistics for an authorized app in the current realm.

func (*Controller) HandleRealmExternalIssuersStats

func (c *Controller) HandleRealmExternalIssuersStats(typ Type) http.Handler

HandleRealmExternalIssuersStats renders statistics for the current realm.

func (*Controller) HandleRealmStats

func (c *Controller) HandleRealmStats(typ Type) http.Handler

HandleRealmStats renders statistics for the current realm.

func (*Controller) HandleRealmUserStats

func (c *Controller) HandleRealmUserStats(typ Type) http.Handler

HandleRealmUserStats renders statistics for a single user in the current realm.

func (*Controller) HandleRealmUsersStats

func (c *Controller) HandleRealmUsersStats(typ Type) http.Handler

HandleRealmUsersStats renders statistics for the current realm.

type Type added in v0.22.0

type Type int64

Type represents a type of stat.

const (
	TypeCSV Type
	TypeJSON
)

Jump to

Keyboard shortcuts

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