| 1 | use std::future::Future; |
| 2 | |
| 3 | use forge_git::GitService; |
| 4 | |
| 5 | use crate::parse::{LfsOperation, RepoPath}; |
| 6 | |
| 7 | pub 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 | } |