handlers

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

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

Go to latest
Published: May 29, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AuthorizeURL = "/authorize"

AuthorizeURL is the path to the authorization URL.

Variables

View Source
var (
	// ErrUnauthorized is returned when the user is not logged in or is not
	// authorized to access a given resource.
	ErrUnauthorized = errors.New("unauthorized")

	// ErrValidation is returned when a saved resource is invalid. It is used
	// as a marker since validation errors are handled by rerendering the
	// template instead of displaying an error.
	ErrInvalid = errors.New("invalid resource")
)

Functions

func Error

func Error(w http.ResponseWriter, err error)

Error translates errors into HTTP responses.

func NewHandler

func NewHandler(db *rationl.DB, clientID, secret string) http.Handler

NewHandler returns a new root HTTP handler.

Types

type CreateInvestigationHandler

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

CreateInvestigationHandler creates a new investigation.

func (*CreateInvestigationHandler) ServeHTTP

type EditInvestigationHandler

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

EditInvestigationHandler renders an editable form for an existing investigation.

func (*EditInvestigationHandler) ServeHTTP

type InvestigationHandler

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

InvestigationHandler renders a single investigation.

func (*InvestigationHandler) ServeHTTP

func (h *InvestigationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type InvestigationsHandler

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

InvestigationsHandler renders a list of investigations for the current user.

func (*InvestigationsHandler) ServeHTTP

type NewInvestigationHandler

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

NewInvestigationHandler renders an editable form for a new investigation.

func (*NewInvestigationHandler) ServeHTTP

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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