Documentation
¶
Index ¶
- Constants
- func ListPlugins(pluginPath string) ([]string, error)
- func RegularCreate() GoroBot.Service
- type Service
- func (s *Service) DisablePlugin(name string) error
- func (s *Service) EnablePlugin(name string) error
- func (s *Service) Init(grb *GoroBot.Instant) error
- func (s *Service) InitPlugin(name string) error
- func (s *Service) InitPlugins()
- func (s *Service) LookupPlugins() error
- func (s *Service) Name() string
- func (s *Service) Release(grb *GoroBot.Instant) error
- func (s *Service) ReleasePlugin(name string) error
Constants ¶
View Source
const DefaultPluginPath = "plugin/"
Variables ¶
This section is empty.
Functions ¶
func ListPlugins ¶
ListPlugins 检查 plugin/ 目录,并返回包含插件名的数组
func RegularCreate ¶
RegularCreate 示例,一个返回标准 Service 接口的函数。动态加载的插件必须存在此函数。
Types ¶
type Service ¶
type Service struct { PluginPath string // contains filtered or unexported fields }
func (*Service) DisablePlugin ¶ added in v0.0.7
func (*Service) EnablePlugin ¶ added in v0.0.7
func (*Service) InitPlugin ¶ added in v0.0.7
func (*Service) InitPlugins ¶ added in v0.0.7
func (s *Service) InitPlugins()
func (*Service) LookupPlugins ¶ added in v0.0.7
func (*Service) ReleasePlugin ¶ added in v0.0.7
Click to show internal directories.
Click to hide internal directories.