blob: 8bf86ec9b1d7900b7a2604eddf00fb99c6b4227d [file] [log] [blame]
#[derive(Debug)]
pub struct BuildConfig {
pub as_root_ca_cert: &'static [u8],
pub auditor_public_keys: &'static [&'static [u8]; {{ auditor_public_keys.len() }}],
pub rpc_max_message_size: u64,
pub attestation_validity_secs: u64,
pub inbound: Inbounds,
}
#[derive(Debug)]
pub struct Inbounds {
pub access_control: &'static [&'static str; {{ inbound.access_control.len() }}],
pub authentication: &'static [&'static str; {{ inbound.authentication.len() }}],
pub management: &'static [&'static str; {{ inbound.management.len() }}],
pub storage: &'static [&'static str; {{ inbound.storage.len() }}],
pub scheduler: &'static [&'static str; {{ inbound.scheduler.len() }}],
}
pub const BUILD_CONFIG: BuildConfig = BuildConfig {
as_root_ca_cert: &{{ as_root_ca_cert }},
auditor_public_keys: &[
{%- for k in auditor_public_keys %}
&{{ k }},
{%- endfor %}
],
rpc_max_message_size: {{ rpc_max_message_size }},
attestation_validity_secs: {{ attestation_validity_secs }},
inbound: Inbounds {
access_control: &[
{%- for s in inbound.access_control %}
"{{ s }}",
{%- endfor %}
],
authentication: &[
{%- for s in inbound.authentication %}
"{{ s }}",
{%- endfor %}
],
management: &[
{%- for s in inbound.management %}
"{{ s }}",
{%- endfor %}
],
storage: &[
{%- for s in inbound.storage %}
"{{ s }}",
{%- endfor %}
],
scheduler: &[
{%- for s in inbound.scheduler %}
"{{ s }}",
{%- endfor %}
],
}
};