api

package
v0.0.0-...-bd07618 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodGet     = "GET"
	MethodPost    = "POST"
	MethodPut     = "PUT"
	MethodDelete  = "DELETE"
	MethodPatch   = "PATCH"
	MethodOptions = "OPTIONS"
)

Variables

This section is empty.

Functions

func CreateCcError

func CreateCcError(message string, parentErr error) error

func IsSuccessStatus

func IsSuccessStatus(state int) bool

Types

type CfAPI

type CfAPI struct {
	BaseAddress string
	*http.Client
}

CfAPI is the implementation of API interface. It is point of access to CF CloudController API

func NewCfAPI

func NewCfAPI() *CfAPI

NewCfAPI constructs and initializes access to CF by loading necessary credentials from ENVs

func (*CfAPI) AssertAppHasRoutes

func (c *CfAPI) AssertAppHasRoutes(appSummary *types.CfAppSummary) error

func (*CfAPI) AssociateRoute

func (c *CfAPI) AssociateRoute(appID string, routeID string) error

func (*CfAPI) BindService

func (c *CfAPI) BindService(appGUID, serviceGUID string, errorsCh chan error, wg *sync.WaitGroup)

func (*CfAPI) CopyBits

func (c *CfAPI) CopyBits(sourceID string, destID string, asyncError chan error)

func (*CfAPI) CreateApp

func (c *CfAPI) CreateApp(app types.CfApp) (*types.CfAppResource, error)

func (*CfAPI) CreateApplicationClone

func (c *CfAPI) CreateApplicationClone(sourceAppGUID, spaceGUID string, parameters map[string]string) (*types.CfAppResource, error)

func (*CfAPI) CreateRoute

func (c *CfAPI) CreateRoute(req *types.CfCreateRouteRequest) (*types.CfRouteResource, error)

func (*CfAPI) CreateServiceClone

func (c *CfAPI) CreateServiceClone(spaceGUID string, params map[string]interface{}, comp types.Component, suffix string,
	resultsCh chan types.ComponentClone, errorsCh chan error, wg *sync.WaitGroup)

func (*CfAPI) CreateUserProvidedServiceBinding

func (c *CfAPI) CreateUserProvidedServiceBinding(req *types.CfServiceBindingCreateRequest) (*types.CfServiceBindingCreateResponse, error)

func (*CfAPI) CreateUserProvidedServiceInstance

func (c *CfAPI) CreateUserProvidedServiceInstance(req *types.CfUserProvidedService) (*types.CfUserProvidedServiceResource, error)

func (*CfAPI) DeleteApp

func (c *CfAPI) DeleteApp(id string) error

func (*CfAPI) DeleteBinding

func (c *CfAPI) DeleteBinding(binding types.CfBindingResource) error

func (*CfAPI) DeleteRoute

func (c *CfAPI) DeleteRoute(routeID string) error

func (*CfAPI) DeleteRoutes

func (c *CfAPI) DeleteRoutes(appGUID string, errorsCh chan error, doneWaitGroup *sync.WaitGroup)

func (*CfAPI) DeleteServiceInstIfUnbound

func (c *CfAPI) DeleteServiceInstIfUnbound(comp types.Component,
	errorsCh chan error, doneWaitGroup *sync.WaitGroup)

func (*CfAPI) DeleteServiceInstance

func (c *CfAPI) DeleteServiceInstance(id string) error

func (*CfAPI) DeleteUPSInstIfUnbound

func (c *CfAPI) DeleteUPSInstIfUnbound(comp types.Component,
	errorsCh chan error, doneWaitGroup *sync.WaitGroup)

func (*CfAPI) DeleteUserProvidedServiceInstance

func (c *CfAPI) DeleteUserProvidedServiceInstance(id string) error

func (*CfAPI) GetAppBindings

func (c *CfAPI) GetAppBindings(id string) (*types.CfBindingsResources, error)

func (*CfAPI) GetAppRoutes

func (c *CfAPI) GetAppRoutes(appID string) (*types.CfRoutesResponse, error)

func (*CfAPI) GetAppSummary

func (c *CfAPI) GetAppSummary(id string) (*types.CfAppSummary, error)

func (*CfAPI) GetAppsFromRoute

func (c *CfAPI) GetAppsFromRoute(routeGUID string) (*types.CfAppsResponse, error)

func (*CfAPI) GetBrokers

func (c *CfAPI) GetBrokers(brokerName string) (*types.CfServiceBrokerResources, error)

func (*CfAPI) GetServiceBindings

func (c *CfAPI) GetServiceBindings(id string) (*types.CfBindingsResources, error)

func (*CfAPI) GetServiceOfName

func (c *CfAPI) GetServiceOfName(name string) (*types.CfServiceResource, error)

func (*CfAPI) GetSpaceRoutesForHostname

func (c *CfAPI) GetSpaceRoutesForHostname(spaceGUID, hostname string) (*types.CfRoutesResponse, error)

func (*CfAPI) GetUserProvidedService

func (c *CfAPI) GetUserProvidedService(guid string) (*types.CfUserProvidedServiceResource, error)

func (*CfAPI) GetUserProvidedServiceBindings

func (c *CfAPI) GetUserProvidedServiceBindings(id string) (*types.CfBindingsResources, error)

func (*CfAPI) PurgeService

func (c *CfAPI) PurgeService(serviceID string, serviceName string, servicePlansURL string) error

func (*CfAPI) RegisterBroker

func (c *CfAPI) RegisterBroker(brokerName string, brokerURL string, username string, password string) error

func (*CfAPI) RestageApp

func (c *CfAPI) RestageApp(appGUID string) error

func (*CfAPI) StartApp

func (c *CfAPI) StartApp(app *types.CfAppResource) error

func (*CfAPI) UnassociateRoute

func (c *CfAPI) UnassociateRoute(appID string, routeID string) error

func (*CfAPI) UnbindAppServices

func (w *CfAPI) UnbindAppServices(appGUID string, errorsCh chan error, doneWaitGroup *sync.WaitGroup)

func (*CfAPI) UpdateApp

func (c *CfAPI) UpdateApp(app *types.CfAppResource) error

func (*CfAPI) UpdateBroker

func (c *CfAPI) UpdateBroker(brokerGUID string, brokerURL string, username string, password string) error

type HttpMethod

type HttpMethod string

Jump to

Keyboard shortcuts

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