aboutsummaryrefslogtreecommitdiff
path: root/src/types/mod.rs
blob: d764b84b03a49e49ec6a7c111ff6ad52f5bdf65a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//! Octopus data types

/// A simple overview of a repository
///
/// This type can be generated by the octopus Repository state wrapper
pub(crate) struct RepoData {
    pub owner: String,
    pub name: String,
    pub tagline: String,
    pub num_commit: usize,
    pub num_branch: usize,
    pub num_tag: usize,
    pub num_contributor: usize,
    pub size: String,
}

/// Data about an individual commit
pub(crate) struct CommitData {
    pub hash: String,
    pub message: String,
    pub author: String,
    pub date: String,
    pub diff: (usize, usize),
}

/// Data about a branch
pub(crate) struct BranchData {
    pub name: String,
    pub last_commit: CommitData,
}