model

package
v0.0.0-...-f5f9226 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: Apache-2.0 Imports: 3 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"`
	Username string             `bson:"username"`
	Password string             `bson:"password"`
}

User contains user's information

var NilUser User

NilUser is the Nil value for User

func NewUser

func NewUser(username string, password string) (*User, error)

NewUser returns a new user

func (*User) Clone

func (user *User) Clone() *User

Clone returns a clone of this user

func (*User) IsCorrectPassword

func (user *User) IsCorrectPassword(password string) bool

IsCorrectPassword checks if the provided password is correct or not

Jump to

Keyboard shortcuts

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