use uuid::Uuid; use crate::error::RepoResult; use crate::features::RepoService; use super::types::{ ApplyDiffPatchFileOptions, ChangeFilesOptions, ContentsListResponse, ContentsQuery, ContentsResponse, CreateFileOption, DeleteFileOption, UpdateFileOption, }; use super::usecase; impl RepoService { pub async fn list_contents( &self, actor: Uuid, repo_id: Uuid, path: &str, q: ContentsQuery, ) -> RepoResult { usecase::list_contents(self, actor, repo_id, path, q).await } pub async fn get_contents( &self, actor: Uuid, repo_id: Uuid, path: &str, q: ContentsQuery, ) -> RepoResult { usecase::get_contents(self, actor, repo_id, path, q).await } pub async fn create_file( &self, actor: Uuid, repo_id: Uuid, path: &str, input: CreateFileOption, ) -> RepoResult { usecase::create_file(self, actor, repo_id, path, input).await } pub async fn update_file( &self, actor: Uuid, repo_id: Uuid, path: &str, input: UpdateFileOption, ) -> RepoResult { usecase::update_file(self, actor, repo_id, path, input).await } pub async fn delete_file( &self, actor: Uuid, repo_id: Uuid, path: &str, input: DeleteFileOption, ) -> RepoResult<()> { usecase::delete_file(self, actor, repo_id, path, input).await } pub async fn change_files( &self, actor: Uuid, repo_id: Uuid, input: ChangeFilesOptions, ) -> RepoResult { usecase::change_files(self, actor, repo_id, input).await } pub async fn apply_diff_patch( &self, actor: Uuid, repo_id: Uuid, input: ApplyDiffPatchFileOptions, ) -> RepoResult { usecase::apply_diff_patch(self, actor, repo_id, input).await } }