diene.go-standard-config

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: MIT

README

Diene Go standard-config library

CI Unit coverage Integration coverage Meta coverage Go Reference Commit activity

Diene's reproducible development environment is managed by Nix. Run direnv allow once, then use pls tasks from the loaded shell.

This repository inherits the all-features workspace baseline: split CI/CD, secrets, release configuration, validators, standards, and vendored agent-skill synchronization.

Commands

  • pls setup — synchronize installed diene package skills.
  • pls lint — run every pre-commit gate.
  • pls secret:scan — scan tracked content for secrets.
  • pls skills:sync — rebuild .claude/skills/vendor/ from installed packages.

Publishable Go module

github.com/AtomiCloud/diene.go-standard-config ships the Diene infrastructure configuration presets: the four frozen infra blocks of C0 §3 — postgres, cache, kv, and storage — as draft-2020-12 JSON Schema fragments, plus the Testcontainers glue that boots each one and emits the matching config block.

It ships presets only. It never loads, merges, or validates a configuration document: github.com/AtomiCloud/diene.go-config is the sole merger and validator. A service composes its own root schema from the engine blocks it uses (otel, auth-engine, api-engine), the infra presets it needs from here, and its own keys. There is no one-call bootstrap.

go get github.com/AtomiCloud/diene.go-standard-config@latest
schema := config.ComposeSchema(
    config.AppBlockSchema(),
    config.NewBlock(otel.BlockKey, false, otel.JSONSchema()),
    config.NewBlock(standardconfig.PostgresBlockKey, true, standardconfig.PostgresSchema()),
)

Packages:

  • lib/standardconfig — the four preset fragments, the typed entries they decode into, the keyed multi-instance helpers, and the problem catalog.
  • testhelper — per-preset Testcontainers start helpers that emit a schema-valid keyed block, container-free block fakes for unit tiers, and fail-fast assertions.

Each preset is a KEYED MAP of named connections, so a second Postgres pool or a second bucket is a YAML entry rather than a schema change. Connection names are authored UPPERCASE (R14); the config loader canonicalizes key spelling, so standardconfig.Named resolves them case-insensitively and standardconfig.ValidateKeys enforces the half of the contract that survives loading. Secrets are blank in YAML and injected per landscape through the environment override tier.

The preset shapes, the keyed multi-instance contract, and the composition boundary are documented on the packages themselves and in the shipped usage skill skills/diene-go-standard-config-usage/SKILL.md.

Go commands

  • pls build — build every package in the module.
  • pls typecheck — compile every source package without running tests.
  • pls test / pls test:coverage — run unit, integration, and active meta tiers.
  • pls deadcode — run strict whole-repository and production passes plus the LLM-lax report.
  • pls up / pls down — start or stop local infrastructure (this library binds none of its own).
  • ./scripts/ci/pkg-validate.sh all — run module-path, vet, API, docs, and example validators.

See the Go baseline for the language contract and template-maintenance boundary. See the Go library baseline for promotion, testing, compatibility, and publication policy.

Standards

Shared standards

Domain-specific documentation belongs under docs/domain/. The docs/standards/contracts/ location is reserved for the separately owned C0 contracts standard.

Go language variants

Directories

Path Synopsis
lib
standardconfig
Package standardconfig ships the Diene infrastructure configuration presets.
Package standardconfig ships the Diene infrastructure configuration presets.
Package testhelper ships the container glue, deterministic block fakes, and fail-fast assertions that consumers of github.com/AtomiCloud/diene.go-standard-config would otherwise rebuild in every repository.
Package testhelper ships the container glue, deterministic block fakes, and fail-fast assertions that consumers of github.com/AtomiCloud/diene.go-standard-config would otherwise rebuild in every repository.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL