Documentation ¶
Overview ¶
* Copyright (c) 2023 * All rights reserved.
* Copyright (c) 2023 * All rights reserved.
Index ¶
- Variables
- func BindModel(req any) gin.HandlerFunc
- func CookiesParser(c *gin.Context, model any) error
- type ContentTypeType
- type ErrorHandlerFunc
- type Model
- type Option
- func ContentType(contentType string, contentTypeType ContentTypeType) Option
- func Deprecated() Option
- func Description(description string) Option
- func Exclude() Option
- func Handlers(handlers ...gin.HandlerFunc) Option
- func OperationID(ID string) Option
- func Responses(response Response) Option
- func Security(securities ...security.ISecurity) Option
- func Summary(summary string) Option
- func Tags(tags ...string) Option
- type Response
- type ResponseItem
- type Router
- func (router *Router) GetHandlers() []gin.HandlerFunc
- func (router *Router) WithContentType(contentType string, contentTypeType ContentTypeType) *Router
- func (router *Router) WithDeprecated() *Router
- func (router *Router) WithDescription(description string) *Router
- func (router *Router) WithExclude() *Router
- func (router *Router) WithHandlers(handlers ...gin.HandlerFunc) *Router
- func (router *Router) WithOperationID(ID string) *Router
- func (router *Router) WithResponses(response Response) *Router
- func (router *Router) WithSecurity(securities ...security.ISecurity) *Router
- func (router *Router) WithSummary(summary string) *Router
- func (router *Router) WithTags(tags ...string) *Router
Constants ¶
This section is empty.
Variables ¶
View Source
var Header = headerBinding{}
View Source
var Query = queryBinding{}
Functions ¶
func BindModel ¶
func BindModel(req any) gin.HandlerFunc
Types ¶
type ContentTypeType ¶
type ContentTypeType string
var ( ContentTypeRequest ContentTypeType = "request" ContentTypeResponse ContentTypeType = "response" )
type Option ¶
type Option func(router *Router)
func ContentType ¶
func ContentType(contentType string, contentTypeType ContentTypeType) Option
ContentType Set request contentType
func Description ¶
func Handlers ¶
func Handlers(handlers ...gin.HandlerFunc) Option
func OperationID ¶
type Response ¶
type Response map[string]ResponseItem
type ResponseItem ¶
type Router ¶
type Router struct { Handlers *list.List Path string Method string Summary string Description string Deprecated bool RequestContentType string ResponseContentType string Tags []string API gin.HandlerFunc Model Model OperationID string Exclude bool Securities []security.ISecurity Response Response }
func (*Router) GetHandlers ¶
func (router *Router) GetHandlers() []gin.HandlerFunc
func (*Router) WithContentType ¶
func (router *Router) WithContentType(contentType string, contentTypeType ContentTypeType) *Router
func (*Router) WithDeprecated ¶
func (*Router) WithDescription ¶
func (*Router) WithExclude ¶
func (*Router) WithHandlers ¶
func (router *Router) WithHandlers(handlers ...gin.HandlerFunc) *Router
func (*Router) WithOperationID ¶
func (*Router) WithResponses ¶
func (*Router) WithSecurity ¶
func (*Router) WithSummary ¶
Click to show internal directories.
Click to hide internal directories.