astro_run_shared/
config.rs

1use crate::{EnvironmentVariables, Id};
2use serde::{Deserialize, Serialize};
3use std::time::Duration;
4
5#[derive(Serialize, Deserialize, Debug, Clone)]
6pub struct Secret {
7  /// The name of the secret
8  pub key: String,
9  /// The name of the environment variable to set
10  pub env: String,
11}
12
13#[derive(Serialize, Deserialize, Debug, Clone)]
14pub struct Volume {
15  /// The name of the volume
16  pub key: String,
17  /// The path to mount the volume to
18  pub path: String,
19}
20
21#[derive(Serialize, Deserialize, Debug, Clone)]
22pub struct Command {
23  pub id: (Id, Id, usize),
24  pub name: Option<String>,
25  pub image: Option<String>,
26  pub run: String,
27  pub continue_on_error: bool,
28  pub environments: EnvironmentVariables,
29  pub secrets: Vec<Secret>,
30  pub volumes: Vec<Volume>,
31  pub timeout: Duration,
32  pub security_opts: Option<Vec<String>>,
33}
34
35#[derive(Serialize, Deserialize, Debug, Clone)]
36pub struct Config {
37  pub command: Command,
38  // cancel signal
39}