mysql

package
v0.0.0-...-a14fa2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBName    = "admin"
	TableName = "admin"
)

Variables

This section is empty.

Functions

func CreateAdmin

func CreateAdmin(db *sql.DB, name, password *string) error

CreateAdmin create an administrative user

func CreateDatabase

func CreateDatabase(db *sql.DB) error

CreateDatabase create admin table.

func CreateTable

func CreateTable(db *sql.DB, name, password *string) error

CreateTable create admin table.

func IsActive

func IsActive(db *sql.DB, id uint64) (bool, error)

IsActive return user.Active and nil if query success.

func Login

func Login(db *sql.DB, name, password *string) (uint32, error)

Login the administrative user logins

func ModifyAdminActive

func ModifyAdminActive(db *sql.DB, id uint32, active bool) error

ModifyAdminActive the administrative user updates active

func ModifyEmail

func ModifyEmail(db *sql.DB, id uint32, email *string) error

ModifyEmail the administrative user updates email

func ModifyMobile

func ModifyMobile(db *sql.DB, id uint32, mobile *string) error

ModifyMobile the administrative user updates mobile

func ModifyPassword

func ModifyPassword(db *sql.DB, id uint32, password, newPassword *string) error

ModifyPassword the administrative user updates password

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL