static_tr_plugin/
config.rs1use serde::Deserialize;
4use tenant_resolver_sdk::TenantStatus;
5use uuid::Uuid;
6
7#[derive(Debug, Clone, Deserialize)]
9#[serde(default, deny_unknown_fields)]
10pub struct StaticTrPluginConfig {
11 pub vendor: String,
13
14 pub priority: i16,
16
17 pub tenants: Vec<TenantConfig>,
19
20 pub access_rules: Vec<AccessRuleConfig>,
22}
23
24impl Default for StaticTrPluginConfig {
25 fn default() -> Self {
26 Self {
27 vendor: "hyperspot".to_owned(),
28 priority: 100,
29 tenants: Vec::new(),
30 access_rules: Vec::new(),
31 }
32 }
33}
34
35#[derive(Debug, Clone, Deserialize)]
37#[serde(deny_unknown_fields)]
38pub struct TenantConfig {
39 pub id: Uuid,
41
42 pub name: String,
44
45 #[serde(default)]
47 pub status: TenantStatus,
48
49 #[serde(rename = "type", default)]
51 pub tenant_type: Option<String>,
52}
53
54#[derive(Debug, Clone, Deserialize)]
58#[serde(deny_unknown_fields)]
59pub struct AccessRuleConfig {
60 pub source: Uuid,
62
63 pub target: Uuid,
65}