userModel

package
v0.0.0-...-9179107 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: MIT 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       string    `bson:"_id"      json:"_id,omitempty"`
	Name     string    `bson:"name"     json:"name,omitempty"`
	Password string    `bson:"password" json:"password,omitempty"`
	Salt     string    `bson:"salt"     json:"salt,omitempty"`
	Date     time.Time `bson:"date"     json:"date,omitempty"`
}

func NewUser

func NewUser(u *User, t time.Time) (u *User, err error)

func (*User) CheckPass

func (u *User) CheckPass(password string) (ok bool, err error)

func (*User) FindByName

func (u *User) FindByName(name string) (code int, err error)

func (*User) InSert

func (u *User) InSert() (code int, err error)

Jump to

Keyboard shortcuts

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