plugins

package
v2.2.27 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoRegister

func AutoRegister(o *Meta[*context.Context]) foundation.Application

func Register

func Register(service string, o *Meta[*context.Context]) foundation.Application

Register 注册插件控制器

Types

type Meta

type Meta[ctx any] struct {
	Name        string    // 插件名称
	Description string    // 插件描述
	Slug        string    // 插件标识
	Version     string    // 插件版本
	Requires    []string  // 依赖插件
	Excludes    []string  // 排除插件
	Install     string    // 安装命令
	Uninstall   string    // 卸载命令
	Update      string    // 更新命令
	OnEnable    func(ctx) // 启用插件后执行的命令
	OnDisable   func(ctx) // 禁用插件后执行的命令
}

Jump to

Keyboard shortcuts

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