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:
2025-05-22 18:16:41 -05:00
parent 45b5049d0e
commit 4d16f8f292
2 changed files with 36 additions and 1 deletions

35
src/lib.rs Normal file
View 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
}