forked from kemitix/git-next
56 lines
1.2 KiB
Rust
56 lines
1.2 KiB
Rust
|
use crate::server::{
|
||
|
actors::repo::RepoActor,
|
||
|
config::{BranchName, RepoConfig},
|
||
|
forge::Commit,
|
||
|
gitforge::{BranchResetResult, CommitStatus, Force, ForgeBranchError, ForgeFileError},
|
||
|
types::GitRef,
|
||
|
};
|
||
|
|
||
|
struct MockForge;
|
||
|
#[derive(Clone)]
|
||
|
pub struct MockForgeEnv;
|
||
|
impl MockForgeEnv {
|
||
|
pub(crate) const fn new() -> Self {
|
||
|
Self
|
||
|
}
|
||
|
}
|
||
|
#[async_trait::async_trait]
|
||
|
impl super::ForgeLike for MockForgeEnv {
|
||
|
fn name(&self) -> String {
|
||
|
"mock".to_string()
|
||
|
}
|
||
|
|
||
|
async fn branches_get_all(&self) -> Result<Vec<super::Branch>, ForgeBranchError> {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
async fn file_contents_get(
|
||
|
&self,
|
||
|
_branch: &BranchName,
|
||
|
_file_path: &str,
|
||
|
) -> Result<String, ForgeFileError> {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
async fn branches_validate_positions(
|
||
|
&self,
|
||
|
_repo_config: RepoConfig,
|
||
|
_addr: actix::prelude::Addr<RepoActor>,
|
||
|
) {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
fn branch_reset(
|
||
|
&self,
|
||
|
_branch_name: BranchName,
|
||
|
_to_commit: GitRef,
|
||
|
_force: Force,
|
||
|
) -> BranchResetResult {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
async fn commit_status(&self, _commit: &Commit) -> CommitStatus {
|
||
|
todo!()
|
||
|
}
|
||
|
}
|