Struct NextcloudTalkConfig
pub struct NextcloudTalkConfig {
pub enabled: bool,
pub base_url: String,
pub app_token: Option<String>,
pub bot_token: Option<String>,
pub webhook_secret: Option<String>,
pub proxy_url: Option<String>,
pub bot_name: Option<String>,
pub excluded_tools: Vec<String>,
pub stream_mode: StreamMode,
pub draft_update_interval_ms: u64,
}Expand description
Nextcloud Talk bot configuration (webhook receive + signed bot send API).
Fields§
§enabled: boolWhether this channel is active. The runtime only loads channels whose
enabled = true. Default: false so an operator who pastes a partial
[channels.<type>.<alias>] block doesn’t accidentally bring a channel
live before the rest of its config is filled in.
base_url: StringNextcloud base URL (e.g. "https://cloud.example.com").
app_token: Option<String>Deprecated, unused. Nextcloud Talk sends do not authenticate via
OCS bearer auth (see webhook_secret); this field is only accepted so
existing configs that set it don’t fail to parse. Safe to remove
from your config.
bot_token: Option<String>DEPRECATED alias for webhook_secret, kept for migration.
Nextcloud issues ONE secret per installed bot and uses it for both
directions, so this cannot hold a different outbound secret. When both
are set to different non-empty values the channel logs the conflict and
fails closed as unconfigured: inbound 401 and no outbound send.
Prefer webhook_secret; this alias will be removed.
Upgrade from a bot_token-only configuration: copy the installed bot
secret to webhook_secret, verify replies still send, then delete
bot_token.
webhook_secret: Option<String>The bot secret Nextcloud installed for this bot. Canonical field.
Used for BOTH directions: verifying inbound webhook signatures and signing outbound bot-API requests. When it is unset, inbound webhooks are rejected and no outbound request is sent (fail closed).
Can also be set via ZEROCLAW_NEXTCLOUD_TALK_WEBHOOK_SECRET.
proxy_url: Option<String>Per-channel proxy URL (http, https, socks5, socks5h).
Overrides the global [proxy] setting for this channel only.
bot_name: Option<String>Display name of the bot in Nextcloud Talk (e.g. “zeroclaw”). Used to filter out the bot’s own messages and prevent feedback loops. If not set, defaults to an empty string (no self-message filtering by name).
excluded_tools: Vec<String>Tools excluded from this channel’s tool spec. When set, these tools are not exposed to the model when responding via this channel.
stream_mode: StreamModeRetained for configuration compatibility. Nextcloud Talk’s bot API does not provide message IDs or edit/delete operations, so draft updates are disabled and responses are currently sent as one final message for every value.
draft_update_interval_ms: u64Retained for configuration compatibility. Currently inert while draft updates are disabled for this channel. Default: 1000 ms.
Implementations§
Source§impl NextcloudTalkConfig
impl NextcloudTalkConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn init_requires_explicit_config() -> bool
pub fn init_requires_explicit_config() -> bool
True when this struct has a required leaf field that a
bare/ancestor-prefix init_defaults scaffold must not
materialize (it would fill the field with its Rust
Default, which prune_empty_leaves then strips on save,
leaving a partial sub-table that fails strict reload).
Explicitly targeting this section (or a descendant of it)
still scaffolds regardless of this flag, so the section can
be materialized for the operator to fill in.
Sourcepub fn secret_fields(&self) -> Vec<SecretFieldInfo>
pub fn secret_fields(&self) -> Vec<SecretFieldInfo>
Returns metadata about all #[secret] fields on this struct and nested children.
pub fn secret_field_terminals() -> Vec<&'static str>
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
Set a secret field by its full dotted name, dispatching to nested children.
Sourcepub fn prop_fields(&self) -> Vec<PropFieldInfo>
pub fn prop_fields(&self) -> Vec<PropFieldInfo>
Returns metadata about all property fields on this struct and nested children.
Sourcepub fn get_prop(&self, name: &str) -> Result<String, Error>
pub fn get_prop(&self, name: &str) -> Result<String, Error>
Get a property value by its full dotted name, returning it as a display string.
Sourcepub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
Set a property value by its full dotted name, parsing from string.
Sourcepub fn prop_is_secret(name: &str) -> bool
pub fn prop_is_secret(name: &str) -> bool
Check if a property name refers to a secret field (static, no instance needed).
Sourcepub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
pub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
Instantiate None nested sections whose prefix matches.
Returns the prefixes that were initialized.
Sourcepub fn map_key_sections() -> Vec<MapKeySection>
pub fn map_key_sections() -> Vec<MapKeySection>
Enumerate every map-keyed (HashMap<String, T>) and list-shaped
(Vec<T>) section discoverable from this Configurable’s tree.
The dashboard / CLI consume this to surface “+ Add” affordances
without hardcoding the section list.
Sourcepub fn nested_section_help(name: &str) -> Option<&'static str>
pub fn nested_section_help(name: &str) -> Option<&'static str>
Help blurb for a #[nested] field on this struct, sourced from
the field-level /// docstring. Returns None for unknown
names so callers can fall through to a different lookup.
pub fn nested_section_group(name: &str) -> Option<&'static str>
Sourcepub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
pub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
Return the current alias keys at section_path, or None if
the path doesn’t resolve to a map-keyed section in this tree.
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Source§impl NextcloudTalkConfig
impl NextcloudTalkConfig
Sourcepub fn resolve_bot_secret(
&self,
) -> Result<Option<String>, NextcloudTalkSecretConflict>
pub fn resolve_bot_secret( &self, ) -> Result<Option<String>, NextcloudTalkSecretConflict>
Resolve the single bot secret Nextcloud installs for this bot.
Nextcloud issues ONE secret per installed bot and uses it for both directions: verifying inbound webhook signatures and signing outbound bot-API requests. So both directions must resolve it identically, or one of them cannot match the installed bot.
webhook_secret is canonical; bot_token is a deprecated alias kept for
migration. Both are trimmed, and a blank value is treated as absent so an empty
or whitespace alias cannot mask a real secret. Two conflicting non-empty values
are rejected rather than silently split into two authorities.
Returns Ok(None) when no secret is configured. Callers must fail closed on
Ok(None) and on Err: send no outbound request, and reject inbound webhooks
rather than skipping verification.
Trait Implementations§
Source§impl ChannelConfig for NextcloudTalkConfig
impl ChannelConfig for NextcloudTalkConfig
Source§impl Clone for NextcloudTalkConfig
impl Clone for NextcloudTalkConfig
Source§fn clone(&self) -> NextcloudTalkConfig
fn clone(&self) -> NextcloudTalkConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NextcloudTalkConfig
impl Debug for NextcloudTalkConfig
Source§impl Default for NextcloudTalkConfig
impl Default for NextcloudTalkConfig
Source§fn default() -> NextcloudTalkConfig
fn default() -> NextcloudTalkConfig
Source§impl<'de> Deserialize<'de> for NextcloudTalkConfig
impl<'de> Deserialize<'de> for NextcloudTalkConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NextcloudTalkConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NextcloudTalkConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for NextcloudTalkConfig
impl JsonSchema for NextcloudTalkConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MaskSecrets for NextcloudTalkConfig
impl MaskSecrets for NextcloudTalkConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &NextcloudTalkConfig)
Source§impl Serialize for NextcloudTalkConfig
impl Serialize for NextcloudTalkConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for NextcloudTalkConfig
impl RefUnwindSafe for NextcloudTalkConfig
impl Send for NextcloudTalkConfig
impl Sync for NextcloudTalkConfig
impl Unpin for NextcloudTalkConfig
impl UnsafeUnpin for NextcloudTalkConfig
impl UnwindSafe for NextcloudTalkConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more