Skip to content
Clone
a06673b
218 lines 5.8 KB Rust
use uuid::Uuid;
use crate::error::RepoResult;
use crate::features::RepoService;
use super::types::*;
use super::usecase;
impl RepoService {
pub async fn search_repos(
&self,
_actor: Uuid,
_q: RepoSearchQuery,
) -> RepoResult<SearchResults> {
usecase::search_repos(self).await
}
pub async fn get_repo_by_id(&self, _actor: Uuid, _id: Uuid) -> RepoResult<RepoSummary> {
usecase::get_repo_by_id(self).await
}
pub async fn update_repo_avatar(
&self,
actor: Uuid,
repo_id: Uuid,
_input: UpdateAvatarOption,
) -> RepoResult<()> {
usecase::update_repo_avatar(self, actor, repo_id).await
}
pub async fn delete_repo_avatar(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<()> {
usecase::delete_repo_avatar(self, actor, repo_id).await
}
pub async fn list_issue_templates(
&self,
actor: Uuid,
repo_id: Uuid,
) -> RepoResult<Vec<IssueTemplate>> {
usecase::list_issue_templates(self, actor, repo_id).await
}
pub async fn get_issue_config(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<IssueConfig> {
usecase::get_issue_config(self, actor, repo_id).await
}
pub async fn validate_issue_config(
&self,
actor: Uuid,
repo_id: Uuid,
) -> RepoResult<IssueConfigValidation> {
usecase::validate_issue_config(self, actor, repo_id).await
}
pub async fn get_languages(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<LanguagesResponse> {
usecase::get_languages(self, actor, repo_id).await
}
pub async fn get_licenses(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<LicensesResponse> {
usecase::get_licenses(self, actor, repo_id).await
}
pub async fn list_stargazers(
&self,
_actor: Uuid,
_repo_id: Uuid,
_page: Option<u64>,
_limit: Option<u64>,
) -> RepoResult<Vec<UserMini>> {
usecase::list_stargazers(self).await
}
pub async fn list_assignees(&self, _actor: Uuid, _repo_id: Uuid) -> RepoResult<Vec<UserMini>> {
usecase::list_assignees(self).await
}
pub async fn check_assignee(
&self,
_actor: Uuid,
_repo_id: Uuid,
_user: &str,
) -> RepoResult<bool> {
usecase::check_assignee(self).await
}
pub async fn list_reviewers(&self, _actor: Uuid, _repo_id: Uuid) -> RepoResult<Vec<UserMini>> {
usecase::list_reviewers(self).await
}
pub async fn check_new_pin_allowed(
&self,
_actor: Uuid,
_repo_id: Uuid,
) -> RepoResult<NewPinAllowedResponse> {
usecase::check_new_pin_allowed(self).await
}
pub async fn get_file_contents(
&self,
_actor: Uuid,
_repo_id: Uuid,
_files: Vec<String>,
) -> RepoResult<Vec<serde_json::Value>> {
usecase::get_file_contents(self).await
}
pub async fn list_commits(
&self,
_actor: Uuid,
_repo_id: Uuid,
_q: CommitsQuery,
) -> RepoResult<CommitsResponse> {
usecase::list_commits(self).await
}
pub async fn get_combined_status_by_ref(
&self,
_actor: Uuid,
_repo_id: Uuid,
_git_ref: &str,
) -> RepoResult<serde_json::Value> {
usecase::get_combined_status_by_ref(self).await
}
pub async fn get_statuses_by_ref(
&self,
_actor: Uuid,
_repo_id: Uuid,
_git_ref: &str,
) -> RepoResult<Vec<serde_json::Value>> {
usecase::get_statuses_by_ref(self).await
}
pub async fn compare_commits(
&self,
_actor: Uuid,
_repo_id: Uuid,
_base: &str,
_head: &str,
) -> RepoResult<CommitComparison> {
usecase::compare_commits(self).await
}
pub async fn get_raw_file(
&self,
_actor: Uuid,
_repo_id: Uuid,
_path: &str,
_ref_: Option<&str>,
) -> RepoResult<Vec<u8>> {
usecase::get_raw_file(self).await
}
pub async fn get_media(
&self,
_actor: Uuid,
_repo_id: Uuid,
_path: &str,
_ref_: Option<&str>,
) -> RepoResult<Vec<u8>> {
usecase::get_media(self).await
}
pub async fn get_editorconfig(
&self,
_actor: Uuid,
_repo_id: Uuid,
_filename: &str,
_ref_: Option<&str>,
) -> RepoResult<String> {
usecase::get_editorconfig(self).await
}
pub async fn list_forks(
&self,
_actor: Uuid,
_repo_id: Uuid,
_page: Option<u64>,
_limit: Option<u64>,
) -> RepoResult<ForksResponse> {
usecase::list_forks(self).await
}
pub async fn list_release_attachments(
&self,
actor: Uuid,
repo_id: Uuid,
release_id: Uuid,
) -> RepoResult<ReleaseAttachmentListResponse> {
usecase::list_release_attachments(self, actor, repo_id, release_id).await
}
pub async fn get_release_attachment(
&self,
actor: Uuid,
repo_id: Uuid,
release_id: Uuid,
attachment_id: Uuid,
) -> RepoResult<ReleaseAttachmentView> {
usecase::get_release_attachment(self, actor, repo_id, release_id, attachment_id).await
}
pub async fn watch_repo(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<Subscription> {
usecase::watch_repo(self, actor, repo_id).await
}
pub async fn unwatch_repo(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<()> {
usecase::unwatch_repo(self, actor, repo_id).await
}
pub async fn get_signing_key_gpg(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<String> {
usecase::get_signing_key_gpg(self, actor, repo_id).await
}
pub async fn get_signing_key_ssh(&self, actor: Uuid, repo_id: Uuid) -> RepoResult<String> {
usecase::get_signing_key_ssh(self, actor, repo_id).await
}
}