...
Package db
func AddUser(user UserInfo, connectionInfo DbInfo)
AddUser
*
- Add a user to the qa_staff table in the database
*
- @param user a UserInfo struct instance with the name, email, and stage of the person to be added
- @param db_info a DbInfo type with information to connect to the database
*
func GetConnection(db_info DbInfo) *sql.DB
*
- Establish a connection to the database
*
- @param db_info A DbInfo type with information to connect to the database
- @return A DB object with an open connection to the database
*
func RemoveUser(user UserInfo, connectionInfo DbInfo)
RemoveUser
*
- Remove a user from the qa_staff table in the database
*
- @param user a UserInfo struct instance with the information of the person to be removed
- @param db_info a DbInfo type with information to connect to the database
*
func UpdateUser(user UserInfo, connectionInfo DbInfo)
UpdateUser
*
* Update existing user in the qa_staff table
type DbInfo struct {
Host string
Port int
User string
Password string
Dbname string
Profile string
IsSsl bool
AltCapoPath string
}
type UserInfo struct {
Name string
Email string
Group string
IsUnavailable bool
IsAvailable bool
}