plugins

package
v0.0.0-...-49cc056 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func PluginMgr

func PluginMgr() *pluginManager

Types

type IterFn

type IterFn func(string, PluginIntf) error

IterFn 迭代函数

type Plug

type Plug struct {
	// contains filtered or unexported fields
}

type PluginIntf

type PluginIntf interface {
	Init(di.AbstractBuilder)         // 初始化插件
	Sign() string                    // 插件的唯一标识, 需要开发者搞一个独一无二如 uuid
	View() string                    // 配置视图json信息
	Menu(interface{}, int)           // 安装插件位置
	Install()                        // 安装插件, 首次扫描后执行.
	IsInstall() bool                 // 安装状态
	Uninstall()                      // 卸载后禁止访问
	Upgrade()                        // 更新插件
	SetStatus(bool)                  // 设置插件状态
	Status() bool                    // 获取状态
	GetController() pine.IController // 控制器返回
	Prefix() string                  // 路由前缀
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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