go-libraries

module
v0.5.0-dev.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0

README

go-libraries

Go reference libraries for Standards Lab — layered building blocks for cloud-native enterprise services.

The repository holds one base library: a single Go module rooted at github.com/standards-lab/go-libraries. Each capability is a package inside that module, and all of them are versioned and released together.

Providers that depend on a third-party SDK will be separate modules in nested directories, such as database/postgres — each named for the system it targets and released on its own schedule, so a consumer that needs one provider does not download the others. None exist yet. The base library takes at most near-stdlib dependencies; today it has none.

Packages

  • lifecycle — starts subsystems concurrently, reports readiness, and shuts down within a timeout.
  • config — loads configuration in layers: a base file, an environment overlay, and secrets.
  • logging — builds an *slog.Logger from a configuration that config loads.
  • web — an HTTP server, RFC 9457 problem responses, /healthz and /readyz, and a middleware chain.

Development

The repository uses a Go workspace and mise:

mise run test    # build and test every module

License

Apache License 2.0.

Directories

Path Synopsis
Package config loads layered JSON configuration and defines the contract a configuration type implements to take part in that load.
Package config loads layered JSON configuration and defines the contract a configuration type implements to take part in that load.
Package database provides the SQL data layer's dialect-neutral core: a lifecycle-integrated wrapper over a database/sql connection pool and the dialect seam its providers implement.
Package database provides the SQL data layer's dialect-neutral core: a lifecycle-integrated wrapper over a database/sql connection pool and the dialect seam its providers implement.
seed
Package seed loads reference data into a database from seed files.
Package seed loads reference data into a database from seed files.
postgres module
Package lifecycle hosts process startup, readiness, and graceful shutdown.
Package lifecycle hosts process startup, readiness, and graceful shutdown.
Package logging constructs the *slog.Logger a process writes through, from a configuration that takes part in the layered load.
Package logging constructs the *slog.Logger a process writes through, from a configuration that takes part in the layered load.
Package web provides the HTTP layer: a net/http server bound to a caller-supplied handler, RFC 9457 problem responses, a JSON writer, and the liveness and readiness endpoints an orchestrator probes.
Package web provides the HTTP layer: a net/http server bound to a caller-supplied handler, RFC 9457 problem responses, a JSON writer, and the liveness and readiness endpoints an orchestrator probes.

Jump to

Keyboard shortcuts

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