prometheus

package
v0.0.0-...-f5b6858 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationService

type AuthorizationService struct {
	AuthorizationService platform.AuthorizationService
	// contains filtered or unexported fields
}

AuthorizationService manages authorizations.

func NewAuthorizationService

func NewAuthorizationService() *AuthorizationService

NewAuthorizationService creates an instance of AuthorizationService.

func (*AuthorizationService) CreateAuthorization

func (s *AuthorizationService) CreateAuthorization(ctx context.Context, a *platform.Authorization) (err error)

CreateAuthorization creates an authorization, records function call latency, and counts function calls.

func (*AuthorizationService) DeleteAuthorization

func (s *AuthorizationService) DeleteAuthorization(ctx context.Context, id platform.ID) (err error)

DeleteAuthorization deletes an authorization, records function call latency, and counts function calls.

func (*AuthorizationService) FindAuthorizationByID

func (s *AuthorizationService) FindAuthorizationByID(ctx context.Context, id platform.ID) (a *platform.Authorization, err error)

FindAuthorizationByID returns an authorization given a id, records function call latency, and counts function calls.

func (*AuthorizationService) FindAuthorizationByToken

func (s *AuthorizationService) FindAuthorizationByToken(ctx context.Context, t string) (a *platform.Authorization, err error)

FindAuthorizationByToken returns an authorization given a token, records function call latency, and counts function calls.

func (*AuthorizationService) FindAuthorizations

func (s *AuthorizationService) FindAuthorizations(ctx context.Context, filter platform.AuthorizationFilter, opt ...platform.FindOptions) (as []*platform.Authorization, i int, err error)

FindAuthorizations returns authorizations given a filter, records function call latency, and counts function calls.

func (*AuthorizationService) PrometheusCollectors

func (s *AuthorizationService) PrometheusCollectors() []prometheus.Collector

PrometheusCollectors returns all authorization service prometheus collectors.

func (*AuthorizationService) SetAuthorizationStatus

func (s *AuthorizationService) SetAuthorizationStatus(ctx context.Context, id platform.ID, status platform.Status) (err error)

SetAuthorizationStatus updates the status of the authorization. Useful for setting an authorization to inactive or active.

Jump to

Keyboard shortcuts

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