Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Authentication ErrorInvalidLogin = errors.New("the supplied authentication credentials are incorrect") ErrorInvalidJWTToken = errors.New("the supplied JWT token was expired or not a valid JWT token") ErrorBadPathParameter = errors.New("the supplied path parameter is invalid, did you supply a valid integer?") ErrorFailedToCreateRequest = errors.New("there was a saving your certificate request") ErrorFailedToCreateCertificate = errors.New("there was a saving your certificate association") )
Functions ¶
func AuthorizeJWT ¶
func AuthorizeJWT() gin.HandlerFunc
AuthorizeJWT is a middleware for requiring authentication on protected routes
func ErrorHandler ¶
func ErrorHandler() gin.HandlerFunc
ErrorHandler is middleware that enables you to configure error handling from a centralised place via its fluent API.
func LoggingMiddleware ¶
LoggingMiddleware is a middleware for logging every http request that comes through the server
func ParseError ¶
ParseError is a function for extracting proper error messages from gin errors and other types
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Status int `json:"status"` Errors []string `json:"errors"` Message string `json:"message"` }
ErrorResponse is a struct used for openapi documentation generation
Click to show internal directories.
Click to hide internal directories.