Expand description
Secure secret access for plugins.
Secrets are configured at deployment time and are read-only to plugins. They are stored securely and never logged.
§Example
ⓘ
use zlayer_sdk::secrets;
// Get optional secret
if let Some(api_key) = secrets::get("API_KEY")? {
// Use the API key
}
// Get required secret
let db_password = secrets::get_required("DATABASE_PASSWORD")?;Functions§
- exists
- Check if a secret exists.
- get
- Get a secret by name.
- get_
required - Get a required secret, returning an error if not found.
- list_
names - List available secret names (not values).