bucketwarden_server/state/
runtime.rs1use super::*;
2
3#[derive(Clone, Debug)]
4pub struct RuntimeConfig {
5 pub key_id: String,
6 pub key_material: Vec<u8>,
7 pub clock_epoch_seconds: u64,
8}
9
10impl RuntimeConfig {
11 pub fn development() -> Self {
12 Self {
13 key_id: "local-dev".to_string(),
14 key_material: b"bucketwarden-local-dev-key".to_vec(),
15 clock_epoch_seconds: 0,
16 }
17 }
18}
19
20#[derive(Clone, Debug)]
21pub struct BucketWarden {
22 pub(crate) buckets: BTreeMap<String, BucketState>,
23 pub(crate) policy: Policy,
24 pub(crate) audit: AuditLog,
25 pub(crate) kms: LocalXorKms,
26 pub(crate) replication: ReplicationLog,
27 pub(crate) multipart_uploads: BTreeMap<String, MultipartUploadState>,
28 pub(crate) notification_events: Vec<NotificationEvent>,
29 pub(crate) compat_sqs_queues: BTreeMap<String, String>,
30 pub(crate) compat_sns_topics: BTreeMap<String, String>,
31 pub(crate) auth: AuthStore,
32 pub(crate) tenant_quotas: BTreeMap<String, TenantQuotaConfiguration>,
33 pub(crate) storage_commits: Vec<StorageCommitRecord>,
34 pub(crate) console_preferences: BTreeMap<String, BTreeMap<String, String>>,
35 pub(crate) active_request_scope: Option<CredentialScope>,
36 pub(crate) clock_epoch_seconds: u64,
37 pub(crate) next_version: u64,
38 pub(crate) next_upload: u64,
39 pub(crate) next_event: u64,
40 pub(crate) next_request: u64,
41}