Golang package that will create a database (if the database does not exist), create a user with a given password (if the user does not exists), and consequently grants all permissions to the user on that database.
- Ulogger needs to be setup. It needs to be created and passed as
pginit.Init(appName, orgName, production) // appName and orgName are strings. production is bool.
- Create the database
pginit.CreateDB(dbName)
- Create the user
pginit.CreateUser("userA", "passwd", dbName)
- Check if PostgreSQL server is live
dbStatus := CheckIfDBIsLive() // returns a bool mentioning if the DB server is live