Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Provide(New)
Functions ¶
func Cors ¶
func Cors() gin.HandlerFunc
Cors for options requests and aborts then exits the middleware chain and ends the request 解决跨域的是先发一次options请求,获取AllowHeader,允许跨域之后才会再发真正的Post请求
func NoCache ¶
func NoCache() gin.HandlerFunc
NoCache prevent the client from caching the HTTP response
func RequestID ¶
func RequestID() gin.HandlerFunc
RequestID is a middleware function that appends RequestID.
func Secure ¶
func Secure() gin.HandlerFunc
Secure is a middleware function that appends security and resource access headers.
func Translations ¶
func Translations() gin.HandlerFunc
Types ¶
type ValidError ¶
func (*ValidError) Error ¶
func (v *ValidError) Error() string
type ValidErrors ¶
type ValidErrors []*ValidError
func ShouldBind ¶
func ShouldBind(c *gin.Context, v interface{}) (bool, ValidErrors)
func ShouldBindJSON ¶
func ShouldBindJSON(c *gin.Context, v interface{}) (bool, ValidErrors)
func ShouldBindQuery ¶
func ShouldBindQuery(c *gin.Context, v interface{}) (bool, ValidErrors)
func ShouldBindUri ¶
func ShouldBindUri(c *gin.Context, v interface{}) (bool, ValidErrors)
func (ValidErrors) Error ¶
func (v ValidErrors) Error() string
func (ValidErrors) Errors ¶
func (v ValidErrors) Errors() []string
Click to show internal directories.
Click to hide internal directories.