Skip to content

pandamy619/goDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goDB

This app for work to databases

pre-install postgreSQL

init struct

database.Database{Host string, Port string, User string, Password string, conn *sql.DB}

Database

open SQL connect

func (db *Database) InitDatabase()

Initialize database connection

Create database

func (db *Database) CreateDatabase(dbname string)

Used to create a new SQL database. If database exists return error

Drop database

func (db *Database) DropDB(name string)

User

Create user

func (db *Database) CreateUser(username string, password string)

Used to create a new SQL user. If role exists return error

Drop user

func (db *Database) DropUser(name string)

Privilege

Grant admin

func (db *Database) GoAdmin(who string)

Used to grant admin role to user

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published