mirror of
https://gitlab.com/hladislav/radiobrowser-lib-rust.git
synced 2025-04-30 07:44:11 +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;
|
use serde::Deserialize;
|
||||||
|
|
||||||
/// Radiobrowser status and statistical information of single server.
|
/// Radiobrowser status and statistical information of single server.
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStatus {
|
pub struct ApiStatus {
|
||||||
pub supported_version: u32,
|
pub supported_version: u32,
|
||||||
pub software_version: Option<String>,
|
pub software_version: Option<String>,
|
||||||
|
@ -19,33 +19,33 @@ pub struct ApiStatus {
|
||||||
pub countries: u64,
|
pub countries: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStationAddResult {
|
pub struct ApiStationAddResult {
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
pub message: String,
|
pub message: String,
|
||||||
pub uuid: String,
|
pub uuid: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStationVoteResult {
|
pub struct ApiStationVoteResult {
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
pub message: String,
|
pub message: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStationClickResult {
|
pub struct ApiStationClickResult {
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
pub message: String,
|
pub message: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiCodec {
|
pub struct ApiCodec {
|
||||||
name: String,
|
name: String,
|
||||||
stationcount: u64,
|
stationcount: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single station entry
|
/// A single station entry
|
||||||
#[derive(PartialEq, Deserialize, Debug)]
|
#[derive(PartialEq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStation {
|
pub struct ApiStation {
|
||||||
pub changeuuid: String,
|
pub changeuuid: String,
|
||||||
pub stationuuid: String,
|
pub stationuuid: String,
|
||||||
|
@ -96,7 +96,7 @@ pub struct ApiStation {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single historical entry for a station
|
/// A single historical entry for a station
|
||||||
#[derive(PartialEq, Deserialize, Debug)]
|
#[derive(PartialEq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStationHistory {
|
pub struct ApiStationHistory {
|
||||||
pub changeuuid: String,
|
pub changeuuid: String,
|
||||||
pub stationuuid: String,
|
pub stationuuid: String,
|
||||||
|
@ -120,7 +120,7 @@ pub struct ApiStationHistory {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A click event for a station
|
/// A click event for a station
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStationClick {
|
pub struct ApiStationClick {
|
||||||
pub stationuuid: String,
|
pub stationuuid: String,
|
||||||
pub clickuuid: String,
|
pub clickuuid: String,
|
||||||
|
@ -131,7 +131,7 @@ pub struct ApiStationClick {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single step of a check action for a station
|
/// 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 struct ApiStationCheckStep {
|
||||||
pub stepuuid: String,
|
pub stepuuid: String,
|
||||||
pub parent_stepuuid: Option<String>,
|
pub parent_stepuuid: Option<String>,
|
||||||
|
@ -147,7 +147,7 @@ pub struct ApiStationCheckStep {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single country
|
/// A single country
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiCountry {
|
pub struct ApiCountry {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub iso_3166_1: String,
|
pub iso_3166_1: String,
|
||||||
|
@ -155,7 +155,7 @@ pub struct ApiCountry {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single language
|
/// A single language
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiLanguage {
|
pub struct ApiLanguage {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub iso_639: Option<String>,
|
pub iso_639: Option<String>,
|
||||||
|
@ -163,13 +163,13 @@ pub struct ApiLanguage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A single tag
|
/// A single tag
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiTag {
|
pub struct ApiTag {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub stationcount: u32,
|
pub stationcount: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiStreamingServer {
|
pub struct ApiStreamingServer {
|
||||||
pub uuid: String,
|
pub uuid: String,
|
||||||
pub url: String,
|
pub url: String,
|
||||||
|
@ -178,7 +178,7 @@ pub struct ApiStreamingServer {
|
||||||
pub error: Option<String>,
|
pub error: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Deserialize, Debug, Clone)]
|
||||||
pub struct ApiConfig {
|
pub struct ApiConfig {
|
||||||
pub check_enabled: bool,
|
pub check_enabled: bool,
|
||||||
pub prometheus_exporter_enabled: bool,
|
pub prometheus_exporter_enabled: bool,
|
||||||
|
|
Loading…
Reference in a new issue