handlers

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataResourceBody

func DataResourceBody(resource *models.Resource) *models.ResourceData

DataResourceBody returns an data encapsulated version of a resource

func DataResourcesBody

func DataResourcesBody(resources []*models.Resource) *models.ResourceArrayData

DataResourcesBody returns an data encapsulated version of an array of resources

func Healthz

func Healthz(w http.ResponseWriter, req *http.Request)

Healthz returns 200

Types

type AuthHandlers added in v0.5.0

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

AuthHandlers defines handlers that provide authentication

func NewAuthHandlers added in v0.5.0

func NewAuthHandlers() (*AuthHandlers, error)

NewAuthHandlers takes a sessions.Store implementation and returns an AuthHandlers struct

func (*AuthHandlers) GithubCallback added in v0.5.0

func (a *AuthHandlers) GithubCallback(w http.ResponseWriter, r *http.Request)

GithubCallback processes the OAuth callback from GitHub

func (*AuthHandlers) InitiateOAuth added in v0.5.0

func (a *AuthHandlers) InitiateOAuth(w http.ResponseWriter, r *http.Request)

InitiateOAuth initiatates an OAuth request

func (*AuthHandlers) Logout added in v0.5.0

func (a *AuthHandlers) Logout(w http.ResponseWriter, r *http.Request)

Logout clears the JWT token cookie

type Params added in v0.5.0

type Params map[string]string

Params a key-value map of path params

type WithParams added in v0.5.0

type WithParams func(http.ResponseWriter, *http.Request, Params)

WithParams can be used to wrap handlers to take an extra arg for path params

func (WithParams) ServeHTTP added in v0.5.0

func (h WithParams) ServeHTTP(w http.ResponseWriter, req *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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