models

package
v0.0.0-...-ec95793 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2016 License: MIT Imports: 2 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        uint      `json:"id"`
	Email     string    `json:"email"`
	Username  string    `json:"username"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"created_at"`
}

User represents user data model

func (*User) ComparePassword

func (u *User) ComparePassword(password string) (err error)

ComparePassword compares provided plain-text password with model's hashed password

func (*User) HashPassword

func (u *User) HashPassword(password string) (err error)

HashPassword creates hash out of provided plain-text password

Jump to

Keyboard shortcuts

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