Refactor entrypoint

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-05 15:39:50 +01:00
parent fea53b589a
commit 63bf983e59
24 changed files with 1442 additions and 361 deletions

View File

@@ -21,19 +21,18 @@ import (
"go.gearno.de/kit/pg"
)
type (
pgConfig struct {
Addr string `json:"addr"`
Username string `json:"username"`
Password string `json:"password"`
Database string `json:"database"`
PoolSize int32 `json:"pool-size"`
CACertBundle string `json:"ca-cert-bundle"`
Debug bool `json:"debug"`
}
)
// PgConfig contains PostgreSQL database configuration.
type PgConfig struct {
Addr string `json:"addr"`
Username string `json:"username"`
Password string `json:"password"`
Database string `json:"database"`
PoolSize int32 `json:"pool-size"`
CACertBundle string `json:"ca-cert-bundle"`
Debug bool `json:"debug"`
}
func (cfg pgConfig) Options(options ...pg.Option) []pg.Option {
func (cfg PgConfig) Options(options ...pg.Option) []pg.Option {
opts := []pg.Option{
pg.WithAddr(cfg.Addr),
pg.WithUser(cfg.Username),