user

package
v0.0.0-...-d94e6cf Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTokenInvalid is returned if token is invalid or expired.
	ErrTokenInvalid = errors.New("token invalid or expired")
	// ErrAccountAlreadyExist is returned if an email already exists in the db.
	ErrAccountAlreadyExist = errors.New("the account already exist")
	// ErrInvalidCredentials is returned if an email and password don't match a db entry.
	ErrInvalidCredentials = errors.New("invalid credentials")
	// ErrWrongPassword is returned if the provided password doesn't match.
	ErrWrongPassword = errors.New("wrong password")
)

Functions

This section is empty.

Types

type Controller

type Controller struct {
	DB *gorm.DB
}

Controller handles User routines.

func NewController

func NewController(db *gorm.DB) *Controller

NewController instantiate a new Controller that handles user routines.

func (Controller) ProfileEdit

func (controller Controller) ProfileEdit(w http.ResponseWriter, r *http.Request, vars map[string]string) error

ProfileEdit modify the information of the user

func (Controller) ProfileView

func (controller Controller) ProfileView(w http.ResponseWriter, r *http.Request, vars map[string]string) error

ProfileView return the information of the user

Jump to

Keyboard shortcuts

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