Documentation ¶
Index ¶
- func Context(ctx context.Context, c *gin.Context) context.Context
- func GetRequiredHeader(ctx *gin.Context, headerName string) (string, bool)
- func ParamsToMap(params gin.Params) map[string]string
- func ReplyWithErrorResponse(ctx *gin.Context, errorResponse *common.ErrorResponse)
- func RequiredHeaderMissingErrorResponse(headerName string) *common.ErrorResponse
- func RequiredQueryMissingErrorResponse(queryName string) *common.ErrorResponse
- func RequiredQueryOrAbort(ctx *gin.Context, queryName string) (string, bool)
- func UintParam(ctx *gin.Context, paramName string) (uint, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequiredHeader ¶
GetRequiredHeader returns a header value or responds with an error.
func ParamsToMap ¶
ParamsToMap converts a Gin parameter list to a simple string map.
func ReplyWithErrorResponse ¶
func ReplyWithErrorResponse(ctx *gin.Context, errorResponse *common.ErrorResponse)
ReplyWithErrorResponse replies with an error response.
func RequiredHeaderMissingErrorResponse ¶
func RequiredHeaderMissingErrorResponse(headerName string) *common.ErrorResponse
RequiredHeaderMissingErrorResponse creates a common.ErrorResponse denoting missing required header.
func RequiredQueryMissingErrorResponse ¶
func RequiredQueryMissingErrorResponse(queryName string) *common.ErrorResponse
RequiredQueryMissingErrorResponse creates a common.ErrorResponse denoting missing required header.
func RequiredQueryOrAbort ¶
RequiredQueryOrAbort returns a query value or responds with an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.