discloud_rs/app/manage/
start.rs1use serde::Deserialize;
2
3use crate::Error;
4
5#[derive(Debug)]
6pub enum AppStartError {
7 AlreadyOnline,
8 Other(Error),
9}
10
11impl From<Error> for AppStartError {
12 fn from(error: Error) -> Self {
13 Self::Other(error)
14 }
15}
16
17#[derive(Deserialize, Debug, Clone)]
18#[serde(rename_all = "camelCase")]
19pub struct AppStartStatus {
20 pub exit_code: i32,
21 pub online: bool,
22 pub ram_killed: bool,
23}
24
25#[derive(Deserialize, Debug, Clone)]
26#[serde(rename_all = "camelCase")]
27pub struct AppStartAll {
28 pub already_in_process: Vec<String>,
29 pub already_online: Vec<String>,
30 pub started: Vec<String>,
31}
32
33#[derive(Deserialize, Debug, Clone)]
34#[serde(rename_all = "camelCase")]
35pub struct AppStartResponseUnique {
36 pub message: String,
37 pub status: String,
38 pub app_status: Option<AppStartStatus>,
39}
40
41#[derive(Deserialize, Debug, Clone)]
42#[serde(rename_all = "camelCase")]
43pub struct AppStartResponseAll {
44 pub message: String,
45 pub status: String,
46 pub apps: AppStartAll,
47}