Documentation
¶
Index ¶
- Variables
- func HealthCheck(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
- func Metrics(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
- func SwaggerJSON(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
- func VersionsHandler(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
- type VersionsResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Routes = lib.Routes{ lib.Route{ Method: "OPTIONS", HandlerFunc: optionsHandler, }, lib.Route{ Name: "versions", Method: "GET", Path: "/versions", HandlerFunc: VersionsHandler, }, lib.Route{ Name: "healthcheck", Method: "GET", Path: "/health", HandlerFunc: HealthCheck, }, lib.Route{ Name: "swagger.json", Method: "GET", Path: "/swagger.json", HandlerFunc: SwaggerJSON, }, }
Routes are routes that are common for all versions
Functions ¶
func HealthCheck ¶
func HealthCheck(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
HealthCheck is an httpHandler for route GET /health
func Metrics ¶
func Metrics(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
Metrics returns data collected by util/metrics
func SwaggerJSON ¶
func SwaggerJSON(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
SwaggerJSON is an httpHandler for route GET /swagger.json
func VersionsHandler ¶
func VersionsHandler(ctx lib.ReqContext, w http.ResponseWriter, r *http.Request)
VersionsHandler is an httpHandler for route GET /versions
Types ¶
type VersionsResponse ¶
VersionsResponse is the response to 'GET /versions'
swagger:response VersionsResponse
func (VersionsResponse) GetError ¶
func (r VersionsResponse) GetError() error
GetError allows VersionResponse to satisfy the APIV1Response interface, even though it can never return an error and is not versioned
Click to show internal directories.
Click to hide internal directories.