 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- type Authenticator
- type CheckVersionWrapper
- type Health
- type Key
- type PoliciesCleanup
- type PoliciesCreate
- type PoliciesDelete
- type PoliciesIndex
- type PoliciesIndexInternal
- type PolicyFilter
- type PolicyGuard
- type QuotaGuard
- type TagsIndex
- type UAAClient
- type UptimeHandler
- type WhoAmIHandler
- type WhoAmIResponse
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 CheckVersionWrapper ¶
type CheckVersionWrapper struct {
	ErrorResponse errorResponse
}
    func (*CheckVersionWrapper) CheckVersion ¶
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 ¶
func NewTagsIndex ¶
type UAAClient ¶
type UAAClient interface {
	CheckToken(token string) (uaa_client.CheckTokenResponse, error)
}
    type UptimeHandler ¶
func (*UptimeHandler) ServeHTTP ¶
func (h *UptimeHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type WhoAmIHandler ¶
func (*WhoAmIHandler) ServeHTTP ¶
func (h *WhoAmIHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
type WhoAmIResponse ¶
type WhoAmIResponse struct {
	UserName string `json:"user_name"`
}
    
       Source Files
      ¶
      Source Files
      ¶
    
   Click to show internal directories. 
   Click to hide internal directories.