use super::*;
#[derive(Clone, Debug)]
pub struct RuntimeConfig {
pub key_id: String,
pub key_material: Vec<u8>,
pub clock_epoch_seconds: u64,
}
impl RuntimeConfig {
pub fn development() -> Self {
Self {
key_id: "local-dev".to_string(),
key_material: b"bucketwarden-local-dev-key".to_vec(),
clock_epoch_seconds: 0,
}
}
}
#[derive(Clone, Debug)]
pub struct BucketWarden {
pub(crate) buckets: BTreeMap<String, BucketState>,
pub(crate) policy: Policy,
pub(crate) audit: AuditLog,
pub(crate) kms: LocalXorKms,
pub(crate) replication: ReplicationLog,
pub(crate) multipart_uploads: BTreeMap<String, MultipartUploadState>,
pub(crate) notification_events: Vec<NotificationEvent>,
pub(crate) compat_sqs_queues: BTreeMap<String, String>,
pub(crate) compat_sns_topics: BTreeMap<String, String>,
pub(crate) auth: AuthStore,
pub(crate) tenant_quotas: BTreeMap<String, TenantQuotaConfiguration>,
pub(crate) storage_commits: Vec<StorageCommitRecord>,
pub(crate) console_preferences: BTreeMap<String, BTreeMap<String, String>>,
pub(crate) active_request_scope: Option<CredentialScope>,
pub(crate) clock_epoch_seconds: u64,
pub(crate) next_version: u64,
pub(crate) next_upload: u64,
pub(crate) next_event: u64,
pub(crate) next_request: u64,
}