Skip to main content

docbox_management_interface/types/
tenant.rs

1use serde::{Deserialize, Serialize};
2use uuid::Uuid;
3
4#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
5pub struct ManagedTenant {
6    /// Environment for the tenant
7    pub env: String,
8    /// Unique ID for the tenant
9    pub id: Uuid,
10    /// Name for the tenant
11    pub name: String,
12    /// Name of the tenant database
13    pub db_name: String,
14    /// Name for the AWS secret used for the database user if
15    /// using secret based authentication
16    pub db_secret_name: Option<String>,
17    /// Name for the database user username if using IAM based
18    /// authentication
19    pub db_iam_user_name: Option<String>,
20    /// Name of the tenant s3 bucket
21    pub s3_name: String,
22    /// Name of the tenant search index
23    pub os_index_name: String,
24    /// Optional event queue (SQS) to send docbox events to
25    pub event_queue_url: Option<String>,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
29pub struct ManagementTenantTarget {
30    /// Unique ID for the tenant
31    pub id: Uuid,
32    /// Name for the tenant
33    pub name: String,
34    /// Environment for the tenant
35    pub env: String,
36}