Skip to main content

KnowledgeBaseProvider

Trait KnowledgeBaseProvider 

Source
pub trait KnowledgeBaseProvider: Send + Sync {
    // Required methods
    fn provider_name(&self) -> &'static str;
    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 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 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 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 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 search<'life0, 'async_trait>(
        &'life0 self,
        params: SearchKbParams,
    ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbPage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Provider for knowledge bases and internal wiki/documentation systems.

Implementations include Confluence Server / Data Center.

Required Methods§

Source

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,

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,

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,

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,

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,

Update an existing page.

Source

fn search<'life0, 'async_trait>( &'life0 self, params: SearchKbParams, ) -> Pin<Box<dyn Future<Output = Result<ProviderResult<KbPage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Search pages across spaces or within a specific space.

Implementors§