user

package
v0.0.0-...-ac624b7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPassword

func SetPassword(d *sqlx.DB, id int, password string) error

SetPassword replaces the password for a user

Types

type User

type User struct {
	models.AutoFields
	Email string `db:"email" json:"email"`
	Name  string `db:"name" json:"name"`
}

User represents a "User" model

func Authenticate

func Authenticate(d *sqlx.DB, email string, password string) (*User, error)

Authenticate takes email and password and returns user

func CreateUser

func CreateUser(d *sqlx.DB, name, email, password string) (*User, error)

CreateUser creates a new user item and returns the id

Jump to

Keyboard shortcuts

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