cf

package
v0.21.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 10 Imported by: 16

Documentation

Index

Constants

View Source
const (
	OperationTypeDelete OperationType = "delete"

	OperationStateFailed     OperationState = "failed"
	OperationStateInProgress OperationState = "in progress"
)

Variables

This section is empty.

Functions

func NewForbiddenError

func NewForbiddenError(message string) error

func NewInvalidResponseError

func NewInvalidResponseError(message string) error

func NewResourceNotFoundError

func NewResourceNotFoundError(message string) error

func NewUnauthorizedError

func NewUnauthorizedError(message string) error

Types

type AuthHeaderBuilder

type AuthHeaderBuilder interface {
	AddAuthHeader(request *http.Request, logger *log.Logger) error
}

type Binding

type Binding struct {
	GUID    string
	AppGUID string
}

type CFResponse added in v0.21.0

type CFResponse struct {
	Resources []struct {
		Entity   map[string]interface{} `json:"entity"`
		Metadata map[string]interface{} `json:"metadata"`
	} `json:"resources"`
}

type Client

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

func New

func New(
	url string,
	authHeaderBuilder AuthHeaderBuilder,
	trustedCertPEM []byte,
	disableTLSCertVerification bool,
) (Client, error)

func (Client) CountInstancesOfPlan

func (c Client) CountInstancesOfPlan(serviceID, servicePlanID string, logger *log.Logger) (int, error)

func (Client) CountInstancesOfServiceOffering

func (c Client) CountInstancesOfServiceOffering(serviceID string, logger *log.Logger) (map[ServicePlan]int, error)

func (Client) DeleteBinding

func (c Client) DeleteBinding(binding Binding, logger *log.Logger) error

func (Client) DeleteServiceInstance

func (c Client) DeleteServiceInstance(instanceGUID string, logger *log.Logger) error

func (Client) DeleteServiceKey

func (c Client) DeleteServiceKey(serviceKey ServiceKey, logger *log.Logger) error

func (Client) DeregisterBroker

func (c Client) DeregisterBroker(brokerGUID string, logger *log.Logger) error

func (Client) DisableServiceAccess

func (c Client) DisableServiceAccess(serviceOfferingID string, logger *log.Logger) error

func (Client) GetAPIVersion

func (c Client) GetAPIVersion(logger *log.Logger) (string, error)

func (Client) GetBindingsForInstance

func (c Client) GetBindingsForInstance(instanceGUID string, logger *log.Logger) ([]Binding, error)

func (Client) GetInstance

func (c Client) GetInstance(serviceInstanceGUID string, logger *log.Logger) (Instance, error)

func (Client) GetInstanceState

func (c Client) GetInstanceState(serviceInstanceGUID string, logger *log.Logger) (InstanceState, error)

func (Client) GetInstancesOfServiceOffering

func (c Client) GetInstancesOfServiceOffering(serviceOfferingID string, logger *log.Logger) ([]s.Instance, error)

func (Client) GetInstancesOfServiceOfferingByOrgSpace added in v0.21.0

func (c Client) GetInstancesOfServiceOfferingByOrgSpace(serviceOfferingID, orgName, spaceName string, logger *log.Logger) ([]s.Instance, error)

func (Client) GetServiceKeysForInstance

func (c Client) GetServiceKeysForInstance(instanceGUID string, logger *log.Logger) ([]ServiceKey, error)

func (Client) GetServiceOfferingGUID

func (c Client) GetServiceOfferingGUID(brokerName string, logger *log.Logger) (string, error)

type ForbiddenError

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

func (ForbiddenError) Error

func (e ForbiddenError) Error() string

type Instance

type Instance struct {
	LastOperation LastOperation `json:"last_operation"`
}

func (Instance) OperationFailed

func (i Instance) OperationFailed() bool

type InstanceState

type InstanceState struct {
	PlanID              string
	OperationInProgress bool
}

type InvalidResponseError

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

func (InvalidResponseError) Error

func (e InvalidResponseError) Error() string

type LastOperation

type LastOperation struct {
	Type  OperationType  `json:"type"`
	State OperationState `json:"state"`
}

func (LastOperation) IsDelete

func (o LastOperation) IsDelete() bool

type Metadata

type Metadata struct {
	GUID string `json:"guid"`
}

type OperationState

type OperationState string

type OperationType

type OperationType string

type ResourceNotFoundError

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

func (ResourceNotFoundError) Error

func (e ResourceNotFoundError) Error() string

type ServiceBroker

type ServiceBroker struct {
	GUID string
	Name string
}

type ServiceKey

type ServiceKey struct {
	GUID string
}

type ServicePlan

type ServicePlan struct {
	Metadata          Metadata          `json:"metadata"`
	ServicePlanEntity ServicePlanEntity `json:"entity"`
}

type ServicePlanEntity

type ServicePlanEntity struct {
	UniqueID            string `json:"unique_id"`
	ServiceInstancesUrl string `json:"service_instances_url"`
	Name                string `json:"name"`
}

type ServicePlanResponse

type ServicePlanResponse struct {
	ServicePlans []ServicePlan `json:"resources"`
	// contains filtered or unexported fields
}

type UnauthorizedError

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

func (UnauthorizedError) Error

func (e UnauthorizedError) Error() string

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