Documentation
¶
Index ¶
- Variables
- type OpenApiMiddleware
- func (o *OpenApiMiddleware) CloneAsCtl() fw.IMiddlewareCtl
- func (o *OpenApiMiddleware) CloneAsMethod() fw.IMiddlewareMethod
- func (o *OpenApiMiddleware) Constructor()
- func (o *OpenApiMiddleware) HandlerController(base string) []*fw.RouteItem
- func (o *OpenApiMiddleware) HandlerMethod(next fw.HandlerFunc) fw.HandlerFunc
- type OpenApiOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var FS embed.FS
Functions ¶
This section is empty.
Types ¶
type OpenApiMiddleware ¶
type OpenApiMiddleware struct {
*fw.MiddlewareGlobal
Conf *config.Config `inject:""`
// contains filtered or unexported fields
}
func NewOpenApiMiddleware ¶
func NewOpenApiMiddleware() *OpenApiMiddleware
func (*OpenApiMiddleware) CloneAsCtl ¶
func (o *OpenApiMiddleware) CloneAsCtl() fw.IMiddlewareCtl
func (*OpenApiMiddleware) CloneAsMethod ¶
func (o *OpenApiMiddleware) CloneAsMethod() fw.IMiddlewareMethod
func (*OpenApiMiddleware) Constructor ¶ added in v0.0.3
func (o *OpenApiMiddleware) Constructor()
func (*OpenApiMiddleware) HandlerController ¶
func (o *OpenApiMiddleware) HandlerController(base string) []*fw.RouteItem
func (*OpenApiMiddleware) HandlerMethod ¶
func (o *OpenApiMiddleware) HandlerMethod(next fw.HandlerFunc) fw.HandlerFunc
type OpenApiOptions ¶ added in v0.0.3
type OpenApiOptions struct {
Redirect bool `yaml:"redirect" default:"true"`
Route string `yaml:"route" default:"doc"` // the page route of openapi document. e.g. if your want to serve document at /docA/index.html, just set route to docA
FileName string `yaml:"fileName" default:"openapi.yaml"` //file path refer to openapi.yaml or openapi.json
}
Click to show internal directories.
Click to hide internal directories.