plugin

package
v1.14.11 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetailHandler

func DetailHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

DetailHandler returns loaded plugin details.

@Summary Get loaded plugin details @Tags admin @Produce json @Security BearerAuth @Param name query string true "Plugin name" @Success 200 {object} plugin.PluginInfo @Router /v1/admin/plugin/detail [get]

func DisableHandler

func DisableHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

DisableHandler disables a plugin.

@Summary Disable a plugin @Tags admin @Accept x-www-form-urlencoded @Produce json @Security BearerAuth @Param name formData string true "Plugin name" @Success 200 {object} map[string]string @Router /v1/admin/plugin/disable [post]

func EnableHandler

func EnableHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

EnableHandler enables a plugin.

@Summary Enable a plugin @Tags admin @Accept x-www-form-urlencoded @Produce json @Security BearerAuth @Param name formData string true "Plugin name" @Success 200 {object} map[string]string @Router /v1/admin/plugin/enable [post]

func InstalledActionHandler

func InstalledActionHandler(svcCtx *svc.ServiceContext, action string) app.HandlerFunc

InstalledActionHandler executes a plugin lifecycle action.

@Summary Execute a plugin lifecycle action @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=PluginActionResponse} @Router /v1/admin/plugins/{name}/disable [post] @Router /v1/admin/plugins/{name}/enable [post] @Router /v1/admin/plugins/{name}/reload [post] @Router /v1/admin/plugins/{name}/restart [post]

func InstalledDetailHandler

func InstalledDetailHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledDetailHandler returns installed plugin details.

@Summary Get installed plugin details @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=runtimeplugin.PluginInfo} @Router /v1/admin/plugins/{name} [get]

func InstalledEventsHandler

func InstalledEventsHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledEventsHandler lists event subscriptions for a plugin.

@Summary List plugin event subscriptions @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=[]runtimeplugin.EventSubscription} @Router /v1/admin/plugins/{name}/events [get]

func InstalledHealthHandler

func InstalledHealthHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledHealthHandler returns plugin runtime health.

@Summary Get plugin runtime health @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=runtimeplugin.PluginHealth} @Router /v1/admin/plugins/{name}/health [get]

func InstalledListHandler

func InstalledListHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledListHandler lists installed plugins.

@Summary List installed plugins @Tags admin @Produce json @Security BearerAuth @Param q query string false "Search by name, description, or author" @Param status query string false "Filter by plugin status" @Param page query int false "Page number" @Param size query int false "Page size" maximum(100) @Success 200 {object} APIResponse{data=PluginListResponse} @Router /v1/admin/plugins [get] @Router /v1/admin/plugins/ [get]

func InstalledManifestHandler

func InstalledManifestHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledManifestHandler returns an installed plugin manifest.

@Summary Get an installed plugin manifest @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=runtimeplugin.PluginManifest} @Router /v1/admin/plugins/{name}/manifest [get]

func InstalledMiddlewareHandler

func InstalledMiddlewareHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledMiddlewareHandler lists runtime middleware for a plugin.

@Summary List plugin runtime middleware @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=[]runtimeplugin.MiddlewareRegistration} @Router /v1/admin/plugins/{name}/middlewares [get]

func InstalledReloadAllHandler

func InstalledReloadAllHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledReloadAllHandler rescans and reloads installed plugins.

@Summary Reload all installed plugins @Tags admin @Produce json @Security BearerAuth @Success 200 {object} APIResponse{data=PluginListResponse} @Router /v1/admin/plugins/reload-all [post]

func InstalledRoutesHandler

func InstalledRoutesHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledRoutesHandler lists runtime routes for a plugin.

@Summary List plugin runtime routes @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=[]runtimeplugin.RouteRegistration} @Router /v1/admin/plugins/{name}/routes [get]

func InstalledUploadHandler

func InstalledUploadHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledUploadHandler uploads and installs a plugin archive.

@Summary Upload and install a plugin archive @Tags admin @Accept mpfd @Produce json @Security BearerAuth @Param file formData file true "Plugin zip archive" @Param replace formData bool false "Replace an existing plugin" @Param enable formData bool false "Enable after installation" @Success 200 {object} APIResponse{data=runtimeplugin.PluginInstallResult} @Router /v1/admin/plugins/upload [post]

func InstalledValidateHandler

func InstalledValidateHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

InstalledValidateHandler validates an installed plugin.

@Summary Validate an installed plugin @Tags admin @Produce json @Security BearerAuth @Param name path string true "name" @Success 200 {object} APIResponse{data=runtimeplugin.PluginValidation} @Router /v1/admin/plugins/{name}/validate [post]

func ListHandler

func ListHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

ListHandler lists loaded plugins.

@Summary List loaded plugins @Tags admin @Produce json @Security BearerAuth @Success 200 {array} plugin.PluginInfo @Router /v1/admin/plugin/list [get]

func ReloadHandler

func ReloadHandler(svcCtx *svc.ServiceContext) app.HandlerFunc

ReloadHandler reloads a plugin.

@Summary Reload a plugin @Tags admin @Accept x-www-form-urlencoded @Produce json @Security BearerAuth @Param name formData string true "Plugin name" @Success 200 {object} map[string]string @Router /v1/admin/plugin/reload [post]

Types

type APIResponse added in v1.14.9

type APIResponse struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type PluginActionResponse added in v1.14.9

type PluginActionResponse struct {
	Name    string `json:"name"`
	Action  string `json:"action"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

type PluginListResponse added in v1.14.9

type PluginListResponse struct {
	List  []runtimeplugin.PluginInfo `json:"list"`
	Total int                        `json:"total"`
}

Jump to

Keyboard shortcuts

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