Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware() *jwt.GinJWTMiddleware
func ExtractLogger ¶
ExtractLogger pulls the logger out of the request context and returns it. By default this will include the request ID, but may also include the server ID if that middleware has been used in the chain by the time it is called.
func ExtractManager ¶
ExtractManager returns the server manager instance set on the request context.
func ExtractServer ¶
ExtractServer will return the server from the gin.Context or panic if it is not present.
func HelloHandler ¶
func ServerExists ¶
func ServerExists() gin.HandlerFunc
ServerExists will ensure that the requested server exists in this setup. Returns a 404 if we cannot locate it. If the server is found it is set into the request context, and the logger for the context is also updated to include the server ID in the fields list.