github.com/cloudfoundry-community/cloudfoundry-cli@v6.44.1-0.20240130060226-cda5ed8e89a5+incompatible/actor/v7action/cloud_controller_client.go (about)

     1  package v7action
     2  
     3  import (
     4  	"code.cloudfoundry.org/cli/resources"
     5  	"io"
     6  
     7  	"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3"
     8  )
     9  
    10  //go:generate counterfeiter . CloudControllerClient
    11  
    12  // CloudControllerClient is the interface to the cloud controller V3 API.
    13  type CloudControllerClient interface {
    14  	AppSSHEndpoint() string
    15  	AppSSHHostKeyFingerprint() string
    16  	CloudControllerAPIVersion() string
    17  	CreateApplication(app resources.Application) (resources.Application, ccv3.Warnings, error)
    18  	CreateApplicationProcessScale(appGUID string, process resources.Process) (resources.Process, ccv3.Warnings, error)
    19  	CreateApplicationTask(appGUID string, task resources.Task) (resources.Task, ccv3.Warnings, error)
    20  	CreateBuild(build resources.Build) (resources.Build, ccv3.Warnings, error)
    21  	CreateBuildpack(bp resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error)
    22  	CreateDomain(domain resources.Domain) (resources.Domain, ccv3.Warnings, error)
    23  	CreateIsolationSegment(isolationSegment resources.IsolationSegment) (resources.IsolationSegment, ccv3.Warnings, error)
    24  	CreatePackage(pkg resources.Package) (resources.Package, ccv3.Warnings, error)
    25  	DeleteApplication(guid string) (ccv3.JobURL, ccv3.Warnings, error)
    26  	DeleteApplicationProcessInstance(appGUID string, processType string, instanceIndex int) (ccv3.Warnings, error)
    27  	DeleteBuildpack(buildpackGUID string) (ccv3.JobURL, ccv3.Warnings, error)
    28  	DeleteDomain(domainGUID string) (ccv3.JobURL, ccv3.Warnings, error)
    29  	DeleteIsolationSegment(guid string) (ccv3.Warnings, error)
    30  	DeleteIsolationSegmentOrganization(isolationSegmentGUID string, organizationGUID string) (ccv3.Warnings, error)
    31  	DeleteServiceInstanceRelationshipsSharedSpace(serviceInstanceGUID string, sharedToSpaceGUID string) (ccv3.Warnings, error)
    32  	EntitleIsolationSegmentToOrganizations(isoGUID string, orgGUIDs []string) (resources.RelationshipList, ccv3.Warnings, error)
    33  	GetApplicationDropletCurrent(appGUID string) (resources.Droplet, ccv3.Warnings, error)
    34  	GetApplicationEnvironment(appGUID string) (ccv3.Environment, ccv3.Warnings, error)
    35  	GetApplicationManifest(appGUID string) ([]byte, ccv3.Warnings, error)
    36  	GetApplicationProcessByType(appGUID string, processType string) (resources.Process, ccv3.Warnings, error)
    37  	GetApplicationProcesses(appGUID string) ([]resources.Process, ccv3.Warnings, error)
    38  	GetApplications(query ...ccv3.Query) ([]resources.Application, ccv3.Warnings, error)
    39  	GetApplicationTasks(appGUID string, query ...ccv3.Query) ([]resources.Task, ccv3.Warnings, error)
    40  	GetBuild(guid string) (resources.Build, ccv3.Warnings, error)
    41  	GetBuildpacks(query ...ccv3.Query) ([]resources.Buildpack, ccv3.Warnings, error)
    42  	GetDomains(query ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error)
    43  	GetDroplet(guid string) (resources.Droplet, ccv3.Warnings, error)
    44  	GetDroplets(query ...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error)
    45  	GetFeatureFlag(featureFlagName string) (resources.FeatureFlag, ccv3.Warnings, error)
    46  	GetFeatureFlags() ([]resources.FeatureFlag, ccv3.Warnings, error)
    47  	GetIsolationSegment(guid string) (resources.IsolationSegment, ccv3.Warnings, error)
    48  	GetIsolationSegmentOrganizations(isolationSegmentGUID string) ([]resources.Organization, ccv3.Warnings, error)
    49  	GetIsolationSegments(query ...ccv3.Query) ([]resources.IsolationSegment, ccv3.Warnings, error)
    50  	GetOrganizationDefaultIsolationSegment(orgGUID string) (resources.Relationship, ccv3.Warnings, error)
    51  	GetOrganizationDomains(orgGUID string, query ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error)
    52  	GetOrganizations(query ...ccv3.Query) ([]resources.Organization, ccv3.Warnings, error)
    53  	GetPackage(guid string) (resources.Package, ccv3.Warnings, error)
    54  	GetPackages(query ...ccv3.Query) ([]resources.Package, ccv3.Warnings, error)
    55  	GetProcessInstances(processGUID string) ([]ccv3.ProcessInstance, ccv3.Warnings, error)
    56  	GetServiceInstances(query ...ccv3.Query) ([]resources.ServiceInstance, ccv3.Warnings, error)
    57  	GetSpaceIsolationSegment(spaceGUID string) (resources.Relationship, ccv3.Warnings, error)
    58  	GetSpaces(query ...ccv3.Query) ([]resources.Space, ccv3.Warnings, error)
    59  	GetStacks(query ...ccv3.Query) ([]resources.Stack, ccv3.Warnings, error)
    60  	PollJob(jobURL ccv3.JobURL) (ccv3.Warnings, error)
    61  	ResourceMatch(resources []ccv3.Resource) ([]ccv3.Resource, ccv3.Warnings, error)
    62  	SetApplicationDroplet(appGUID string, dropletGUID string) (resources.Relationship, ccv3.Warnings, error)
    63  	SharePrivateDomainToOrgs(domainGuid string, sharedOrgs ccv3.SharedOrgs) (ccv3.Warnings, error)
    64  	ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (resources.RelationshipList, ccv3.Warnings, error)
    65  	UnsharePrivateDomainFromOrg(domainGUID string, sharedOrgGUID string) (ccv3.Warnings, error)
    66  	UpdateApplication(app resources.Application) (resources.Application, ccv3.Warnings, error)
    67  	UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (ccv3.JobURL, ccv3.Warnings, error)
    68  	UpdateApplicationEnvironmentVariables(appGUID string, envVars resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error)
    69  	UpdateApplicationRestart(appGUID string) (resources.Application, ccv3.Warnings, error)
    70  	UpdateApplicationStart(appGUID string) (resources.Application, ccv3.Warnings, error)
    71  	UpdateApplicationStop(appGUID string) (resources.Application, ccv3.Warnings, error)
    72  	UpdateBuildpack(buildpack resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error)
    73  	UpdateFeatureFlag(flag resources.FeatureFlag) (resources.FeatureFlag, ccv3.Warnings, error)
    74  	UpdateOrganization(org resources.Organization) (resources.Organization, ccv3.Warnings, error)
    75  	UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID string, isolationSegmentGUID string) (resources.Relationship, ccv3.Warnings, error)
    76  	UpdateProcess(process resources.Process) (resources.Process, ccv3.Warnings, error)
    77  	UpdateSpaceApplyManifest(spaceGUID string, rawManifest []byte, query ...ccv3.Query) (ccv3.JobURL, ccv3.Warnings, error)
    78  	UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (resources.Relationship, ccv3.Warnings, error)
    79  	UpdateTaskCancel(taskGUID string) (resources.Task, ccv3.Warnings, error)
    80  	UploadBitsPackage(pkg resources.Package, matchedResources []ccv3.Resource, newResources io.Reader, newResourcesLength int64) (resources.Package, ccv3.Warnings, error)
    81  	UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (ccv3.JobURL, ccv3.Warnings, error)
    82  	UploadPackage(pkg resources.Package, zipFilepath string) (resources.Package, ccv3.Warnings, error)
    83  }