Documentation
¶
Index ¶
- type AliasPlugin
- type AptPlugin
- type BackupPlugin
- func (p *BackupPlugin) Description() string
- func (p *BackupPlugin) Init(_ context.Context, mgr plugin.Manager) error
- func (p *BackupPlugin) Name() string
- func (p *BackupPlugin) SetConfig(path string, cfg *config.Config)
- func (p *BackupPlugin) Start(_ context.Context) error
- func (p *BackupPlugin) Stop(_ context.Context) error
- type CorePlugin
- type ExecPlugin
- type HelpPlugin
- type InfoPlugin
- type LangPlugin
- type LogPlugin
- type PrefixPlugin
- type PrunePlugin
- type ReloadPlugin
- type StatusPlugin
- type SudoPlugin
- func (p *SudoPlugin) Description() string
- func (p *SudoPlugin) Init(_ context.Context, mgr plugin.Manager) error
- func (p *SudoPlugin) IsSudoUser(userID int64) bool
- func (p *SudoPlugin) Name() string
- func (p *SudoPlugin) Start(_ context.Context) error
- func (p *SudoPlugin) Stop(_ context.Context) error
- type UpdatePlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliasPlugin ¶
type AliasPlugin struct {
// contains filtered or unexported fields
}
AliasPlugin manages runtime command aliases with persistent storage. Aliases are expanded once during command parsing; they do not nest.
func NewAlias ¶
func NewAlias() *AliasPlugin
func (*AliasPlugin) Description ¶
func (p *AliasPlugin) Description() string
func (*AliasPlugin) Name ¶
func (p *AliasPlugin) Name() string
type AptPlugin ¶
type AptPlugin struct {
// contains filtered or unexported fields
}
AptPlugin is the plugin package manager (renamed from ppm). Pure plugin manager: install/remove/load/unload/list/info/search.
func (*AptPlugin) Description ¶
type BackupPlugin ¶
type BackupPlugin struct {
// contains filtered or unexported fields
}
BackupPlugin provides config/session backup and restore.
func NewBackup ¶
func NewBackup() *BackupPlugin
func (*BackupPlugin) Description ¶
func (p *BackupPlugin) Description() string
func (*BackupPlugin) Name ¶
func (p *BackupPlugin) Name() string
type CorePlugin ¶
type CorePlugin struct {
// contains filtered or unexported fields
}
CorePlugin provides fundamental commands.
func NewCore ¶
func NewCore(version string) *CorePlugin
func (*CorePlugin) Description ¶
func (p *CorePlugin) Description() string
func (*CorePlugin) Name ¶
func (p *CorePlugin) Name() string
type ExecPlugin ¶
type ExecPlugin struct{}
ExecPlugin executes system commands (owner only). The old separate sudo plugin (run-as-root) is merged here via the --sudo flag.
func NewExec ¶
func NewExec() *ExecPlugin
func (*ExecPlugin) Description ¶
func (p *ExecPlugin) Description() string
func (*ExecPlugin) Name ¶
func (p *ExecPlugin) Name() string
type HelpPlugin ¶
type HelpPlugin struct {
// contains filtered or unexported fields
}
HelpPlugin provides help and command discovery.
func NewHelp ¶
func NewHelp() *HelpPlugin
func (*HelpPlugin) Description ¶
func (p *HelpPlugin) Description() string
func (*HelpPlugin) Name ¶
func (p *HelpPlugin) Name() string
type InfoPlugin ¶
type InfoPlugin struct{}
InfoPlugin shows user/chat info.
func NewInfo ¶
func NewInfo() *InfoPlugin
func (*InfoPlugin) Description ¶
func (p *InfoPlugin) Description() string
func (*InfoPlugin) Name ¶
func (p *InfoPlugin) Name() string
type LangPlugin ¶
type LangPlugin struct {
// contains filtered or unexported fields
}
LangPlugin provides runtime language switching (native i18n).
func NewLang ¶
func NewLang(mgr *i18n.Manager) *LangPlugin
func (*LangPlugin) Description ¶
func (p *LangPlugin) Description() string
func (*LangPlugin) Name ¶
func (p *LangPlugin) Name() string
type LogPlugin ¶
type LogPlugin struct {
// contains filtered or unexported fields
}
LogPlugin manages runtime logging: level control + log file delivery. Absorbs the old sendlog plugin.
func (*LogPlugin) Description ¶
type PrefixPlugin ¶
type PrefixPlugin struct {
// contains filtered or unexported fields
}
PrefixPlugin manages command prefixes with persistent storage.
func NewPrefix ¶
func NewPrefix() *PrefixPlugin
func (*PrefixPlugin) Description ¶
func (p *PrefixPlugin) Description() string
func (*PrefixPlugin) Name ¶
func (p *PrefixPlugin) Name() string
type PrunePlugin ¶
type PrunePlugin struct{}
PrunePlugin provides message deletion utilities.
func NewPrune ¶
func NewPrune() *PrunePlugin
func (*PrunePlugin) Description ¶
func (p *PrunePlugin) Description() string
func (*PrunePlugin) Name ¶
func (p *PrunePlugin) Name() string
type ReloadPlugin ¶
type ReloadPlugin struct {
// contains filtered or unexported fields
}
ReloadPlugin provides hot-reload for external plugins.
func NewReload ¶
func NewReload(pluginLoader *loader.Loader) *ReloadPlugin
func (*ReloadPlugin) Description ¶
func (p *ReloadPlugin) Description() string
func (*ReloadPlugin) Name ¶
func (p *ReloadPlugin) Name() string
type StatusPlugin ¶
type StatusPlugin struct {
// contains filtered or unexported fields
}
StatusPlugin provides detailed system status and metrics.
func NewStatus ¶
func NewStatus(version string) *StatusPlugin
func (*StatusPlugin) Description ¶
func (p *StatusPlugin) Description() string
func (*StatusPlugin) Name ¶
func (p *StatusPlugin) Name() string
type SudoPlugin ¶
type SudoPlugin struct {
// contains filtered or unexported fields
}
SudoPlugin implements PagerMaid-style permission delegation. Other Telegram users can be granted permission to use the userbot's commands.
func NewSudo ¶
func NewSudo() *SudoPlugin
func (*SudoPlugin) Description ¶
func (p *SudoPlugin) Description() string
func (*SudoPlugin) IsSudoUser ¶
func (p *SudoPlugin) IsSudoUser(userID int64) bool
IsSudoUser reports whether the given user is permitted.
func (*SudoPlugin) Name ¶
func (p *SudoPlugin) Name() string
type UpdatePlugin ¶
type UpdatePlugin struct {
// contains filtered or unexported fields
}
UpdatePlugin merges update and autofix: git sync + restart. Absorbs the old autofix plugin.
func NewUpdate ¶
func NewUpdate() *UpdatePlugin
func (*UpdatePlugin) Description ¶
func (p *UpdatePlugin) Description() string
func (*UpdatePlugin) Name ¶
func (p *UpdatePlugin) Name() string