pub struct Telegram { /* private fields */ }Expand description
The Telegram module: the webhook, account linking, and the consent buttons.
Implementations§
Source§impl Telegram
impl Telegram
Sourcepub fn new(events: TelegramEvents) -> Self
pub fn new(events: TelegramEvents) -> Self
A module with the given venture hooks; TelegramEvents::new() for
none.
Sourcepub fn bot(self, bot: Arc<dyn TelegramBot>) -> Self
pub fn bot(self, bot: Arc<dyn TelegramBot>) -> Self
Injects the bot the module talks to — a
FakeTelegramBot
in tests, or the adapter’s HttpTelegramBot in production.
Without one (and without TELEGRAM_BOT_TOKEN to build one from),
replies and prompts are skipped with a warning; the webhook keeps
working.
Sourcepub fn random(self, random: impl RandomBytes + 'static) -> Self
pub fn random(self, random: impl RandomBytes + 'static) -> Self
Injects the entropy source link codes and action ids are drawn
from. Without one, POST /link-codes answers 500 and no prompt
can be issued; Module::self_check names the missing argument.
Trait Implementations§
Source§impl Module for Telegram
impl Module for Telegram
Source§fn signature_verification(&self) -> SignatureVerification
fn signature_verification(&self) -> SignatureVerification
The route is a provider webhook guarded by Telegram’s shared secret token.
Source§fn self_check(&self) -> Vec<String>
fn self_check(&self) -> Vec<String>
The composition a build should hear about. Nothing here comes from the environment; the fix is in the composition.
Source§fn requires(&self) -> &'static [Port]
fn requires(&self) -> &'static [Port]
Source§fn tables(&self) -> &'static [&'static str]
fn tables(&self) -> &'static [&'static str]
Source§fn personal_data(&self) -> &'static [PersonalDataSet]
fn personal_data(&self) -> &'static [PersonalDataSet]
Source§fn emits(&self) -> &'static [&'static str]
fn emits(&self) -> &'static [&'static str]
"<module>.<event>"), listed by
/__health.Source§fn migrations(&self) -> Migrations
fn migrations(&self) -> Migrations
Source§fn validate_config(&self, cfg: &dyn Config) -> Result<(), ConfigError>
fn validate_config(&self, cfg: &dyn Config) -> Result<(), ConfigError>
Source§fn router(&self, ctx: ModuleContext) -> Router
fn router(&self, ctx: ModuleContext) -> Router
/v1/<name>.Source§fn surface(&self) -> Surface
fn surface(&self) -> Surface
Action::input::<Body>()), so the
declaration cannot drift from the route. Harness::build
validates it; GET /__surface serves the composition. Default:
nothing, and a module that declares nothing renders nothing.Source§fn harness_api(&self) -> u32
fn harness_api(&self) -> u32
Harness::build.Source§fn depends_on(&self) -> &'static [&'static str]
fn depends_on(&self) -> &'static [&'static str]
Source§fn actor_kinds(&self) -> &'static [&'static str]
fn actor_kinds(&self) -> &'static [&'static str]
[a-z0-9_-]; duplicates across
modules are a build error, and so is a kind with no handler registered
through
HarnessBuilder::actor. Read moreSource§fn public_writes(&self) -> bool
fn public_writes(&self) -> bool
Source§fn public_write_policy(&self) -> RoutePolicy
fn public_write_policy(&self) -> RoutePolicy
RoutePolicy on
(issue #143). Read moreSource§fn max_body_bytes(&self, _cfg: &dyn Config) -> usize
fn max_body_bytes(&self, _cfg: &dyn Config) -> usize
Source§fn streaming_routes(&self) -> &'static [StreamRoute]
fn streaming_routes(&self) -> &'static [StreamRoute]
StreamRoute::max_bytes ceiling. Opt-in: the default
is empty, and every existing route keeps the buffered behaviour it
always had. Read moreSource§fn max_blob_object_bytes(&self) -> u64
fn max_blob_object_bytes(&self) -> u64
ScopedBlob the harness hands the module on
put_stream, upload_part and complete_multipart. Read moreSource§fn well_known(&self) -> Option<Router>
fn well_known(&self) -> Option<Router>
/.well-known, for
spec-mandated discovery documents (OIDC openid-configuration,
jwks.json) that must live outside /v1 (issue #46). Paths are
relative to the prefix: register /jwks.json, not
/.well-known/jwks.json. Read more