handlers

package
v0.0.0-...-3b3f94e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORSHandler

type CORSHandler struct {
	Handler http.Handler
}

middleware handler for supporting Cross Origin Requests

func NewCorsHandler

func NewCorsHandler(destHandler http.Handler) *CORSHandler

returns a new CORSHandler middleware handler

func (*CORSHandler) ServeHTTP

func (ch *CORSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

adds various headers to to response writer as defined by the constants.go file

type HandlerCtx

type HandlerCtx struct {
	// contains filtered or unexported fields
}

func NewHandlerContext

func NewHandlerContext(signingKey string, ss sessions.Store, us users.UserStore) *HandlerCtx

func (*HandlerCtx) SessionsHandler

func (hCtx *HandlerCtx) SessionsHandler(w http.ResponseWriter, r *http.Request)

TODO: To be revisited to assess intended authentication method

func (*HandlerCtx) SessionsMineHandler

func (hCtx *HandlerCtx) SessionsMineHandler(w http.ResponseWriter, r *http.Request)

func (*HandlerCtx) UsersHandler

func (hCtx *HandlerCtx) UsersHandler(w http.ResponseWriter, r *http.Request)

func (*HandlerCtx) UsersMeHandler

func (hCtx *HandlerCtx) UsersMeHandler(w http.ResponseWriter, r *http.Request)

type SessionState

type SessionState struct {
	AuthUsr   *users.User
	StartTime time.Time
}

Jump to

Keyboard shortcuts

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