Documentation ¶
Overview ¶
Package handler provides handlers of Graylog API mock server. Basically enduser does not use the package directly.
Index ¶
- func HandleAddUserToRole(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateDashboard(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateIndexSet(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateInput(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateRole(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateStream(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateStreamRule(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleCreateUser(u *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteDashboard(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteIndexSet(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteInput(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteRole(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteStream(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteStreamRule(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleDeleteUser(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetAlarmCallbacks(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetAlert(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetAlertConditions(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetAlerts(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetDashboard(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetDashboards(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetEnabledStreams(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetIndexSet(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetIndexSetStats(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetIndexSets(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetInput(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetInputs(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetRole(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetRoles(user *graylog.User, lgc *logic.Logic, _ *http.Request, _ Params) (interface{}, int, error)
- func HandleGetStream(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetStreamRule(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetStreamRules(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetStreams(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetTotalIndexSetStats(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetUser(u *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleGetUsers(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleNotFound(lgc *logic.Logic) echo.HandlerFunc
- func HandlePauseStream(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleRemoveUserFromRole(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleResumeStream(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleRoleMembers(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleSetDefaultIndexSet(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateDashboard(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateIndexSet(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateInput(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateRole(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateStream(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateStreamRule(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func HandleUpdateUser(u *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
- func NewRouter(lgc *logic.Logic) http.Handler
- type APIError
- type Handler
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleAddUserToRole ¶
func HandleAddUserToRole( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleAddUserToRole is the handler of Add a user to a role API.
func HandleCreateDashboard ¶ added in v0.4.0
func HandleCreateDashboard( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateDashboard is the handler of Create an Dashboard API.
func HandleCreateIndexSet ¶
func HandleCreateIndexSet( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateIndexSet is the handler of Create an Index Set API.
func HandleCreateInput ¶
func HandleCreateInput( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateInput is the handler of Create an Input API.
func HandleCreateRole ¶
func HandleCreateRole( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateRole is the handler of Create Role API.
func HandleCreateStream ¶
func HandleCreateStream( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateStream is the handler of Create a Stream API.
func HandleCreateStreamRule ¶
func HandleCreateStreamRule( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateStreamRule is the handler of Create a Stream Rule API.
func HandleCreateUser ¶
func HandleCreateUser( u *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleCreateUser is the handler of Create User API.
func HandleDeleteDashboard ¶ added in v0.4.0
func HandleDeleteDashboard( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteDashboard is the handler of Delete an Dashboard API.
func HandleDeleteIndexSet ¶
func HandleDeleteIndexSet( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteIndexSet is the handler of Delete an Index Set API.
func HandleDeleteInput ¶
func HandleDeleteInput( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteInput is the handler of Delete an Input API.
func HandleDeleteRole ¶
func HandleDeleteRole( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteRole is the handler of Delete Role API.
func HandleDeleteStream ¶
func HandleDeleteStream( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteStream is the handler of Delete a Stream API.
func HandleDeleteStreamRule ¶
func HandleDeleteStreamRule( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteStreamRule is the handler of Delete a Stream Rule API.
func HandleDeleteUser ¶
func HandleDeleteUser( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleDeleteUser is the handler of Delete User API.
func HandleGetAlarmCallbacks ¶ added in v0.5.0
func HandleGetAlarmCallbacks( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetAlarmCallbacks is the handler of GET AlarmCallbacks API.
func HandleGetAlert ¶ added in v0.3.0
func HandleGetAlert( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetAlert is the handler of Get an Alert API.
func HandleGetAlertConditions ¶ added in v0.2.0
func HandleGetAlertConditions( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetAlertConditions is the handler of GET Alert Conditions API.
func HandleGetAlerts ¶ added in v0.3.0
func HandleGetAlerts( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetAlerts is the handler of GET Alerts API.
func HandleGetDashboard ¶ added in v0.4.0
func HandleGetDashboard( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetDashboard is the handler of Get an Dashboard API.
func HandleGetDashboards ¶ added in v0.4.0
func HandleGetDashboards( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetDashboards is the handler of Get Dashboards API.
func HandleGetEnabledStreams ¶
func HandleGetEnabledStreams( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetEnabledStreams is the handler of Get all enabled streams API.
func HandleGetIndexSet ¶
func HandleGetIndexSet( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetIndexSet is the handler of Get an Index Set API.
func HandleGetIndexSetStats ¶
func HandleGetIndexSetStats( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetIndexSetStats is the handler of Get Index Set Statistics API.
func HandleGetIndexSets ¶
func HandleGetIndexSets( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetIndexSets is the handler of Get Index Sets API.
func HandleGetInput ¶
func HandleGetInput( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetInput is the handler of Get an Input API.
func HandleGetInputs ¶
func HandleGetInputs( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetInputs is the handler of Get Inputs API.
func HandleGetRole ¶
func HandleGetRole( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetRole is the handler of GET Role API.
func HandleGetRoles ¶
func HandleGetRoles( user *graylog.User, lgc *logic.Logic, _ *http.Request, _ Params, ) (interface{}, int, error)
HandleGetRoles is the handler of GET Roles API.
func HandleGetStream ¶
func HandleGetStream( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetStream is the handler of Get a Stream API.
func HandleGetStreamRule ¶
func HandleGetStreamRule( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetStreamRule is the handler of Get a Stream Rule API.
func HandleGetStreamRules ¶
func HandleGetStreamRules( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetStreamRules is the handler of Get Stream Rules API.
func HandleGetStreams ¶
func HandleGetStreams( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetStreams is the handler of Get Streams API.
func HandleGetTotalIndexSetStats ¶
func HandleGetTotalIndexSetStats( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetTotalIndexSetStats is the handler of Get Index Set Statistics of all Index Sets API.
func HandleGetUser ¶
func HandleGetUser( u *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetUser is the handler of GET User API.
func HandleGetUsers ¶
func HandleGetUsers( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleGetUsers is the handler of GET Users API.
func HandleNotFound ¶
func HandleNotFound(lgc *logic.Logic) echo.HandlerFunc
HandleNotFound is the generator of the NotFound handler.
func HandlePauseStream ¶
func HandlePauseStream( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandlePauseStream is the handler of Pause a Stream API.
func HandleRemoveUserFromRole ¶
func HandleRemoveUserFromRole( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleRemoveUserFromRole is the handler of Remove a user from a role API.
func HandleResumeStream ¶
func HandleResumeStream( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleResumeStream is the handler of Resume a Stream API.
func HandleRoleMembers ¶
func HandleRoleMembers( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleRoleMembers is the handler of Get the role's members API.
func HandleSetDefaultIndexSet ¶
func HandleSetDefaultIndexSet( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleSetDefaultIndexSet is the handler of Set the default Index Set API.
func HandleUpdateDashboard ¶ added in v0.4.0
func HandleUpdateDashboard( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleUpdateDashboard is the handler of Update an Dashboard API.
func HandleUpdateIndexSet ¶
func HandleUpdateIndexSet( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleUpdateIndexSet is the handler of Update an Index Set API.
func HandleUpdateInput ¶
func HandleUpdateInput( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleUpdateInput is the handler of Update an Input API.
func HandleUpdateRole ¶
func HandleUpdateRole( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleUpdateRole is the handler of Update Role API.
func HandleUpdateStream ¶
func HandleUpdateStream( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleUpdateStream is the handler of Update a Stream API.
func HandleUpdateStreamRule ¶
func HandleUpdateStreamRule( user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params, ) (interface{}, int, error)
HandleUpdateStreamRule is the handler of Update a Stream Rule API.
Types ¶
type Handler ¶
type Handler func(user *graylog.User, lgc *logic.Logic, r *http.Request, ps Params) (interface{}, int, error)
Handler is the graylog REST API's handler. the argument `user` is the authenticated user and are mainly used for the authorization.
type Params ¶ added in v0.3.0
Params is an interface of request parameters.
func NewEchoParams ¶ added in v0.3.0
NewEchoParams returns a Params.