chain_registry/
github.rs

1//! Types for deserializing github repos API content
2use serde::Deserialize;
3use serde::Serialize;
4
5#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
6#[serde(default, rename_all = "camelCase")]
7pub struct Content {
8    pub name: String,
9    pub path: String,
10    pub sha: String,
11    pub size: i64,
12    pub url: String,
13    #[serde(rename = "html_url")]
14    pub html_url: String,
15    #[serde(rename = "git_url")]
16    pub git_url: String,
17    #[serde(rename = "download_url")]
18    pub download_url: Option<String>,
19    #[serde(rename = "type")]
20    pub type_field: String,
21    #[serde(rename = "_links")]
22    pub links: Links,
23}
24
25#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
26#[serde(default, rename_all = "camelCase")]
27pub struct Links {
28    #[serde(rename = "self")]
29    pub self_field: String,
30    pub git: String,
31    pub html: String,
32}