45308cd4bfcb576fe607b6672ce02848a4e4f6a2
Add PostgreSQL support to database package alongside existing MySQL support. Both databases share common infrastructure (pool management, metrics, transactions) while using database-specific connectors. database/ changes: - Add PostgresConfig struct and PostgreSQL connector using pgx/stdlib - Change MySQL config from DBConfig to *MySQLConfig (pointer) - Add Config.Validate() to prevent multiple database configs - Add PostgreSQL connector with secure config building (no password in DSN) - Add field validation and secure defaults (SSLMode="prefer") - Support legacy flat PostgreSQL config format for backward compatibility - Add tests for PostgreSQL configs and validation New database/pgdb/ package: - Native pgx connection pool support (*pgxpool.Pool) - OpenPool() and OpenPoolWithConfigFile() APIs - CreatePoolConfig() for secure config conversion - PoolOptions for fine-grained pool control - Full test coverage and documentation Security: - Passwords never exposed in DSN strings - Set passwords separately in pgx config objects - Validate all configuration before connection Architecture: - Shared code in database/ for both MySQL and PostgreSQL (sql.DB) - database/pgdb/ for PostgreSQL-specific native pool support
Common library for the NTP Pool project with shared infrastructure components.
Packages
- apitls - TLS setup for NTP Pool internal services with embedded CA
- config - NTP Pool project configuration with environment variables
- ekko - Enhanced Echo web framework with observability middleware
- health - Standalone health check HTTP server
- kafka - Kafka client wrapper with TLS support
- logger - Structured logging with OpenTelemetry integration
- metricsserver - Prometheus metrics HTTP server
- timeutil - JSON-serializable duration types
- tracing - OpenTelemetry distributed tracing setup
- types - Shared data structures for NTP Pool
- ulid - Thread-safe ULID generation
- version - Build metadata and version information
- xff/fastlyxff - Fastly CDN IP range management
Description
Languages
Go
99.3%
Shell
0.6%