github.com/aalemi-dev/stdlib-lab/postgres

Reusable Go modules for observability, messaging, databases, storage, and AI data infrastructure.


License
MIT
Install
go get github.com/aalemi-dev/stdlib-lab/postgres

Documentation

stdlib-lab

A collection of reusable, production-ready Go modules for observability, messaging, databases, storage, and AI data infrastructure.

Packages

Package Description Go Reference
logger Structured logging with OpenTelemetry tracing and fx support Go Reference
tracer Distributed tracing with OpenTelemetry and OTLP HTTP export Go Reference
observability Unified observer interface for infrastructure packages Go Reference
metrics Prometheus metrics with dual-endpoint separation and fx support Go Reference
kafka Apache Kafka client with serialization, SASL/TLS and fx support Go Reference
mariadb MariaDB/MySQL client with GORM, migrations, and fx support Go Reference
minio MinIO/S3-compatible object storage client with fx support Go Reference
postgres PostgreSQL client with GORM, migrations, and fx support Go Reference
schema_registry Confluent Schema Registry client with Avro/Protobuf/JSON serializers and fx support Go Reference

Requirements

  • Go 1.25+
  • Docker (for packages that use testcontainers: kafka, mariadb, minio, postgres)

Development

Install tools

make install-tools

Test

make test                                # all packages
make test PKG=schema_registry            # single package
make test PKG=schema_registry,kafka      # multiple packages (comma-separated)

Coverage threshold is enforced at 80%. Packages that require Docker (kafka, mariadb, minio, postgres) automatically set DOCKER_HOST and disable Ryuk.

Lint

make lint                                # all packages
make lint PKG=schema_registry            # single package
make lint PKG=schema_registry,logger     # multiple packages (comma-separated)

Format

make fmt

Docs

make docs        # generates docs/ from Go source comments

Clean

make clean       # removes coverage files and test binaries

Open a PR

make pr          # pushes current branch and opens a PR against main,
                 # or just pushes if a PR is already open

Contributing

Contributions are welcome. Please open an issue before submitting a pull request for significant changes.

License

MIT