cf

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationTypeDelete OperationType = "delete"

	OperationStateSucceeded  OperationState = "succeeded"
	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,
	logger *log.Logger) (Client, error)

func (Client) CheckMinimumOSBAPIVersion added in v0.33.0

func (c Client) CheckMinimumOSBAPIVersion(minimum string, logger *log.Logger) bool

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) CreateServiceBroker added in v0.29.0

func (c Client) CreateServiceBroker(name, username, password, url string) error

func (Client) CreateServicePlanVisibility added in v0.29.0

func (c Client) CreateServicePlanVisibility(orgName string, serviceOfferingID string, planName string, logger *log.Logger) 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, planName string, logger *log.Logger) error

func (Client) DisableServiceAccessForAllPlans added in v0.29.0

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

func (Client) EnableServiceAccess added in v0.29.0

func (c Client) EnableServiceAccess(serviceOfferingID, planName 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) GetLastOperationForInstance added in v0.30.0

func (c Client) GetLastOperationForInstance(serviceInstanceGUID string, logger *log.Logger) (LastOperation, error)

func (Client) GetPlanByServiceInstanceGUID added in v0.32.0

func (c Client) GetPlanByServiceInstanceGUID(serviceGUID string, logger *log.Logger) (ServicePlan, error)

func (Client) GetServiceInstance added in v0.32.0

func (c Client) GetServiceInstance(serviceInstanceGUID string, logger *log.Logger) (ServiceInstanceResource, error)

func (Client) GetServiceInstances added in v0.33.1

func (c Client) GetServiceInstances(filters GetInstancesFilter, logger *log.Logger) ([]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)

func (Client) ServiceBrokers added in v0.29.0

func (c Client) ServiceBrokers() ([]ServiceBroker, error)

func (Client) UpdateServiceBroker added in v0.29.0

func (c Client) UpdateServiceBroker(brokerGUID, name, username, password, url string) error

func (Client) UpgradeServiceInstance added in v0.32.0

func (c Client) UpgradeServiceInstance(serviceInstanceGUID string, maintenanceInfo MaintenanceInfo, logger *log.Logger) (LastOperation, error)

type ForbiddenError

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

func (ForbiddenError) Error

func (e ForbiddenError) Error() string

type GetInstancesFilter added in v0.30.0

type GetInstancesFilter struct {
	ServiceOfferingID string `json:"service_offering_id"`
	OrgName           string `json:"org_name"`
	SpaceName         string `json:"space_name"`
}

type Instance

type Instance struct {
	GUID         string `json:"service_instance_id"`
	PlanUniqueID string `json:"plan_id"`
}

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

func (LastOperation) OperationFailed added in v0.30.0

func (o LastOperation) OperationFailed() bool

type MaintenanceInfo added in v0.32.0

type MaintenanceInfo struct {
	Version string `json:"version"`
}

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 ServiceInstanceEntity added in v0.32.0

type ServiceInstanceEntity struct {
	ServicePlanURL  string          `json:"service_plan_url"`
	LastOperation   LastOperation   `json:"last_operation"`
	MaintenanceInfo MaintenanceInfo `json:"maintenance_info"`
}

type ServiceInstanceResource added in v0.32.0

type ServiceInstanceResource struct {
	Metadata Metadata              `json:"metadata"`
	Entity   ServiceInstanceEntity `json:"entity"`
}

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"`
	MaintenanceInfo     MaintenanceInfo `json:"maintenance_info"`
}

type ServicePlanResponse

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

type ServicePlanVisibility added in v0.29.0

type ServicePlanVisibility struct {
	Metadata ServicePlanVisibilityMetadata `json:"metadata"`
}

type ServicePlanVisibilityMetadata added in v0.29.0

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

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