Documentation
¶
Overview ¶
Package control 控制插件的启用与优先级等
Index ¶
- func Delete(service string)
- func ForEach(iterator func(key string, manager *Control) bool)
- type Control
- func (m *Control) Ban(uid, gid int64)
- func (m *Control) Disable(groupID int64)
- func (m *Control) Enable(groupID int64)
- func (m *Control) GetData(gid int64) int64
- func (m *Control) Handler(ctx *zero.Ctx) bool
- func (m *Control) IsBannedIn(uid, gid int64) bool
- func (m *Control) IsEnabledIn(gid int64) bool
- func (m *Control) Permit(uid, gid int64)
- func (m *Control) Reset(groupID int64)
- func (m *Control) SetData(groupID int64, data int64) error
- type Engine
- type Matcher
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Control ¶
Control is to control the plugins.
func (*Control) Disable ¶
Disable disables a group to pass the Manager. groupID == 0 (ALL) will operate on all grps.
func (*Control) Enable ¶
Enable enables a group to pass the Manager. groupID == 0 (ALL) will operate on all grps.
func (*Control) IsBannedIn ¶
IsBannedIn 某人是否在某群被 ban
type Engine ¶
type Engine interface {
// Delete 移除该 Engine 注册的所有 Matchers
Delete()
// On 添加新的指定消息类型的匹配器
On(typ string, rules ...zero.Rule) Matcher
// OnMessage 消息触发器
OnMessage(rules ...zero.Rule) Matcher
// OnNotice 系统提示触发器
OnNotice(rules ...zero.Rule) Matcher
// OnRequest 请求消息触发器
OnRequest(rules ...zero.Rule) Matcher
// OnMetaEvent 元事件触发器
OnMetaEvent(rules ...zero.Rule) Matcher
// OnPrefix 前缀触发器
OnPrefix(prefix string, rules ...zero.Rule) Matcher
// OnSuffix 后缀触发器
OnSuffix(suffix string, rules ...zero.Rule) Matcher
// OnCommand 命令触发器
OnCommand(commands string, rules ...zero.Rule) Matcher
// OnRegex 正则触发器
OnRegex(regexPattern string, rules ...zero.Rule) Matcher
// OnKeyword 关键词触发器
OnKeyword(keyword string, rules ...zero.Rule) Matcher
// OnFullMatch 完全匹配触发器
OnFullMatch(src string, rules ...zero.Rule) Matcher
// OnFullMatchGroup 完全匹配触发器组
OnFullMatchGroup(src []string, rules ...zero.Rule) Matcher
// OnKeywordGroup 关键词触发器组
OnKeywordGroup(keywords []string, rules ...zero.Rule) Matcher
// OnCommandGroup 命令触发器组
OnCommandGroup(commands []string, rules ...zero.Rule) Matcher
// OnPrefixGroup 前缀触发器组
OnPrefixGroup(prefix []string, rules ...zero.Rule) Matcher
// OnSuffixGroup 后缀触发器组
OnSuffixGroup(suffix []string, rules ...zero.Rule) Matcher
// OnShell shell命令触发器
OnShell(command string, model interface{}, rules ...zero.Rule) Matcher
}
Click to show internal directories.
Click to hide internal directories.