Trait DashboardService

Source
pub trait DashboardService: Service {
    // Required methods
    fn get_dashboard<'life0, 'async_trait>(
        &'life0 self,
        id: DashboardId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_dashboards<'life0, 'async_trait>(
        &'life0 self,
        pagination: Option<PaginationParams>,
        filters: Option<DashboardFilterParams>,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Dashboard>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_dashboard<'life0, 'async_trait>(
        &'life0 self,
        dashboard: Dashboard,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_dashboard<'life0, 'async_trait>(
        &'life0 self,
        id: DashboardId,
        dashboard: Dashboard,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_dashboard<'life0, 'async_trait>(
        &'life0 self,
        id: DashboardId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn archive_dashboard<'life0, 'async_trait>(
        &'life0 self,
        id: DashboardId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unarchive_dashboard<'life0, 'async_trait>(
        &'life0 self,
        id: DashboardId,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn duplicate_dashboard<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: DashboardId,
        new_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn add_card_to_dashboard<'life0, 'life1, 'async_trait>(
        &'life0 self,
        dashboard_id: DashboardId,
        card_data: &'life1 Value,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_card_from_dashboard<'life0, 'async_trait>(
        &'life0 self,
        dashboard_id: DashboardId,
        card_id: i32,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn validate_dashboard<'life0, 'life1, 'async_trait>(
        &'life0 self,
        dashboard: &'life1 Dashboard,
    ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Service trait for Dashboard operations

Required Methods§

Source

fn get_dashboard<'life0, 'async_trait>( &'life0 self, id: DashboardId, ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a dashboard by ID

Source

fn list_dashboards<'life0, 'async_trait>( &'life0 self, pagination: Option<PaginationParams>, filters: Option<DashboardFilterParams>, ) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Dashboard>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List dashboards with filters

Source

fn create_dashboard<'life0, 'async_trait>( &'life0 self, dashboard: Dashboard, ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new dashboard

Source

fn update_dashboard<'life0, 'async_trait>( &'life0 self, id: DashboardId, dashboard: Dashboard, ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a dashboard

Source

fn delete_dashboard<'life0, 'async_trait>( &'life0 self, id: DashboardId, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a dashboard

Source

fn archive_dashboard<'life0, 'async_trait>( &'life0 self, id: DashboardId, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Archive a dashboard

Source

fn unarchive_dashboard<'life0, 'async_trait>( &'life0 self, id: DashboardId, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unarchive a dashboard

Source

fn duplicate_dashboard<'life0, 'life1, 'async_trait>( &'life0 self, id: DashboardId, new_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = ServiceResult<Dashboard>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Duplicate a dashboard

Source

fn add_card_to_dashboard<'life0, 'life1, 'async_trait>( &'life0 self, dashboard_id: DashboardId, card_data: &'life1 Value, ) -> Pin<Box<dyn Future<Output = ServiceResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Add a card to a dashboard

Source

fn remove_card_from_dashboard<'life0, 'async_trait>( &'life0 self, dashboard_id: DashboardId, card_id: i32, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove a card from a dashboard

Source

fn validate_dashboard<'life0, 'life1, 'async_trait>( &'life0 self, dashboard: &'life1 Dashboard, ) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validate dashboard data

Implementors§