handlers

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_REQ_BODY_SIZE = 10 << 20 // 10 MB

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticatedHandler

type AuthenticatedHandler interface {
	ServeHTTP(logger lager.Logger, response http.ResponseWriter, request *http.Request, tokenData uaa_client.CheckTokenResponse)
}

type Authenticator

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

func (*Authenticator) Wrap

type Health

type Health struct {
	Store         store
	ErrorResponse errorResponse
}

func (*Health) ServeHTTP

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

type PoliciesCleanup

type PoliciesCleanup struct {
	Marshaler     marshal.Marshaler
	PolicyCleaner policyCleaner
	ErrorResponse errorResponse
}

func (*PoliciesCleanup) ServeHTTP

func (h *PoliciesCleanup) ServeHTTP(logger lager.Logger, w http.ResponseWriter, req *http.Request, tokenData uaa_client.CheckTokenResponse)

type PoliciesCreate

type PoliciesCreate struct {
	Store         store
	Unmarshaler   marshal.Unmarshaler
	Validator     validator
	PolicyGuard   policyGuard
	QuotaGuard    quotaGuard
	ErrorResponse errorResponse
}

func (*PoliciesCreate) ServeHTTP

func (h *PoliciesCreate) ServeHTTP(logger lager.Logger, w http.ResponseWriter, req *http.Request, tokenData uaa_client.CheckTokenResponse)

type PoliciesDelete

type PoliciesDelete struct {
	Unmarshaler   marshal.Unmarshaler
	Store         store
	Validator     validator
	PolicyGuard   policyGuard
	ErrorResponse errorResponse
}

func (*PoliciesDelete) ServeHTTP

func (h *PoliciesDelete) ServeHTTP(logger lager.Logger, w http.ResponseWriter, req *http.Request, tokenData uaa_client.CheckTokenResponse)

type PoliciesIndex

type PoliciesIndex struct {
	Store         store
	Marshaler     marshal.Marshaler
	PolicyFilter  policyFilter
	ErrorResponse errorResponse
}

func (*PoliciesIndex) ServeHTTP

func (h *PoliciesIndex) ServeHTTP(logger lager.Logger, w http.ResponseWriter, req *http.Request, userToken uaa_client.CheckTokenResponse)

type PoliciesIndexInternal

type PoliciesIndexInternal struct {
	Logger        lager.Logger
	Store         store
	Marshaler     marshal.Marshaler
	ErrorResponse errorResponse
}

func (*PoliciesIndexInternal) ServeHTTP

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

type PolicyFilter

type PolicyFilter struct {
	CCClient  ccClient
	UAAClient uaaClient
	ChunkSize int
}

func (*PolicyFilter) FilterPolicies

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

type PolicyGuard

type PolicyGuard struct {
	CCClient  ccClient
	UAAClient uaaClient
}

func (*PolicyGuard) CheckAccess

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

type QuotaGuard

type QuotaGuard struct {
	Store       store
	MaxPolicies int
}

func (*QuotaGuard) CheckAccess

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

type TagsIndex

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

func (*TagsIndex) ServeHTTP

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(logger lager.Logger, w http.ResponseWriter, req *http.Request)

type Validator

type Validator struct{}

func (*Validator) ValidatePolicies

func (v *Validator) ValidatePolicies(policies []models.Policy) error

type WhoAmIHandler

type WhoAmIHandler struct {
	Marshaler     marshal.Marshaler
	ErrorResponse errorResponse
}

func (*WhoAmIHandler) ServeHTTP

func (h *WhoAmIHandler) ServeHTTP(logger lager.Logger, w http.ResponseWriter, req *http.Request, tokenData uaa_client.CheckTokenResponse)

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