server

package
v0.0.0-...-177a12d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2015 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtAuth

type JwtAuth struct {
	InvalidTokenHandler func(http.ResponseWriter, *http.Request)
	TokenValidated      func(map[string]interface{}, *http.Request)
	SecretKey           string
}

func NewJwtAuth

func NewJwtAuth() *JwtAuth

func (*JwtAuth) GenerateToken

func (j *JwtAuth) GenerateToken(claims map[string]interface{}) (string, error)

func (*JwtAuth) Handler

func (j *JwtAuth) Handler(h http.Handler) http.HandlerFunc

func (*JwtAuth) HandlerFunc

func (j *JwtAuth) HandlerFunc(h http.HandlerFunc) http.HandlerFunc

type Server

type Server struct {
	*http.Server

	Exited chan int
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Run

func (s *Server) Run() error

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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