Skip to content
Clone
a06673b
45 lines 1.1 KB Rust
use uuid::Uuid;
use crate::error::RepoResult;
use crate::features::RepoService;
use super::types::{CreateDeployKeyOption, DeployKeyPage, DeployKeyView, ListDeployKeyQuery};
use super::usecase;
impl RepoService {
pub async fn list_deploy_keys(
&self,
actor: Uuid,
repo_id: Uuid,
q: ListDeployKeyQuery,
) -> RepoResult<DeployKeyPage> {
usecase::list_deploy_keys(self, actor, repo_id, q).await
}
pub async fn get_deploy_key(
&self,
actor: Uuid,
repo_id: Uuid,
key_id: Uuid,
) -> RepoResult<DeployKeyView> {
usecase::get_deploy_key(self, actor, repo_id, key_id).await
}
pub async fn create_deploy_key(
&self,
actor: Uuid,
repo_id: Uuid,
input: CreateDeployKeyOption,
) -> RepoResult<DeployKeyView> {
usecase::create_deploy_key(self, actor, repo_id, input).await
}
pub async fn delete_deploy_key(
&self,
actor: Uuid,
repo_id: Uuid,
key_id: Uuid,
) -> RepoResult<()> {
usecase::delete_deploy_key(self, actor, repo_id, key_id).await
}
}