Documentation ¶
Index ¶
- func CloseStreams(streams ...interface{})
- func Error(c *gin.Context, status int, err error)
- func HijackConnection(w http.ResponseWriter) (io.ReadCloser, io.Writer, error)
- func NoContent(c *gin.Context)
- func NotImplemented(c *gin.Context)
- func RequestLoggerMiddleware() gin.HandlerFunc
- func ResponseLoggerMiddleware() gin.HandlerFunc
- func UpgradeConnection(r *http.Request, out io.Writer)
- func VersionAliasMiddleware(router *gin.Engine) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseStreams ¶
func CloseStreams(streams ...interface{})
CloseStreams ensures that a list for http streams are properly closed.
func HijackConnection ¶
func HijackConnection(w http.ResponseWriter) (io.ReadCloser, io.Writer, error)
HijackConnection interrupts the http response writer to get the underlying connection and operate with it.
func NotImplemented ¶
NotImplemented will return a not implented response.
func RequestLoggerMiddleware ¶
func RequestLoggerMiddleware() gin.HandlerFunc
RequestLoggerMiddleware is a gin-gonic middleware that will log the raw request.
func ResponseLoggerMiddleware ¶
func ResponseLoggerMiddleware() gin.HandlerFunc
ResponseLoggerMiddleware is a gin-gonic middleware that will the raw response.
func UpgradeConnection ¶
UpgradeConnection will upgrade the Hijacked connection.
func VersionAliasMiddleware ¶
func VersionAliasMiddleware(router *gin.Engine) gin.HandlerFunc
VersionAliasMiddleware is a gin-gonic middleware that will remove /v1.xx and /v4.x.y from the url path (ignoring versioned apis).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.