go_plugin

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 8 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/ 目录,并返回 .so 文件数组

func RegularCreate

func RegularCreate() GoroBot.Service

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

Types

type RegularCreation

type RegularCreation func() GoroBot.Service

type Service

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

func Create

func Create() *Service

func (*Service) Init

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

func (*Service) Name

func (s *Service) Name() string

func (*Service) Release

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

Jump to

Keyboard shortcuts

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