Replaced the gin framwwork with echo

This commit is contained in:
2025-01-13 11:57:48 +01:00
parent 8e2d22b899
commit 034ba35fbb
32 changed files with 348 additions and 266 deletions

View File

@@ -20,9 +20,9 @@ import (
var Dbpool *pgxpool.Pool
var Ctx = context.Background()
func InitDB(host string, port int, user string, password string, dbname string) {
func InitDB(host string, port string, user string, password string, dbname string) {
psqlInfo := fmt.Sprintf("host=%s port=%d user=%s "+
psqlInfo := fmt.Sprintf("host=%s port=%s user=%s "+
"password=%s dbname=%s sslmode=disable",
host, port, user, password, dbname)
@@ -72,8 +72,8 @@ func resetGameIdSeq() {
}
}
func Migrate_db(host string, port int, user string, password string, dbname string) {
migrationInfo := fmt.Sprintf("postgres://%s:%s@%s:%d/%s?sslmode=disable",
func Migrate_db(host string, port string, user string, password string, dbname string) {
migrationInfo := fmt.Sprintf("postgres://%s:%s@%s:%s/%s?sslmode=disable",
user, password, host, port, dbname)
fmt.Println("Migration Info: ", migrationInfo)