connect, createschema, close

This commit is contained in:
2024-08-19 14:15:44 +02:00
parent 6943eb83f4
commit fd8fdc899c
6 changed files with 93 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package configuration
var (
Debug = false
RunHTTP = true
RunGRPC = true
)

14
configuration/database.go Normal file
View File

@ -0,0 +1,14 @@
package configuration
import "fmt"
var (
DATABASE_HOST = "localhost:5432"
DATABASE_NAME = "postgres"
DATABASE_USER = "postgres"
DATABASE_PASS = "postgres"
)
func GetDatabaseConnectionString() string {
return fmt.Sprintf("postgresql://%s:%s@%s/%s?sslmode=disable", DATABASE_USER, DATABASE_PASS, DATABASE_HOST, DATABASE_NAME)
}