user

package
v0.0.0-...-e27359b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package user provides functionality for getting information about the currently logged in user.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(w http.ResponseWriter, r *http.Request)

GetUser sends a JSON response with the current user information.

func MakeMuxer

func MakeMuxer(prefix string) http.Handler

MakeMuxer creates a http.Handler to manage all user operations. If a prefix is given, that prefix will be the first part of the url. This muxer will provide the following handlers and return a RESTful 404 on all others.

GET     prefix + /      Get the currently logged in user.

Types

type UserInfo

type UserInfo struct {
	// The users e-mail address.
	Email string

	// The url to use to log the user out.
	LogoutURL string
}

UserInfo is the information about the current user.

Jump to

Keyboard shortcuts

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