Move the Release info structs to new tree
This commit is contained in:
32
src/lib.rs
32
src/lib.rs
@@ -4,36 +4,6 @@ pub mod cli;
|
||||
pub mod api;
|
||||
pub mod structs;
|
||||
|
||||
/// A struct matching a Gitea "Release" entry
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct ReleaseInfo {
|
||||
id: usize,
|
||||
tag_name: String,
|
||||
target_commitish: String,
|
||||
name: String,
|
||||
body: String,
|
||||
url: String,
|
||||
html_url: String,
|
||||
tarball_url: String,
|
||||
zipball_url: String,
|
||||
upload_url: String,
|
||||
draft: bool,
|
||||
prerelease: bool,
|
||||
created_at: String,
|
||||
published_at: String,
|
||||
author: Author,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub struct Author {
|
||||
id: usize,
|
||||
login: String,
|
||||
login_name: String,
|
||||
source_id: usize,
|
||||
full_name: String,
|
||||
email: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct CreateReleaseOption {
|
||||
pub body: String,
|
||||
@@ -53,7 +23,7 @@ pub struct ApiError {
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CreateResult {
|
||||
Success(ReleaseInfo),
|
||||
Success(structs::release::Release),
|
||||
ErrWithMessage(ApiError),
|
||||
Empty,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user