Skip to main content

grp_core/common/
structs.rs

1/// # Repo (repository)
2/// 
3/// Represents a repository for any platform 
4/// it contains varios properties that are shared 
5/// across all the repositories.
6/// 
7pub struct Repo {
8    pub name: String,
9    pub path: String,
10    pub private: Option<bool>,
11    pub url: String,
12    pub git: String,
13    pub description: Option<String>,
14}
15
16/// # Contex
17/// 
18/// This object allows to share more debug informacion for 
19/// the error, if some platform fails.
20/// 
21#[derive(Clone, Debug)]
22pub struct Context {
23    pub request_type: RequestType,
24    pub owner: Option<String>,
25    pub repo: Option<String>,
26    pub additional: Option<String>,
27}
28
29/// # RequestType
30/// 
31/// an enum used to represent the aim of the request.
32///  
33#[derive(Clone, Debug)]
34pub enum RequestType {
35    List,
36    Create,
37    Delete,
38    DeletePermanent,
39    UserList,
40    ListOrg,
41    CreateOrg,
42    DeleteOrg,
43    RepositoryDetails
44}