pub struct ConfluenceClient { /* private fields */ }Implementations§
Source§impl ConfluenceClient
impl ConfluenceClient
pub fn new(base_url: impl Into<String>, auth: ConfluenceAuth) -> Self
pub fn with_http_client(self, http: Client) -> Self
pub fn base_url(&self) -> &str
Sourcepub fn instance_url(&self) -> &str
pub fn instance_url(&self) -> &str
Real Confluence host used in user-facing links. Equal to
base_url() unless with_instance_url was called (the typical
proxy case).
pub fn auth(&self) -> &ConfluenceAuth
pub fn with_api_version(self, api_version: Option<&str>) -> Self
Sourcepub fn with_proxy(self, headers: HashMap<String, String>) -> Self
pub fn with_proxy(self, headers: HashMap<String, String>) -> Self
Configure proxy mode with headers added to every request.
When proxy is active, provider auth headers are suppressed.
Note: this does not change browse-link generation — set
with_instance_url to the real Confluence host so links in
responses don’t point at the proxy.
Sourcepub fn with_instance_url(self, url: impl Into<String>) -> Self
pub fn with_instance_url(self, url: impl Into<String>) -> Self
Override the host used for generating browse links (_links.webui,
/pages/<id>). Useful when base_url is a proxy URL — callers
would otherwise see proxy-host URLs in tool responses.
pub fn rest_api_url(&self, path: &str) -> String
pub async fn get_json<T>(&self, path: &str) -> Result<T>where
T: DeserializeOwned,
pub async fn post_json<T, B>(&self, path: &str, body: &B) -> Result<T>
pub async fn put_json<T, B>(&self, path: &str, body: &B) -> Result<T>
pub async fn post_empty_json<B>(&self, path: &str, body: &B) -> Result<()>
pub async fn delete_empty(&self, path: &str) -> Result<()>
Trait Implementations§
Source§impl Clone for ConfluenceClient
impl Clone for ConfluenceClient
Source§fn clone(&self) -> ConfluenceClient
fn clone(&self) -> ConfluenceClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfluenceClient
impl Debug for ConfluenceClient
Source§impl KnowledgeBaseProvider for ConfluenceClient
impl KnowledgeBaseProvider for ConfluenceClient
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name for logging (e.g. “confluence”).
Source§fn get_spaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbSpace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_spaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbSpace>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List available spaces / knowledge base containers.
Source§fn list_pages<'life0, 'async_trait>(
&'life0 self,
params: ListPagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbPage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_pages<'life0, 'async_trait>(
&'life0 self,
params: ListPagesParams,
) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbPage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List pages in a space with pagination.
Source§fn get_page<'life0, 'life1, 'async_trait>(
&'life0 self,
page_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<KbPageContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_page<'life0, 'life1, 'async_trait>(
&'life0 self,
page_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<KbPageContent>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a single page with full body content and metadata.
Source§fn create_page<'life0, 'async_trait>(
&'life0 self,
params: CreatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_page<'life0, 'async_trait>(
&'life0 self,
params: CreatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new page.
Source§fn update_page<'life0, 'async_trait>(
&'life0 self,
params: UpdatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_page<'life0, 'async_trait>(
&'life0 self,
params: UpdatePageParams,
) -> Pin<Box<dyn Future<Output = Result<KbPage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update an existing page.
Source§impl LivenessProbe for ConfluenceClient
impl LivenessProbe for ConfluenceClient
Source§fn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Lower-cased provider name surfaced in the
NotImplemented
default and in doctor output. Concrete impls override
to return e.g. "github", "gitlab".Source§fn test<'life0, 'life1, 'async_trait>(
&'life0 self,
_token: &'life1 SecretBox<str>,
) -> Pin<Box<dyn Future<Output = Result<LivenessResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn test<'life0, 'life1, 'async_trait>(
&'life0 self,
_token: &'life1 SecretBox<str>,
) -> Pin<Box<dyn Future<Output = Result<LivenessResult, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Probe the upstream with
token. The default impl returns
NotImplemented so providers without a native
introspection endpoint can opt-in trivially.Auto Trait Implementations§
impl !RefUnwindSafe for ConfluenceClient
impl !UnwindSafe for ConfluenceClient
impl Freeze for ConfluenceClient
impl Send for ConfluenceClient
impl Sync for ConfluenceClient
impl Unpin for ConfluenceClient
impl UnsafeUnpin for ConfluenceClient
Blanket Implementations§
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
Mutably borrows from an owned value. Read more