Documentation ¶
Index ¶
- func CheckBlock(ctx *zero.Ctx) bool
- func IsServiceEnabled(serv string) zero.Rule
- func LoadCommandList(service string) map[string]CommandInfo
- func StoneCommandList(service string, cmds map[string]CommandInfo)
- func StoreServiceData(serv string, d ServiceInfo)
- type CommandInfo
- type D
- type Service
- func (s *Service) OnCommand(command string, docs string, aliases []string, rules ...zero.Rule) *zero.Matcher
- func (s *Service) OnMessage(name string, docs string, rules ...zero.Rule) *zero.Matcher
- func (s *Service) OnMetaEvent(name string, docs string, rules ...zero.Rule) *zero.Matcher
- func (s *Service) OnNotice(name string, docs string, rules ...zero.Rule) *zero.Matcher
- func (s *Service) OnRegex(pattern string, docs string, rules ...zero.Rule) *zero.Matcher
- func (s *Service) OnRequest(name string, docs string, rules ...zero.Rule) *zero.Matcher
- type ServiceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBlock ¶
func IsServiceEnabled ¶
func LoadCommandList ¶
func LoadCommandList(service string) map[string]CommandInfo
func StoneCommandList ¶
func StoneCommandList(service string, cmds map[string]CommandInfo)
func StoreServiceData ¶
func StoreServiceData(serv string, d ServiceInfo)
Types ¶
type CommandInfo ¶
type Service ¶
type Service struct { Service string Docs string OnlyAdmin bool Rule []zero.Rule MainCommand string }
func NewService ¶
func NewService(name string, docs string, onlyAdmin bool, mainCommand string, rules ...zero.Rule) *Service
NewService 注册一个服务
func (*Service) OnMetaEvent ¶
type ServiceInfo ¶
type ServiceInfo struct { Service string `json:"service"` Docs string `json:"docs"` CommandList map[string]CommandInfo `json:"command_list"` Enabled bool `json:"enabled"` OnlyAdmin bool `json:"only_admin"` DisableUser []string `json:"disable_user"` DisableGroup []string `json:"disable_group"` }
func LoadServiceData ¶
func LoadServiceData(service string) ServiceInfo
Click to show internal directories.
Click to hide internal directories.