Documentation ¶
Overview ¶
Package middleware provides functions to inspect and transform requests.
Index ¶
Constants ¶
View Source
const ( ParamID = "id" ParamTopic = "topic" ParamLimit = "limit" ParamOffset = "offset" ParamTask = "task" ParamTasks = "tasks" ParamCommit = "commit" ParamPromise = "promise" )
Name constants for parameter keys.
Variables ¶
This section is empty.
Functions ¶
func Commit ¶
func Commit() gin.HandlerFunc
Commit returns a middleware that normalizes commits in request bodies.
func Pagination ¶
func Pagination(pc *config.PaginationConfig) gin.HandlerFunc
Pagination returns a middleware that normalizes pagination options.
func Prometheus ¶
func Prometheus() gin.HandlerFunc
Prometheus returns a middleware that collects request-related metrics.
func Promise ¶
func Promise() gin.HandlerFunc
Promise returns a middleware that normalizes promises in request bodies.
func Task ¶
func Task() gin.HandlerFunc
Task returns a middleware that normalizes tasks in request bodies.
func Tasks ¶
func Tasks() gin.HandlerFunc
Tasks returns a middleware that normalizes task lists in request bodies.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.