gin

package
v1.0.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 New

func New(c config.Config) fx.Option

func Send400

func Send400(c *gin.Context, objectType, name, reason string)

func Send400ForBodyParameter

func Send400ForBodyParameter(c *gin.Context, name, reason string)

func Send400ForHeaderParameter

func Send400ForHeaderParameter(c *gin.Context, name, reason string)

func Send400ForQueryParameter

func Send400ForQueryParameter(c *gin.Context, name, reason string)

func Send400ForSchemaValidation

func Send400ForSchemaValidation(c *gin.Context, e *problems.JsonValidationError)

func Send403

func Send403(c *gin.Context)

func Send404

func Send404(c *gin.Context)

func Send405

func Send405(c *gin.Context)

func Send500

func Send500(c *gin.Context)

func SendHttpNotAcceptable

func SendHttpNotAcceptable(c *gin.Context)

func SendHttpUnsupportedMediaType

func SendHttpUnsupportedMediaType(c *gin.Context)

func StartFxGin

func StartFxGin(c config.Config) fx.Option

func TryAndCatch

func TryAndCatch(c *gin.Context, f func() error)

func TryAndCatchHandler

func TryAndCatchHandler() gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL