handlers

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const MAX_REQ_BODY_SIZE = 10 << 20 // 10 MB
View Source
const TokenDataKey = Key("tokenData")

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	Client        UAAClient
	Scopes        []string
	ErrorResponse errorResponse
	ScopeChecking bool
}

func (*Authenticator) Wrap

func (a *Authenticator) Wrap(handle http.Handler) http.Handler

type CORSOptionsWrapper

type CORSOptionsWrapper struct {
	RataRoutes         rata.Routes
	AllowedCORSDomains []string
}

func (CORSOptionsWrapper) Wrap

func (c CORSOptionsWrapper) Wrap(handler http.Handler) http.Handler

type CheckVersionWrapper

type CheckVersionWrapper struct {
	ErrorResponse errorResponse
	RataAdapter   rataAdapter
}

func (*CheckVersionWrapper) CheckVersion

func (c *CheckVersionWrapper) CheckVersion(handlers map[string]http.Handler) http.Handler

type Health

type Health struct {
	Store         dataStore
	ErrorResponse errorResponse
}

func NewHealth

func NewHealth(store dataStore, errorResponse errorResponse) *Health

func (*Health) ServeHTTP

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

type Key

type Key string

type PoliciesCleanup

type PoliciesCleanup struct {
	Mapper        api.PolicyMapper
	PolicyCleaner policyCleaner
	ErrorResponse errorResponse
}

func NewPoliciesCleanup

func NewPoliciesCleanup(mapper api.PolicyMapper, policyCleaner policyCleaner, errorResponse errorResponse) *PoliciesCleanup

func (*PoliciesCleanup) ServeHTTP

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

type PoliciesCreate

type PoliciesCreate struct {
	Store         dataStore
	Mapper        api.PolicyMapper
	PolicyGuard   policyGuard
	QuotaGuard    quotaGuard
	ErrorResponse errorResponse
}

func NewPoliciesCreate

func NewPoliciesCreate(store dataStore, mapper api.PolicyMapper,
	policyGuard policyGuard, quotaGuard quotaGuard, errorResponse errorResponse) *PoliciesCreate

func (*PoliciesCreate) ServeHTTP

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

type PoliciesDelete

type PoliciesDelete struct {
	Store         dataStore
	Mapper        api.PolicyMapper
	PolicyGuard   policyGuard
	ErrorResponse errorResponse
}

func NewPoliciesDelete

func NewPoliciesDelete(store dataStore, mapper api.PolicyMapper,
	policyGuard policyGuard, errorResponse errorResponse) *PoliciesDelete

func (*PoliciesDelete) ServeHTTP

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

type PoliciesIndex

type PoliciesIndex struct {
	Store         dataStore
	Mapper        api.PolicyMapper
	PolicyFilter  policyFilter
	ErrorResponse errorResponse
}

func NewPoliciesIndex

func NewPoliciesIndex(store dataStore, mapper api.PolicyMapper, policyFilter policyFilter,
	errorResponse errorResponse) *PoliciesIndex

func (*PoliciesIndex) ServeHTTP

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

type PoliciesIndexInternal

type PoliciesIndexInternal struct {
	Logger        lager.Logger
	Store         dataStore
	Mapper        api.PolicyMapper
	ErrorResponse errorResponse
}

func NewPoliciesIndexInternal

func NewPoliciesIndexInternal(logger lager.Logger, store dataStore,
	mapper api.PolicyMapper, errorResponse errorResponse) *PoliciesIndexInternal

func (*PoliciesIndexInternal) ServeHTTP

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

type PolicyFilter

type PolicyFilter struct {
	CCClient  ccClient
	UAAClient uaaClient
	ChunkSize int
}

func NewPolicyFilter

func NewPolicyFilter(uaaClient uaaClient, ccClient ccClient, chunkSize int) *PolicyFilter

func (*PolicyFilter) FilterPolicies

func (f *PolicyFilter) FilterPolicies(policies []store.Policy, userToken uaa_client.CheckTokenResponse) ([]store.Policy, error)

type PolicyGuard

type PolicyGuard struct {
	CCClient  ccClient
	UAAClient uaaClient
}

func NewPolicyGuard

func NewPolicyGuard(uaaClient uaaClient, ccClient ccClient) *PolicyGuard

func (*PolicyGuard) CheckAccess

func (g *PolicyGuard) CheckAccess(policies []store.Policy, userToken uaa_client.CheckTokenResponse) (bool, error)

type QuotaGuard

type QuotaGuard struct {
	Store       dataStore
	MaxPolicies int
}

func NewQuotaGuard

func NewQuotaGuard(store dataStore, maxPolicies int) *QuotaGuard

func (*QuotaGuard) CheckAccess

func (g *QuotaGuard) CheckAccess(policies []store.Policy, userToken uaa_client.CheckTokenResponse) (bool, error)

type TagsIndex

type TagsIndex struct {
	Store         dataStore
	Marshaler     marshal.Marshaler
	ErrorResponse errorResponse
}

func NewTagsIndex

func NewTagsIndex(store dataStore, marshaler marshal.Marshaler, errorResponse errorResponse) *TagsIndex

func (*TagsIndex) ServeHTTP

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

type UAAClient

type UAAClient interface {
	CheckToken(token string) (uaa_client.CheckTokenResponse, error)
}

type UptimeHandler

type UptimeHandler struct {
	StartTime time.Time
}

func (*UptimeHandler) ServeHTTP

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

type WhoAmIHandler

type WhoAmIHandler struct {
	Marshaler     marshal.Marshaler
	ErrorResponse errorResponse
}

func (*WhoAmIHandler) ServeHTTP

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

type WhoAmIResponse

type WhoAmIResponse struct {
	UserName string `json:"user_name"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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