Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jocelyn Falempe
rust-gitlab
Commits
363083c3
Commit
363083c3
authored
Jan 26, 2017
by
Ben Boeckel
⛰
Browse files
types: update for 8.16
parent
d41cb19e
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
363083c3
...
...
@@ -3,7 +3,7 @@
This library implements an interface to communicate with a Gitlab instance. Not
all API endpoints are implemented, but patches are welcome.
The API is based off of the 8.1
4
.0 API and will likely aggressively track new
The API is based off of the 8.1
6
.0 API and will likely aggressively track new
API additions, so the newest release may not support talking to older releases
where fields have been added..
...
...
src/types.rs.in
View file @
363083c3
...
...
@@ -541,12 +541,29 @@ pub struct Project {
pub snippets_enabled: bool,
/// Whether the project wiki is enabled or not.
pub wiki_enabled: bool,
/// Statistics about the project.
pub statistics: Option<ProjectStatistics>,
/// If this is present, it is `ProjectWithAccess`, but since it is so similar, just have it be
/// optional here.
pub permissions: Option<Permissions>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Statistics about a project.
pub struct ProjectStatistics {
/// The number of commits in the repository.
pub commit_count: u64,
/// The size, in bytes, of the total storage required for the project.
pub storage_size: u64,
/// The size, in bytes, of the repository.
pub repository_size: u64,
/// The size, in bytes, of uploaded LFS files.
pub lfs_objects_size: u64,
/// The size, in bytes, of uploaded build artifacts.
pub build_artifacts_size: u64,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
/// Access levels for groups and projects.
pub enum AccessLevel {
...
...
@@ -693,6 +710,21 @@ pub struct Group {
pub web_url: String,
/// Whether membership requests are allowed for the group.
pub request_access_enabled: bool,
/// Statistics about the group.
pub statistics: Option<ProjectStatistics>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Statistics about a group.
pub struct GroupStatistics {
/// The size, in bytes, of the total storage required for the group.
pub storage_size: u64,
/// The size, in bytes, of all repositories in the group.
pub repository_size: u64,
/// The size, in bytes, of uploaded LFS files in the group.
pub lfs_objects_size: u64,
/// The size, in bytes, of uploaded build artifacts in the group.
pub build_artifacts_size: u64,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
...
...
@@ -1066,6 +1098,19 @@ pub struct Issue {
pub web_url: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A time estimate on an issue or merge request.
pub struct IssuableTimeEstimate {
/// The time estimate, in seconds.
pub time_estimate: u64,
/// The total time spent, in seconds.
pub total_time_spent: u64,
/// The time estimate, as a human-readable string.
pub human_time_estimate: Option<String>,
/// The total time spent, as a human-readable string.
pub human_total_time_spent: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
/// Type-safe external issue ID.
pub struct ExternalIssueId(u64);
...
...
@@ -1325,6 +1370,8 @@ pub struct SshKey {
pub key: String,
/// When the key was created.
pub created_at: DateTime<UTC>,
/// Whether the key may push to repositories or not.
pub can_push: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
...
...
@@ -1844,6 +1891,8 @@ impl Namespace {
// expose :repository_storages
// expose :koding_enabled
// expose :koding_url
// expose :plantuml_enabled
// expose :plantuml_url
//end
//class Release < Grape::Entity
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment