Skip to main content

faucet_cli/params/
mod.rs

1//! Typed pipeline parameters — the `params:` block and the `${param.NAME}`
2//! interpolation namespace (#444).
3//!
4//! A config declares the values that change per run:
5//!
6//! ```yaml
7//! version: 1
8//! params:
9//!   tenant_id: { type: string, required: true, description: "Tenant to sync" }
10//!   since:     { default: "1970-01-01" }
11//!   api_token: { required: true, secret: true }
12//! pipeline:
13//!   source:
14//!     type: rest
15//!     config:
16//!       url: "https://api.example.com/${param.tenant_id}/events?since=${param.since}"
17//!       auth: { type: bearer, config: { token: "${param.api_token}" } }
18//! ```
19//!
20//! and every runtime supplies them the same way:
21//!
22//! - `faucet run --param tenant_id=acme` / `faucet validate` (placeholders),
23//! - `faucet template run <id> --param tenant_id=acme`,
24//! - `POST /v1/templates/{id}/runs` with `{"params": {...}, "env": {...}}`.
25//!
26//! [`spec`] is the declaration grammar + coercion; [`bind`] is the pre-parse
27//! substitution pass. The persistent registry that stores parameterized configs
28//! server-side lives in [`crate::templates`] (the `templates` build feature).
29
30pub mod bind;
31pub mod spec;
32
33pub use bind::{
34    BindMode, BoundParams, PARAM_ID, PARAMS_KEY, SuppliedParams, bind_document, collect_cli_params,
35    collect_env_overrides, declared, parse_cli_param, resolve,
36};
37pub use spec::{ParamSpec, ParamType, ParamsSpec};