pub struct AppMeta {
pub app_id: String,
pub app_slug: String,
pub gateways: HashMap<String, GatewayMeta>,
pub frontends: HashMap<String, FrontendMeta>,
pub environment: EnvironmentMeta,
pub build: BuildMeta,
pub deploy: DeployMeta,
}Fields§
§app_id: StringThe Encore application ID. If the application is not linked to the Encore platform this will be an empty string.
To link to the Encore platform run encore cloud link from your terminal in the root directory of the Encore app.
app_slug: StringThe Encore application slug — the human-readable identifier shown in the Encore Cloud dashboard and used by the CLI. Empty if the application is not linked to the Encore platform.
Distinct from Self::app_id: the id is opaque and stable, the slug is
readable and may be renamed. Locally the two are the same.
gateways: HashMap<String, GatewayMeta>The API gateways of this application this service is given, keyed by gateway name: those its code looks up the URL of, and the one it hosts.
An application can declare several gateways, so there is no single “the”
base URL; look up the gateway you mean by name. A service’s processes,
its Workers’ included, list the gateways its code names
(gateways::url("api")) and the one it hosts, and no other, the
default included; one the runtime config names none to, as under
encore test, reports an empty map rather than a placeholder.
frontends: HashMap<String, FrontendMeta>The frontends of this application this service is given — those its
code looks up the URL of (frontends::url("web")), and the one it
hosts — keyed by name, with where each is reached. One the runtime
config names no origins for is left out.
environment: EnvironmentMetaInformation about the environment the app is running in.
build: BuildMetaInformation about the build.
deploy: DeployMetaInformation about the deployment.
Implementations§
Source§impl AppMeta
impl AppMeta
pub fn new(rt: &RuntimeConfig) -> AppMeta
Sourcepub fn gateway(&self, name: &str) -> Option<&GatewayMeta>
pub fn gateway(&self, name: &str) -> Option<&GatewayMeta>
The gateway with the given name, if this service is given it: its code looks its URL up, or it hosts it.
Sourcepub fn frontend(&self, name: &str) -> Option<&FrontendMeta>
pub fn frontend(&self, name: &str) -> Option<&FrontendMeta>
The frontend with the given name, if this service is given it — its code looks its URL up, or it hosts it — and the environment says where it is reached.
Trait Implementations§
Source§impl Serialize for AppMeta
impl Serialize for AppMeta
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Forget for AppMeta
impl Freeze for AppMetawhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, GatewayMeta)>: Freeze,
PhantomData<(String, FrontendMeta)>: Freeze,
NonZero<i32>: Freeze,
Utc: Freeze,
PhantomData<HostedService>: Freeze,
impl Move for AppMeta
impl RefUnwindSafe for AppMeta
impl Send for AppMeta
impl Sync for AppMeta
impl Unpin for AppMeta
impl UnsafeUnpin for AppMetawhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, GatewayMeta)>: UnsafeUnpin,
PhantomData<(String, FrontendMeta)>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
PhantomData<HostedService>: UnsafeUnpin,
impl UnwindSafe for AppMetawhere
RawVecInner: UnwindSafe,
HashMap<String, GatewayMeta>: UnwindSafe,
HashMap<String, FrontendMeta>: UnwindSafe,
NonZero<i32>: UnwindSafe,
Utc: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request