forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloud_controller_client.go
55 lines (51 loc) · 3.74 KB
/
cloud_controller_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package v3action
import (
"net/url"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3"
)
//go:generate counterfeiter . CloudControllerClient
// CloudControllerClient is the interface to the cloud controller V3 API.
type CloudControllerClient interface {
AppSSHEndpoint() string
AppSSHHostKeyFingerprint() string
AssignSpaceToIsolationSegment(spaceGUID string, isolationSegmentGUID string) (ccv3.Relationship, ccv3.Warnings, error)
CloudControllerAPIVersion() string
CreateApplication(app ccv3.Application) (ccv3.Application, ccv3.Warnings, error)
CreateApplicationProcessScale(appGUID string, process ccv3.Process) (ccv3.Warnings, error)
CreateApplicationTask(appGUID string, task ccv3.Task) (ccv3.Task, ccv3.Warnings, error)
CreateBuild(build ccv3.Build) (ccv3.Build, ccv3.Warnings, error)
CreateIsolationSegment(isolationSegment ccv3.IsolationSegment) (ccv3.IsolationSegment, ccv3.Warnings, error)
CreatePackage(pkg ccv3.Package) (ccv3.Package, ccv3.Warnings, error)
DeleteApplication(guid string) (string, ccv3.Warnings, error)
DeleteApplicationProcessInstance(appGUID string, processType string, instanceIndex int) (ccv3.Warnings, error)
DeleteIsolationSegment(guid string) (ccv3.Warnings, error)
EntitleIsolationSegmentToOrganizations(isoGUID string, orgGUIDs []string) (ccv3.RelationshipList, ccv3.Warnings, error)
GetApplicationDroplets(appGUID string, query url.Values) ([]ccv3.Droplet, ccv3.Warnings, error)
GetApplicationEnvironmentVariables(appGUID string) (ccv3.EnvironmentVariableGroups, ccv3.Warnings, error)
GetApplicationProcessByType(appGUID string, processType string) (ccv3.Process, ccv3.Warnings, error)
GetApplicationProcesses(appGUID string) ([]ccv3.Process, ccv3.Warnings, error)
GetApplicationTasks(appGUID string, query url.Values) ([]ccv3.Task, ccv3.Warnings, error)
GetApplications(query url.Values) ([]ccv3.Application, ccv3.Warnings, error)
GetBuild(guid string) (ccv3.Build, ccv3.Warnings, error)
GetDroplet(guid string) (ccv3.Droplet, ccv3.Warnings, error)
GetIsolationSegment(guid string) (ccv3.IsolationSegment, ccv3.Warnings, error)
GetIsolationSegmentOrganizationsByIsolationSegment(isolationSegmentGUID string) ([]ccv3.Organization, ccv3.Warnings, error)
GetIsolationSegments(query url.Values) ([]ccv3.IsolationSegment, ccv3.Warnings, error)
GetOrganizationDefaultIsolationSegment(orgGUID string) (ccv3.Relationship, ccv3.Warnings, error)
GetOrganizations(query url.Values) ([]ccv3.Organization, ccv3.Warnings, error)
GetPackages(query url.Values) ([]ccv3.Package, ccv3.Warnings, error)
GetPackage(guid string) (ccv3.Package, ccv3.Warnings, error)
GetProcessInstances(processGUID string) ([]ccv3.Instance, ccv3.Warnings, error)
GetSpaceIsolationSegment(spaceGUID string) (ccv3.Relationship, ccv3.Warnings, error)
PatchApplicationProcessHealthCheck(processGUID string, processHealthCheckType string, processHealthCheckEndpoint string) (ccv3.Warnings, error)
PatchOrganizationDefaultIsolationSegment(orgGUID string, isolationSegmentGUID string) (ccv3.Warnings, error)
PollJob(jobURL string) (ccv3.Warnings, error)
RevokeIsolationSegmentFromOrganization(isolationSegmentGUID string, organizationGUID string) (ccv3.Warnings, error)
SetApplicationDroplet(appGUID string, dropletGUID string) (ccv3.Relationship, ccv3.Warnings, error)
StartApplication(appGUID string) (ccv3.Application, ccv3.Warnings, error)
StopApplication(appGUID string) (ccv3.Warnings, error)
UpdateApplication(app ccv3.Application) (ccv3.Application, ccv3.Warnings, error)
PatchApplicationUserProvidedEnvironmentVariables(appGUID string, envVars ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error)
UpdateTask(taskGUID string) (ccv3.Task, ccv3.Warnings, error)
UploadPackage(pkg ccv3.Package, zipFilepath string) (ccv3.Package, ccv3.Warnings, error)
}