mirror of
https://gitlab.com/hladislav/radiobrowser-lib-rust.git
synced 2025-04-29 23:34:12 +00:00
Merge branch 'main' into 'main'
Added "Clone" traits to all api structs See merge request radiobrowser/radiobrowser-lib-rust!1
This commit is contained in:
commit
50d87c1e07
1 changed files with 14 additions and 14 deletions
|
@ -5,7 +5,7 @@ use chrono::Utc;
|
|||
use serde::Deserialize;
|
||||
|
||||
/// Radiobrowser status and statistical information of single server.
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStatus {
|
||||
pub supported_version: u32,
|
||||
pub software_version: Option<String>,
|
||||
|
@ -19,33 +19,33 @@ pub struct ApiStatus {
|
|||
pub countries: u64,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStationAddResult {
|
||||
pub ok: bool,
|
||||
pub message: String,
|
||||
pub uuid: String,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStationVoteResult {
|
||||
pub ok: bool,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStationClickResult {
|
||||
pub ok: bool,
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiCodec {
|
||||
name: String,
|
||||
stationcount: u64,
|
||||
}
|
||||
|
||||
/// A single station entry
|
||||
#[derive(PartialEq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStation {
|
||||
pub changeuuid: String,
|
||||
pub stationuuid: String,
|
||||
|
@ -96,7 +96,7 @@ pub struct ApiStation {
|
|||
}
|
||||
|
||||
/// A single historical entry for a station
|
||||
#[derive(PartialEq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStationHistory {
|
||||
pub changeuuid: String,
|
||||
pub stationuuid: String,
|
||||
|
@ -120,7 +120,7 @@ pub struct ApiStationHistory {
|
|||
}
|
||||
|
||||
/// A click event for a station
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStationClick {
|
||||
pub stationuuid: String,
|
||||
pub clickuuid: String,
|
||||
|
@ -131,7 +131,7 @@ pub struct ApiStationClick {
|
|||
}
|
||||
|
||||
/// A single step of a check action for a station
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStationCheckStep {
|
||||
pub stepuuid: String,
|
||||
pub parent_stepuuid: Option<String>,
|
||||
|
@ -147,7 +147,7 @@ pub struct ApiStationCheckStep {
|
|||
}
|
||||
|
||||
/// A single country
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiCountry {
|
||||
pub name: String,
|
||||
pub iso_3166_1: String,
|
||||
|
@ -155,7 +155,7 @@ pub struct ApiCountry {
|
|||
}
|
||||
|
||||
/// A single language
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiLanguage {
|
||||
pub name: String,
|
||||
pub iso_639: Option<String>,
|
||||
|
@ -163,13 +163,13 @@ pub struct ApiLanguage {
|
|||
}
|
||||
|
||||
/// A single tag
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiTag {
|
||||
pub name: String,
|
||||
pub stationcount: u32,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiStreamingServer {
|
||||
pub uuid: String,
|
||||
pub url: String,
|
||||
|
@ -178,7 +178,7 @@ pub struct ApiStreamingServer {
|
|||
pub error: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
||||
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||
pub struct ApiConfig {
|
||||
pub check_enabled: bool,
|
||||
pub prometheus_exporter_enabled: bool,
|
||||
|
|
Loading…
Reference in a new issue