feat: service/controller prototype

This commit is contained in:
2025-06-19 18:37:19 +03:00
parent 912470b6e2
commit 87878f15a3
12 changed files with 258 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
package utils
import (
"context"
"easywish/config"
"github.com/jackc/pgx/v5"
)
func GetDbConn() (*pgx.Conn, context.Context, error) {
ctx := context.Background()
conn, err := pgx.Connect(ctx, config.GetConfig().DatabaseUrl)
if err != nil {
return nil, nil, err
}
return conn, ctx, nil
}