Skip to content

Unaxiom/pginit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pginit

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.

Usage

  1. 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.
  1. Create the database
pginit.CreateDB(dbName)
  1. Create the user
pginit.CreateUser("userA", "passwd", dbName)
  1. Check if PostgreSQL server is live
dbStatus := CheckIfDBIsLive() // returns a bool mentioning if the DB server is live

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages