Documentation
¶
Index ¶
- Variables
- func RegisterSwagger()
- type SwaggerLifecycle
- func (s *SwaggerLifecycle) Disable(ctx plugins.BaseContext) error
- func (s *SwaggerLifecycle) Enable(ctx plugins.EnableContext) error
- func (s *SwaggerLifecycle) Install(ctx plugins.InstallContext) error
- func (s *SwaggerLifecycle) Start(ctx plugins.BaseContext) error
- func (s *SwaggerLifecycle) StartCron(ctx plugins.BaseContext, spec string) error
- func (s *SwaggerLifecycle) Stop(ctx plugins.BaseContext) error
- func (s *SwaggerLifecycle) Uninstall(ctx plugins.UninstallContext) error
- func (s *SwaggerLifecycle) Upgrade(ctx plugins.UpgradeContext) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Metadata = plugins.Module{ Meta: plugins.Meta{ Name: modules.PluginNameSwagger, Title: "Swagger文档", Version: "1.0.0", Description: "Swagger API文档查看。更新执行插件目录下的make.sh脚本生成文档。", }, Tables: []string{}, Crons: []string{}, Menus: []plugins.Menu{ { Key: "plugin_swagger", Title: "Swagger文档", Icon: "fa-solid fa-code-branch", Order: 190, Children: []plugins.Menu{ { Key: "plugin_swagger_open", Title: "API文档", Icon: "fa-solid fa-book", EventType: "custom", CustomEvent: `() => open("/swagger/index.html")`, Order: 100, }, }, }, }, Dependencies: []string{}, RunAfter: []string{}, Lifecycle: &SwaggerLifecycle{}, }
View Source
var SwaggerInfo = swaggerInfo{ Version: "1.0", Host: "", BasePath: "", Schemes: []string{}, Title: "k8m API", Description: "请输入以 `Bearer ` 开头的 Token,例:Bearer xxxxxxxx。未列出接口请参考前端调用方法。Token在个人中心-API密钥菜单下申请。", }
SwaggerInfo holds exported Swagger Info so clients can modify it
Functions ¶
func RegisterSwagger ¶
func RegisterSwagger()
Types ¶
type SwaggerLifecycle ¶
type SwaggerLifecycle struct{}
func (*SwaggerLifecycle) Disable ¶
func (s *SwaggerLifecycle) Disable(ctx plugins.BaseContext) error
func (*SwaggerLifecycle) Enable ¶
func (s *SwaggerLifecycle) Enable(ctx plugins.EnableContext) error
func (*SwaggerLifecycle) Install ¶
func (s *SwaggerLifecycle) Install(ctx plugins.InstallContext) error
func (*SwaggerLifecycle) Start ¶
func (s *SwaggerLifecycle) Start(ctx plugins.BaseContext) error
func (*SwaggerLifecycle) StartCron ¶
func (s *SwaggerLifecycle) StartCron(ctx plugins.BaseContext, spec string) error
func (*SwaggerLifecycle) Stop ¶
func (s *SwaggerLifecycle) Stop(ctx plugins.BaseContext) error
func (*SwaggerLifecycle) Uninstall ¶
func (s *SwaggerLifecycle) Uninstall(ctx plugins.UninstallContext) error
func (*SwaggerLifecycle) Upgrade ¶
func (s *SwaggerLifecycle) Upgrade(ctx plugins.UpgradeContext) error
Click to show internal directories.
Click to hide internal directories.