feat: add pmoconfig library with YAML-based configuration and REST API #1
Loading…
Reference in a new issue
No description provided.
Delete branch "push-mlnslrzyvnrt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Introduce the
pmoconfigcrate providing a YAML-based configuration system with environment overrides, case-insensitive keys, and machine-specific password encryption. The library includes a global initialization flow (initthenget_config) to prevent panics and exposes a REST API for configuration management when theapifeature is enabled.src/lib.rs,src/config.rs,src/error.rs,src/global.rs,src/spec.rs, andsrc/typed.rs.AppSpecinsrc/spec.rsto define configuration prefixes, directory names, and salts for environment variable overrides.src/encryption.rsusing AES-256-GCM with keys derived from machine UUIDs and salts.src/global.rsusingOnceLockandMutexto ensure thread-safe initialization and retrieval.src/typed.rsfor handling missing values by writing defaults or returning errors for type mismatches.src/api.rsandsrc/openapi.rsfor getting and updating configuration values via HTTP.src/config_tests.rscovering default loading, environment overrides, case insensitivity, and null value handling..crate-kit/includingcrate.mk,dev-patch.mk,jj.mk, and various scripts for API snapshotting, version bumping, and release management..gitea/workflows/release.yamlfor automated publishing to the PMO registry and Forgejo releases.Cargo.tomlwith dependencies for YAML parsing, encryption, and optional HTTP server support via theapifeature.README.md,AGENTS.md, and license files (LICENSE,LICENSE.en) describing usage, coding standards, and legal terms.api/0.1.0.txtandapi/0.1.1.txtto track public API changes for semantic versioning.