go-bootstrapify-modules
Reusable modules for the go-bootstrapify bootstrapper framework.
Overview
go-bootstrapify-modules provides a collection of commonly used modules that integrate seamlessly with the go-bootstrapify dependency injection framework. These modules handle typical web application concerns like HTTP routing, database connectivity, logging, and health checks.
Modules
HTTP Module
- Gin framework integration
- Correlation ID middleware
- Request logging middleware
- Error response handling middleware
- Context key utilities
PostgreSQL Module
- pgx/v5 driver integration
- Database executor with querier interface
- Query builder with filtering, ordering, and pagination
- Database migration support (golang-migrate)
Logger Module
- zerolog integration
- Structured logging support
Health Module
- Health check endpoints
- Service health monitoring
Installation
go get gitlab.com/bitval/go-bootstrapify-modules
Requirements
Usage
Import the modules you need and register them with your go-bootstrapify application:
import (
"gitlab.com/bitval/go-bootstrapify"
"gitlab.com/bitval/go-bootstrapify-modules/http"
"gitlab.com/bitval/go-bootstrapify-modules/logger"
"gitlab.com/bitval/go-bootstrapify-modules/postgresdb"
"gitlab.com/bitval/go-bootstrapify-modules/health"
)
func main() {
app := bootstrapify.New()
// Register modules
app.Register(logger.Module())
app.Register(postgresdb.Module())
app.Register(http.Module())
app.Register(health.Module())
app.Run()
}
License
MIT License - see LICENSE for details
Status
This project is in early alpha stage and under active development.