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/// 
21pub struct Context {
22    pub request_type: RequestType,
23    pub owner: Option<String>,
24    pub repo: Option<String>,
25    pub additional: Option<String>,
26}
27
28/// # RequestType
29/// 
30/// an enum used to represent the aim of the request.
31///  
32#[derive(Clone)]
33pub enum RequestType {
34    List,
35    Create,
36    Delete,
37    DeletePermanent,
38    UserList,
39    ListOrg,
40    CreateOrg,
41    DeleteOrg,
42    RepositoryDetails
43}