Documentation
¶
Index ¶
- Constants
- func AcceptMiddleware(allowedAcceptType ...string) gin.HandlerFunc
- func ContentTypeMiddleware(allowedContentType ...string) gin.HandlerFunc
- func New(c config.Config) fx.Option
- func Send400(c *gin.Context, objectType, name, reason string)
- func Send400ForBodyParameter(c *gin.Context, name, reason string)
- func Send400ForHeaderParameter(c *gin.Context, name, reason string)
- func Send400ForQueryParameter(c *gin.Context, name, reason string)
- func Send400ForSchemaValidation(c *gin.Context, e *problems.JsonValidationError)
- func Send403(c *gin.Context)
- func Send404(c *gin.Context)
- func Send405(c *gin.Context)
- func Send500(c *gin.Context)
- func SendHttpNotAcceptable(c *gin.Context)
- func SendHttpUnsupportedMediaType(c *gin.Context)
- func StartFxGin(c config.Config) fx.Option
- func TryAndCatch(c *gin.Context, f func() error)
- func TryAndCatchHandler() gin.HandlerFunc
Constants ¶
View Source
const ( ApplicationJSONType = "application/json" ApplicationProblemType = "application/problem" ApplicationProblemJSONType = ApplicationProblemType + "+json" )
Variables ¶
This section is empty.
Functions ¶
func AcceptMiddleware ¶
func AcceptMiddleware(allowedAcceptType ...string) gin.HandlerFunc
func ContentTypeMiddleware ¶
func ContentTypeMiddleware(allowedContentType ...string) gin.HandlerFunc
func Send400ForBodyParameter ¶
func Send400ForSchemaValidation ¶
func Send400ForSchemaValidation(c *gin.Context, e *problems.JsonValidationError)
func SendHttpNotAcceptable ¶
func TryAndCatch ¶
func TryAndCatchHandler ¶
func TryAndCatchHandler() gin.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.