use uuid::Uuid; use crate::error::RepoResult; use crate::features::RepoService; use super::types::{ ArchiveRepoOption, CreateRepoOption, ForkRepoOption, GenerateRepoOption, ListRepoQuery, RenameRepoOption, RepoPage, RepoView, TransferRepoOption, UpdateRepoOption, }; use super::usecase; impl RepoService { pub async fn create_repo(&self, actor: Uuid, input: CreateRepoOption) -> RepoResult { usecase::create_repo(self, actor, input).await } pub async fn get_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, ) -> RepoResult { usecase::get_repo(self, actor, channel_id, repo_id).await } pub async fn list_repos(&self, actor: Uuid, q: ListRepoQuery) -> RepoResult { usecase::list_repos(self, actor, q).await } pub async fn update_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, input: UpdateRepoOption, ) -> RepoResult { usecase::update_repo(self, actor, channel_id, repo_id, input).await } pub async fn delete_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, ) -> RepoResult<()> { usecase::delete_repo(self, actor, channel_id, repo_id).await } pub async fn transfer_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, input: TransferRepoOption, ) -> RepoResult { usecase::transfer_repo(self, actor, channel_id, repo_id, input).await } pub async fn archive_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, input: ArchiveRepoOption, ) -> RepoResult { usecase::archive_repo(self, actor, channel_id, repo_id, input).await } pub async fn rename_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, input: RenameRepoOption, ) -> RepoResult { usecase::rename_repo(self, actor, channel_id, repo_id, input).await } pub async fn fork_repo( &self, actor: Uuid, channel_id: Uuid, repo_id: Uuid, input: ForkRepoOption, ) -> RepoResult { usecase::fork_repo(self, actor, channel_id, repo_id, input).await } pub async fn generate_repo( &self, actor: Uuid, repo_id: Uuid, input: GenerateRepoOption, ) -> RepoResult { usecase::generate_repo(self, actor, repo_id, input).await } }