useractions

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResetLifetime is the maximum time reset tokens are valid for
	ResetLifetime = time.Hour
)

Variables

This section is empty.

Functions

func HandleCreate

func HandleCreate(w http.ResponseWriter, r *http.Request) error

HandleCreate handles the POST of the create form for users

func HandleCreateShow

func HandleCreateShow(w http.ResponseWriter, r *http.Request) error

HandleCreateShow serves the create form via GET for users.

func HandleDestroy

func HandleDestroy(w http.ResponseWriter, r *http.Request) error

HandleDestroy responds to /users/n/destroy by deleting the user.

func HandleIndex

func HandleIndex(w http.ResponseWriter, r *http.Request) error

HandleIndex displays a list of users.

func HandleLogin

func HandleLogin(w http.ResponseWriter, r *http.Request) error

HandleLogin responds to POST /users/login by setting a cookie on the request with encrypted user data.

func HandleLoginShow

func HandleLoginShow(w http.ResponseWriter, r *http.Request) error

HandleLoginShow shows the page at /users/login

func HandleLogout

func HandleLogout(w http.ResponseWriter, r *http.Request) error

HandleLogout clears the current user's session /users/logout

func HandlePasswordReset

func HandlePasswordReset(w http.ResponseWriter, r *http.Request) error

HandlePasswordReset responds to GET /users/password?token=DEADFISH by logging the user in, removing the token and allowing them to set their password.

func HandlePasswordResetSend

func HandlePasswordResetSend(w http.ResponseWriter, r *http.Request) error

HandlePasswordResetSend responds to POST /users/password/reset by sending a password reset email.

func HandlePasswordResetSentShow

func HandlePasswordResetSentShow(w http.ResponseWriter, r *http.Request) error

HandlePasswordResetSentShow responds to GET /users/password/sent

func HandlePasswordResetShow

func HandlePasswordResetShow(w http.ResponseWriter, r *http.Request) error

HandlePasswordResetShow responds to GET /users/password/reset by showing the password reset page.

func HandleShow

func HandleShow(w http.ResponseWriter, r *http.Request) error

HandleShow displays a single user.

func HandleUpdate

func HandleUpdate(w http.ResponseWriter, r *http.Request) error

HandleUpdate handles the POST of the form to update a user

func HandleUpdateShow

func HandleUpdateShow(w http.ResponseWriter, r *http.Request) error

HandleUpdateShow renders the form to update a user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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