Expand description
Metadata about the running application — its environment, build, deployment and API gateways.
ⓘ
let md = encore::env::app_meta();
if md.environment.r#type == encore::env::EnvironmentType::Production {
// ...
}
// An app can declare several gateways, so look one up by name.
if let Some(gw) = md.gateway("api") {
println!("api is at {}", gw.base_url);
}The types are the core’s own: this crate links encore_sdk_core directly, so
there is nothing to marshal and no reason to define a parallel set.
Structs§
- AppMeta
- Build
Meta - Deploy
Meta - Environment
Meta - Gateway
Meta - An API gateway serving the application.
- Hosted
Service
Enums§
Functions§
- app_
meta - Metadata about the running Encore application.