Documentation
¶
Index ¶
- Constants
- type Egs
- func (e *Egs) DELETE(path string, r *router.Router)
- func (e *Egs) GET(path string, r *router.Router)
- func (e *Egs) Group(path string, options ...GroupOption) *Group
- func (e *Egs) HEAD(path string, r *router.Router)
- func (e *Egs) OPTIONS(path string, r *router.Router)
- func (e *Egs) PATCH(path string, r *router.Router)
- func (e *Egs) POST(path string, r *router.Router)
- func (e *Egs) PUT(path string, r *router.Router)
- func (e *Egs) Run(addr ...string) error
- func (e *Egs) Use(middlewares ...gin.HandlerFunc) gin.IRoutes
- type Group
- func (g *Group) DELETE(path string, r *router.Router)
- func (g *Group) GET(path string, r *router.Router)
- func (g *Group) Group(path string, options ...GroupOption) *Group
- func (g *Group) HEAD(path string, r *router.Router)
- func (g *Group) OPTIONS(path string, r *router.Router)
- func (g *Group) PATCH(path string, r *router.Router)
- func (g *Group) POST(path string, r *router.Router)
- func (g *Group) PUT(path string, r *router.Router)
- func (g *Group) Use(middleware ...gin.HandlerFunc) gin.IRoutes
- type GroupOption
- type RouterMap
- type Swagger
Constants ¶
View Source
const ( DEFAULT = "default" BINDING = "binding" DESCRIPTION = "description" QUERY = "query" FORM = "form" URI = "uri" HEADER = "header" COOKIE = "cookie" JSON = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Egs ¶
type Group ¶
type Group struct {
Egs *Egs
Path string
Tags []string
RouterGroup *gin.RouterGroup
// middlewares
Handlers []gin.HandlerFunc
Securities []security.Security
}
type GroupOption ¶
type GroupOption func(group *Group)
func Handlers ¶
func Handlers(handlers ...gin.HandlerFunc) GroupOption
func Security ¶
func Security(securities ...security.Security) GroupOption
func Tags ¶
func Tags(tags string) GroupOption
type Swagger ¶
type Swagger struct {
// metadata
Title string
Description string
TermsOfService string
Contact *openapi3.Contact
License *openapi3.License
Version string
DocsUrl string
OpenAPIUrl string
RedocUrl string
OpenAPI *openapi3.T
Servers openapi3.Servers
Routers RouterMap
SwaggerOptions map[string]any
RedocOptions map[string]any
}
func NewSwagger ¶
func (*Swagger) BuildOpenAPI ¶
func (swagger *Swagger) BuildOpenAPI()
func (*Swagger) MarshalJSON ¶
func (*Swagger) MarshalYaml ¶
Click to show internal directories.
Click to hide internal directories.
