Documentation
¶
Index ¶
- Constants
- func EnsureAuth(ctx context.Context, client *telegram.Client, phone string) error
- type App
- type TerminalAuth
- func (a TerminalAuth) AcceptTermsOfService(_ context.Context, tos tg.HelpTermsOfService) error
- func (a TerminalAuth) Code(_ context.Context, _ *tg.AuthSentCode) (string, error)
- func (a TerminalAuth) Password(_ context.Context) (string, error)
- func (a TerminalAuth) Phone(_ context.Context) (string, error)
- func (a TerminalAuth) SignUp(_ context.Context) (auth.UserInfo, error)
- type UpdateHandler
Constants ¶
View Source
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the top-level orchestrator.
func (*App) GetPluginLoader ¶
GetPluginLoader returns the external plugin loader.
type TerminalAuth ¶
type TerminalAuth struct {
// contains filtered or unexported fields
}
TerminalAuth implements auth.UserAuthenticator with env-var fallback for non-interactive environments (containers, CI, automated installs).
func (TerminalAuth) AcceptTermsOfService ¶
func (a TerminalAuth) AcceptTermsOfService(_ context.Context, tos tg.HelpTermsOfService) error
func (TerminalAuth) Code ¶
func (a TerminalAuth) Code(_ context.Context, _ *tg.AuthSentCode) (string, error)
type UpdateHandler ¶
type UpdateHandler struct {
// contains filtered or unexported fields
}
UpdateHandler processes Telegram updates and emits events.
func NewUpdateHandler ¶
func NewUpdateHandler(bus *eventbus.Bus) *UpdateHandler
func (*UpdateHandler) Handle ¶
func (h *UpdateHandler) Handle(ctx context.Context, u tg.UpdatesClass) error
func (*UpdateHandler) SetSelfUserID ¶
func (h *UpdateHandler) SetSelfUserID(id int64)
Click to show internal directories.
Click to hide internal directories.