feat: add pmoconfig library with YAML-based configuration and REST API #1

Merged
eric merged 1 commit from push-mlnslrzyvnrt into main 2026-11-08 08:47:38 +01:00
Owner

Introduce the pmoconfig crate providing a YAML-based configuration system with environment overrides, case-insensitive keys, and machine-specific password encryption. The library includes a global initialization flow (init then get_config) to prevent panics and exposes a REST API for configuration management when the api feature is enabled.

  • Add core library structure in src/lib.rs, src/config.rs, src/error.rs, src/global.rs, src/spec.rs, and src/typed.rs.
  • Implement AppSpec in src/spec.rs to define configuration prefixes, directory names, and salts for environment variable overrides.
  • Add encryption utilities in src/encryption.rs using AES-256-GCM with keys derived from machine UUIDs and salts.
  • Implement global configuration management in src/global.rs using OnceLock and Mutex to ensure thread-safe initialization and retrieval.
  • Add typed readers in src/typed.rs for handling missing values by writing defaults or returning errors for type mismatches.
  • Introduce REST API endpoints in src/api.rs and src/openapi.rs for getting and updating configuration values via HTTP.
  • Add comprehensive test suites in src/config_tests.rs covering default loading, environment overrides, case insensitivity, and null value handling.
  • Create build infrastructure in .crate-kit/ including crate.mk, dev-patch.mk, jj.mk, and various scripts for API snapshotting, version bumping, and release management.
  • Add CI/CD workflows in .gitea/workflows/release.yaml for automated publishing to the PMO registry and Forgejo releases.
  • Update Cargo.toml with dependencies for YAML parsing, encryption, and optional HTTP server support via the api feature.
  • Add documentation in README.md, AGENTS.md, and license files (LICENSE, LICENSE.en) describing usage, coding standards, and legal terms.
  • Initialize API snapshots in api/0.1.0.txt and api/0.1.1.txt to track public API changes for semantic versioning.
Introduce the `pmoconfig` crate providing a YAML-based configuration system with environment overrides, case-insensitive keys, and machine-specific password encryption. The library includes a global initialization flow (`init` then `get_config`) to prevent panics and exposes a REST API for configuration management when the `api` feature is enabled. - Add core library structure in `src/lib.rs`, `src/config.rs`, `src/error.rs`, `src/global.rs`, `src/spec.rs`, and `src/typed.rs`. - Implement `AppSpec` in `src/spec.rs` to define configuration prefixes, directory names, and salts for environment variable overrides. - Add encryption utilities in `src/encryption.rs` using AES-256-GCM with keys derived from machine UUIDs and salts. - Implement global configuration management in `src/global.rs` using `OnceLock` and `Mutex` to ensure thread-safe initialization and retrieval. - Add typed readers in `src/typed.rs` for handling missing values by writing defaults or returning errors for type mismatches. - Introduce REST API endpoints in `src/api.rs` and `src/openapi.rs` for getting and updating configuration values via HTTP. - Add comprehensive test suites in `src/config_tests.rs` covering default loading, environment overrides, case insensitivity, and null value handling. - Create build infrastructure in `.crate-kit/` including `crate.mk`, `dev-patch.mk`, `jj.mk`, and various scripts for API snapshotting, version bumping, and release management. - Add CI/CD workflows in `.gitea/workflows/release.yaml` for automated publishing to the PMO registry and Forgejo releases. - Update `Cargo.toml` with dependencies for YAML parsing, encryption, and optional HTTP server support via the `api` feature. - Add documentation in `README.md`, `AGENTS.md`, and license files (`LICENSE`, `LICENSE.en`) describing usage, coding standards, and legal terms. - Initialize API snapshots in `api/0.1.0.txt` and `api/0.1.1.txt` to track public API changes for semantic versioning.
feat: add pmoconfig library with YAML-based configuration and REST API
All checks were successful
Release / release (push) Successful in 1m2s
1d5b841c47
Introduce the `pmoconfig` crate (v0.1.7) providing a YAML-based configuration system with environment overrides, case-insensitive keys, and machine-specific password encryption. The library includes a global initialization flow (`init` then `get_config`) to prevent panics and exposes a REST API for configuration management when the `api` feature is enabled.

- Add core library structure in `src/lib.rs`, `src/config.rs`, `src/error.rs`, `src/global.rs`, `src/spec.rs`, and `src/typed.rs`.
- Implement `AppSpec` in `src/spec.rs` to define configuration prefixes, directory names, and salts for environment variable overrides.
- Add encryption utilities in `src/encryption.rs` using AES-256-GCM with keys derived from machine UUIDs and salts.
- Implement global configuration management in `src/global.rs` using `OnceLock` and `Mutex` to ensure thread-safe initialization and retrieval.
- Add typed readers in `src/typed.rs` for handling missing values by writing defaults or returning errors for type mismatches.
- Introduce REST API endpoints in `src/api.rs` and `src/openapi.rs` for getting and updating configuration values via HTTP.
- Add comprehensive test suites in `src/config_tests.rs` covering default loading, environment overrides, case insensitivity, and null value handling.
- Create build infrastructure in `.crate-kit/` including `crate.mk`, `dev-patch.mk`, `jj.mk`, and various scripts for API snapshotting, version bumping, and release management.
- Add CI/CD workflows in `.gitea/workflows/release.yaml` for automated publishing to the PMO registry and Forgejo releases.
- Update `Cargo.toml` with dependencies for YAML parsing, encryption, and optional HTTP server support via the `api` feature.
- Add documentation in `README.md`, `AGENTS.md`, and license files (`LICENSE`, `LICENSE.en`) describing usage, coding standards, and legal terms.
- Initialize API snapshots in `api/0.1.0.txt` and `api/0.1.1.txt` to track public API changes for semantic versioning.
eric merged commit a479ed1f3a into main 2026-11-08 08:47:38 +01:00
eric deleted branch push-mlnslrzyvnrt 2026-11-08 08:47:41 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pmo/pmoconfig!1
No description provided.