cloud_foundry_client

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

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 {
	Build(logger *log.Logger) (string, error)
}

type Binding

type Binding struct {
	GUID    string
	AppGUID string
}

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[string]int, error)

func (Client) Delete

func (c Client) Delete(path 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) Get

func (w Client) Get(path string, body interface{}, 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) ([]string, error)

func (Client) GetServiceKeysForInstance

func (c Client) GetServiceKeysForInstance(instanceGUID string, logger *log.Logger) ([]ServiceKey, 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 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"`
}

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
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL