Skip to content
Clone
a06673b
37 lines 914 B Rust
use uuid::Uuid;
use crate::error::SpaceResult;
use crate::features::SpaceService;
use super::types::{ChannelPage, ChannelView};
use super::usecase;
impl SpaceService {
pub async fn get_channel(
&self,
caller: Uuid,
space_id: Uuid,
channel_id: Uuid,
) -> SpaceResult<ChannelView> {
usecase::get_channel(self, caller, space_id, channel_id).await
}
pub async fn list_channels(
&self,
caller: Uuid,
space_id: Uuid,
limit: u64,
offset: u64,
) -> SpaceResult<ChannelPage> {
usecase::list_channels(self, caller, space_id, limit, offset).await
}
pub async fn ensure_channel_for_resource(
&self,
space_id: Uuid,
name: &str,
created_by: Uuid,
) -> SpaceResult<ChannelView> {
usecase::ensure_channel_for_resource(self, space_id, name, created_by).await
}
}