gitai/remote/common/
mod.rs

1pub mod fetch;
2pub mod parse;
3pub mod sequence;
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Debug)]
8pub enum ErrorType {
9    RepositoryRootPathCommand,
10    RepositoryRootPathParse,
11    CurrentDirRetrieve,
12    CurrentDirConvert,
13    DotGitWireFileOpen,
14    DotGitWireFileParse,
15    DotGitWireFileSoundness,
16    DotGitWireFileNameNotUnique,
17    TempDirCreation,
18    GitCloneCommand,
19    GitCloneCommandExitStatus,
20    GitCheckoutCommand,
21    GitCheckoutCommandExitStatus,
22    GitCheckoutChangeDirectory,
23    GitFetchCommand,
24    GitFetchCommandExitStatus,
25    MoveFromTempToDest,
26    NoItemToOperate,
27    CheckDifferenceExecution,
28    CheckDifferenceStringReplace,
29    GitLsRemoteCommand,
30    GitLsRemoteCommandExitStatus,
31    GitLsRemoteCommandStdoutDecode,
32    GitLsRemoteCommandStdoutRegex,
33}
34
35/*# [derive(Debug)]
36pub enum ErrorType {
37    RepositoryRootPathCommand,
38    RepositoryRootPathParse,
39    CurrentDirRetrieve,
40    CurrentDirConvert,
41    DotGitWireFileOpen,
42    DotGitWireFileParse,
43    DotGitWireFileSoundness,
44    DotGitWireFileNameNotUnique,
45    TempDirCreation,
46    GitCloneCommand,
47    GitCloneCommandExitStatus,
48    GitCheckoutCommand,
49    GitCheckoutCommandExitStatus,
50    GitCheckoutChangeDirectory,
51    GitFetchCommand,
52    GitFetchCommandExitStatus,
53    MoveFromTempToDest,
54    NoItemToOperate,
55    CheckDifferenceExecution,
56    CheckDifferenceStringReplace,
57    GitLsRemoteCommand,
58    GitLsRemoteCommandExitStatus,
59    GitLsRemoteCommandStdoutDecode,
60    GitLsRemoteCommandStdoutRegex,
61} */
62
63#[derive(Serialize, Deserialize, Debug, Clone)]
64pub enum Method {
65    #[serde(rename = "shallow")]
66    Shallow,
67
68    #[serde(rename = "shallow_no_sparse")]
69    ShallowNoSparse,
70
71    #[serde(rename = "partial")]
72    Partial,
73}
74
75#[derive(Serialize, Deserialize, Debug, Clone)]
76pub struct Parsed {
77    pub name: Option<String>,
78    pub dsc: Option<String>,
79    pub url: String,
80    pub rev: String,
81    pub src: String,
82    pub dst: String,
83    pub mtd: Option<Method>,
84}
85
86pub enum Target {
87    Declared(Option<String>),
88    Direct(Parsed),
89}