cf

package
v0.0.0-...-fb356ce Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 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

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

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

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

func (Client) CreateServicePlanVisibility

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

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

func (Client) EnableServiceAccess

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

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

func (Client) GetPlanByServiceInstanceGUID

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

func (Client) GetServiceInstance

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

func (Client) GetServiceInstances

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

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

func (Client) UpdateServiceBroker

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

func (Client) UpgradeServiceInstance

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

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"`
	SpaceGUID    string `json:"space_guid"`
}

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

func (o LastOperation) OperationFailed() bool

type MaintenanceInfo

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

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

type ServiceInstanceResource

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

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

type ServicePlanVisibilityMetadata

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