common

package
v0.0.0-...-bb3e6dd Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppConfig configuration

AppConfig holds the configuration values from config.json file

Functions

func Authorize

func Authorize(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Middleware for validating JWT tokens

func DisplayAppError

func DisplayAppError(w http.ResponseWriter, handlerError error, message string, code int)

func GenerateJWT

func GenerateJWT(name, role string) (string, error)

Generate JWT token

func GetSession

func GetSession() *mgo.Session

func StartUp

func StartUp()

Types

This section is empty.

Jump to

Keyboard shortcuts

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