events

package
v2.2.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVGetEvents        = "EV_GetEvents"
	EVGetEventsSummary = "EV_GetEventsSummary"
	EVGetUserEvents    = "EV_GetUserEvents"
)

Actions used for authorization module

Variables

This section is empty.

Functions

func MakeAuthorizationManagementComponentMW

func MakeAuthorizationManagementComponentMW(logger log.Logger, authorizationManager security.AuthorizationManager) func(Component) Component

MakeAuthorizationManagementComponentMW checks authorization and return an error if the action is not allowed.

func MakeEventsHandler

func MakeEventsHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server

MakeEventsHandler make an HTTP handler for an Events endpoint.

func MakeGetEventsEndpoint

func MakeGetEventsEndpoint(ec Component) cs.Endpoint

MakeGetEventsEndpoint makes the events endpoint.

func MakeGetEventsSummaryEndpoint

func MakeGetEventsSummaryEndpoint(ec Component) cs.Endpoint

MakeGetEventsSummaryEndpoint makes the events summary endpoint.

func MakeGetUserEventsEndpoint

func MakeGetUserEventsEndpoint(ec Component) cs.Endpoint

MakeGetUserEventsEndpoint makes the events summary endpoint.

Types

type Component

type Component interface {
	GetEvents(context.Context, map[string]string) (api.AuditEventsRepresentation, error)
	GetEventsSummary(context.Context) (api.EventSummaryRepresentation, error)
	GetUserEvents(context.Context, map[string]string) (api.AuditEventsRepresentation, error)
}

Component is the interface of the events component.

func NewComponent

func NewComponent(db app.EventsDBModule, eventDBModule database.EventsDBModule, logger app.Logger) Component

NewComponent returns a component

type Endpoints

type Endpoints struct {
	GetEvents                   endpoint.Endpoint
	GetEventsSummary            endpoint.Endpoint
	GetUserEvents               endpoint.Endpoint
	GetStatistics               endpoint.Endpoint
	GetStatisticsUsers          endpoint.Endpoint
	GetStatisticsAuthenticators endpoint.Endpoint
}

Endpoints exposed for path /events

Jump to

Keyboard shortcuts

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