ccv2

package
v6.44.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package ccv2 represents a Cloud Controller V2 client.

These sets of packages are still under development/pre-pre-pre...alpha. Use at your own risk! Functionality and design may change without warning.

It is currently designed to support Cloud Controller API 2.58.0. However, it may include features and endpoints of later API versions.

For more information on the Cloud Controller API see https://apidocs.cloudfoundry.org/

Method Naming Conventions

The client takes a '<Action Name><Top Level Endpoint><nth... level endpoint><Return Value>' approach to method names. If the <Top Level Endpoint> and <Return Value> are similar, they do not need to be repeated. If a GUID is required for the <Top Level Endpoint>, the pluralization is removed from said endpoint in the method name.

For Example:

Method Name: GetApplication
Endpoint: /v2/applications/:guid
Action Name: GET
Top Level Endpoint: applications
Return Value: Application

Method Name: GetServiceInstances
Endpoint: /v2/service_instances
Action Name: GET
Top Level Endpoint: service_instances
Return Value: []ServiceInstance

Method Name: GetSpaceServiceInstances
Endpoint: /v2/spaces/:guid/service_instances
Action Name: GET
Top Level Endpoint: spaces
Return Value: []ServiceInstance

Method Name: UpdateRouteApplication
Endpoint: /v2/routes/:route_guid/apps/:app_guid
Action Name: PUT
Top Level Endpoint: routes
Second Level Endpoint: Application
Return Value: Route

Method Name: DeleteSpaceJob
Endpoint: /v2/spaces/:space_guid
Action Name: DELETE
Top Level Endpoint: spaces
Return Value: Job

Use the following table to determine which HTTP Command equates to which Action Name:

HTTP Command -> Action Name
POST -> Create
GET -> Get
PUT -> Update
DELETE -> Delete
PATCH -> Patch

Method Locations

Methods exist in the same file as their return type, regardless of which endpoint they use.

Error Handling

All error handling that requires parsing the error_code/code returned back from the Cloud Controller should be placed in the errorWrapper. Everything else can be handled in the individual operations. All errors structs should be placed in individual files in the ccerror package.

No inline-relations-depth And summary Endpoints

This package will not ever use 'inline-relations-depth' or the '/summary' endpoints for any operations. These requests can be extremely taxing on the Cloud Controller and are avoided at all costs. Additionally, the objects returned back from these requests can become extremely inconsistent across versions and are problematic to deal with in general.

An additional problem that occurs with these endpoints is that lists of 51+ objects do not get returned by the CC. Example: Summary of Organizations includes a list of spaces. If there are 50 spaces, the endpoint returns these spaces under the 'spaces' field; if there are 51+, spaces, the 'spaces' field is missing from the CC return.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFilterParameters

func ConvertFilterParameters(filters []Filter) url.Values

ConvertFilterParameters converts a Filter object into a collection that cloudcontroller.Request can accept.

Types

type APIInformation

type APIInformation struct {

	// APIVersion is the Cloud Controller API version number.
	APIVersion string `json:"api_version"`

	// AuthorizationEndpoint is the authorization endpoint for the targeted Cloud
	// Controller.
	AuthorizationEndpoint string `json:"authorization_endpoint"`

	// DopplerEndpoint is the Doppler endpoint for the targeted Cloud Controller.
	DopplerEndpoint string `json:"doppler_logging_endpoint"`

	// MinCLIVersion is the minimum CLI version number required for the targeted
	// Cloud Controller.
	MinCLIVersion string `json:"min_cli_version"`

	// MinimumRecommendedCLIVersion is the minimum CLI version number recommended
	// for the targeted Cloud Controller.
	MinimumRecommendedCLIVersion string `json:"min_recommended_cli_version"`

	// Name is the name given to the targeted Cloud Controller.
	Name string `json:"name"`

	// RoutingEndpoint is the Routing endpoint for the targeted Cloud Controller.
	RoutingEndpoint string `json:"routing_endpoint"`

	// TokenEndpoint is the endpoint to retrieve a refresh token for the targeted
	// Cloud Controller.
	TokenEndpoint string `json:"token_endpoint"`
}

APIInformation represents the information returned back from /v2/info

type Application

type Application struct {
	// Buildpack is the buildpack set by the user.
	Buildpack types.FilteredString

	// Command is the user specified start command.
	Command types.FilteredString

	// DetectedBuildpack is the buildpack automatically detected.
	DetectedBuildpack types.FilteredString

	// DetectedStartCommand is the command used to start the application.
	DetectedStartCommand types.FilteredString

	// DiskQuota is the disk given to each instance, in megabytes.
	DiskQuota types.NullByteSizeInMb

	// DockerCredentials is the authentication information for the provided
	// DockerImage.
	DockerCredentials DockerCredentials

	// DockerImage is the docker image location.
	DockerImage string

	// EnvironmentVariables are the environment variables passed to the app.
	EnvironmentVariables map[string]string

	// GUID is the unique application identifier.
	GUID string

	// HealthCheckTimeout is the number of seconds for health checking of an
	// staged app when starting up.
	HealthCheckTimeout uint64

	// HealthCheckType is the type of health check that will be done to the app.
	HealthCheckType constant.ApplicationHealthCheckType

	// HealthCheckHTTPEndpoint is the url of the http health check endpoint.
	HealthCheckHTTPEndpoint string

	// Instances is the total number of app instances.
	Instances types.NullInt

	// Memory is the memory given to each instance, in megabytes.
	Memory types.NullByteSizeInMb

	// Name is the name given to the application.
	Name string

	// PackageState represents the staging state of the application bits.
	PackageState constant.ApplicationPackageState

	// PackageUpdatedAt is the last time the app bits were updated. In RFC3339.
	PackageUpdatedAt time.Time

	// SpaceGUID is the GUID of the app's space.
	SpaceGUID string

	// StackGUID is the GUID for the Stack the application is running on.
	StackGUID string

	// StagingFailedDescription is the verbose description of why the package
	// failed to stage.
	StagingFailedDescription string

	// StagingFailedReason is the reason why the package failed to stage.
	StagingFailedReason string

	// State is the desired state of the application.
	State constant.ApplicationState

	// EnableSSH specifies whether SSH is enabled for this app.
	EnableSSH types.NullBool

	// Ports on which application may listen.
	Ports []int
}

Application represents a Cloud Controller Application.

func (Application) MarshalJSON

func (application Application) MarshalJSON() ([]byte, error)

MarshalJSON converts an application into a Cloud Controller Application.

func (*Application) UnmarshalJSON

func (application *Application) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Application response.

type ApplicationInstance

type ApplicationInstance struct {
	// Details are arbitrary information about the instance.
	Details string

	// ID is the instance ID.
	ID int

	// Since is the Unix time stamp that represents the time the instance was
	// created.
	Since float64

	// State is the instance's state.
	State constant.ApplicationInstanceState
}

ApplicationInstance represents a Cloud Controller Application Instance.

func (*ApplicationInstance) UnmarshalJSON

func (instance *ApplicationInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller application instance response.

type ApplicationInstanceStatus

type ApplicationInstanceStatus struct {
	// CPU is the instance's CPU utilization percentage.
	CPU float64

	// Disk is the instance's disk usage in bytes.
	Disk int64

	// DiskQuota is the instance's allowed disk usage in bytes.
	DiskQuota int64

	// ID is the instance ID.
	ID int

	// IsolationSegment that the app is currently running on.
	IsolationSegment string

	// Memory is the instance's memory usage in bytes.
	Memory int64

	// MemoryQuota is the instance's allowed memory usage in bytes.
	MemoryQuota int64

	// State is the instance's state.
	State constant.ApplicationInstanceState

	// Uptime is the number of seconds the instance has been running.
	Uptime int64
}

ApplicationInstanceStatus represents a Cloud Controller Application Instance.

func (*ApplicationInstanceStatus) UnmarshalJSON

func (instance *ApplicationInstanceStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller application instance response.

type Buildpack

type Buildpack struct {
	Locked   types.NullBool
	Enabled  types.NullBool
	GUID     string
	Name     string
	Position types.NullInt
	Stack    string
	Filename string
}

Buildpack represents a Cloud Controller Buildpack.

func (Buildpack) MarshalJSON

func (buildpack Buildpack) MarshalJSON() ([]byte, error)

func (*Buildpack) UnmarshalJSON

func (buildpack *Buildpack) UnmarshalJSON(data []byte) error

type Client

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

Client is a client that can be used to talk to a Cloud Controller's V2 Endpoints.

func NewClient

func NewClient(config Config) *Client

NewClient returns a new Cloud Controller Client.

func (*Client) API

func (client *Client) API() string

API returns the Cloud Controller API URL for the targeted Cloud Controller.

func (*Client) APIVersion

func (client *Client) APIVersion() string

APIVersion returns Cloud Controller API Version for the targeted Cloud Controller.

func (*Client) AddEnvVarRunning

func (client *Client) AddEnvVarRunning(envVar EnvVarGroup) (Warnings, error)

AddEnvVarRunning add env var to current env var group running.

func (*Client) AddEnvVarStaging

func (client *Client) AddEnvVarStaging(envVar EnvVarGroup) (Warnings, error)

AddEnvVarStaging add env var to current env var group staging.

func (*Client) AuthorizationEndpoint

func (client *Client) AuthorizationEndpoint() string

AuthorizationEndpoint returns the authorization endpoint for the targeted Cloud Controller.

func (*Client) BindRunningSecurityGroup

func (client *Client) BindRunningSecurityGroup(guid string) (Warnings, error)

BindSecurityGroup bind the security group with the given GUID.

func (*Client) BindStagingSecurityGroup

func (client *Client) BindStagingSecurityGroup(guid string) (Warnings, error)

BindSecurityGroup bind the security group with the given GUID.

func (*Client) CheckRoute

func (client *Client) CheckRoute(route Route) (bool, Warnings, error)

CheckRoute returns true if the route exists in the CF instance.

func (*Client) CreateApplication

func (client *Client) CreateApplication(app Application) (Application, Warnings, error)

CreateApplication creates a cloud controller application in with the given settings. SpaceGUID and Name are the only required fields.

func (*Client) CreateBuildpack

func (client *Client) CreateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error)

CreateBuildpack creates a new buildpack.

func (*Client) CreateOrganization

func (client *Client) CreateOrganization(orgName string, quotaGUID string) (Organization, Warnings, error)

func (*Client) CreateOrganizationQuota

func (client *Client) CreateOrganizationQuota(quota Quota) (Quota, Warnings, error)

CreateQuota creates a cloud controller quota in with the given settings.

func (*Client) CreatePrivateDomain

func (client *Client) CreatePrivateDomain(domainName string, organizationGUID string) (Domain, Warnings, error)

CreateDomain creates a cloud controller domain in with the given settings.

func (*Client) CreateQuota

func (client *Client) CreateQuota(quotaType constant.QuotaType, quota Quota) (Quota, Warnings, error)

CreateQuota returns an Quota associated with the provided quota and for type either SpaceQuota or OrgQuota.

func (*Client) CreateRoute

func (client *Client) CreateRoute(route Route, generatePort bool) (Route, Warnings, error)

CreateRoute creates the route with the given properties; SpaceGUID and DomainGUID are required Route properties. Additional configuration rules: - generatePort = true to generate a random port on the cloud controller. - generatePort takes precedence over the provided port. Setting the port and generatePort only works with CC API 2.53.0 or higher and when TCP router groups are enabled.

func (*Client) CreateRouteMapping

func (client *Client) CreateRouteMapping(appGuid, routeGuid string, appPort *int) (RouteMapping, Warnings, error)

CreateRouteMapping creates a cloud controller route mapping in with the given settings.

func (*Client) CreateSecurityGroup

func (client *Client) CreateSecurityGroup(securityGroup SecurityGroup) (SecurityGroup, Warnings, error)

CreateSecurityGroup creates a cloud controller security group in with the given settings.

func (*Client) CreateServiceBinding

func (client *Client) CreateServiceBinding(appGUID string, serviceInstanceGUID string, bindingName string, acceptsIncomplete bool, parameters map[string]interface{}) (ServiceBinding, Warnings, error)

func (*Client) CreateServiceBindingRoute

func (client *Client) CreateServiceBindingRoute(serviceID, routeID string, params interface{}) (Warnings, error)

CreateServiceBindingRoute creates a cloud controller service binding route in with the given settings.

func (*Client) CreateServiceBroker

func (client *Client) CreateServiceBroker(brokerName, username, password, url, spaceGUID string) (ServiceBroker, Warnings, error)

CreateServiceBroker posts a service broker resource with the provided attributes to the api and returns the result.

func (*Client) CreateServiceInstance

func (client *Client) CreateServiceInstance(spaceGUID, servicePlanGUID, serviceInstance string, parameters map[string]interface{}, tags []string) (ServiceInstance, Warnings, error)

CreateServiceInstance posts a service instance resource with the provided attributes to the api and returns the result.

func (*Client) CreateServiceInstanceFromObject

func (client *Client) CreateServiceInstanceFromObject(serviceInstance ServiceInstance) (ServiceInstance, Warnings, error)

CreateServiceInstance posts a service instance resource with the provided attributes to the api and returns the result.

func (*Client) CreateServiceKey

func (client *Client) CreateServiceKey(serviceInstanceGUID string, keyName string, parameters map[string]interface{}) (ServiceKey, Warnings, error)

CreateServiceKey creates a new service key using the provided name and parameters for the requested service instance.

func (*Client) CreateServicePlanVisibility

func (client *Client) CreateServicePlanVisibility(planGUID string, orgGUID string) (ServicePlanVisibility, Warnings, error)

func (*Client) CreateSharedDomain

func (client *Client) CreateSharedDomain(domainName string, routerGroupdGUID string, isInternal bool) (Domain, Warnings, error)

func (*Client) CreateSpace

func (client *Client) CreateSpace(spaceName string, orgGUID string) (Space, Warnings, error)

CreateSpace creates a new space with the provided spaceName in the org with the provided orgGUID.

func (*Client) CreateSpaceFromObject

func (client *Client) CreateSpaceFromObject(space Space) (Space, Warnings, error)

CreateSpace creates a new space with the provided spaceName in the org with the provided orgGUID.

func (*Client) CreateSpaceQuotaDefinition

func (client *Client) CreateSpaceQuotaDefinition(quota Quota) (Quota, Warnings, error)

CreateQuota creates a cloud controller quota in with the given settings.

func (*Client) CreateUser

func (client *Client) CreateUser(uaaUserID string) (User, Warnings, error)

CreateUser creates a new Cloud Controller User from the provided UAA user ID.

func (*Client) CreateUserProvidedServiceInstance

func (client *Client) CreateUserProvidedServiceInstance(userProvidedServiceInstance UserProvidedServiceInstance) (UserProvidedServiceInstance, Warnings, error)

CreateUserProvidedServiceInstance creates a cloud controller user provided service instance in with the given settings.

func (*Client) DeleteApplication

func (client *Client) DeleteApplication(guid string) (Warnings, error)

DeleteApplication delete an application

func (*Client) DeleteBuildpack

func (client *Client) DeleteBuildpack(guid string) (Warnings, error)

DeleteBuildpack delete an buildpack

func (*Client) DeleteOrganization

func (client *Client) DeleteOrganization(guid string) (Job, Warnings, error)

DeleteOrganization deletes the Organization associated with the provided GUID. It will return the Cloud Controller job that is assigned to the Organization deletion.

func (Client) DeleteOrganizationAuditorByUsername

func (client Client) DeleteOrganizationAuditorByUsername(orgGUID string, username string) (Warnings, error)

DeleteOrganizationAuditorByUsername revoke the user with the given username a member of the org.

func (Client) DeleteOrganizationBillingManagerByUsername

func (client Client) DeleteOrganizationBillingManagerByUsername(orgGUID string, username string) (Warnings, error)

DeleteOrganizationBillingManagerByUsername revoke the user with the given username a member of the org.

func (*Client) DeleteOrganizationJob

func (client *Client) DeleteOrganizationJob(guid string) (Job, Warnings, error)

DeleteOrganizationJob deletes the Organization associated with the provided GUID. It will return the Cloud Controller job that is assigned to the Organization deletion.

func (Client) DeleteOrganizationManagerByUsername

func (client Client) DeleteOrganizationManagerByUsername(orgGUID string, username string) (Warnings, error)

DeleteOrganizationManagerByUsername revoke the user with the given username a member of the org.

func (*Client) DeleteOrganizationPrivateDomain

func (client *Client) DeleteOrganizationPrivateDomain(organizationGuid, privateDomainGuid string) (Warnings, error)

DeleteOrganizationPrivateDomain delete a organization private domain

func (*Client) DeleteOrganizationQuota

func (client *Client) DeleteOrganizationQuota(guid string) (Warnings, error)

DeleteQuota delete a quota

func (*Client) DeleteOrganizationUserByRole

func (client *Client) DeleteOrganizationUserByRole(role constant.UserRole, guid string, uaaID string) (Warnings, error)

DeleteOrganizationUserByRole remove the user or client with the given UAA ID a member of this role in the org . (Only available: OrgManager, BillingManager and OrgAuditor)

func (Client) DeleteOrganizationUserByUsername

func (client Client) DeleteOrganizationUserByUsername(orgGUID string, username string) (Warnings, error)

DeleteOrganizationUserByUsername revoke the user with the given username a member of the org.

func (*Client) DeletePrivateDomain

func (client *Client) DeletePrivateDomain(guid string) (Warnings, error)

DeletePrivateDomain delete a private domain

func (*Client) DeleteQuota

func (client *Client) DeleteQuota(quotaType constant.QuotaType, guid string) (Warnings, error)

DeleteQuota delete a quota and for type either SpaceQuota or OrgQuota

func (*Client) DeleteRoute

func (client *Client) DeleteRoute(routeGUID string) (Warnings, error)

DeleteRoute deletes the Route associated with the provided Route GUID.

func (*Client) DeleteRouteApplication

func (client *Client) DeleteRouteApplication(routeGUID string, appGUID string) (Warnings, error)

DeleteRouteApplication removes the link between the route and application.

func (*Client) DeleteRouteMapping

func (client *Client) DeleteRouteMapping(guid string) (Warnings, error)

DeleteRouteMapping delete a route mapping

func (*Client) DeleteSecurityGroup

func (client *Client) DeleteSecurityGroup(guid string) (Warnings, error)

DeleteSecurityGroup delete a security group

func (*Client) DeleteSecurityGroupSpace

func (client *Client) DeleteSecurityGroupSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)

DeleteSecurityGroupSpace disassociates a security group in the running phase for the lifecycle, specified by its GUID, from a space, which is also specified by its GUID.

func (*Client) DeleteSecurityGroupStagingSpace

func (client *Client) DeleteSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)

DeleteSecurityGroupStagingSpace disassociates a security group in the staging phase fo the lifecycle, specified by its GUID, from a space, which is also specified by its GUID.

func (*Client) DeleteService

func (client *Client) DeleteService(serviceGUID string, purge bool) (Warnings, error)

DeleteService deletes the service with the given GUID, and returns any errors and warnings.

func (*Client) DeleteServiceBinding

func (client *Client) DeleteServiceBinding(serviceBindingGUID string, acceptsIncomplete bool) (ServiceBinding, Warnings, error)

DeleteServiceBinding deletes the specified Service Binding. An updated service binding is returned only if acceptsIncomplete is true.

func (*Client) DeleteServiceBindingRoute

func (client *Client) DeleteServiceBindingRoute(serviceID, routeID string) (Warnings, error)

DeleteServiceBindingRoute delete a cloud controller service binding route in with the given settings.

func (*Client) DeleteServiceBroker

func (client *Client) DeleteServiceBroker(guid string) (Warnings, error)

DeleteServiceBroker delete a service broker

func (*Client) DeleteServiceInstance

func (client *Client) DeleteServiceInstance(guid string, recursive bool, purge bool) (async bool, warn Warnings, err error)

DeleteServiceInstance delete a service instance

func (*Client) DeleteServiceKey

func (client *Client) DeleteServiceKey(guid string) (Warnings, error)

DeleteServiceKey delete a service key.

func (*Client) DeleteServicePlan

func (client *Client) DeleteServicePlan(guid string) (Warnings, error)

DeleteServicePlan delete a service plan

func (*Client) DeleteServicePlanVisibility

func (client *Client) DeleteServicePlanVisibility(servicePlanVisibilityGUID string) (Warnings, error)

func (*Client) DeleteSharedDomain

func (client *Client) DeleteSharedDomain(guid string) (Warnings, error)

DeleteSharedDomain delete a shared domain

func (*Client) DeleteSpace

func (client *Client) DeleteSpace(guid string) (Job, Warnings, error)

DeleteSpace deletes the Space associated with the provided GUID. It will return the Cloud Controller job that is assigned to the Space deletion.

func (*Client) DeleteSpaceAuditorByUsername

func (client *Client) DeleteSpaceAuditorByUsername(spaceGUID string, username string) (Warnings, error)

DeleteSpaceAuditorByUsername revoke the given username the space manager role.

func (*Client) DeleteSpaceDeveloperByUsername

func (client *Client) DeleteSpaceDeveloperByUsername(spaceGUID string, username string) (Warnings, error)

DeleteSpaceDeveloperByUsername revoke the given username the space manager role.

func (*Client) DeleteSpaceJob

func (client *Client) DeleteSpaceJob(guid string) (Job, Warnings, error)

DeleteSpaceJob deletes the Space associated with the provided GUID. It will return the Cloud Controller job that is assigned to the Space deletion.

func (*Client) DeleteSpaceManagerByUsername

func (client *Client) DeleteSpaceManagerByUsername(spaceGUID string, username string) (Warnings, error)

DeleteSpaceManagerByUsername revoke the given username the space manager role.

func (*Client) DeleteSpaceQuota

func (client *Client) DeleteSpaceQuota(quotaGuid, spaceGuid string) (Warnings, error)

DeleteSpaceQuota delete a space quota

func (*Client) DeleteSpaceQuotaDefinition

func (client *Client) DeleteSpaceQuotaDefinition(guid string) (Warnings, error)

DeleteQuota delete a quota

func (*Client) DeleteSpaceUnmappedRoutes

func (client *Client) DeleteSpaceUnmappedRoutes(spaceGUID string) (Warnings, error)

DeleteSpaceUnmappedRoutes deletes Routes within a specified Space not mapped to an Application

func (*Client) DeleteSpaceUserByRole

func (client *Client) DeleteSpaceUserByRole(role constant.UserRole, guid string, uaaID string) (Warnings, error)

UpdateSpaceUserByRole makes the user or client with the given UAA ID a member of this role in the space . (Only available: SpaceManager, SpaceDeveloper and SpaceAuditor)

func (*Client) DeleteUserProvidedServiceInstance

func (client *Client) DeleteUserProvidedServiceInstance(guid string) (Warnings, error)

DeleteUserProvidedServiceInstance delete a user provided service instance

func (*Client) DopplerEndpoint

func (client *Client) DopplerEndpoint() string

DopplerEndpoint returns the Doppler endpoint for the targetd Cloud Controller.

func (*Client) GetApplication

func (client *Client) GetApplication(guid string) (Application, Warnings, error)

GetApplication returns back an Application.

func (*Client) GetApplicationApplicationInstanceStatuses

func (client *Client) GetApplicationApplicationInstanceStatuses(guid string) (map[int]ApplicationInstanceStatus, Warnings, error)

GetApplicationApplicationInstanceStatuses returns a list of ApplicationInstanceStatus for a given application. Depending on the state of an application, it might skip some application instance statuses.

func (*Client) GetApplicationApplicationInstances

func (client *Client) GetApplicationApplicationInstances(guid string) (map[int]ApplicationInstance, Warnings, error)

GetApplicationApplicationInstances returns a list of ApplicationInstance for a given application. Depending on the state of an application, it might skip some application instances.

func (*Client) GetApplicationRoutes

func (client *Client) GetApplicationRoutes(appGUID string, filters ...Filter) ([]Route, Warnings, error)

GetApplicationRoutes returns a list of Routes associated with the provided Application GUID, and filtered by the provided filters.

func (*Client) GetApplications

func (client *Client) GetApplications(filters ...Filter) ([]Application, Warnings, error)

GetApplications returns back a list of Applications based off of the provided filters.

func (*Client) GetBuildpack

func (client *Client) GetBuildpack(guid string) (Buildpack, Warnings, error)

GetBuildpack returns back a buildpack.

func (*Client) GetBuildpacks

func (client *Client) GetBuildpacks(filters ...Filter) ([]Buildpack, Warnings, error)

GetBuildpacks searches for a buildpack with the given name and returns it if it exists.

func (Client) GetConfigFeatureFlags

func (client Client) GetConfigFeatureFlags() ([]FeatureFlag, Warnings, error)

GetConfigFeatureFlags retrieves a list of FeatureFlag from the Cloud Controller.

func (*Client) GetEnvVarGroupRunning

func (client *Client) GetEnvVarGroupRunning() (EnvVarGroup, Warnings, error)

GetEnvVarGroup returns back a env var group running.

func (*Client) GetEnvVarGroupStaging

func (client *Client) GetEnvVarGroupStaging() (EnvVarGroup, Warnings, error)

GetEnvVarGroup returns back a env var group staging.

func (*Client) GetEvents

func (client *Client) GetEvents(filters ...Filter) ([]Event, Warnings, error)

GetEvents returns back a list of Events based off of the provided queries.

func (*Client) GetJob

func (client *Client) GetJob(jobGUID string) (Job, Warnings, error)

GetJob returns a job for the provided GUID.

func (*Client) GetOrganization

func (client *Client) GetOrganization(guid string) (Organization, Warnings, error)

GetOrganization returns an Organization associated with the provided GUID.

func (*Client) GetOrganizationPrivateDomains

func (client *Client) GetOrganizationPrivateDomains(orgGUID string, filters ...Filter) ([]Domain, Warnings, error)

GetOrganizationPrivateDomains returns the private domains associated with an organization.

func (*Client) GetOrganizationQuota

func (client *Client) GetOrganizationQuota(guid string) (Quota, Warnings, error)

GetOrganizationQuota returns an Organization Quota associated with the provided GUID.

func (*Client) GetOrganizationQuotas

func (client *Client) GetOrganizationQuotas(filters ...Filter) ([]Quota, Warnings, error)

GetOrganizationQuotas returns an Organization Quota list associated with the provided filters.

func (*Client) GetOrganizationUsers

func (client *Client) GetOrganizationUsers(guid string) ([]User, Warnings, error)

GetOrganizationUsers find all users for an org .

func (*Client) GetOrganizationUsersByRole

func (client *Client) GetOrganizationUsersByRole(role constant.UserRole, guid string) ([]User, Warnings, error)

GetOrganizationUsersByRole find all users for an org by role . (Only available roles: OrgManager, BillingManager and OrgAuditor)

func (*Client) GetOrganizations

func (client *Client) GetOrganizations(filters ...Filter) ([]Organization, Warnings, error)

GetOrganizations returns back a list of Organizations based off of the provided filters.

func (*Client) GetPrivateDomain

func (client *Client) GetPrivateDomain(domainGUID string) (Domain, Warnings, error)

GetPrivateDomain returns the Private Domain associated with the provided Domain GUID.

func (*Client) GetPrivateDomains

func (client *Client) GetPrivateDomains(filters ...Filter) ([]Domain, Warnings, error)

GetPrivateDomains returns the private domains this client has access to.

func (*Client) GetQuota

func (client *Client) GetQuota(quotaType constant.QuotaType, guid string) (Quota, Warnings, error)

GetQuota returns an Quota associated with the provided GUID and for type either SpaceQuota or OrgQuota.

func (*Client) GetQuotas

func (client *Client) GetQuotas(quotaType constant.QuotaType, filters ...Filter) ([]Quota, Warnings, error)

GetQuotas returns an Quota list associated with the provided filters and for type either SpaceQuota or OrgQuota.

func (*Client) GetRoute

func (client *Client) GetRoute(guid string) (Route, Warnings, error)

GetRoute returns a route with the provided guid.

func (*Client) GetRouteApplications

func (client *Client) GetRouteApplications(routeGUID string, filters ...Filter) ([]Application, Warnings, error)

GetRouteApplications returns a list of Applications based off a route GUID and the provided filters.

func (*Client) GetRouteMapping

func (client *Client) GetRouteMapping(guid string) (RouteMapping, Warnings, error)

GetRouteMapping returns a route mapping with the provided guid.

func (*Client) GetRouteMappings

func (client *Client) GetRouteMappings(filters ...Filter) ([]RouteMapping, Warnings, error)

GetRouteMappings returns a list of RouteMappings based off of the provided queries.

func (*Client) GetRoutes

func (client *Client) GetRoutes(filters ...Filter) ([]Route, Warnings, error)

GetRoutes returns a list of Routes based off of the provided filters.

func (*Client) GetRunningSecurityGroups

func (client *Client) GetRunningSecurityGroups(filters ...Filter) ([]SecurityGroup, Warnings, error)

GetRunningSecurityGroups returns back a list of running security groups based off of the provided filters.

func (*Client) GetSecurityGroup

func (client *Client) GetSecurityGroup(guid string) (SecurityGroup, Warnings, error)

GetSecurityGroup returns back a security group.

func (*Client) GetSecurityGroupSpaces

func (client *Client) GetSecurityGroupSpaces(securityGroupGUID string) ([]Space, Warnings, error)

GetSecurityGroupSpaces returns a list of Spaces based on the provided SecurityGroup GUID.

func (*Client) GetSecurityGroupStagingSpaces

func (client *Client) GetSecurityGroupStagingSpaces(securityGroupGUID string) ([]Space, Warnings, error)

GetSecurityGroupStagingSpaces returns a list of Spaces based on the provided SecurityGroup GUID.

func (*Client) GetSecurityGroups

func (client *Client) GetSecurityGroups(filters ...Filter) ([]SecurityGroup, Warnings, error)

GetSecurityGroups returns a list of Security Groups based off the provided filters.

func (*Client) GetService

func (client *Client) GetService(serviceGUID string) (Service, Warnings, error)

GetService returns the service with the given GUID.

func (*Client) GetServiceBinding

func (client *Client) GetServiceBinding(guid string) (ServiceBinding, Warnings, error)

GetServiceBinding returns back a service binding with the provided GUID.

func (*Client) GetServiceBindingRoutes

func (client *Client) GetServiceBindingRoutes(serviceID string) ([]Route, Warnings, error)

GetServiceBindingRoute returns back a service binding route.

func (*Client) GetServiceBindings

func (client *Client) GetServiceBindings(filters ...Filter) ([]ServiceBinding, Warnings, error)

GetServiceBindings returns back a list of Service Bindings based off of the provided filters.

func (*Client) GetServiceBroker

func (client *Client) GetServiceBroker(guid string) (ServiceBroker, Warnings, error)

GetServiceBroker returns back a service broker.

func (*Client) GetServiceBrokers

func (client *Client) GetServiceBrokers(filters ...Filter) ([]ServiceBroker, Warnings, error)

GetServiceBrokers returns back a list of Service Brokers given the provided filters.

func (*Client) GetServiceInstance

func (client *Client) GetServiceInstance(serviceInstanceGUID string) (ServiceInstance, Warnings, error)

GetServiceInstance returns the service instance with the given GUID. This service can be either a managed or user provided.

func (*Client) GetServiceInstanceServiceBindings

func (client *Client) GetServiceInstanceServiceBindings(serviceInstanceGUID string) ([]ServiceBinding, Warnings, error)

GetServiceInstanceServiceBindings returns back a list of Service Bindings for the provided service instance GUID.

func (*Client) GetServiceInstanceSharedFrom

func (client *Client) GetServiceInstanceSharedFrom(serviceInstanceGUID string) (ServiceInstanceSharedFrom, Warnings, error)

GetServiceInstanceSharedFrom returns back a ServiceInstanceSharedFrom object.

func (*Client) GetServiceInstanceSharedTos

func (client *Client) GetServiceInstanceSharedTos(serviceInstanceGUID string) ([]ServiceInstanceSharedTo, Warnings, error)

GetServiceInstanceSharedTos returns a list of ServiceInstanceSharedTo objects.

func (*Client) GetServiceInstances

func (client *Client) GetServiceInstances(filters ...Filter) ([]ServiceInstance, Warnings, error)

GetServiceInstances returns back a list of *managed* Service Instances based off of the provided filters.

func (*Client) GetServiceKey

func (client *Client) GetServiceKey(guid string) (ServiceKey, Warnings, error)

GetServiceKey returns back a service key.

func (*Client) GetServiceKeys

func (client *Client) GetServiceKeys(filters ...Filter) ([]ServiceKey, Warnings, error)

GetServiceKeys returns a list of Service Key based off of the provided filters.

func (*Client) GetServicePlan

func (client *Client) GetServicePlan(servicePlanGUID string) (ServicePlan, Warnings, error)

GetServicePlan returns the service plan with the given GUID.

func (*Client) GetServicePlanVisibilities

func (client *Client) GetServicePlanVisibilities(filters ...Filter) ([]ServicePlanVisibility, Warnings, error)

GetServicePlanVisibilities returns back a list of Service Plan Visibilities given the provided filters.

func (*Client) GetServicePlanVisibility

func (client *Client) GetServicePlanVisibility(guid string) (ServicePlanVisibility, Warnings, error)

GetServicePlanVisibility returns back a service plan visibility.

func (*Client) GetServicePlans

func (client *Client) GetServicePlans(filters ...Filter) ([]ServicePlan, Warnings, error)

func (*Client) GetServices

func (client *Client) GetServices(filters ...Filter) ([]Service, Warnings, error)

GetServices returns a list of Services given the provided filters.

func (*Client) GetSharedDomain

func (client *Client) GetSharedDomain(domainGUID string) (Domain, Warnings, error)

GetSharedDomain returns the Shared Domain associated with the provided Domain GUID.

func (*Client) GetSharedDomains

func (client *Client) GetSharedDomains(filters ...Filter) ([]Domain, Warnings, error)

GetSharedDomains returns the global shared domains.

func (*Client) GetSpace

func (client *Client) GetSpace(guid string) (Space, Warnings, error)

GetSpace returns back a space.

func (*Client) GetSpaceQuotaDefinition

func (client *Client) GetSpaceQuotaDefinition(guid string) (Quota, Warnings, error)

GetSpaceQuotaDefinition returns a Space Quota.

func (*Client) GetSpaceQuotaDefinitions

func (client *Client) GetSpaceQuotaDefinitions(filters ...Filter) ([]Quota, Warnings, error)

GetQuotas returns back a list of quotas based off of the provided filters.

func (*Client) GetSpaceQuotas

func (client *Client) GetSpaceQuotas(spaceGUID string) ([]Quota, Warnings, error)

GetSpaceQuotas returns all the space quotas for the org

func (*Client) GetSpaceRoutes

func (client *Client) GetSpaceRoutes(spaceGUID string, filters ...Filter) ([]Route, Warnings, error)

GetSpaceRoutes returns a list of Routes associated with the provided Space GUID, and filtered by the provided filters.

func (*Client) GetSpaceSecurityGroups

func (client *Client) GetSpaceSecurityGroups(spaceGUID string, filters ...Filter) ([]SecurityGroup, Warnings, error)

GetSpaceSecurityGroups returns the running Security Groups associated with the provided Space GUID.

func (*Client) GetSpaceServiceInstances

func (client *Client) GetSpaceServiceInstances(spaceGUID string, includeUserProvidedServices bool, filters ...Filter) ([]ServiceInstance, Warnings, error)

GetSpaceServiceInstances returns back a list of Service Instances based off of the space and filters provided. User provided services will be included if includeUserProvidedServices is set to true.

func (*Client) GetSpaceServices

func (client *Client) GetSpaceServices(spaceGUID string, filters ...Filter) ([]Service, Warnings, error)

func (*Client) GetSpaceStagingSecurityGroups

func (client *Client) GetSpaceStagingSecurityGroups(spaceGUID string, filters ...Filter) ([]SecurityGroup, Warnings, error)

GetSpaceStagingSecurityGroups returns the staging Security Groups associated with the provided Space GUID.

func (*Client) GetSpaceSummary

func (client *Client) GetSpaceSummary(spaceGUID string) (SpaceSummary, Warnings, error)

GetSpaceSummary returns the summary of the space with the given GUID.

func (*Client) GetSpaceUsersByRole

func (client *Client) GetSpaceUsersByRole(role constant.UserRole, guid string) ([]User, Warnings, error)

GetSpaceUsersByRole find all users for a space by role . (Only available: SpaceManager, SpaceDeveloper and SpaceAuditor)

func (*Client) GetSpaces

func (client *Client) GetSpaces(filters ...Filter) ([]Space, Warnings, error)

GetSpaces returns a list of Spaces based off of the provided filters.

func (*Client) GetStack

func (client *Client) GetStack(guid string) (Stack, Warnings, error)

GetStack returns the requested stack.

func (*Client) GetStacks

func (client *Client) GetStacks(filters ...Filter) ([]Stack, Warnings, error)

GetStacks returns a list of Stacks based off of the provided filters.

func (*Client) GetStagingSecurityGroups

func (client *Client) GetStagingSecurityGroups(filters ...Filter) ([]SecurityGroup, Warnings, error)

GetSecurityGroups returns back a list of staging security groups based off of the provided filters.

func (*Client) GetUserOrganizations

func (client *Client) GetUserOrganizations(uaaUserID string, filters ...Filter) ([]Organization, Warnings, error)

GetUserOrganizations get all organizations available to user

func (*Client) GetUserProvServiceInstances

func (client *Client) GetUserProvServiceInstances(filters ...Filter) ([]UserProvidedServiceInstance, Warnings, error)

GetUserProvidedServiceInstances returns back a list of user provided service instances based off of the provided filters.

func (*Client) GetUserProvidedServiceInstance

func (client *Client) GetUserProvidedServiceInstance(guid string) (UserProvidedServiceInstance, Warnings, error)

GetUserProvidedServiceInstance returns back a user provided service instance.

func (*Client) GetUserProvidedServiceInstanceServiceBindings

func (client *Client) GetUserProvidedServiceInstanceServiceBindings(userProvidedServiceInstanceGUID string) ([]ServiceBinding, Warnings, error)

GetUserProvidedServiceInstanceServiceBindings returns back a list of Service Bindings for the provided user provided service instance GUID.

func (*Client) GetUserProvidedServiceInstances

func (client *Client) GetUserProvidedServiceInstances(filters ...Filter) ([]ServiceInstance, Warnings, error)

GetUserProvidedServiceInstances returns back a list of *user provided* Service Instances based off the provided queries.

func (*Client) GetUserSpaces

func (client *Client) GetUserSpaces(uaaUserID string, filters ...Filter) ([]Space, Warnings, error)

GetUserSpaces get all spaces available to user

func (*Client) GetUsers

func (client *Client) GetUsers(filters ...Filter) ([]User, Warnings, error)

GetUsers returns back a list of User based off of the provided filters.

func (*Client) Info

func (client *Client) Info() (APIInformation, Warnings, error)

Info returns back endpoint and API information from /v2/info.

func (*Client) MinCLIVersion

func (client *Client) MinCLIVersion() string

MinCLIVersion returns the minimum CLI version required for the targeted Cloud Controller

func (*Client) PollJob

func (client *Client) PollJob(job Job) (Warnings, error)

PollJob will keep polling the given job until the job has terminated, an error is encountered, or config.OverallPollingTimeout is reached. In the last case, a JobTimeoutError is returned.

func (*Client) RestageApplication

func (client *Client) RestageApplication(app Application) (Application, Warnings, error)

RestageApplication restages the application with the given GUID.

func (*Client) RoutingEndpoint

func (client *Client) RoutingEndpoint() string

RoutingEndpoint returns the Routing endpoint for the targeted Cloud Controller.

func (Client) SetConfigFeatureFlags

func (client Client) SetConfigFeatureFlags(ff FeatureFlag) (Warnings, error)

GetConfigFeatureFlags retrieves a list of FeatureFlag from the Cloud Controller.

func (*Client) SetEnvVarGroupRunning

func (client *Client) SetEnvVarGroupRunning(envVarGroup EnvVarGroup) (Warnings, error)

SetEnvVarGroupRunning set a cloud controller env var group running in with the given settings.

func (*Client) SetEnvVarGroupStaging

func (client *Client) SetEnvVarGroupStaging(envVarGroup EnvVarGroup) (Warnings, error)

SetEnvVarGroupStaging set a cloud controller env var group staging in with the given settings.

func (*Client) SetOrganizationPrivateDomain

func (client *Client) SetOrganizationPrivateDomain(domainGUID string, organizationGUID string) (Warnings, error)

CreateDomain creates a cloud controller domain in with the given settings.

func (*Client) SetSpaceQuota

func (client *Client) SetSpaceQuota(spaceGUID string, quotaGUID string) (Warnings, error)

SetSpaceQuota should set the quota for the space and returns the warnings

func (*Client) TargetCF

func (client *Client) TargetCF(settings TargetSettings) (Warnings, error)

TargetCF sets the client to use the Cloud Controller specified in the configuration. Any other configuration is also applied to the client.

func (*Client) TokenEndpoint

func (client *Client) TokenEndpoint() string

TokenEndpoint returns the Token endpoint for the targeted Cloud Controller.

func (*Client) UnbindRunningSecurityGroup

func (client *Client) UnbindRunningSecurityGroup(guid string) (Warnings, error)

UnbindSecurityGroup delete a security group

func (*Client) UnbindStagingSecurityGroup

func (client *Client) UnbindStagingSecurityGroup(guid string) (Warnings, error)

UnbindSecurityGroup delete a security group

func (*Client) UpdateApplication

func (client *Client) UpdateApplication(app Application) (Application, Warnings, error)

UpdateApplication updates the application with the given GUID. Note: Sending DockerImage and StackGUID at the same time will result in an API error.

func (*Client) UpdateBuildpack

func (client *Client) UpdateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error)

UpdateBuildpack updates the buildpack with the provided GUID and returns the updated buildpack. Note: Stack cannot be updated without uploading a new buildpack.

func (*Client) UpdateOrganization

func (client *Client) UpdateOrganization(orgGuid, orgName, quotaGUID string) (Organization, Warnings, error)

UpdateOrganization updates the organization with the given GUID.

func (*Client) UpdateOrganizationAuditorByUsername

func (client *Client) UpdateOrganizationAuditorByUsername(guid string, username string) (Warnings, error)

UpdateOrganizationAuditorByUsername assigns the org manager role to the user with the provided name.

func (*Client) UpdateOrganizationBillingManagerByUsername

func (client *Client) UpdateOrganizationBillingManagerByUsername(guid string, username string) (Warnings, error)

UpdateOrganizationBillingManagerByUsername assigns the org manager role to the user with the provided name.

func (*Client) UpdateOrganizationManager

func (client *Client) UpdateOrganizationManager(guid string, uaaID string) (Warnings, error)

UpdateOrganizationManager assigns the org manager role to the UAA user or client with the provided ID.

func (*Client) UpdateOrganizationManagerByUsername

func (client *Client) UpdateOrganizationManagerByUsername(guid string, username string) (Warnings, error)

UpdateOrganizationManagerByUsername assigns the org manager role to the user with the provided name.

func (*Client) UpdateOrganizationQuota

func (client *Client) UpdateOrganizationQuota(quota Quota) (Quota, Warnings, error)

UpdateQuota updates the quota with the given GUID.

func (*Client) UpdateOrganizationUser

func (client *Client) UpdateOrganizationUser(guid string, uaaID string) (Warnings, error)

UpdateOrganizationUser makes the user or client with the given UAA ID a member of the org.

func (*Client) UpdateOrganizationUserByRole

func (client *Client) UpdateOrganizationUserByRole(role constant.UserRole, guid string, uaaID string) (Warnings, error)

UpdateOrganizationUserByRole makes the user or client with the given UAA ID a member of this role in the org . (Only available: OrgManager, BillingManager and OrgAuditor)

func (Client) UpdateOrganizationUserByUsername

func (client Client) UpdateOrganizationUserByUsername(orgGUID string, username string) (Warnings, error)

UpdateOrganizationUserByUsername makes the user with the given username a member of the org.

func (*Client) UpdateQuota

func (client *Client) UpdateQuota(quotaType constant.QuotaType, quota Quota) (Quota, Warnings, error)

UpdateQuota updates the quota with the given GUID and for type either SpaceQuota or OrgQuota.

func (*Client) UpdateResourceMatch

func (client *Client) UpdateResourceMatch(resourcesToMatch []Resource) ([]Resource, Warnings, error)

UpdateResourceMatch returns the resources that exist on the cloud foundry instance from the set of resources given.

func (*Client) UpdateRoute

func (client *Client) UpdateRoute(route Route) (Route, Warnings, error)

UpdateRoute updates the route with the given GUID.

func (*Client) UpdateRouteApplication

func (client *Client) UpdateRouteApplication(routeGUID string, appGUID string) (Route, Warnings, error)

UpdateRouteApplication creates a link between the route and application.

func (*Client) UpdateSecurityGroup

func (client *Client) UpdateSecurityGroup(securityGroup SecurityGroup) (SecurityGroup, Warnings, error)

UpdateSecurityGroup updates the security group with the given GUID.

func (*Client) UpdateSecurityGroupSpace

func (client *Client) UpdateSecurityGroupSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)

UpdateSecurityGroupSpace associates a security group in the running phase for the lifecycle, specified by its GUID, from a space, which is also specified by its GUID.

func (*Client) UpdateSecurityGroupStagingSpace

func (client *Client) UpdateSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (Warnings, error)

UpdateSecurityGroupStagingSpace associates a security group in the staging phase for the lifecycle, specified by its GUID, from a space, which is also specified by its GUID.

func (*Client) UpdateServiceBroker

func (client *Client) UpdateServiceBroker(serviceBroker ServiceBroker) (ServiceBroker, Warnings, error)

UpdateServiceBroker updates the service broker with the given GUID.

func (*Client) UpdateServiceInstance

func (client *Client) UpdateServiceInstance(serviceInstance ServiceInstance) (ServiceInstance, Warnings, error)

UpdateServiceInstance updates the service instance with the given GUID.

func (*Client) UpdateServicePlan

func (client *Client) UpdateServicePlan(guid string, public bool) (Warnings, error)

func (*Client) UpdateServicePlanVisibility

func (client *Client) UpdateServicePlanVisibility(planGUID string, orgGUID string) (ServicePlanVisibility, Warnings, error)

UpdateServicePlanVisibility updates the service plan visibility with the given GUID.

func (*Client) UpdateSpace

func (client *Client) UpdateSpace(space Space) (Space, Warnings, error)

UpdateSpace updates the space with the given GUID.

func (*Client) UpdateSpaceAuditorByUsername

func (client *Client) UpdateSpaceAuditorByUsername(spaceGUID string, username string) (Warnings, error)

UpdateSpaceAuditorByUsername grants the given username the space developer role.

func (*Client) UpdateSpaceDeveloper

func (client *Client) UpdateSpaceDeveloper(spaceGUID string, uaaID string) (Warnings, error)

UpdateSpaceDeveloper grants the space developer role to the user or client associated with the given UAA ID.

func (*Client) UpdateSpaceDeveloperByUsername

func (client *Client) UpdateSpaceDeveloperByUsername(spaceGUID string, username string) (Warnings, error)

UpdateSpaceDeveloperByUsername grants the given username the space developer role.

func (*Client) UpdateSpaceManager

func (client *Client) UpdateSpaceManager(spaceGUID string, uaaID string) (Warnings, error)

UpdateSpaceManager grants the space manager role to the user or client associated with the given UAA ID.

func (*Client) UpdateSpaceManagerByUsername

func (client *Client) UpdateSpaceManagerByUsername(spaceGUID string, username string) (Warnings, error)

UpdateSpaceManagerByUsername grants the given username the space manager role.

func (*Client) UpdateSpaceQuotaDefinition

func (client *Client) UpdateSpaceQuotaDefinition(quota Quota) (Quota, Warnings, error)

UpdateQuota updates the quota with the given GUID.

func (*Client) UpdateSpaceUserByRole

func (client *Client) UpdateSpaceUserByRole(role constant.UserRole, guid string, uaaID string) (Warnings, error)

UpdateSpaceUserByRole makes the user or client with the given UAA ID a member of this role in the space . (Only available: SpaceManager, SpaceDeveloper and SpaceAuditor)

func (*Client) UpdateUserProvidedServiceInstance

func (client *Client) UpdateUserProvidedServiceInstance(userProvidedServiceInstance UserProvidedServiceInstance) (UserProvidedServiceInstance, Warnings, error)

UpdateUserProvidedServiceInstance updates the user provided service instance with the given GUID.

func (*Client) UploadApplicationPackage

func (client *Client) UploadApplicationPackage(appGUID string, existingResources []Resource, newResources Reader, newResourcesLength int64) (Job, Warnings, error)

UploadApplicationPackage uploads the newResources and a list of existing resources to the cloud controller. A job that combines the requested/newly uploaded bits is returned. The function will act differently given the following Readers:

io.ReadSeeker: Will function properly on retry.
io.Reader: Will return a ccerror.PipeSeekError on retry.
nil: Will not add the "application" section to the request.
newResourcesLength is ignored in this case.

func (*Client) UploadBuildpack

func (client *Client) UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (Warnings, error)

UploadBuildpack uploads the contents of a buildpack zip to the server.

func (*Client) UploadDroplet

func (client *Client) UploadDroplet(appGUID string, droplet io.Reader, dropletLength int64) (Job, Warnings, error)

UploadDroplet defines and uploads a previously staged droplet that an application will run, using a multipart PUT request. The uploaded file should be a gzipped tar file.

func (*Client) WrapConnection

func (client *Client) WrapConnection(wrapper ConnectionWrapper)

WrapConnection wraps the current Client connection in the wrapper.

type Config

type Config struct {
	// AppName is the name of the application/process using the client.
	AppName string

	// AppVersion is the version of the application/process using the client.
	AppVersion string

	// JobPollingTimeout is the maximum amount of time a job polls for.
	JobPollingTimeout time.Duration

	// JobPollingInterval is the wait time between job polls.
	JobPollingInterval time.Duration

	// Wrappers that apply to the client connection.
	Wrappers []ConnectionWrapper
}

Config allows the Client to be configured

type ConnectionWrapper

type ConnectionWrapper interface {
	cloudcontroller.Connection
	Wrap(innerconnection cloudcontroller.Connection) cloudcontroller.Connection
}

ConnectionWrapper can wrap a given connection allowing the wrapper to modify all requests going in and out of the given connection.

type DockerCredentials

type DockerCredentials struct {
	// Username is the username for a user that has access to a given docker
	// image.
	Username string `json:"username,omitempty"`

	// Password is the password for the user.
	Password string `json:"password,omitempty"`
}

DockerCredentials are the authentication credentials to pull a docker image from it's repository.

type Domain

type Domain struct {
	// GUID is the unique domain identifier.
	GUID string

	// Internal indicates whether the domain is an internal domain.
	Internal bool

	// Name is the name given to the domain.
	Name string

	// RouterGroupGUID is the unique identier of the router group this domain is
	// assigned to.
	RouterGroupGUID string

	// RouterGroupType is the type of router group this domain is assigned to. It
	// can be of type `tcp` or `http`.
	RouterGroupType constant.RouterGroupType

	// DomainType is the access type of the domain. It can be either a domain
	// private to a single org or it can be a domain shared to all orgs.
	Type constant.DomainType

	// Organization owning the domain
	OwningOrganizationGUID string
}

Domain represents a Cloud Controller Domain.

func (*Domain) UnmarshalJSON

func (domain *Domain) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Domain response.

type EnvVarGroup

type EnvVarGroup map[string]string

EnvVarGroup represents a Cloud Controller env var group.

type Event

type Event struct {
	// GUID is the unique event identifier.
	GUID string

	// Type is the type of event.
	Type constant.EventType

	// ActorGUID is the GUID of the actor initiating an event.
	ActorGUID string

	// ActorType is the type of actor initiating an event.
	ActorType string

	// ActorName is the name of the actor initiating an event.
	ActorName string

	// ActeeGUID is the GUID of the cc object affected by an event.
	ActeeGUID string

	// ActeeType is the type of the cc object affected by an event.
	ActeeType string

	// ActeeName is the name of the cc object affected by an event.
	ActeeName string

	// Timestamp is the event creation time.
	Timestamp time.Time

	// Metadata contains additional information about the event.
	Metadata map[string]interface{}
}

Event represents a Cloud Controller Event

func (*Event) UnmarshalJSON

func (event *Event) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Event response.

type FeatureFlag

type FeatureFlag struct {
	// Name is a string representation of the Cloud Controller
	// feature flag's name.
	Name string `json:"name"`

	// Enabled is the status of the Cloud Controller feature
	// flag.
	Enabled bool `json:"enabled"`
}

FeatureFlag represents a Cloud Controller feature flag.

type Filter

type Filter struct {
	// Type is the component that determines what the query is filtered by.
	Type constant.FilterType

	// Operator is the component that determines how the the query will be filtered.
	Operator constant.FilterOperator

	// Values is the component that determines what values are filtered.
	Values []string
}

Filter is a type of filter that can be passed to specific request to narrow down the return set.

func FilterByName

func FilterByName(value ...string) Filter

func FilterByOrg

func FilterByOrg(value ...string) Filter

func FilterBySpace

func FilterBySpace(value ...string) Filter

func FilterEqual

func FilterEqual(filterType constant.FilterType, value ...string) Filter

type Job

type Job struct {

	// Error is the error a job returns if it failed. It is otherwise empty.
	Error string

	// ErrorDetails is a detailed description of a job failure returned by the
	// Cloud Controller.
	ErrorDetails struct {
		Description string
	}

	// GUID is the unique job identifier.
	GUID string

	// Status is the current state of the job.
	Status constant.JobStatus
}

Job represents a Cloud Controller Job.

func (Job) Failed

func (job Job) Failed() bool

Failed returns true when the job has completed with an error/failure.

func (Job) Finished

func (job Job) Finished() bool

Finished returns true when the job has completed successfully.

func (*Job) UnmarshalJSON

func (job *Job) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Job response.

type LastOperation

type LastOperation struct {
	// Type is the type of operation that was last performed or currently being
	// performed on the service instance.
	Type string `json:"type"`

	// State is the status of the last operation or current operation being
	// performed on the service instance.
	State constant.LastOperationState `json:"state"`

	// Description is the service broker-provided description of the operation.
	Description string `json:"description"`

	// UpdatedAt is the timestamp that the Cloud Controller last checked the
	// service instance state from the broker.
	UpdatedAt string `json:"updated_at"`

	// CreatedAt is the timestamp that the Cloud Controller created the service
	// instance from the broker.
	CreatedAt string `json:"created_at"`
}

LastOperation is the status of the last operation requested on a service instance.

type Organization

type Organization struct {
	// GUID is the unique Organization identifier.
	GUID string

	// Name is the organization's name.
	Name string

	// QuotaDefinitionGUID is unique identifier of the quota assigned to this
	// organization.
	QuotaDefinitionGUID string

	// DefaultIsolationSegmentGUID is the unique identifier of the isolation
	// segment this organization is tagged with.
	DefaultIsolationSegmentGUID string
}

Organization represents a Cloud Controller Organization.

func (*Organization) UnmarshalJSON

func (org *Organization) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Organization response.

type PaginatedResources

type PaginatedResources struct {
	NextURL        string          `json:"next_url"`
	ResourcesBytes json.RawMessage `json:"resources"`
	// contains filtered or unexported fields
}

PaginatedResources represents a page of resources returned by the Cloud Controller.

func NewPaginatedResources

func NewPaginatedResources(exampleResource interface{}) *PaginatedResources

NewPaginatedResources returns a new PaginatedResources struct with the given resource type.

func (PaginatedResources) Resources

func (pr PaginatedResources) Resources() ([]interface{}, error)

Resources unmarshals JSON representing a page of resources and returns a slice of the given resource type.

type Params

type Params map[string]string

Params represents URI parameters for a request.

type Quota

type Quota struct {
	// GUID is the unique OrganizationQuota identifier.
	GUID string

	// Name is the name of the OrganizationQuota.
	Name string

	//  If an organization can have services that are not free
	NonBasicServicesAllowed bool

	// How many services an organization can have. (-1 represents an unlimited amount)
	TotalServices int

	// How many service keys an organization can have. (-1 represents an unlimited amount)
	TotalServiceKeys types.NullInt

	// How many routes an organization can have. (-1 represents an unlimited amount)
	TotalRoutes int

	// How many routes an organization can have that use a reserved port.
	// These routes count toward total_routes. (-1 represents an unlimited amount)
	TotalReservedRoutePorts types.NullInt

	// How many private domains an organization can have. (-1 represents an unlimited amount)
	TotalPrivateDomains types.NullInt

	// How much memory in megabyte an organization can have.
	MemoryLimit types.NullByteSizeInMb

	// The maximum amount of memory in megabyte an application instance can have. (-1 represents an unlimited amount)
	InstanceMemoryLimit types.NullByteSizeInMb

	// How many app instances an organization can create. (-1 represents an unlimited amount)
	AppInstanceLimit types.NullInt

	// The number of tasks that can be run per app. (-1 represents an unlimited amount)
	AppTaskLimit types.NullInt

	// The owning organization of the space quota
	OrganizationGUID string
}

Quota is the generic definition of a quota.

func (Quota) MarshalJSON

func (q Quota) MarshalJSON() ([]byte, error)

func (*Quota) UnmarshalJSON

func (q *Quota) UnmarshalJSON(data []byte) error

type Reader

type Reader interface {
	io.Reader
}

Reader is an io.Reader.

type Resource

type Resource struct {

	// Filename is the name of the resource.
	Filename string `json:"fn"`

	// Mode is the operating system file mode (aka file permissions) of the
	// resource.
	Mode os.FileMode `json:"mode"`

	// SHA1 represents the SHA-1 hash of the resource.
	SHA1 string `json:"sha1"`

	// Size represents the file size of the resource.
	Size int64 `json:"size"`
}

Resource represents a Cloud Controller Resource.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON converts a resource into a Cloud Controller Resource.

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Resource response.

type Route

type Route struct {
	// GUID is the unique Route identifier.
	GUID string `json:"-"`

	// Host is the hostname of the route.
	Host string `json:"host"`

	// Path is the path of the route.
	Path string `json:"path"`

	// Port is the port number of the route.
	Port types.NullInt `json:"port,omitempty"`

	// DomainGUID is the unique Domain identifier.
	DomainGUID string `json:"domain_guid"`

	// SpaceGUID is the unique Space identifier.
	SpaceGUID string `json:"space_guid"`
}

Route represents a Cloud Controller Route.

func (*Route) UnmarshalJSON

func (route *Route) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Route response.

type RouteMapping

type RouteMapping struct {
	// GUID is the unique route mapping identifier.
	GUID string

	// AppGUID is the unique application identifier.
	AppGUID string

	// RouteGUID is the unique route identifier.
	RouteGUID string

	// Port on which the application should listen, and to which requests for the mapped route will be routed
	AppPort int
}

RouteMapping represents a Cloud Controller map between an application and route.

func (*RouteMapping) UnmarshalJSON

func (routeMapping *RouteMapping) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Route Mapping

type SecurityGroup

type SecurityGroup struct {
	// GUID is the unique Security Group identifier.
	GUID string
	// Name is the Security Group's name.
	Name string
	// Rules are the Security Group Rules associated with this Security Group.
	Rules []SecurityGroupRule
	// RunningDefault is true when this Security Group is applied to all running
	// apps in the CF instance.
	RunningDefault bool
	// StagingDefault is true when this Security Group is applied to all staging
	// apps in the CF instance.
	StagingDefault bool
}

SecurityGroup represents a Cloud Controller Security Group.

func (SecurityGroup) MarshalJSON

func (securityGroup SecurityGroup) MarshalJSON() ([]byte, error)

MarshalJSON helps marshal a Cloud Controller Security Group request

func (*SecurityGroup) UnmarshalJSON

func (securityGroup *SecurityGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Security Group response

type SecurityGroupRule

type SecurityGroupRule struct {
	// Description is a short message discribing the rule.
	Description string

	// Destination is the destination CIDR or range of IPs.
	Destination string

	// Ports is the port or port range.
	Ports string

	// Protocol can be tcp, icmp, udp, all.
	Protocol string

	// control signal for icmp, where -1 allows all
	Type types.NullInt

	// control signal for icmp, where -1 allows all
	Code types.NullInt

	// enables logging for the egress rule, only valid for tcp rules
	Log types.NullBool
}

SecurityGroupRule represents a Cloud Controller Security Group Role.

type Service

type Service struct {
	// GUID is the unique Service identifier.
	GUID string
	// Label is the name of the service.
	Label string
	// Description is a short blurb describing the service.
	Description string
	// DocumentationURL is a url that points to a documentation page for the
	// service.
	DocumentationURL string
	// ServiceBrokerName is name of the service broker associated with the service
	ServiceBrokerName string
	// ServiceBrokerGUID is guid of the service broker associated with the service
	ServiceBrokerGUID string
	// Extra is a field with extra data pertaining to the service.
	Extra ServiceExtra
}

Service represents a Cloud Controller Service.

func (*Service) UnmarshalJSON

func (service *Service) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Service response.

type ServiceBinding

type ServiceBinding struct {
	// AppGUID is the associated application GUID.
	AppGUID string
	// GUID is the unique Service Binding identifier.
	GUID string
	// LastOperation
	LastOperation LastOperation
	// Name is the name of the service binding
	Name string
	// ServiceInstanceGUID is the associated service GUID.
	ServiceInstanceGUID string

	// Parameters of the service binding
	Parameters map[string]interface{}
}

ServiceBinding represents a Cloud Controller Service Binding.

func (*ServiceBinding) UnmarshalJSON

func (serviceBinding *ServiceBinding) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Service Binding response.

type ServiceBindingRoute

type ServiceBindingRoute struct {
	// GUID is the unique service binding route identifier.
	GUID string

	// Name is the name given to the service binding route.
	Name string

	// The guid of the service instance to bind
	ServiceInstanceGuid string

	// The guid of the app to bind
	AppGuid string

	// Arbitrary parameters to pass along to the service broker.
	Parameters map[string]interface{}
}

ServiceBindingRoute represents a Cloud Controller service binding route.

func (ServiceBindingRoute) MarshalJSON

func (o ServiceBindingRoute) MarshalJSON() ([]byte, error)

MarshalJSON converts an service binding route into a Cloud Controller service binding route.

func (*ServiceBindingRoute) UnmarshalJSON

func (o *ServiceBindingRoute) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller service binding route response.

type ServiceBroker

type ServiceBroker struct {
	// AuthUsername is the HTTP Basic Auth username of the service broker.
	AuthUsername string
	// AuthPassword is the HTTP Basic Auth password of the service broker.
	AuthPassword string
	// BrokerURL is the URL of the service broker.
	BrokerURL string
	// GUID is the unique Service Broker identifier.
	GUID string
	// Name is the name of the service broker.
	Name string
	// SpaceGUID is the space guid of the serivce broker. Only applies to space scoped service brokers.
	SpaceGUID string
}

ServiceBroker represents a Cloud Controller Service Broker.

func (*ServiceBroker) MarshalJSON

func (serviceBroker *ServiceBroker) MarshalJSON() ([]byte, error)

MarshalJSON helps marshal a Cloud Controller Service Broker request.

func (*ServiceBroker) UnmarshalJSON

func (serviceBroker *ServiceBroker) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Service Broker response.

type ServiceExtra

type ServiceExtra struct {
	// DocumentationURL is the URL of the documentation page for the service.
	DocumentationURL string `json:"documentationUrl"`

	// Shareable is true if the service is shareable across organizations and
	// spaces.
	Shareable bool
}

ServiceExtra contains extra service related properties.

type ServiceInstance

type ServiceInstance struct {
	// GUID is the unique service instance identifier.
	GUID string

	// Name is the name given to the service instance.
	Name string

	// SpaceGUID is the unique identifier of the space that this service instance
	// belongs to.
	SpaceGUID string

	// ServiceGUID is the unique identifier of the service that this service
	// instance belongs to.
	ServiceGUID string

	// ServicePlanGUID is the unique identifier of the service plan that this
	// service instance belongs to.
	ServicePlanGUID string

	// Type is the type of service instance.
	Type constant.ServiceInstanceType

	// Tags is a list of all tags for the service instance.
	Tags []string

	// DashboardURL is the service-broker provided URL to access administrative
	// features of the service instance.
	DashboardURL string

	// RouteServiceURL is the URL of the user-provided service to which requests
	// for bound routes will be forwarded.
	RouteServiceURL string

	// LastOperation is the status of the last operation requested on the service
	// instance.
	LastOperation LastOperation

	// Arbitrary parameters to pass along to the service instance.
	Parameters map[string]interface{}
}

ServiceInstance represents a Cloud Controller Service Instance.

func (ServiceInstance) Managed

func (serviceInstance ServiceInstance) Managed() bool

Managed returns true if the Service Instance is a managed service.

func (ServiceInstance) MarshalJSON

func (serviceInstance ServiceInstance) MarshalJSON() ([]byte, error)

MarshalJSON converts an user provided service instance into a Cloud Controller user provided service instance.

func (*ServiceInstance) UnmarshalJSON

func (serviceInstance *ServiceInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Service Instance response.

func (ServiceInstance) UserProvided

func (serviceInstance ServiceInstance) UserProvided() bool

UserProvided returns true if the Service Instance is a user provided service.

type ServiceInstanceSharedFrom

type ServiceInstanceSharedFrom struct {
	// SpaceGUID is the unique identifier of the space that this service is
	// shared from.
	SpaceGUID string `json:"space_guid"`

	// SpaceName is the name of the space that this service is shared from.
	SpaceName string `json:"space_name"`

	// OrganizationName is the name of the organization that this service is
	// shared from.
	OrganizationName string `json:"organization_name"`
}

ServiceInstanceSharedFrom represents a Cloud Controller relationship object that describes a service instance in another space (and possibly org) that this service instance is **shared from**.

type ServiceInstanceSharedTo

type ServiceInstanceSharedTo struct {
	// SpaceGUID is the unique identifier of the space that this service is
	// shared to.
	SpaceGUID string `json:"space_guid"`

	// SpaceName is the name of the space that this service is shared to.
	SpaceName string `json:"space_name"`

	// OrganizationName is the name of the organization that this service is
	// shared to.
	OrganizationName string `json:"organization_name"`

	// BoundAppCount is the number of apps that are bound to the shared to
	// service instance.
	BoundAppCount int `json:"bound_app_count"`
}

ServiceInstanceSharedTo represents a Cloud Controller relationship object that describes a service instance in another space (and possibly org) that this service is **shared to**.

type ServiceKey

type ServiceKey struct {
	// GUID is the unique Service Key identifier.
	GUID string
	// Name is the name of the service key.
	Name string
	// ServiceInstanceGUID is the associated service instance GUID.
	ServiceInstanceGUID string
	// Credentials are the credentials returned by the service broker for the service key.
	Credentials map[string]interface{}
}

ServiceKey represents a Cloud Controller Service Key.

func (*ServiceKey) UnmarshalJSON

func (serviceKey *ServiceKey) UnmarshalJSON(data []byte) error

type ServicePlan

type ServicePlan struct {
	// GUID is the unique identifier of the service plan.
	GUID string

	// Name is the name of the service plan.
	Name string

	// ServiceGUID is the unique identifier of the service that the service
	// plan belongs to.
	ServiceGUID string

	// Public is true if plan is accessible to all organizations.
	Public bool

	// Description of the plan
	Description string

	// Free is true if plan is free
	Free bool
}

ServicePlan represents a predefined set of configurations for a Cloud Controller service object.

func (*ServicePlan) UnmarshalJSON

func (servicePlan *ServicePlan) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Service Plan response.

type ServicePlanVisibility

type ServicePlanVisibility struct {
	// GUID is the unique Service Plan Visibility identifier.
	GUID string
	// ServicePlanGUID of the associated Service Plan.
	ServicePlanGUID string
	// OrganizationGUID of the associated Organization.
	OrganizationGUID string
}

ServicePlanVisibility represents a Cloud Controller Service Plan Visibility.

func (*ServicePlanVisibility) UnmarshalJSON

func (servicePlanVisibility *ServicePlanVisibility) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Service Plan Visibilities response.

type Space

type Space struct {
	// AllowSSH specifies whether SSH is enabled for this space.
	AllowSSH bool

	// GUID is the unique space identifier.
	GUID string

	// Name is the name given to the space.
	Name string

	// OrganizationGUID is the unique identifier of the organization this space
	// belongs to.
	OrganizationGUID string

	// SpaceQuotaDefinitionGUID is the unique identifier of the space quota
	// defined for this space.
	SpaceQuotaDefinitionGUID string
}

Space represents a Cloud Controller Space.

func (Space) MarshalJSON

func (space Space) MarshalJSON() ([]byte, error)

UnmarshalJSON helps unmarshal a Cloud Controller Space response.

func (*Space) UnmarshalJSON

func (space *Space) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Space response.

type SpaceSummary

type SpaceSummary struct {
	Applications     []SpaceSummaryApplication
	Name             string
	ServiceInstances []SpaceSummaryServiceInstance
}

SpaceSummary represents a service instance inside a space

func (*SpaceSummary) UnmarshalJSON

func (spaceSummary *SpaceSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Space Summary response.

type SpaceSummaryApplication

type SpaceSummaryApplication struct {
	Name         string   `json:"name"`
	ServiceNames []string `json:"service_names"`
}

SpaceSummaryApplication represents an application inside a space

type SpaceSummaryService

type SpaceSummaryService struct {
	GUID              string
	Label             string
	ServiceBrokerName string
}

SpaceSummaryService represents a service inside a space

type SpaceSummaryServiceInstance

type SpaceSummaryServiceInstance struct {
	LastOperation LastOperation           `json:"last_operation"`
	Name          string                  `json:"name"`
	ServicePlan   SpaceSummaryServicePlan `json:"service_plan"`
}

SpaceSummaryServiceInstance represents a service instance inside a space

type SpaceSummaryServicePlan

type SpaceSummaryServicePlan struct {
	GUID    string              `json:"guid"`
	Name    string              `json:"name"`
	Service SpaceSummaryService `json:"service"`
}

SpaceSummaryServicePlan represents a service plan inside a space

type Stack

type Stack struct {
	// GUID is the unique stack identifier.
	GUID string

	// Name is the name given to the stack.
	Name string

	// Description is the description of the stack.
	Description string
}

Stack represents a Cloud Controller Stack.

func (*Stack) UnmarshalJSON

func (stack *Stack) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Stack response.

type TargetSettings

type TargetSettings struct {
	// DialTimeout is the DNS timeout used to make all requests to the Cloud
	// Controller.
	DialTimeout time.Duration

	// SkipSSLValidation controls whether a client verifies the server's
	// certificate chain and host name. If SkipSSLValidation is true, TLS accepts
	// any certificate presented by the server and any host name in that
	// certificate for *all* client requests going forward.
	//
	// In this mode, TLS is susceptible to man-in-the-middle attacks. This should
	// be used only for testing.
	SkipSSLValidation bool

	// URL is a fully qualified URL to the Cloud Controller API.
	URL string
}

TargetSettings represents configuration for establishing a connection to the Cloud Controller server.

type User

type User struct {
	// GUID is the unique user identifier.
	GUID string

	// Username of the user
	Username string
}

User represents a Cloud Controller User.

func (*User) UnmarshalJSON

func (user *User) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller User response.

type UserProvidedServiceInstance

type UserProvidedServiceInstance struct {
	// GUID is the unique user provided service instance identifier.
	GUID string

	// Name is the name given to the user provided service instance.
	Name string

	// The guid of the space in which the instance will be created
	SpaceGuid string

	// URL to which logs will be streamed for bound applications.
	SyslogDrainUrl string

	// A hash exposed in the VCAP_SERVICES environment variable for bound applications.
	Credentials map[string]interface{}

	// URL to which requests for bound routes will be forwarded.
	RouteServiceUrl string

	// A list of tags for the service instance. Max characters: 2048
	Tags []string
}

UserProvidedServiceInstance represents a Cloud Controller user provided service instance.

func (UserProvidedServiceInstance) MarshalJSON

func (o UserProvidedServiceInstance) MarshalJSON() ([]byte, error)

MarshalJSON converts an user provided service instance into a Cloud Controller user provided service instance.

func (*UserProvidedServiceInstance) UnmarshalJSON

func (o *UserProvidedServiceInstance) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller user provided service instance response.

type Warnings

type Warnings []string

Warnings are a collection of warnings that the Cloud Controller can return back from an API request.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
Package constant contains types and constants used by the ccv2 package.
Package constant contains types and constants used by the ccv2 package.

Jump to

Keyboard shortcuts

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