{"modulePath":"github.com/loggregator/cli","version":"v6.33.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ccv2\n\nPackage ccv2 represents a Cloud Controller V2 client.\n\nThese sets of packages are still under development/pre-pre-pre...alpha. Use at your own risk! Functionality and design may change without warning.\n\nIt is currently designed to support Cloud Controller API 2.23.0. However, it may include features and endpoints of later API versions.\n\nFor more information on the Cloud Controller API see [https://apidocs.cloudfoundry.org/](https://apidocs.cloudfoundry.org/)\n\n### Method Naming Conventions {#hdr-Method_Naming_Conventions}\n\nThe client takes a '\\\u003cAction Name\u003e\\\u003cTop Level Endpoint\u003e\\\u003cReturn Value\u003e' approach to method names.  If the \\\u003cTop Level Endpoint\u003e and \\\u003cReturn Value\u003e are similar, they do not need to be repeated. If a GUID is required for the \\\u003cTop Level Endpoint\u003e, the pluralization is removed from said endpoint in the method name.\n\nFor Example:\n\n\tMethod Name: GetApplication\n\tEndpoint: /v2/applications/:guid\n\tAction Name: Get\n\tTop Level Endpoint: applications\n\tReturn Value: Application\n\n\tMethod Name: GetServiceInstances\n\tEndpoint: /v2/service_instances\n\tAction Name: Get\n\tTop Level Endpoint: service_instances\n\tReturn Value: []ServiceInstance\n\n\tMethod Name: GetSpaceServiceInstances\n\tEndpoint: /v2/spaces/:guid/service_instances\n\tAction Name: Get\n\tTop Level Endpoint: spaces\n\tReturn Value: []ServiceInstance\n\nUse the following table to determine which HTTP Command equates to which Action Name:\n\n\tHTTP Command -\u003e Action Name\n\tPOST -\u003e Create\n\tGET -\u003e Get\n\tPUT -\u003e Update\n\tDELETE -\u003e Delete\n\tPATCH -\u003e Patch\n\n### Method Locations {#hdr-Method_Locations}\n\nMethods exist in the same file as their return type, regardless of which endpoint they use.\n\n### Error Handling {#hdr-Error_Handling}\n\nAll 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 parsed cloud controller errors should exist in errors.go, all generic HTTP errors should exist in the cloudcontroller's errors.go. Errors related to the individaul operation should exist at the top of that operation's file.\n\n### No inline-relations-depth And summary Endpoints {#hdr-No_inline_relations_depth_And_summary_Endpoints}\n\nThis package will not use 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 inconsistant across versions and are problematic to deal with in general.\n\n## Functions\n\n```go\nfunc FormatQueryParameters(queries []Query) url.Values\n```\nFormatQueryParameters converts a Query object into a collection that cloudcontroller.Request can accept.\n\n## Types\n\n```go\ntype APIInformation struct {\n\tAPIVersion                   string `json:\"api_version\"`\n\tAuthorizationEndpoint        string `json:\"authorization_endpoint\"`\n\tDopplerEndpoint              string `json:\"doppler_logging_endpoint\"`\n\tMinCLIVersion                string `json:\"min_cli_version\"`\n\tMinimumRecommendedCLIVersion string `json:\"min_recommended_cli_version\"`\n\tName                         string `json:\"name\"`\n\tRoutingEndpoint              string `json:\"routing_endpoint\"`\n\tTokenEndpoint                string `json:\"token_endpoint\"`\n}\n```\nAPIInformation represents the information returned back from /v2/info\n\n```go\ntype Application struct {\n\t// Buildpack is the buildpack set by the user.\n\tBuildpack types.FilteredString\n\n\t// Command is the user specified start command.\n\tCommand types.FilteredString\n\n\t// DetectedBuildpack is the buildpack automatically detected.\n\tDetectedBuildpack types.FilteredString\n\n\t// DetectedStartCommand is the command used to start the application.\n\tDetectedStartCommand types.FilteredString\n\n\t// DiskQuota is the disk given to each instance, in megabytes.\n\tDiskQuota uint64\n\n\t// DockerCredentials is the authentication information for the provided\n\t// DockerImage.\n\tDockerCredentials DockerCredentials\n\n\t// DockerImage is the docker image location.\n\tDockerImage string\n\n\t// EnvironmentVariables are the environment variables passed to the app.\n\tEnvironmentVariables map[string]string\n\n\t// GUID is the unique application identifier.\n\tGUID string\n\n\t// HealthCheckTimeout is the number of seconds for health checking of an\n\t// staged app when starting up.\n\tHealthCheckTimeout int\n\n\t// HealthCheckType is the type of health check that will be done to the app.\n\tHealthCheckType constant.ApplicationHealthCheckType\n\n\t// HealthCheckHTTPEndpoint is the url of the http health check endpoint.\n\tHealthCheckHTTPEndpoint string\n\n\t// Instances is the total number of app instances.\n\tInstances types.NullInt\n\n\t// Memory is the memory given to each instance, in megabytes.\n\tMemory uint64\n\n\t// Name is the name given to the application.\n\tName string\n\n\t// PackageState represents the staging state of the application bits.\n\tPackageState ApplicationPackageState\n\n\t// PackageUpdatedAt is the last time the app bits were updated. In RFC3339.\n\tPackageUpdatedAt time.Time\n\n\t// SpaceGUID is the GUID of the app's space.\n\tSpaceGUID string\n\n\t// StackGUID is the GUID for the Stack the application is running on.\n\tStackGUID string\n\n\t// StagingFailedDescription is the verbose description of why the package\n\t// failed to stage.\n\tStagingFailedDescription string\n\n\t// StagingFailedReason is the reason why the package failed to stage.\n\tStagingFailedReason string\n\n\t// State is the desired state of the application.\n\tState ApplicationState\n}\n```\nApplication represents a Cloud Controller Application.\n\n```go\nfunc (application Application) MarshalJSON() ([]byte, error)\n```\nMarshalJSON converts an application into a Cloud Controller Application.\n\n```go\nfunc (application *Application) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Application response.\n\n```go\ntype ApplicationInstance struct {\n\t// Details are arbitrary information about the instance.\n\tDetails string\n\n\t// ID is the instance ID.\n\tID int\n\n\t// Since is the Unix time stamp that represents the time the instance was\n\t// created.\n\tSince float64\n\n\t// State is the instance's state.\n\tState ApplicationInstanceState\n}\n```\nApplicationInstance represents a Cloud Controller Application Instance.\n\n```go\nfunc (instance *ApplicationInstance) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller application instance response.\n\n```go\ntype ApplicationInstanceState string\n```\nApplicationInstanceState reflects the state of the individual app instance.\n\n```go\nconst (\n\tApplicationInstanceCrashed  ApplicationInstanceState = \"CRASHED\"\n\tApplicationInstanceDown     ApplicationInstanceState = \"DOWN\"\n\tApplicationInstanceFlapping ApplicationInstanceState = \"FLAPPING\"\n\tApplicationInstanceRunning  ApplicationInstanceState = \"RUNNING\"\n\tApplicationInstanceStarting ApplicationInstanceState = \"STARTING\"\n\tApplicationInstanceUnknown  ApplicationInstanceState = \"UNKNOWN\"\n)\n```\n\n```go\ntype ApplicationInstanceStatus struct {\n\t// CPU is the instance's CPU utilization percentage.\n\tCPU float64\n\n\t// Disk is the instance's disk usage in bytes.\n\tDisk int\n\n\t// DiskQuota is the instance's allowed disk usage in bytes.\n\tDiskQuota int\n\n\t// ID is the instance ID.\n\tID int\n\n\t// IsolationSegment that the app is currently running on.\n\tIsolationSegment string\n\n\t// Memory is the instance's memory usage in bytes.\n\tMemory int\n\n\t// MemoryQuota is the instance's allowed memory usage in bytes.\n\tMemoryQuota int\n\n\t// State is the instance's state.\n\tState ApplicationInstanceState\n\n\t// Uptime is the number of seconds the instance has been running.\n\tUptime int\n}\n```\nApplicationInstanceStatus represents a Cloud Controller Application Instance.\n\n```go\nfunc (instance *ApplicationInstanceStatus) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller application instance response.\n\n```go\ntype ApplicationPackageState string\n```\nApplicationPackageState is the staging state of application bits.\n\n```go\nconst (\n\tApplicationPackageStaged  ApplicationPackageState = \"STAGED\"\n\tApplicationPackagePending ApplicationPackageState = \"PENDING\"\n\tApplicationPackageFailed  ApplicationPackageState = \"FAILED\"\n\tApplicationPackageUnknown ApplicationPackageState = \"UNKNOWN\"\n)\n```\n\n```go\ntype ApplicationState string\n```\nApplicationState is the running state of an application.\n\n```go\nconst (\n\tApplicationStarted ApplicationState = \"STARTED\"\n\tApplicationStopped ApplicationState = \"STOPPED\"\n)\n```\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient is a client that can be used to talk to a Cloud Controller's V2 Endpoints.\n\n```go\nfunc NewClient(config Config) *Client\n```\nNewClient returns a new Cloud Controller Client.\n\n```go\nfunc (client *Client) API() string\n```\nAPI returns the Cloud Controller API URL for the targeted Cloud Controller.\n\n```go\nfunc (client *Client) APIVersion() string\n```\nAPIVersion returns Cloud Controller API Version for the targeted Cloud Controller.\n\n```go\nfunc (client *Client) AssociateSpaceWithRunningSecurityGroup(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) AssociateSpaceWithStagingSecurityGroup(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\n\n```go\nfunc (client *Client) AuthorizationEndpoint() string\n```\nAuthorizationEndpoint returns the authorization endpoint for the targeted Cloud Controller.\n\n```go\nfunc (client *Client) CheckRoute(route Route) (bool, Warnings, error)\n```\nCheckRoute returns true if the route exists in the CF instance. DomainGUID is required for check. This call will only work for CC API 2.55 or higher.\n\n```go\nfunc (client *Client) CreateApplication(app Application) (Application, Warnings, error)\n```\nCreateApplication creates a cloud controller application in with the given settings. SpaceGUID and Name are the only required fields.\n\n```go\nfunc (client *Client) CreateRoute(route Route, generatePort bool) (Route, Warnings, error)\n```\nCreateRoute creates the route with the given properties; SpaceGUID and DomainGUID are required. Set generatePort true to generate a random port on the cloud controller. generatePort takes precedence over manually specified port. Setting the port and generatePort only works with CC API 2.53.0 or higher and when TCP router groups are enabled.\n\n```go\nfunc (client *Client) CreateServiceBinding(appGUID string, serviceInstanceGUID string, parameters map[string]interface{}) (ServiceBinding, Warnings, error)\n```\nCreateServiceBinding creates a service binding\n\n```go\nfunc (client *Client) CreateUser(uaaUserID string) (User, Warnings, error)\n```\nCreateUser creates a new Cloud Controller User from the provided UAA user ID.\n\n```go\nfunc (client *Client) DeleteOrganization(guid string) (Job, Warnings, error)\n```\nDeleteOrganization deletes the Organization associated with the provided GUID. It will return the Cloud Controller job that is assigned to the Organization deletion.\n\n```go\nfunc (client *Client) DeleteRoute(routeGUID string) (Warnings, error)\n```\nDeleteRoute deletes the Route associated with the provided Route GUID.\n\n```go\nfunc (client *Client) DeleteRouteApplication(routeGUID string, appGUID string) (Warnings, error)\n```\nDeleteRouteApplication removes the link between the route and application.\n\n```go\nfunc (client *Client) DeleteServiceBinding(serviceBindingGUID string) (Warnings, error)\n```\nDeleteServiceBinding will destroy the requested Service Binding.\n\n```go\nfunc (client *Client) DeleteSpace(guid string) (Job, Warnings, error)\n```\nDeleteSpace deletes the Space associated with the provided GUID. It will return the Cloud Controller job that is assigned to the Space deletion.\n\n```go\nfunc (client *Client) DopplerEndpoint() string\n```\nDopplerEndpoint returns the Doppler endpoint for the targetd Cloud Controller.\n\n```go\nfunc (client *Client) GetApplication(guid string) (Application, Warnings, error)\n```\nGetApplication returns back an Application.\n\n```go\nfunc (client *Client) GetApplicationInstanceStatusesByApplication(guid string) (map[int]ApplicationInstanceStatus, Warnings, error)\n```\nGetApplicationInstanceStatusesByApplication returns a list of ApplicationInstance for a given application. Given the state of an application, it might skip some application instances.\n\n```go\nfunc (client *Client) GetApplicationInstancesByApplication(guid string) (map[int]ApplicationInstance, Warnings, error)\n```\nGetApplicationInstancesByApplication returns a list of ApplicationInstance for a given application. Given the state of an application, it might skip some application instances.\n\n```go\nfunc (client *Client) GetApplicationRoutes(appGUID string, queryParams ...Query) ([]Route, Warnings, error)\n```\nGetApplicationRoutes returns a list of Routes associated with the provided Application GUID, and filtered by the provided queries.\n\n```go\nfunc (client *Client) GetApplications(queries ...Query) ([]Application, Warnings, error)\n```\nGetApplications returns back a list of Applications based off of the provided queries.\n\n```go\nfunc (client *Client) GetJob(jobGUID string) (Job, Warnings, error)\n```\nGetJob returns a job for the provided GUID.\n\n```go\nfunc (client *Client) GetOrganization(guid string) (Organization, Warnings, error)\n```\nGetOrganization returns an Organization associated with the provided guid.\n\n```go\nfunc (client *Client) GetOrganizationPrivateDomains(orgGUID string, queries ...Query) ([]Domain, Warnings, error)\n```\nGetOrganizationPrivateDomains returns the private domains associated with an organization.\n\n```go\nfunc (client *Client) GetOrganizationQuota(guid string) (OrganizationQuota, Warnings, error)\n```\nGetOrganizaitonQuota gets an organization quota (quota definition) from the API.\n\n```go\nfunc (client *Client) GetOrganizations(queries ...Query) ([]Organization, Warnings, error)\n```\nGetOrganizations returns back a list of Organizations based off of the provided queries.\n\n```go\nfunc (client *Client) GetPrivateDomain(domainGUID string) (Domain, Warnings, error)\n```\nGetPrivateDomain returns the Private Domain associated with the provided Domain GUID.\n\n```go\nfunc (client *Client) GetRouteApplications(routeGUID string, queryParams ...Query) ([]Application, Warnings, error)\n```\nGetRouteApplications returns a list of Applications associated with a route GUID, filtered by provided queries.\n\n```go\nfunc (client *Client) GetRoutes(queryParams ...Query) ([]Route, Warnings, error)\n```\nGetRoutes returns a list of Routes based off of the provided queries.\n\n```go\nfunc (client *Client) GetRunningSpacesBySecurityGroup(securityGroupGUID string) ([]Space, Warnings, error)\n```\nGetRunningSpacesBySecurityGroup returns a list of Spaces based on the provided SecurityGroup GUID.\n\n```go\nfunc (client *Client) GetSecurityGroups(queries ...Query) ([]SecurityGroup, Warnings, error)\n```\n\n```go\nfunc (client *Client) GetService(serviceGUID string) (Service, Warnings, error)\n```\nGetService returns the service with the given GUID.\n\n```go\nfunc (client *Client) GetServiceBindings(queries ...Query) ([]ServiceBinding, Warnings, error)\n```\nGetServiceBindings returns back a list of Service Bindings based off of the provided queries.\n\n```go\nfunc (client *Client) GetServiceInstance(serviceInstanceGUID string) (ServiceInstance, Warnings, error)\n```\nGetServiceInstance returns the service instance with the given GUID. This service can be either a managed or user provided.\n\n```go\nfunc (client *Client) GetServiceInstanceServiceBindings(serviceInstanceGUID string) ([]ServiceBinding, Warnings, error)\n```\nGetServiceInstanceServiceBindings returns back a list of Service Bindings for the provided service instance GUID.\n\n```go\nfunc (client *Client) GetServiceInstances(queries ...Query) ([]ServiceInstance, Warnings, error)\n```\nGetServiceInstances returns back a list of \\*managed\\* Service Instances based off of the provided queries.\n\n```go\nfunc (client *Client) GetServicePlan(servicePlanGUID string) (ServicePlan, Warnings, error)\n```\nGetServicePlan returns the service plan with the given GUID.\n\n```go\nfunc (client *Client) GetSharedDomain(domainGUID string) (Domain, Warnings, error)\n```\nGetSharedDomain returns the Shared Domain associated with the provided Domain GUID.\n\n```go\nfunc (client *Client) GetSharedDomains(queries ...Query) ([]Domain, Warnings, error)\n```\nGetSharedDomains returns the global shared domains.\n\n```go\nfunc (client *Client) GetSpaceQuota(guid string) (SpaceQuota, Warnings, error)\n```\nGetSpaceQuota returns a Space Quota.\n\n```go\nfunc (client *Client) GetSpaceRoutes(spaceGUID string, queryParams ...Query) ([]Route, Warnings, error)\n```\nGetSpaceRoutes returns a list of Routes associated with the provided Space GUID, and filtered by the provided queries.\n\n```go\nfunc (client *Client) GetSpaceRunningSecurityGroupsBySpace(spaceGUID string, queries ...Query) ([]SecurityGroup, Warnings, error)\n```\nGetSpaceRunningSecurityGroupsBySpace returns the running Security Groups associated with the provided Space GUID.\n\n```go\nfunc (client *Client) GetSpaceServiceInstances(spaceGUID string, includeUserProvidedServices bool, queries ...Query) ([]ServiceInstance, Warnings, error)\n```\nGetSpaceServiceInstances returns back a list of Service Instances based off of the space and queries provided. User provided services will be included if includeUserProvidedServices is set to true.\n\n```go\nfunc (client *Client) GetSpaceStagingSecurityGroupsBySpace(spaceGUID string, queries ...Query) ([]SecurityGroup, Warnings, error)\n```\nGetSpaceStagingSecurityGroupsBySpace returns the staging Security Groups associated with the provided Space GUID.\n\n```go\nfunc (client *Client) GetSpaces(queries ...Query) ([]Space, Warnings, error)\n```\nGetSpaces returns a list of Spaces based off of the provided queries.\n\n```go\nfunc (client *Client) GetStack(guid string) (Stack, Warnings, error)\n```\nGetStack returns the requested stack.\n\n```go\nfunc (client *Client) GetStacks(queries ...Query) ([]Stack, Warnings, error)\n```\nGetStacks returns a list of Stacks based off of the provided queries.\n\n```go\nfunc (client *Client) GetStagingSpacesBySecurityGroup(securityGroupGUID string) ([]Space, Warnings, error)\n```\nGetStagingSpacesBySecurityGroup returns a list of Spaces based on the provided SecurityGroup GUID.\n\n```go\nfunc (client *Client) GetUserProvidedServiceInstanceServiceBindings(userProvidedServiceInstanceGUID string) ([]ServiceBinding, Warnings, error)\n```\nGetUserProvidedServiceInstanceServiceBindings returns back a list of Service Bindings for the provided user provided service instance GUID.\n\n```go\nfunc (client *Client) Info() (APIInformation, Warnings, error)\n```\nInfo returns back endpoint and API information from /v2/info.\n\n```go\nfunc (client *Client) MinCLIVersion() string\n```\nMinCLIVersion returns the minimum CLI version required for the targeted Cloud Controller\n\n```go\nfunc (client *Client) PollJob(job Job) (Warnings, error)\n```\nPollJob 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.\n\n```go\nfunc (client *Client) RemoveSpaceFromRunningSecurityGroup(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\nRemoveSpaceRunningFromSecurityGroup disassociates a security group in the running phase fo the lifecycle, specified by its GUID, from a space, which is also specified by its GUID.\n\n```go\nfunc (client *Client) RemoveSpaceFromStagingSecurityGroup(securityGroupGUID string, spaceGUID string) (Warnings, error)\n```\nRemoveSpaceStagingFromSecurityGroup 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.\n\n```go\nfunc (client *Client) ResourceMatch(resourcesToMatch []Resource) ([]Resource, Warnings, error)\n```\nResourceMatch returns the resources that exist on the cloud foundry instance from the set of resources given.\n\n```go\nfunc (client *Client) RestageApplication(app Application) (Application, Warnings, error)\n```\nRestageApplication restages the application with the given GUID.\n\n```go\nfunc (client *Client) RoutingEndpoint() string\n```\nRoutingEndpoint returns the Routing endpoint for the targeted Cloud Controller.\n\n```go\nfunc (client *Client) TargetCF(settings TargetSettings) (Warnings, error)\n```\nTargetCF sets the client to use the Cloud Controller specified in the configuration. Any other configuration is also applied to the client.\n\n```go\nfunc (client *Client) TokenEndpoint() string\n```\nTokenEndpoint returns the Token endpoint for the targeted Cloud Controller.\n\n```go\nfunc (client *Client) UpdateApplication(app Application) (Application, Warnings, error)\n```\nUpdateApplication updates the application with the given GUID. Note: Sending DockerImage and StackGUID at the same time will result in an API error.\n\n```go\nfunc (client *Client) UpdateRouteApplication(routeGUID string, appGUID string) (Route, Warnings, error)\n```\nUpdateRouteApplication creates a link between the route and application.\n\n```go\nfunc (client *Client) UploadApplicationPackage(appGUID string, existingResources []Resource, newResources Reader, newResourcesLength int64) (Job, Warnings, error)\n```\nUploadApplicationPackage 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:\n\n\tio.ReadSeeker: Will function properly on retry.\n\tio.Reader: Will return a ccerror.PipeSeekError on retry.\n\tnil: Will not add the \"application\" section to the request.\n\tnewResourcesLength is ignored in this case.\n\n```go\nfunc (client *Client) WrapConnection(wrapper ConnectionWrapper)\n```\nWrapConnection wraps the current Client connection in the wrapper.\n\n```go\ntype Config struct {\n\t// AppName is the name of the application/process using the client.\n\tAppName string\n\n\t// AppVersion is the version of the application/process using the client.\n\tAppVersion string\n\n\t// JobPollingTimeout is the maximum amount of time a job polls for.\n\tJobPollingTimeout time.Duration\n\n\t// JobPollingInterval is the wait time between job polls.\n\tJobPollingInterval time.Duration\n\n\t// Wrappers that apply to the client connection.\n\tWrappers []ConnectionWrapper\n}\n```\nConfig allows the Client to be configured\n\n```go\ntype ConnectionWrapper interface {\n\tcloudcontroller.Connection\n\tWrap(innerconnection cloudcontroller.Connection) cloudcontroller.Connection\n}\n```\nConnectionWrapper can wrap a given connection allowing the wrapper to modify all requests going in and out of the given connection.\n\n```go\ntype DockerCredentials struct {\n\t// Username is the username for a user that has access to a given docker\n\t// image.\n\tUsername string `json:\"username,omitempty\"`\n\n\t// Password is the password for the user.\n\tPassword string `json:\"password,omitempty\"`\n}\n```\nDockerCredentials are the authentication credentials to pull a docker image from it's repository.\n\n```go\ntype Domain struct {\n\tGUID            string\n\tName            string\n\tRouterGroupGUID string\n\tRouterGroupType constant.RouterGroupType\n\tType            constant.DomainType\n}\n```\nDomain represents a Cloud Controller Domain.\n\n```go\nfunc (domain *Domain) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Domain response.\n\n```go\ntype Job struct {\n\tError        string\n\tErrorDetails struct {\n\t\tDescription string\n\t}\n\tGUID   string\n\tStatus JobStatus\n}\n```\nJob represents a Cloud Controller Job.\n\n```go\nfunc (job Job) Failed() bool\n```\nFailed returns true when the job has completed with an error/failure.\n\n```go\nfunc (job Job) Finished() bool\n```\nFinished returns true when the job has completed successfully.\n\n```go\nfunc (job *Job) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Job response.\n\n```go\ntype JobStatus string\n```\nJobStatus is the current state of a job.\n\n```go\nconst (\n\t// JobStatusFailed is when the job is no longer running due to a failure.\n\tJobStatusFailed JobStatus = \"failed\"\n\n\t// JobStatusFinished is when the job is no longer and it was successful.\n\tJobStatusFinished JobStatus = \"finished\"\n\n\t// JobStatusQueued is when the job is waiting to be run.\n\tJobStatusQueued JobStatus = \"queued\"\n\n\t// JobStatusRunning is when the job is running.\n\tJobStatusRunning JobStatus = \"running\"\n)\n```\n\n```go\ntype LastOperation struct {\n\tType        string\n\tState       string\n\tDescription string\n\tUpdatedAt   string\n\tCreatedAt   string\n}\n```\n\n```go\ntype Organization struct {\n\tGUID                        string\n\tName                        string\n\tQuotaDefinitionGUID         string\n\tDefaultIsolationSegmentGUID string\n}\n```\nOrganization represents a Cloud Controller Organization.\n\n```go\nfunc (org *Organization) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Organization response.\n\n```go\ntype OrganizationQuota struct {\n\tGUID string\n\tName string\n}\n```\nOrganizationQuota is the definition of a quota for an organization.\n\n```go\nfunc (application *OrganizationQuota) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller organization quota response.\n\n```go\ntype PaginatedResources struct {\n\tNextURL        string          `json:\"next_url\"`\n\tResourcesBytes json.RawMessage `json:\"resources\"`\n\t// contains filtered or unexported fields\n}\n```\nPaginatedResources represents a page of resources returned by the Cloud Controller.\n\n```go\nfunc NewPaginatedResources(exampleResource interface{}) *PaginatedResources\n```\nNewPaginatedResources returns a new PaginatedResources struct with the given resource type.\n\n```go\nfunc (pr PaginatedResources) Resources() ([]interface{}, error)\n```\nResources unmarshals JSON representing a page of resources and returns a slice of the given resource type.\n\n```go\ntype Params map[string]string\n```\nParams represents URI parameters for a request.\n\n```go\ntype Query struct {\n\tFilter   QueryFilter\n\tOperator QueryOperator\n\tValues   []string\n}\n```\nQuery is a type of filter that can be passed to specific request to narrow down the return set.\n\n```go\ntype QueryFilter string\n```\nQueryFilter is the type of filter a Query uses.\n\n```go\nconst (\n\t// AppGUIDFilter is the name of the 'app_guid' filter.\n\tAppGUIDFilter QueryFilter = \"app_guid\"\n\t// DomainGUIDFilter is the name of the 'domain_guid' filter.\n\tDomainGUIDFilter QueryFilter = \"domain_guid\"\n\t// OrganizationGUIDFilter is the name of the 'organization_guid' filter.\n\tOrganizationGUIDFilter QueryFilter = \"organization_guid\"\n\t// RouteGUIDFilter is the name of the 'route_guid' filter.\n\tRouteGUIDFilter QueryFilter = \"route_guid\"\n\t// ServiceInstanceGUIDFilter is the name of the 'service_instance_guid' filter.\n\tServiceInstanceGUIDFilter QueryFilter = \"service_instance_guid\"\n\t// SpaceGUIDFilter is the name of the 'space_guid' filter.\n\tSpaceGUIDFilter QueryFilter = \"space_guid\"\n\n\t// NameFilter is the name of the 'name' filter.\n\tNameFilter QueryFilter = \"name\"\n\t// HostFilter is the name of the 'host' filter.\n\tHostFilter QueryFilter = \"host\"\n\t// PathFilter is the name of the 'path' filter.\n\tPathFilter QueryFilter = \"path\"\n\t// PortFilter is the name of the 'port' filter.\n\tPortFilter QueryFilter = \"port\"\n)\n```\n\n```go\ntype QueryOperator string\n```\nQueryOperator is the type of operation a Query uses.\n\n```go\nconst (\n\t// EqualOperator is the query equal operator.\n\tEqualOperator QueryOperator = \":\"\n\n\t// InOperator is the query \"IN\" operator.\n\tInOperator QueryOperator = \" IN \"\n)\n```\n\n```go\ntype Reader interface {\n\tio.Reader\n}\n```\nReader is an io.Reader.\n\n```go\ntype Resource struct {\n\tFilename string      `json:\"fn\"`\n\tMode     os.FileMode `json:\"mode\"`\n\tSHA1     string      `json:\"sha1\"`\n\tSize     int64       `json:\"size\"`\n}\n```\n\n```go\nfunc (r Resource) MarshalJSON() ([]byte, error)\n```\n\n```go\nfunc (r *Resource) UnmarshalJSON(rawJSON []byte) error\n```\n\n```go\ntype Route struct {\n\tGUID       string        `json:\"-\"`\n\tHost       string        `json:\"host,omitempty\"`\n\tPath       string        `json:\"path,omitempty\"`\n\tPort       types.NullInt `json:\"port,omitempty\"`\n\tDomainGUID string        `json:\"domain_guid\"`\n\tSpaceGUID  string        `json:\"space_guid\"`\n}\n```\nRoute represents a Cloud Controller Route.\n\n```go\nfunc (route *Route) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Route response.\n\n```go\ntype SecurityGroup struct {\n\tGUID           string\n\tName           string\n\tRules          []SecurityGroupRule\n\tRunningDefault bool\n\tStagingDefault bool\n}\n```\n\n```go\nfunc (securityGroup *SecurityGroup) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Security Group response\n\n```go\ntype SecurityGroupLifecycle string\n```\nSecurityGroupLifecycle represents the lifecycle phase of a security group binding.\n\n```go\nconst (\n\t// SecurityGroupLifecycleRunning indicates the lifecycle phase running.\n\tSecurityGroupLifecycleRunning SecurityGroupLifecycle = \"running\"\n\n\t// SecurityGroupLifecycleStaging indicates the lifecycle phase staging.\n\tSecurityGroupLifecycleStaging SecurityGroupLifecycle = \"staging\"\n)\n```\n\n```go\ntype SecurityGroupRule struct {\n\tDescription string\n\tDestination string\n\tPorts       string\n\tProtocol    string\n}\n```\n\n```go\ntype Service struct {\n\tGUID             string\n\tLabel            string\n\tDescription      string\n\tDocumentationURL string\n}\n```\n\n```go\nfunc (service *Service) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Service response.\n\n```go\ntype ServiceBinding struct {\n\tGUID                string\n\tAppGUID             string\n\tServiceInstanceGUID string\n}\n```\nServiceBinding represents a Cloud Controller Service Binding.\n\n```go\nfunc (serviceBinding *ServiceBinding) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Service Binding response.\n\n```go\ntype ServiceInstance struct {\n\tGUID            string\n\tName            string\n\tSpaceGUID       string\n\tServicePlanGUID string\n\tType            ServiceInstanceType\n\tTags            []string\n\tDashboardURL    string\n\tLastOperation   LastOperation\n}\n```\nServiceInstance represents a Cloud Controller Service Instance.\n\n```go\nfunc (serviceInstance ServiceInstance) Managed() bool\n```\nManaged returns true if the Service Instance is a managed service.\n\n```go\nfunc (serviceInstance *ServiceInstance) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Service Instance response.\n\n```go\nfunc (serviceInstance ServiceInstance) UserProvided() bool\n```\nUserProvided returns true if the Service Instance is a user provided service.\n\n```go\ntype ServiceInstanceType string\n```\nServiceInstanceType is the type of the Service Instance.\n\n```go\nconst (\n\t// UserProvidedService is a Service Instance that is created by a user.\n\tUserProvidedService ServiceInstanceType = \"user_provided_service_instance\"\n\n\t// ManagedService is a Service Instance that is managed by a service broker.\n\tManagedService ServiceInstanceType = \"managed_service_instance\"\n)\n```\n\n```go\ntype ServicePlan struct {\n\tGUID        string\n\tName        string\n\tServiceGUID string\n}\n```\n\n```go\nfunc (servicePlan *ServicePlan) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Service Plan response.\n\n```go\ntype Space struct {\n\tGUID                     string\n\tOrganizationGUID         string\n\tName                     string\n\tAllowSSH                 bool\n\tSpaceQuotaDefinitionGUID string\n}\n```\nSpace represents a Cloud Controller Space.\n\n```go\nfunc (space *Space) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Space response.\n\n```go\ntype SpaceQuota struct {\n\tGUID string\n\tName string\n}\n```\n\n```go\nfunc (spaceQuota *SpaceQuota) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Space Quota response.\n\n```go\ntype Stack struct {\n\tGUID        string\n\tName        string\n\tDescription string\n}\n```\nStack represents a Cloud Controller Stack.\n\n```go\nfunc (stack *Stack) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller Stack response.\n\n```go\ntype TargetSettings struct {\n\t// DialTimeout is the DNS timeout used to make all requests to the Cloud\n\t// Controller.\n\tDialTimeout time.Duration\n\n\t// SkipSSLValidation controls whether a client verifies the server's\n\t// certificate chain and host name. If SkipSSLValidation is true, TLS accepts\n\t// any certificate presented by the server and any host name in that\n\t// certificate for *all* client requests going forward.\n\t//\n\t// In this mode, TLS is susceptible to man-in-the-middle attacks. This should\n\t// be used only for testing.\n\tSkipSSLValidation bool\n\n\t// URL is a fully qualified URL to the Cloud Controller API.\n\tURL string\n}\n```\nTargetSettings represents configuration for establishing a connection to the Cloud Controller server.\n\n```go\ntype User struct {\n\tGUID string\n}\n```\nUser represents a Cloud Controller User.\n\n```go\nfunc (user *User) UnmarshalJSON(data []byte) error\n```\nUnmarshalJSON helps unmarshal a Cloud Controller User response.\n\n```go\ntype Warnings []string\n```\nWarnings are a collection of warnings that the Cloud Controller can return back from an API request.\n\n","path":"github.com/loggregator/cli/api/cloudcontroller/ccv2","name":"ccv2","synopsis":"Package ccv2 represents a Cloud Controller V2 client.","isRedistributable":true}
