Documentation ¶
Index ¶
- Variables
- func GetActions() []security.Action
- func MakeAuthorizationManagementComponentMW(logger log.Logger, authorizationManager security.AuthorizationManager) func(Component) Component
- func MakeEventsHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- func MakeGetActionsEndpoint(ec Component) cs.Endpoint
- func MakeGetEventsEndpoint(ec Component) cs.Endpoint
- func MakeGetEventsSummaryEndpoint(ec Component) cs.Endpoint
- func MakeGetUserEventsEndpoint(ec Component) cs.Endpoint
- type Component
- type Endpoints
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EVGetActions = newAction("EV_GetActions", security.ScopeGlobal) EVGetEvents = newAction("EV_GetEvents", security.ScopeRealm) EVGetEventsSummary = newAction("EV_GetEventsSummary", security.ScopeRealm) EVGetUserEvents = newAction("EV_GetUserEvents", security.ScopeGroup) )
Actions used for authorization module
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 ¶
MakeEventsHandler make an HTTP handler for an Events endpoint.
func MakeGetActionsEndpoint ¶
MakeGetActionsEndpoint creates an endpoint for GetActions
func MakeGetEventsEndpoint ¶
MakeGetEventsEndpoint makes the events endpoint.
func MakeGetEventsSummaryEndpoint ¶
MakeGetEventsSummaryEndpoint makes the events summary endpoint.
func MakeGetUserEventsEndpoint ¶
MakeGetUserEventsEndpoint makes the events summary endpoint.
Types ¶
type Component ¶
type Component interface { GetActions(ctx context.Context) ([]api.ActionRepresentation, error) 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 { GetActions endpoint.Endpoint GetEvents endpoint.Endpoint GetEventsSummary endpoint.Endpoint GetUserEvents endpoint.Endpoint GetStatistics endpoint.Endpoint GetStatisticsUsers endpoint.Endpoint GetStatisticsAuthenticators endpoint.Endpoint }
Endpoints exposed for path /events
Click to show internal directories.
Click to hide internal directories.