user

package
v0.0.0-...-e495acf Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID       primitive.ObjectID `bson:"_id" json:"_id"`
	Username string             `json:"username" xml:"username" bson:"username"`
	Password string             `json:"password" xml:"password" bson:"password"`
	Salt     []byte             `json:"salt" xml:"salt" bson:"salt"`
}

User Structure.

func (User) MarshalToBSON

func (u User) MarshalToBSON() ([]byte, error)

MarshalToBSON 转换为BSON

func (User) MarshalToJSON

func (u User) MarshalToJSON() ([]byte, error)

MarshalToJSON 转换为JSON

func (User) TryLogin

func (u User) TryLogin(pwd string) bool

TryLogin 登陆函数

Jump to

Keyboard shortcuts

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