hyperlane-plugin-env 23.3.0

A zero-dependency .env parser, layered typed environment configuration loader, redacting SecretValue wrapper, and HYPERLANE_* ServerConfig builder plugin for the Hyperlane framework.
Documentation
/// Default environment variable prefix for Hyperlane server settings (`HYPERLANE_`).
pub const DEFAULT_ENV_PREFIX: &str = "HYPERLANE_";

/// Environment key for bind address (`ADDRESS`, e.g. `HYPERLANE_ADDRESS=0.0.0.0:8080`).
pub const KEY_ADDRESS: &str = "ADDRESS";

/// Environment key for bind host fallback (`HOST`).
pub const KEY_HOST: &str = "HOST";

/// Environment key for bind port fallback (`PORT`).
pub const KEY_PORT: &str = "PORT";

/// Environment key for `TCP_NODELAY` (`NODELAY`).
pub const KEY_NODELAY: &str = "NODELAY";

/// Environment key for `IP_TTL` (`TTL`).
pub const KEY_TTL: &str = "TTL";

/// Environment key for server wire protocol (`PROTOCOL`: `http1`, `http2`, `http3`).
pub const KEY_PROTOCOL: &str = "PROTOCOL";

/// Environment key for TLS certificate PEM path (`TLS_CERT`).
pub const KEY_TLS_CERT: &str = "TLS_CERT";

/// Environment key for TLS private key PEM path (`TLS_KEY`).
pub const KEY_TLS_KEY: &str = "TLS_KEY";

/// Redacted debug/display marker for [`SecretValue`].
pub const REDACTED_MARKER: &str = "[REDACTED]";

/// Optional shell `export ` prefix stripped in `.env` files.
pub(crate) const EXPORT_PREFIX: &str = "export ";

/// Boolean true literal (`true`).
pub(crate) const BOOL_TRUE: &str = "true";

/// Boolean false literal (`false`).
pub(crate) const BOOL_FALSE: &str = "false";

/// Protocol literal for HTTP/1.x.
pub(crate) const PROTO_HTTP1: &str = "http1";

/// Protocol literal for HTTP/2.
pub(crate) const PROTO_HTTP2: &str = "http2";

/// Protocol literal for HTTP/3.
pub(crate) const PROTO_HTTP3: &str = "http3";

/// Error display prefix for missing required environment key.
pub(crate) const ERR_MISSING: &str = "missing required env key";

/// Error display prefix for typed parse failure.
pub(crate) const ERR_PARSE: &str = "failed to parse env key";

/// Error display prefix for `.env` syntax errors.
pub(crate) const ERR_SYNTAX: &str = "invalid .env syntax";

/// Error display prefix for filesystem I/O errors.
pub(crate) const ERR_IO: &str = "failed to read .env file";

/// Error reason for invalid boolean value.
pub(crate) const ERR_INVALID_BOOL: &str = "invalid boolean";

/// Error reason for invalid duration value.
pub(crate) const ERR_INVALID_DURATION: &str = "invalid duration";

/// Error reason for invalid protocol value.
pub(crate) const ERR_INVALID_PROTOCOL: &str = "expected http1, http2, or http3";

/// Error reason for missing `=` in `.env` line.
pub(crate) const ERR_MISSING_EQ: &str = "missing '=' separator";

/// Error reason for invalid variable key in `.env`.
pub(crate) const ERR_INVALID_KEY: &str = "invalid variable name";

/// Error reason for unclosed quoted value in `.env`.
pub(crate) const ERR_UNCLOSED_QUOTE: &str = "unterminated quoted value";