admin

package
v0.0.0-...-9f6fd05 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAdminUser

func CheckAdminUser(userName, password, userType string) bool

func CheckUser

func CheckUser(userName, password string) bool

func CountUser

func CountUser(query interface{}) (int, error)

func UpdateUser

func UpdateUser(user User) error

Types

type User

type User struct {
	ID_      bson.ObjectId `bson:"_id,omitempty"`
	UserName string
	Pwd      string
	Portrait string
	Email    string
	Type     string
}

func QueryAdmin

func QueryAdmin() (*User, error)

func QueryByUserName

func QueryByUserName(userName string) (*User, error)

func QueryUser

func QueryUser(query interface{}) (*User, error)

func Save

func Save(user *User) (*User, error)

Jump to

Keyboard shortcuts

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