Documentation ¶
Overview ¶
Package middleware includes all gin-style middleware. Both API and middleware are in handlers chain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrHandler ¶
func ErrHandler() gin.HandlerFunc
ErrHandler checks whether there is an error after API is called. If not, it will do nothing and just return
func IdValidator ¶
func IdValidator() gin.HandlerFunc
IdValidator validates whether id is valid. With regard to GET, PUT and DELETE, we expect that id is integer(int64).
func SimpleAuthorizer ¶
func SimpleAuthorizer() gin.HandlerFunc
SimpleAuthorizer provides a simple authorization for users.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.