| pub mod config; |
| pub mod error; |
| pub mod health; |
| pub mod token; |
| pub mod tri; |
| pub mod userinfo; |
|
|
| use std::borrow::Cow; |
|
|
| use serde::Serialize; |
|
|
| #[derive(Serialize)] |
| #[serde(rename_all = "lowercase")] |
| pub enum ApiStatus { |
| Success, |
| Error, |
| } |
|
|
| #[derive(Serialize)] |
| pub struct GenericError { |
| |
| pub status: ApiStatus, |
| |
| #[serde(skip_serializing_if = "Option::is_none")] |
| pub code: Option<u16>, |
| |
| #[serde(skip_serializing_if = "Option::is_none")] |
| pub error: Option<Cow<'static, str>>, |
| |
| #[serde(skip_serializing_if = "Option::is_none")] |
| pub message: Option<Cow<'static, str>>, |
| } |
|
|