Add structs to represent API results
So far it's just a pair that work together to do the repo list results.
This commit is contained in:
35
src/lib.rs
Normal file
35
src/lib.rs
Normal file
@@ -0,0 +1,35 @@
|
||||
use serde::Deserialize;
|
||||
|
||||
pub fn module_echo(){
|
||||
println!("hello from lib.rs!");
|
||||
}
|
||||
|
||||
/// A struct matching a Gitea "Release" entry
|
||||
#[derive(Deserialize, Debug)]
|
||||
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(Deserialize, Debug)]
|
||||
pub struct Author {
|
||||
id: usize,
|
||||
login: String,
|
||||
login_name: String,
|
||||
source_id: usize,
|
||||
full_name: String,
|
||||
email: String
|
||||
}
|
||||
Reference in New Issue
Block a user