use bucketwarden_server::RuntimeConfig;
use std::path::PathBuf;

pub(crate) const DEFAULT_DATA_DIR: &str = ".bucketwarden/data";
pub(crate) const DEFAULT_CONSOLE_BIND: &str = "127.0.0.1:9001";

#[derive(Clone, Debug, Eq, PartialEq)]
pub(crate) enum S3StorageMode {
    Filesystem { data_dir: PathBuf },
    InMemory,
}

pub(crate) struct S3ServeOptions {
    pub bind: String,
    pub console_bind: String,
    pub config: RuntimeConfig,
    pub principal: String,
    pub access_key_id: String,
    pub secret_access_key: String,
    pub storage: S3StorageMode,
}

pub(crate) const MAX_HEADER_BYTES: usize = 16 * 1024;
pub(crate) const MAX_HEADER_LINE_BYTES: usize = 4096;
pub(crate) const MAX_REQUEST_LINE_BYTES: usize = 2048;
pub(crate) const MAX_REQUEST_URI_BYTES: usize = 2048;
pub(crate) const MAX_BODY_BYTES: usize = 32 * 1024 * 1024;
pub(crate) const MAX_ACTIVE_CONNECTIONS: usize = 256;
pub(crate) const MAX_HEADER_FIELDS: usize = 128;
pub(crate) const MAX_HEADER_KEY_BYTES: usize = 128;
pub(crate) const MAX_HEADER_VALUE_BYTES: usize = 4096;
pub(crate) const MAX_QUERY_BYTES: usize = 4096;
pub(crate) const MAX_QUERY_PAIRS: usize = 64;
