Documentation ¶
Index ¶
- Constants
- func MakeAuthorizationManagementComponentMW(logger log.Logger, authorizationManager security.AuthorizationManager) func(Component) Component
- func MakeEventsHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- func MakeGetEventsEndpoint(ec Component) cs.Endpoint
- func MakeGetEventsSummaryEndpoint(ec Component) cs.Endpoint
- func MakeGetUserEventsEndpoint(ec Component) cs.Endpoint
- type Component
- type Endpoints
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 ¶
MakeEventsHandler make an HTTP handler for an Events endpoint.
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 { 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
Click to show internal directories.
Click to hide internal directories.