gitai/remote/models/
repo_config.rs1use serde::{Deserialize, Serialize};
2
3use crate::remote::common::Method;
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct RepositoryConfiguration {
7 pub url: String,
9 pub branch: String,
11 pub target_path: String,
13 pub filters: Vec<String>,
15 pub commit_hash: Option<String>,
17 pub mtd: Option<Method>,
19}
20
21impl RepositoryConfiguration {
22 pub fn new(
23 url: String,
24 branch: String,
25 target_path: String,
26 filters: Vec<String>,
27 commit_hash: Option<String>,
28 mtd: Option<Method>,
29 ) -> Self {
30 Self {
31 url,
32 branch,
33 target_path,
34 filters,
35 commit_hash,
36 mtd,
37 }
38 }
39}