d5939db
use uuid::Uuid;
use crate::error::RepoResult;
use crate::features::RepoService;
use super::{BlobView, CommitDiffPayload, CommitView, GitRef, NoteView, TreeView};
use super::usecase;
impl RepoService {
pub async fn list_git_refs(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<Vec<GitRef>> {
usecase::list_git_refs(self, actor, repo_id).await
}
pub async fn filter_git_refs(
&self,
actor: Uuid,
repo_id: Uuid,
filter: &str,
) -> RepoResult<Vec<GitRef>> {
usecase::filter_git_refs(self, actor, repo_id, filter).await
}
pub async fn get_commit(
&self,
actor: Uuid,
repo_id: Uuid,
sha: &str,
) -> RepoResult<CommitView> {
usecase::get_commit(self, actor, repo_id, sha).await
}
pub async fn get_commit_diff_or_patch(
&self,
actor: Uuid,
repo_id: Uuid,
sha: &str,
diff_type: &str,
) -> RepoResult<CommitDiffPayload> {
usecase::get_commit_diff_or_patch(self, actor, repo_id, sha, diff_type).await
}
pub async fn get_tree(
&self,
actor: Uuid,
repo_id: Uuid,
sha: &str,
recursive: bool,
) -> RepoResult<TreeView> {
usecase::get_tree(self, actor, repo_id, sha, recursive).await
}
pub async fn get_blob(&self, actor: Uuid, repo_id: Uuid, sha: &str) -> RepoResult<BlobView> {
usecase::get_blob(self, actor, repo_id, sha).await
}
pub async fn get_note(&self, actor: Uuid, repo_id: Uuid, sha: &str) -> RepoResult<NoteView> {
usecase::get_note(self, actor, repo_id, sha).await
}
}