models

package
v0.0.0-...-a932866 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertUser

func InsertUser(database *mgo.Database, user *User) error

Types

type User

type User struct {
	ID        bson.ObjectId `bson:"_id,omitempty"`
	Email     string        `bson:"e"`
	Username  string        `bson:"u"`
	Password  []byte        `bson:"p"`
	Timestamp time.Time     `bson:"t"`
}

func GetUserByEmail

func GetUserByEmail(database *mgo.Database, email string) (user *User)

func (*User) HashPassword

func (user *User) HashPassword(password string)

Jump to

Keyboard shortcuts

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