Skip to main content

Crate kellnr_settings

Crate kellnr_settings 

Source

Re-exports§

pub use cli::CliResult;
pub use cli::ResolvedSettings;
pub use cli::ShowConfigOptions;
pub use cli::cli_flag_map;
pub use cli::parse_cli;
pub use gcs::Gcs;
pub use oauth2::ClaimMatch;
pub use oauth2::OAuth2;
pub use proxy::Proxy;
pub use erased_serde;

Modules§

cli
compile_time_config
constants
gcs
oauth2
proxy
s3

Structs§

Config
A builder that collects Sources in priority order, then merges them.
CratesioFilter
Filters for downloads through the crates.io proxy.
Docs
Local
Origin
Postgresql
Registry
RegistryFilter
Filters for downloads of crates hosted in Kellnr.
Settings
Pure configuration values, every leaf carries the active value, no provenance attached. Provenance lives on the companion SettingsProv, which is built by build_prov_with_cli and stored in the app state for the one handler (/settings) that needs it.
SettingsProv
Setup
Toolchain
UrlPathPrefix
URL path prefix of Kellnr: empty for the root, otherwise /prefix with one leading and no trailing slash, so callers can append /... to it.
Webhooks

Enums§

Category
Which kind of source contributed a value.
ConfigSource
Represents the source of a configuration value.
LicenseUnknown
What the license filter does with a crate whose license is unknown: none is declared, the expression does not parse, or it could not be fetched.
LogFormat
LogLevel
Protocol
SessionAge
Lifetime of a session, counted from the login.
SettingsError
Error returned by settings construction. Aliases provcfg::Error, every failure surfaces from there (source deserialization or config-file I/O), so kellnr-side code keeps a domain-flavoured name without inventing its own opaque box. The error type returned by Config::build and the add_*_file helpers.

Traits§

Provenance
Implemented by every generated *Prov struct.

Functions§

build_prov_with_cli
Build a SettingsProv from the configured sources: optional TOML file, KELLNR_* environment variables, and optionally a CLI partial.
leaf_label
Returns a display label override for dotted_path, or None if the auto-humanized form is fine.
settings_from_prov
The active settings of prov, normalized so that the rest of Kellnr can rely on the form of values like origin.path.
sources_from_prov
Convert provcfg’s per-leaf provenance map into kellnr’s SourceMap. Called by the /settings web-ui handler to build the API response.

Type Aliases§

SourceMap
Maps setting keys (e.g., "registry.data_dir") to their configuration source.