uc

package
v0.0.0-...-cfbc2f4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseUser

type BaseUser struct {
	Nick     string `bson:",omitempty"`
	Password string `bson:",omitempty"`
	Name     string `bson:",omitempty"`
	Email    string `bson:",omitempty"`
	Phone    string `bson:",omitempty"`
	// contains filtered or unexported fields
}

BaseUser 用户标元数据

type UserCenter

type UserCenter struct {
	// contains filtered or unexported fields
}

UserCenter 用户中心的配置和MongoDB核心

func (UserCenter) AddUserFunc

func (uc UserCenter) AddUserFunc(w http.ResponseWriter, req *http.Request)

AddUserFunc 添加新用户

func (*UserCenter) ConnectToDB

func (uc *UserCenter) ConnectToDB(uri, dbName, collectionName string)

ConnectToDB 连接指定MongoDB

func (UserCenter) DelUserFunc

func (uc UserCenter) DelUserFunc(w http.ResponseWriter, req *http.Request)

DelUserFunc 可根据nick或name删除用户

func (UserCenter) QueryUserFunc

func (uc UserCenter) QueryUserFunc(w http.ResponseWriter, req *http.Request)

QueryUserFunc 可根据nick或name查询用户信息

func (UserCenter) UpdateUserFunc

func (uc UserCenter) UpdateUserFunc(w http.ResponseWriter, req *http.Request)

UpdateUserFunc 根据nick去修改对应用户信息

Jump to

Keyboard shortcuts

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