controllers

package
v0.0.0-...-079d604 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2016 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermissionAdmin     = "kahinah.admin"
	PermissionQA        = "kahinah.qa"
	PermissionWhitelist = "kahinah.whitelist"
)
View Source
const (
	CASReferrer = "_cas_refer"
)

Variables

View Source
var (
	ErrNotFound         = errors.New("kahinah: path not found")
	ErrMethodNotAllowed = errors.New("kahinah: method not allowed")
	ErrBadRequest       = errors.New("kahinah: bad request")
	ErrForbidden        = errors.New("kahinah: forbidden")
	ErrPermission       = errors.New("kahinah: permission error")
)
View Source
var (
	// ErrNoCurrentStage signals that StageCurrent doesn't exist for some reason.
	ErrNoCurrentStage = errors.New("kahinah: couldn't find the current stage (yikes!)")
)

Functions

func ActivityHandler

func ActivityHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func ActivityJSONHandler

func ActivityJSONHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func AdminGetHandler

func AdminGetHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

AdminGetHandler controls the central dashboard for Kahinah.

func AdminPostHandler

func AdminPostHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

AdminPostHandler manipulates the central dashboard for kahinah

func Authenticated

func Authenticated(r *http.Request) string

func BuildGetHandler

func BuildGetHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

BuildGetHandler displays build information for a specific build

func BuildGetJSONHandler

func BuildGetJSONHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

BuildGetJSONHandler displays build information in JSON for a specific build.

func BuildPostHandler

func BuildPostHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

BuildPostHandler handles post actions that occur to the current active stage.

func IntegrationHandler

func IntegrationHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

IntegrationHandler handles webhooks to integration handlers in the integration package by calling their hook function with the request.

func ListsAPIHandler

func ListsAPIHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

ListsAPIHandler shows the collection of lists, with filters, paginated, JSON'ified.

func ListsHandler

func ListsHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

ListsHandler shows the collection of lists (HTML).

func MainHandler

func MainHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

MainHandler shows the main page.

func MustAuthenticate

func MustAuthenticate(r *http.Request) string

func PanicMiddleware

func PanicMiddleware(inner goji.Handler) goji.Handler

func PermAbortCheck

func PermAbortCheck(r *http.Request, perm string)

func PermCheck

func PermCheck(r *http.Request, perm string) bool

func RedirectHandler

func RedirectHandler(rw http.ResponseWriter, r *http.Request)

RedirectHandler redirects paths without a trailing slash to those with a trailing slash...

func StaticHandler

func StaticHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func UserLoginHandler

func UserLoginHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func UserLogoutHandler

func UserLogoutHandler(ctx context.Context, rw http.ResponseWriter, r *http.Request)

Types

type PanicHandler

type PanicHandler struct {
	Cache *ttlcache.Cache
}

func (*PanicHandler) Err400

func (p *PanicHandler) Err400(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func (*PanicHandler) Err403

func (p *PanicHandler) Err403(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func (*PanicHandler) Err404

func (p *PanicHandler) Err404(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func (*PanicHandler) Err405

func (p *PanicHandler) Err405(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func (*PanicHandler) Err500

func (p *PanicHandler) Err500(ex interface{}, ctx context.Context, rw http.ResponseWriter, r *http.Request)

func (*PanicHandler) Err550

func (p *PanicHandler) Err550(ctx context.Context, rw http.ResponseWriter, r *http.Request)

func (*PanicHandler) ServeHTTPC

func (p *PanicHandler) ServeHTTPC(ex interface{}, ctx context.Context, rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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