swagger

package
v0.26.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (*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 (*SwaggerLifecycle) Uninstall

func (s *SwaggerLifecycle) Uninstall(ctx plugins.UninstallContext) error

func (*SwaggerLifecycle) Upgrade

func (s *SwaggerLifecycle) Upgrade(ctx plugins.UpgradeContext) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL