Skip to main content

AtlassianApi

Trait AtlassianApi 

Source
pub trait AtlassianApi: Send + Sync {
    // Required methods
    fn get_content<'a>(
        &'a self,
        id: &'a str,
    ) -> Pin<Box<dyn Future<Output = Result<ContentItem>> + Send + 'a>>;
    fn update_content<'a>(
        &'a self,
        id: &'a str,
        body_adf: &'a AdfDocument,
        title: Option<&'a str>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
    fn verify_auth<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>>;
    fn backend_name(&self) -> &'static str;
}
Expand description

Trait for Atlassian content backends.

Follows the project’s AiClient pattern: Send + Sync bounds with boxed futures for async trait methods.

Required Methods§

Source

fn get_content<'a>( &'a self, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<ContentItem>> + Send + 'a>>

Fetches a content item by its identifier.

Source

fn update_content<'a>( &'a self, id: &'a str, body_adf: &'a AdfDocument, title: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

Updates a content item’s body and optionally its title.

Source

fn verify_auth<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>>

Verifies authentication and returns a display name.

Source

fn backend_name(&self) -> &'static str

Returns the backend type name (“jira” or “confluence”).

Implementors§