Documentation
¶
Index ¶
- Constants
- type Env
- func (e *Env) Error(ctx *zero.Ctx, err error)
- func (e *Env) FilePath() (string, error)
- func (e *Env) Get(key string) any
- func (e *Env) GetConf(conf any) error
- func (e *Env) GetDB() (*gorm.DB, error)
- func (e *Env) GetPlugin(name string) (p plugin.Plugin, ok bool)
- func (e *Env) Groups() plugin.Groups
- func (e *Env) IsDisable() bool
- func (e *Env) MetricReport() string
- func (e *Env) Set(key string, value any)
- func (e *Env) SuperUser() plugin.Users
- func (e *Env) Toggle(b bool)
- func (e *Env) UseBot(h zero.Handler)
- type EnvEngine
- func (e *EnvEngine) On(typ string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnCommand(commands string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnCommandGroup(commands []string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnFullMatch(src string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnFullMatchGroup(src []string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnKeyword(keyword string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnKeywordGroup(keywords []string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnMessage(rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnMetaEvent(rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnNotice(rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnPrefix(prefix string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnPrefixGroup(prefix []string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnRegex(regexPattern string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnRequest(rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnShell(command string, model interface{}, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnSuffix(suffix string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) OnSuffixGroup(suffix []string, rules ...zero.Rule) *zero.Matcher
- func (e *EnvEngine) UseMidHandler(rules ...zero.Rule)
- func (e *EnvEngine) UsePostHandler(handler ...zero.Handler)
- func (e *EnvEngine) UsePreHandler(rules ...zero.Rule)
- type Groups
- type GroupsWithEnv
- type UserWithEnv
- type Users
Constants ¶
View Source
const (
EnvMetric = "ENV_METRIC_%s"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env struct {
Disable atomic.Bool
Metric *metric.Metric
// contains filtered or unexported fields
}
func (*Env) MetricReport ¶ added in v1.1.1
type EnvEngine ¶
type EnvEngine struct {
// contains filtered or unexported fields
}
func (*EnvEngine) OnCommandGroup ¶
func (*EnvEngine) OnFullMatch ¶
func (*EnvEngine) OnFullMatchGroup ¶
func (*EnvEngine) OnKeywordGroup ¶
func (*EnvEngine) OnPrefixGroup ¶
func (*EnvEngine) OnSuffixGroup ¶
func (*EnvEngine) UseMidHandler ¶
func (*EnvEngine) UsePostHandler ¶
func (*EnvEngine) UsePreHandler ¶
type GroupsWithEnv ¶
type GroupsWithEnv struct {
Groups
// contains filtered or unexported fields
}
func NewGroupsWithEnv ¶
func NewGroupsWithEnv(groups Groups, env *Env) *GroupsWithEnv
func (*GroupsWithEnv) Rule ¶
func (g *GroupsWithEnv) Rule() zero.Rule
type UserWithEnv ¶
type UserWithEnv struct {
Users
// contains filtered or unexported fields
}
func NewUserWithEnv ¶
func NewUserWithEnv(users Users, env *Env) *UserWithEnv
func (*UserWithEnv) Rule ¶
func (g *UserWithEnv) Rule() zero.Rule
Click to show internal directories.
Click to hide internal directories.