greentic_setup/engine/
types.rs1use std::collections::BTreeSet;
6use std::path::PathBuf;
7
8use serde_json::{Map as JsonMap, Value};
9
10use crate::plan::{
11 AccessChangeSelection, PackDefaultSelection, PackRemoveSelection, RemoveTarget,
12 TenantSelection, UpdateOp,
13};
14use crate::platform_setup::{PlatformSetupAnswers, StaticRoutesPolicy};
15
16#[derive(Clone, Debug, Default)]
18pub struct LoadedAnswers {
19 pub tenant: Option<String>,
20 pub team: Option<String>,
21 pub env: Option<String>,
22 pub platform_setup: PlatformSetupAnswers,
23 pub setup_answers: JsonMap<String, Value>,
24}
25
26#[derive(Clone, Debug, Default)]
28pub struct SetupRequest {
29 pub bundle: PathBuf,
30 pub bundle_name: Option<String>,
31 pub pack_refs: Vec<String>,
32 pub tenants: Vec<TenantSelection>,
33 pub default_assignments: Vec<PackDefaultSelection>,
34 pub providers: Vec<String>,
35 pub update_ops: BTreeSet<UpdateOp>,
36 pub remove_targets: BTreeSet<RemoveTarget>,
37 pub packs_remove: Vec<PackRemoveSelection>,
38 pub providers_remove: Vec<String>,
39 pub tenants_remove: Vec<TenantSelection>,
40 pub access_changes: Vec<AccessChangeSelection>,
41 pub static_routes: StaticRoutesPolicy,
42 pub deployment_targets: Vec<crate::deployment_targets::DeploymentTargetRecord>,
43 pub setup_answers: serde_json::Map<String, serde_json::Value>,
44 pub domain_filter: Option<String>,
46 pub parallel: usize,
48 pub backup: bool,
50 pub skip_secrets_init: bool,
52 pub best_effort: bool,
54}
55
56pub struct SetupConfig {
58 pub tenant: String,
59 pub team: Option<String>,
60 pub env: String,
61 pub offline: bool,
62 pub verbose: bool,
63}