forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.09.3 MiBcd4373fTahinli4 hours ago347 commits

backend.rs28 lines, 709 bytesHistoryRawDownload
1use std::future::Future;
2
3use forge_git::GitService;
4
5use crate::parse::{LfsOperation, RepoPath};
6
7pub trait GitBackend: Send + Sync + 'static {
8 fn authenticate_key(
9 &self,
10 algorithm: &str,
11 key_blob: &[u8],
12 ) -> impl Future<Output = Option<String>> + Send;
13
14 fn prepare(
15 &self,
16 user_id: &str,
17 service: GitService,
18 repo_path: &RepoPath,
19 git_protocol: Option<&str>,
20 ) -> impl Future<Output = Result<tokio::process::Command, String>> + Send;
21
22 fn lfs_authenticate(
23 &self,
24 user_id: &str,
25 repo_path: &RepoPath,
26 operation: LfsOperation,
27 ) -> impl Future<Output = Result<String, String>> + Send;
28}