builtin

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

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) Init

func (p *AliasPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*AliasPlugin) Name

func (p *AliasPlugin) Name() string

func (*AliasPlugin) Start

func (p *AliasPlugin) Start(_ context.Context) error

func (*AliasPlugin) Stop

func (p *AliasPlugin) Stop(_ context.Context) error

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 NewApt

func NewApt(pluginLoader *loader.Loader) *AptPlugin

func (*AptPlugin) Description

func (p *AptPlugin) Description() string

func (*AptPlugin) Init

func (p *AptPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*AptPlugin) Name

func (p *AptPlugin) Name() string

func (*AptPlugin) Start

func (p *AptPlugin) Start(_ context.Context) error

func (*AptPlugin) Stop

func (p *AptPlugin) Stop(_ context.Context) error

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) Init

func (p *BackupPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*BackupPlugin) Name

func (p *BackupPlugin) Name() string

func (*BackupPlugin) SetConfig

func (p *BackupPlugin) SetConfig(path string, cfg *config.Config)

SetConfig wires the active configuration so backups include configured paths instead of silently looking only in the process working directory.

func (*BackupPlugin) Start

func (p *BackupPlugin) Start(_ context.Context) error

func (*BackupPlugin) Stop

func (p *BackupPlugin) Stop(_ context.Context) error

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) Init

func (p *CorePlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*CorePlugin) Name

func (p *CorePlugin) Name() string

func (*CorePlugin) Start

func (p *CorePlugin) Start(_ context.Context) error

func (*CorePlugin) Stop

func (p *CorePlugin) Stop(_ context.Context) error

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) Init

func (p *ExecPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*ExecPlugin) Name

func (p *ExecPlugin) Name() string

func (*ExecPlugin) Start

func (p *ExecPlugin) Start(_ context.Context) error

func (*ExecPlugin) Stop

func (p *ExecPlugin) Stop(_ context.Context) error

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) Init

func (p *HelpPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*HelpPlugin) Name

func (p *HelpPlugin) Name() string

func (*HelpPlugin) Start

func (p *HelpPlugin) Start(_ context.Context) error

func (*HelpPlugin) Stop

func (p *HelpPlugin) Stop(_ context.Context) error

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) Init

func (p *InfoPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*InfoPlugin) Name

func (p *InfoPlugin) Name() string

func (*InfoPlugin) Start

func (p *InfoPlugin) Start(_ context.Context) error

func (*InfoPlugin) Stop

func (p *InfoPlugin) Stop(_ context.Context) error

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) Init

func (p *LangPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*LangPlugin) Name

func (p *LangPlugin) Name() string

func (*LangPlugin) Start

func (p *LangPlugin) Start(_ context.Context) error

func (*LangPlugin) Stop

func (p *LangPlugin) Stop(_ context.Context) error

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 NewLog

func NewLog() *LogPlugin

func (*LogPlugin) Description

func (p *LogPlugin) Description() string

func (*LogPlugin) Init

func (p *LogPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*LogPlugin) Name

func (p *LogPlugin) Name() string

func (*LogPlugin) Start

func (p *LogPlugin) Start(_ context.Context) error

func (*LogPlugin) Stop

func (p *LogPlugin) Stop(_ context.Context) error

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) Init

func (p *PrefixPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*PrefixPlugin) Name

func (p *PrefixPlugin) Name() string

func (*PrefixPlugin) Start

func (p *PrefixPlugin) Start(_ context.Context) error

func (*PrefixPlugin) Stop

func (p *PrefixPlugin) Stop(_ context.Context) error

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) Init

func (p *PrunePlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*PrunePlugin) Name

func (p *PrunePlugin) Name() string

func (*PrunePlugin) Start

func (p *PrunePlugin) Start(_ context.Context) error

func (*PrunePlugin) Stop

func (p *PrunePlugin) Stop(_ context.Context) error

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) Init

func (p *ReloadPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*ReloadPlugin) Name

func (p *ReloadPlugin) Name() string

func (*ReloadPlugin) Start

func (p *ReloadPlugin) Start(_ context.Context) error

func (*ReloadPlugin) Stop

func (p *ReloadPlugin) Stop(_ context.Context) error

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) Init

func (p *StatusPlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*StatusPlugin) Name

func (p *StatusPlugin) Name() string

func (*StatusPlugin) Start

func (p *StatusPlugin) Start(_ context.Context) error

func (*StatusPlugin) Stop

func (p *StatusPlugin) Stop(_ context.Context) error

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) Init

func (p *SudoPlugin) Init(_ context.Context, mgr plugin.Manager) error

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

func (*SudoPlugin) Start

func (p *SudoPlugin) Start(_ context.Context) error

func (*SudoPlugin) Stop

func (p *SudoPlugin) Stop(_ context.Context) error

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) Init

func (p *UpdatePlugin) Init(_ context.Context, mgr plugin.Manager) error

func (*UpdatePlugin) Name

func (p *UpdatePlugin) Name() string

func (*UpdatePlugin) Start

func (p *UpdatePlugin) Start(_ context.Context) error

func (*UpdatePlugin) Stop

func (p *UpdatePlugin) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL