Documentation ¶
Index ¶
- Variables
- func AddAutoLoadPlugin(name string) error
- func GetPluginInfo(pluginName string) (*meta.PluginMeta, error)
- func IsAdmin(uin int64) bool
- func RemoveAutoLoadPlugin(name string) error
- type AutoLoadPluginCfg
- type Manager
- func (m *Manager) CloseAllPlugin(ctx context.Context)
- func (m *Manager) GetAllPlugins() map[string]*Plugin
- func (m *Manager) GetPlugin(pluginName string) (*Plugin, error)
- func (m *Manager) LoadPlugin(ctx context.Context, pluginPath string) error
- func (m *Manager) LoadPluginWithSha256(ctx context.Context, pluginInfo AutoLoadPluginCfg) error
- func (m *Manager) OnGroupMsgAdmin(ctx context.Context, event events.IEvent) bool
- func (m *Manager) OnGroupMsgEvent(ctx context.Context, event events.IEvent)
- func (m *Manager) UnloadPlugin(ctx context.Context, pluginName string) error
- type Plugin
- func (p *Plugin) Http(ctx context.Context, request *proto.HttpReq) (*proto.HttpRes, error)
- func (p *Plugin) LockEvent(f func())
- func (p *Plugin) Log(ctx context.Context, req *proto.LogReq) (*emptypb.Empty, error)
- func (p *Plugin) RegisterCronJob(ctx context.Context, job *proto.CronJob) (*emptypb.Empty, error)
- func (p *Plugin) RemoteCall(ctx context.Context, req *proto.RemoteCallReq) (*proto.RemoteCallReply, error)
- func (p *Plugin) RemoveCronJob(ctx context.Context, job *proto.CronJob) (*emptypb.Empty, error)
- func (p *Plugin) SendFriendMsg(ctx context.Context, request *proto.MsgReq) (*proto.SendReply, error)
- func (p *Plugin) SendGroupMsg(ctx context.Context, request *proto.MsgReq) (*proto.SendReply, error)
- func (p *Plugin) SendPrivateMsg(ctx context.Context, request *proto.MsgReq) (*proto.SendReply, error)
- func (p *Plugin) Upload(ctx context.Context, uploadReq *proto.UploadReq) (*proto.UploadReply, error)
- type PluginEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var M = Manager{ // contains filtered or unexported fields }
Functions ¶
func AddAutoLoadPlugin ¶ added in v0.0.4
func GetPluginInfo ¶
func GetPluginInfo(pluginName string) (*meta.PluginMeta, error)
func RemoveAutoLoadPlugin ¶ added in v0.0.4
Types ¶
type AutoLoadPluginCfg ¶ added in v0.0.4
type AutoLoadPluginCfg struct { PluginName string `mapstructure:"pluginname"` PluginSha256 string `mapstructure:"pluginsha256"` }
func GetAutoLoadPlugins ¶ added in v0.0.4
func GetAutoLoadPlugins() []AutoLoadPluginCfg
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) CloseAllPlugin ¶
func (*Manager) GetAllPlugins ¶
func (*Manager) LoadPlugin ¶
func (*Manager) LoadPluginWithSha256 ¶ added in v0.0.4
func (m *Manager) LoadPluginWithSha256(ctx context.Context, pluginInfo AutoLoadPluginCfg) error
LoadPluginWithSha256 自动加载时使用
func (*Manager) OnGroupMsgAdmin ¶
func (*Manager) OnGroupMsgEvent ¶
type Plugin ¶
type Plugin struct { Meta meta.PluginMeta // contains filtered or unexported fields }
func (*Plugin) RegisterCronJob ¶
func (*Plugin) RemoteCall ¶
func (p *Plugin) RemoteCall(ctx context.Context, req *proto.RemoteCallReq) (*proto.RemoteCallReply, error)
func (*Plugin) RemoveCronJob ¶
func (*Plugin) SendFriendMsg ¶
func (*Plugin) SendGroupMsg ¶
func (*Plugin) SendPrivateMsg ¶
Click to show internal directories.
Click to hide internal directories.