go_plugin

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPluginPath = "plugin/"

Variables

This section is empty.

Functions

func ListPlugins

func ListPlugins(pluginPath string) ([]string, error)

ListPlugins 检查 plugin/ 目录,并返回包含插件名的数组

func RegularCreate

func RegularCreate() GoroBot.Service

RegularCreate 示例,一个返回标准 Service 接口的函数。动态加载的插件必须存在此函数。

Types

type Service

type Service struct {
	PluginPath string
	// contains filtered or unexported fields
}

func Create

func Create() *Service

func (*Service) DisablePlugin added in v0.0.7

func (s *Service) DisablePlugin(name string) error

func (*Service) EnablePlugin added in v0.0.7

func (s *Service) EnablePlugin(name string) error

func (*Service) Init

func (s *Service) Init(grb *GoroBot.Instant) error

func (*Service) InitPlugin added in v0.0.7

func (s *Service) InitPlugin(name string) error

func (*Service) InitPlugins added in v0.0.7

func (s *Service) InitPlugins()

func (*Service) LookupPlugins added in v0.0.7

func (s *Service) LookupPlugins() error

func (*Service) Name

func (s *Service) Name() string

func (*Service) Release

func (s *Service) Release(grb *GoroBot.Instant) error

func (*Service) ReleasePlugin added in v0.0.7

func (s *Service) ReleasePlugin(name string) error

Jump to

Keyboard shortcuts

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