v7action

package
v7.0.0-beta.30+incompa... Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package v7action contains the business logic for the commands/v7 package

Index

Constants

View Source
const (
	DefaultFolderPermissions      = 0755
	DefaultArchiveFilePermissions = 0744
)

Variables

This section is empty.

Functions

func GetHumanReadableOrigin

func GetHumanReadableOrigin(user User) string

func SortUsers

func SortUsers(users []User)

func Zipit

func Zipit(source, target, prefix string) error

Zipit zips the source into a .zip file in the target dir

Types

type Actor

type Actor struct {
	CloudControllerClient CloudControllerClient
	Config                Config
	SharedActor           SharedActor
	UAAClient             UAAClient
	Clock                 clock.Clock
}

Actor represents a V7 actor.

func NewActor

func NewActor(client CloudControllerClient, config Config, sharedActor SharedActor, uaaClient UAAClient, clk clock.Clock) *Actor

NewActor returns a new V7 actor.

func (Actor) ApplyApplicationManifest

func (actor Actor) ApplyApplicationManifest(parser ManifestParser, spaceGUID string) (Warnings, error)

ApplyApplicationManifest reads in the manifest from the path and provides it to the cloud controller.

func (Actor) ApplyOrganizationQuotaByName

func (actor Actor) ApplyOrganizationQuotaByName(quotaName string, orgGUID string) (Warnings, error)

func (Actor) ApplySpaceQuotaByName

func (actor Actor) ApplySpaceQuotaByName(quotaName, spaceGUID, orgGUID string) (Warnings, error)

func (Actor) AssignIsolationSegmentToSpaceByNameAndSpace

func (actor Actor) AssignIsolationSegmentToSpaceByNameAndSpace(isolationSegmentName string, spaceGUID string) (Warnings, error)

func (Actor) Authenticate

func (actor Actor) Authenticate(credentials map[string]string, origin string, grantType constant.GrantType) error

func (Actor) CancelDeployment

func (actor Actor) CancelDeployment(deploymentGUID string) (Warnings, error)

func (Actor) CheckRoute

func (actor Actor) CheckRoute(domainName string, hostname string, path string) (bool, Warnings, error)

func (Actor) ClearTarget

func (actor Actor) ClearTarget()

ClearTarget clears target information from the actor.

func (Actor) CloudControllerAPIVersion

func (actor Actor) CloudControllerAPIVersion() string

CloudControllerAPIVersion returns the Cloud Controller API version.

func (Actor) CreateAndUploadBitsPackageByApplicationNameAndSpace

func (actor Actor) CreateAndUploadBitsPackageByApplicationNameAndSpace(appName string, spaceGUID string, bitsPath string) (Package, Warnings, error)

func (Actor) CreateApplicationDroplet

func (actor Actor) CreateApplicationDroplet(appGUID string) (Droplet, Warnings, error)

CreateApplicationDroplet creates a new droplet without a package for the app with guid appGUID.

func (Actor) CreateApplicationInSpace

func (actor Actor) CreateApplicationInSpace(app Application, spaceGUID string) (Application, Warnings, error)

CreateApplicationInSpace creates and returns the application with the given name in the given space.

func (Actor) CreateBitsPackageByApplication

func (actor Actor) CreateBitsPackageByApplication(appGUID string) (Package, Warnings, error)

func (Actor) CreateBuildpack

func (actor Actor) CreateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error)

func (Actor) CreateDeployment

func (actor Actor) CreateDeployment(appGUID string, dropletGUID string) (string, Warnings, error)

func (Actor) CreateDockerPackageByApplication

func (actor Actor) CreateDockerPackageByApplication(appGUID string, dockerImageCredentials DockerImageCredentials) (Package, Warnings, error)

func (Actor) CreateDockerPackageByApplicationNameAndSpace

func (actor Actor) CreateDockerPackageByApplicationNameAndSpace(appName string, spaceGUID string, dockerImageCredentials DockerImageCredentials) (Package, Warnings, error)

func (Actor) CreateIsolationSegmentByName

func (actor Actor) CreateIsolationSegmentByName(isolationSegment IsolationSegment) (Warnings, error)

CreateIsolationSegmentByName creates a given isolation segment.

func (Actor) CreateOrgRole

func (actor Actor) CreateOrgRole(roleType constant.RoleType, orgGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error)

func (Actor) CreateOrganization

func (actor Actor) CreateOrganization(orgName string) (Organization, Warnings, error)

CreateOrganization creates a new organization with the given name

func (Actor) CreateOrganizationQuota

func (actor Actor) CreateOrganizationQuota(name string, limits QuotaLimits) (Warnings, error)

CreateOrganization creates a new organization with the given name

func (Actor) CreatePrivateDomain

func (actor Actor) CreatePrivateDomain(domainName string, orgName string) (Warnings, error)

func (Actor) CreateRoute

func (actor Actor) CreateRoute(spaceGUID, domainName, hostname, path string) (Route, Warnings, error)

func (Actor) CreateServiceBroker

func (actor Actor) CreateServiceBroker(model ServiceBrokerModel) (Warnings, error)

func (Actor) CreateSharedDomain

func (actor Actor) CreateSharedDomain(domainName string, internal bool) (Warnings, error)

func (Actor) CreateSpace

func (actor Actor) CreateSpace(spaceName, orgGUID string) (Space, Warnings, error)

func (Actor) CreateSpaceQuota

func (actor Actor) CreateSpaceQuota(spaceQuotaName string, orgGuid string, limits QuotaLimits) (Warnings, error)

func (Actor) CreateSpaceRole

func (actor Actor) CreateSpaceRole(roleType constant.RoleType, orgGUID string, spaceGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error)

func (Actor) CreateUser

func (actor Actor) CreateUser(username string, password string, origin string) (User, Warnings, error)

CreateUser creates a new user in UAA and registers it with cloud controller.

func (Actor) DeleteApplicationByNameAndSpace

func (actor Actor) DeleteApplicationByNameAndSpace(name, spaceGUID string, deleteRoutes bool) (Warnings, error)

func (Actor) DeleteBuildpackByNameAndStack

func (actor Actor) DeleteBuildpackByNameAndStack(buildpackName string, buildpackStack string) (Warnings, error)

func (Actor) DeleteDomain

func (actor Actor) DeleteDomain(domain Domain) (Warnings, error)

func (Actor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndex

func (actor Actor) DeleteInstanceByApplicationNameSpaceProcessTypeAndIndex(appName string, spaceGUID string, processType string, instanceIndex int) (Warnings, error)

func (Actor) DeleteIsolationSegmentByName

func (actor Actor) DeleteIsolationSegmentByName(name string) (Warnings, error)

DeleteIsolationSegmentByName deletes the given isolation segment.

func (Actor) DeleteIsolationSegmentOrganizationByName

func (actor Actor) DeleteIsolationSegmentOrganizationByName(isolationSegmentName string, orgName string) (Warnings, error)

func (Actor) DeleteOrgRole

func (actor Actor) DeleteOrgRole(roleType constant.RoleType, orgGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error)

func (Actor) DeleteOrganization

func (actor Actor) DeleteOrganization(name string) (Warnings, error)

func (Actor) DeleteOrganizationQuota

func (actor Actor) DeleteOrganizationQuota(quotaName string) (Warnings, error)

func (Actor) DeleteOrphanedRoutes

func (actor Actor) DeleteOrphanedRoutes(spaceGUID string) (Warnings, error)

func (Actor) DeleteRoute

func (actor Actor) DeleteRoute(domainName, hostname, path string) (Warnings, error)

func (Actor) DeleteServiceBroker

func (actor Actor) DeleteServiceBroker(serviceBrokerGUID string) (Warnings, error)

func (Actor) DeleteSpaceByNameAndOrganizationName

func (actor Actor) DeleteSpaceByNameAndOrganizationName(spaceName string, orgName string) (Warnings, error)

func (Actor) DeleteSpaceQuotaByName

func (actor Actor) DeleteSpaceQuotaByName(quotaName string, orgGUID string) (Warnings, error)

func (Actor) DeleteSpaceRole

func (actor Actor) DeleteSpaceRole(roleType constant.RoleType, spaceGUID string, userNameOrGUID string, userOrigin string, isClient bool) (Warnings, error)

func (Actor) DeleteUser

func (actor Actor) DeleteUser(userGuid string) (Warnings, error)

DeleteUser

func (Actor) DisableFeatureFlag

func (actor Actor) DisableFeatureFlag(flagName string) (Warnings, error)

func (Actor) EnableFeatureFlag

func (actor Actor) EnableFeatureFlag(flagName string) (Warnings, error)

func (Actor) EntitleIsolationSegmentToOrganizationByName

func (actor Actor) EntitleIsolationSegmentToOrganizationByName(isolationSegmentName string, orgName string) (Warnings, error)

EntitleIsolationSegmentToOrganizationByName entitles the given organization to use the specified isolation segment

func (Actor) GetAppFeature

func (actor Actor) GetAppFeature(appGUID string, featureName string) (ccv3.ApplicationFeature, Warnings, error)

func (Actor) GetAppSummariesForSpace

func (actor Actor) GetAppSummariesForSpace(spaceGUID string, labelSelector string) ([]ApplicationSummary, Warnings, error)

func (Actor) GetApplicationByNameAndSpace

func (actor Actor) GetApplicationByNameAndSpace(appName string, spaceGUID string) (Application, Warnings, error)

GetApplicationByNameAndSpace returns the application with the given name in the given space.

func (Actor) GetApplicationDroplets

func (actor Actor) GetApplicationDroplets(appName string, spaceGUID string) ([]Droplet, Warnings, error)

GetApplicationDroplets returns the list of droplets that belong to application.

func (*Actor) GetApplicationLabels

func (actor *Actor) GetApplicationLabels(appName string, spaceGUID string) (map[string]types.NullString, Warnings, error)

func (*Actor) GetApplicationPackages

func (actor *Actor) GetApplicationPackages(appName string, spaceGUID string) ([]Package, Warnings, error)

GetApplicationPackages returns a list of package of an app.

func (Actor) GetApplicationProcessHealthChecksByNameAndSpace

func (actor Actor) GetApplicationProcessHealthChecksByNameAndSpace(appName string, spaceGUID string) ([]ProcessHealthCheck, Warnings, error)

func (Actor) GetApplicationRoutes

func (actor Actor) GetApplicationRoutes(appGUID string) ([]Route, Warnings, error)

func (Actor) GetApplicationTasks

func (actor Actor) GetApplicationTasks(appGUID string, sortOrder SortOrder) ([]Task, Warnings, error)

GetApplicationTasks returns a list of tasks associated with the provided appplication GUID.

func (Actor) GetApplicationsByGUIDs

func (actor Actor) GetApplicationsByGUIDs(appGUIDs []string) ([]Application, Warnings, error)

func (Actor) GetApplicationsByNamesAndSpace

func (actor Actor) GetApplicationsByNamesAndSpace(appNames []string, spaceGUID string) ([]Application, Warnings, error)

func (Actor) GetApplicationsBySpace

func (actor Actor) GetApplicationsBySpace(spaceGUID string) ([]Application, Warnings, error)

GetApplicationsBySpace returns all applications in a space.

func (Actor) GetBuildpackByNameAndStack

func (actor Actor) GetBuildpackByNameAndStack(buildpackName string, buildpackStack string) (Buildpack, Warnings, error)

GetBuildpackByNameAndStack returns a buildpack with the provided name and stack. If `buildpackStack` is not specified, and there are multiple buildpacks with the same name, it will return the one with no stack, if present.

func (*Actor) GetBuildpackLabels

func (actor *Actor) GetBuildpackLabels(buildpackName string, buildpackStack string) (map[string]types.NullString, Warnings, error)

func (Actor) GetBuildpacks

func (actor Actor) GetBuildpacks(labelSelector string) ([]Buildpack, Warnings, error)

func (Actor) GetCurrentDropletByApplication

func (actor Actor) GetCurrentDropletByApplication(appGUID string) (Droplet, Warnings, error)

func (Actor) GetDefaultDomain

func (actor Actor) GetDefaultDomain(orgGUID string) (Domain, Warnings, error)

func (Actor) GetDetailedAppSummary

func (actor Actor) GetDetailedAppSummary(appName, spaceGUID string, withObfuscatedValues bool) (DetailedApplicationSummary, Warnings, error)

func (Actor) GetDomain

func (actor Actor) GetDomain(domainGUID string) (Domain, Warnings, error)

func (Actor) GetDomainAndOrgGUIDsByName

func (actor Actor) GetDomainAndOrgGUIDsByName(domainName string, orgName string) (string, string, Warnings, error)

func (Actor) GetDomainByName

func (actor Actor) GetDomainByName(domainName string) (Domain, Warnings, error)

func (*Actor) GetDomainLabels

func (actor *Actor) GetDomainLabels(domainName string) (map[string]types.NullString, Warnings, error)

func (Actor) GetEffectiveIsolationSegmentBySpace

func (actor Actor) GetEffectiveIsolationSegmentBySpace(spaceGUID string, orgDefaultIsolationSegmentGUID string) (IsolationSegment, Warnings, error)

GetEffectiveIsolationSegmentBySpace returns the space's effective isolation segment.

If the space has its own isolation segment, that will be returned.

If the space does not have one, the organization's default isolation segment (GUID passed in) will be returned.

If the space does not have one and the passed in organization default isolation segment GUID is empty, a NoRelationshipError will be returned.

func (*Actor) GetEnvironmentVariableGroup

func (actor *Actor) GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (EnvironmentVariableGroup, Warnings, error)

GetEnvironmentVariableGroup returns the values of an environment variable group.

func (*Actor) GetEnvironmentVariablesByApplicationNameAndSpace

func (actor *Actor) GetEnvironmentVariablesByApplicationNameAndSpace(appName string, spaceGUID string) (EnvironmentVariableGroups, Warnings, error)

GetEnvironmentVariablesByApplicationNameAndSpace returns the environment variables for an application.

func (Actor) GetFeatureFlagByName

func (actor Actor) GetFeatureFlagByName(featureFlagName string) (FeatureFlag, Warnings, error)

GetFeatureFlagByName returns a featureFlag with the provided name.

func (Actor) GetFeatureFlags

func (actor Actor) GetFeatureFlags() ([]FeatureFlag, Warnings, error)

func (Actor) GetIsolationSegmentByName

func (actor Actor) GetIsolationSegmentByName(name string) (IsolationSegment, Warnings, error)

GetIsolationSegmentByName returns the requested isolation segment.

func (Actor) GetIsolationSegmentSummaries

func (actor Actor) GetIsolationSegmentSummaries() ([]IsolationSegmentSummary, Warnings, error)

GetIsolationSegmentSummaries returns all isolation segments and their entitled orgs

func (Actor) GetIsolationSegmentsByOrganization

func (actor Actor) GetIsolationSegmentsByOrganization(orgGUID string) ([]IsolationSegment, Warnings, error)

func (Actor) GetLatestActiveDeploymentForApp

func (actor Actor) GetLatestActiveDeploymentForApp(appGUID string) (Deployment, Warnings, error)

func (Actor) GetNewestReadyPackageForApplication

func (actor Actor) GetNewestReadyPackageForApplication(appGUID string) (Package, Warnings, error)

func (Actor) GetOrgUsersByRoleType

func (actor Actor) GetOrgUsersByRoleType(orgGuid string) (map[constant.RoleType][]User, Warnings, error)

func (Actor) GetOrganizationByGUID

func (actor Actor) GetOrganizationByGUID(orgGUID string) (Organization, Warnings, error)

GetOrganizationByGUID returns the organization with the given guid.

func (Actor) GetOrganizationByName

func (actor Actor) GetOrganizationByName(name string) (Organization, Warnings, error)

GetOrganizationByName returns the organization with the given name.

func (Actor) GetOrganizationDefaultIsolationSegment

func (actor Actor) GetOrganizationDefaultIsolationSegment(orgGUID string) (string, Warnings, error)

GetOrganizationDefaultIsolationSegment gets a default isolation segment on an organization.

func (Actor) GetOrganizationDomains

func (actor Actor) GetOrganizationDomains(orgGuid string, labelSelector string) ([]Domain, Warnings, error)

func (*Actor) GetOrganizationLabels

func (actor *Actor) GetOrganizationLabels(orgName string) (map[string]types.NullString, Warnings, error)

func (Actor) GetOrganizationQuotaByName

func (actor Actor) GetOrganizationQuotaByName(orgQuotaName string) (OrganizationQuota, Warnings, error)

func (Actor) GetOrganizationQuotas

func (actor Actor) GetOrganizationQuotas() ([]OrganizationQuota, Warnings, error)

func (Actor) GetOrganizationSpaces

func (actor Actor) GetOrganizationSpaces(orgGUID string) ([]Space, Warnings, error)

GetOrganizationSpaces returns a list of spaces in the specified org

func (Actor) GetOrganizationSpacesWithLabelSelector

func (actor Actor) GetOrganizationSpacesWithLabelSelector(orgGUID string, labelSelector string) ([]Space, Warnings, error)

GetOrganizationSpacesWithLabelSelector returns a list of spaces in the specified org

func (Actor) GetOrganizationSummaryByName

func (actor Actor) GetOrganizationSummaryByName(orgName string) (OrganizationSummary, Warnings, error)

func (Actor) GetOrganizations

func (actor Actor) GetOrganizations(labelSelector string) ([]Organization, Warnings, error)

func (Actor) GetProcess

func (actor Actor) GetProcess(processGUID string) (Process, Warnings, error)

func (Actor) GetProcessByTypeAndApplication

func (actor Actor) GetProcessByTypeAndApplication(processType string, appGUID string) (Process, Warnings, error)

GetProcessByTypeAndApplication returns a process for the given application and type.

func (Actor) GetRawApplicationManifestByNameAndSpace

func (actor Actor) GetRawApplicationManifestByNameAndSpace(appName string, spaceGUID string) ([]byte, Warnings, error)

func (Actor) GetRecentEventsByApplicationNameAndSpace

func (actor Actor) GetRecentEventsByApplicationNameAndSpace(appName string, spaceGUID string) ([]Event, Warnings, error)

func (Actor) GetRecentLogsForApplicationByNameAndSpace

func (actor Actor) GetRecentLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) ([]sharedaction.LogMessage, Warnings, error)

func (Actor) GetRoleGUID

func (actor Actor) GetRoleGUID(queryKey ccv3.QueryKey, orgOrSpaceGUID string, userGUID string, roleType constant.RoleType) (string, Warnings, error)

func (Actor) GetRoute

func (actor Actor) GetRoute(routePath string, spaceGUID string) (Route, Warnings, error)

func (Actor) GetRouteByAttributes

func (actor Actor) GetRouteByAttributes(domainName string, domainGUID string, hostname string, path string) (Route, Warnings, error)

func (Actor) GetRouteDestinationByAppGUID

func (actor Actor) GetRouteDestinationByAppGUID(routeGUID string, appGUID string) (RouteDestination, Warnings, error)

func (Actor) GetRouteDestinations

func (actor Actor) GetRouteDestinations(routeGUID string) ([]RouteDestination, Warnings, error)

func (*Actor) GetRouteLabels

func (actor *Actor) GetRouteLabels(routeName string, spaceGUID string) (map[string]types.NullString, Warnings, error)

func (Actor) GetRouteSummaries

func (actor Actor) GetRouteSummaries(routes []Route) ([]RouteSummary, Warnings, error)

func (Actor) GetRoutesByOrg

func (actor Actor) GetRoutesByOrg(orgGUID string, labelSelector string) ([]Route, Warnings, error)

func (Actor) GetRoutesBySpace

func (actor Actor) GetRoutesBySpace(spaceGUID string, labelSelector string) ([]Route, Warnings, error)

func (Actor) GetSSHEnabled

func (actor Actor) GetSSHEnabled(appGUID string) (ccv3.SSHEnabled, Warnings, error)

func (Actor) GetSSHEnabledByAppName

func (actor Actor) GetSSHEnabledByAppName(appName string, spaceGUID string) (ccv3.SSHEnabled, Warnings, error)

func (Actor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex

func (actor Actor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex(
	appName string, spaceGUID string, processType string, processIndex uint,
) (SSHAuthentication, Warnings, error)

GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex returns back the SSH authentication information for the SSH session.

func (Actor) GetServiceBrokerByName

func (actor Actor) GetServiceBrokerByName(serviceBrokerName string) (ServiceBroker, Warnings, error)

func (Actor) GetServiceBrokerLabels

func (actor Actor) GetServiceBrokerLabels(serviceBrokerName string) (map[string]types.NullString, Warnings, error)

func (Actor) GetServiceBrokers

func (actor Actor) GetServiceBrokers() ([]ServiceBroker, Warnings, error)

func (Actor) GetServiceInstanceByNameAndSpace

func (actor Actor) GetServiceInstanceByNameAndSpace(serviceInstanceName string, spaceGUID string) (ServiceInstance, Warnings, error)

func (Actor) GetServiceOfferingByNameAndBroker

func (actor Actor) GetServiceOfferingByNameAndBroker(serviceOfferingName, serviceBrokerName string) (ServiceOffering, Warnings, error)

func (Actor) GetServiceOfferingLabels

func (actor Actor) GetServiceOfferingLabels(serviceOfferingName, serviceBrokerName string) (map[string]types.NullString, Warnings, error)

func (Actor) GetServicePlanByNameOfferingAndBroker

func (actor Actor) GetServicePlanByNameOfferingAndBroker(servicePlanName, serviceOfferingName, serviceBrokerName string) (ServicePlan, Warnings, error)

func (Actor) GetServicePlanLabels

func (actor Actor) GetServicePlanLabels(servicePlanName, serviceOfferingName, serviceBrokerName string) (map[string]types.NullString, Warnings, error)

func (Actor) GetSpaceByNameAndOrganization

func (actor Actor) GetSpaceByNameAndOrganization(spaceName string, orgGUID string) (Space, Warnings, error)

func (Actor) GetSpaceFeature

func (actor Actor) GetSpaceFeature(spaceName string, orgGUID string, feature string) (bool, Warnings, error)

func (*Actor) GetSpaceLabels

func (actor *Actor) GetSpaceLabels(spaceName string, orgGUID string) (map[string]types.NullString, Warnings, error)

func (Actor) GetSpaceQuotaByName

func (actor Actor) GetSpaceQuotaByName(spaceQuotaName string, orgGUID string) (SpaceQuota, Warnings, error)

func (Actor) GetSpaceQuotasByOrgGUID

func (actor Actor) GetSpaceQuotasByOrgGUID(orgGUID string) ([]SpaceQuota, Warnings, error)

func (Actor) GetSpaceSummaryByNameAndOrganization

func (actor Actor) GetSpaceSummaryByNameAndOrganization(spaceName string, orgGUID string) (SpaceSummary, Warnings, error)

func (Actor) GetSpaceUsersByRoleType

func (actor Actor) GetSpaceUsersByRoleType(spaceGuid string) (map[constant.RoleType][]User, Warnings, error)

func (*Actor) GetStackByName

func (actor *Actor) GetStackByName(stackName string) (Stack, Warnings, error)

func (*Actor) GetStackLabels

func (actor *Actor) GetStackLabels(stackName string) (map[string]types.NullString, Warnings, error)

func (Actor) GetStacks

func (actor Actor) GetStacks(labelSelector string) ([]Stack, Warnings, error)

func (Actor) GetStreamingLogsForApplicationByNameAndSpace

func (actor Actor) GetStreamingLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc, Warnings, error)

func (Actor) GetTaskBySequenceIDAndApplication

func (actor Actor) GetTaskBySequenceIDAndApplication(sequenceID int, appGUID string) (Task, Warnings, error)

func (Actor) GetUnstagedNewestPackageGUID

func (actor Actor) GetUnstagedNewestPackageGUID(appGUID string) (string, Warnings, error)

func (Actor) GetUser

func (actor Actor) GetUser(username, origin string) (User, error)

GetUser gets a user in UAA with the given username and (if provided) origin. It returns an error if no matching user is found. It returns an error if multiple matching users are found. NOTE: The UAA /Users endpoint used here requires admin scopes.

func (Actor) MapRoute

func (actor Actor) MapRoute(routeGUID string, appGUID string) (Warnings, error)

func (Actor) PollBuild

func (actor Actor) PollBuild(buildGUID string, appName string) (Droplet, Warnings, error)

func (Actor) PollPackage

func (actor Actor) PollPackage(pkg Package) (Package, Warnings, error)

PollPackage returns a package of an app.

func (Actor) PollProcesses

func (actor Actor) PollProcesses(processes []ccv3.Process) (bool, Warnings, error)

PollProcesses - return true if there's no need to keep polling

func (Actor) PollStart

func (actor Actor) PollStart(appGUID string, noWait bool) (Warnings, error)

PollStart polls an application's processes until some are started. If noWait is false, it waits for at least one instance of all processes to be running. If noWait is true, it only waits for an instance of the web process to be running.

func (Actor) PollStartForRolling

func (actor Actor) PollStartForRolling(appGUID string, deploymentGUID string, noWait bool) (Warnings, error)

PollStartForRolling polls a deploying application's processes until some are started. It does the same thing as PollStart, except it accounts for rolling deployments and whether they have failed or been canceled during polling.

func (Actor) PollUploadBuildpackJob

func (actor Actor) PollUploadBuildpackJob(jobURL ccv3.JobURL) (Warnings, error)

func (*Actor) PrepareBuildpackBits

func (actor *Actor) PrepareBuildpackBits(inputPath string, tmpDirPath string, downloader Downloader) (string, error)

func (Actor) RefreshAccessToken

func (actor Actor) RefreshAccessToken() (string, error)

func (Actor) RenameApplicationByNameAndSpaceGUID

func (actor Actor) RenameApplicationByNameAndSpaceGUID(appName, newAppName, spaceGUID string) (Application, Warnings, error)

func (Actor) RenameOrganization

func (actor Actor) RenameOrganization(oldOrgName, newOrgName string) (Organization, Warnings, error)

func (Actor) RenameSpaceByNameAndOrganizationGUID

func (actor Actor) RenameSpaceByNameAndOrganizationGUID(oldSpaceName, newSpaceName, orgGUID string) (Space, Warnings, error)

func (Actor) ResetOrganizationDefaultIsolationSegment

func (actor Actor) ResetOrganizationDefaultIsolationSegment(orgGUID string) (Warnings, error)

ResetOrganizationDefaultIsolationSegment resets the default isolation segment fon an organization.

func (Actor) ResetSpaceIsolationSegment

func (actor Actor) ResetSpaceIsolationSegment(orgGUID string, spaceGUID string) (string, Warnings, error)

ResetSpaceIsolationSegment disassociates a space from an isolation segment.

If the space's organization has a default isolation segment, return its name. Otherwise return the empty string.

func (Actor) ResourceMatch

func (actor Actor) ResourceMatch(resources []sharedaction.V3Resource) ([]sharedaction.V3Resource, Warnings, error)

func (Actor) RestartApplication

func (actor Actor) RestartApplication(appGUID string, noWait bool) (Warnings, error)

RestartApplication restarts an application and waits for it to start.

func (Actor) RunTask

func (actor Actor) RunTask(appGUID string, task Task) (Task, Warnings, error)

RunTask runs the provided command in the application environment associated with the provided application GUID.

func (Actor) ScaleProcessByApplication

func (actor Actor) ScaleProcessByApplication(appGUID string, process Process) (Warnings, error)

func (Actor) ScheduleTokenRefresh

func (actor Actor) ScheduleTokenRefresh() (chan bool, error)

func (Actor) SetApplicationDroplet

func (actor Actor) SetApplicationDroplet(appGUID string, dropletGUID string) (Warnings, error)

func (Actor) SetApplicationDropletByApplicationNameAndSpace

func (actor Actor) SetApplicationDropletByApplicationNameAndSpace(appName string, spaceGUID string, dropletGUID string) (Warnings, error)

SetApplicationDropletByApplicationNameAndSpace sets the droplet for an application.

func (Actor) SetApplicationManifest

func (actor Actor) SetApplicationManifest(appGUID string, rawManifest []byte) (Warnings, error)

func (Actor) SetApplicationProcessHealthCheckTypeByNameAndSpace

func (actor Actor) SetApplicationProcessHealthCheckTypeByNameAndSpace(
	appName string,
	spaceGUID string,
	healthCheckType constant.HealthCheckType,
	httpEndpoint string,
	processType string,
	invocationTimeout int64,
) (Application, Warnings, error)

SetApplicationProcessHealthCheckTypeByNameAndSpace sets the health check information of the provided processType for an application with the given name and space GUID.

func (*Actor) SetEnvironmentVariableByApplicationNameAndSpace

func (actor *Actor) SetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, envPair EnvironmentVariablePair) (Warnings, error)

SetEnvironmentVariableByApplicationNameAndSpace adds an EnvironmentVariablePair to an application. It must be restarted for changes to take effect.

func (*Actor) SetEnvironmentVariableGroup

func (actor *Actor) SetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, newEnvVars ccv3.EnvironmentVariables) (Warnings, error)

SetEnvironmentVariableGroup sets a given environment variable group according to the given keys and values. Any existing variables that are not present in the given set of variables will be unset.

func (Actor) SetOrganizationDefaultIsolationSegment

func (actor Actor) SetOrganizationDefaultIsolationSegment(orgGUID string, isoSegGUID string) (Warnings, error)

SetOrganizationDefaultIsolationSegment sets a default isolation segment on an organization.

func (Actor) SetSpaceManifest

func (actor Actor) SetSpaceManifest(spaceGUID string, rawManifest []byte) (Warnings, error)

func (Actor) SetTarget

func (actor Actor) SetTarget(settings TargetSettings) (Warnings, error)

SetTarget targets the Cloud Controller using the client and sets target information in the actor based on the response.

func (Actor) SharePrivateDomain

func (actor Actor) SharePrivateDomain(domainName string, orgName string) (Warnings, error)

func (Actor) ShareServiceInstanceToSpaces

func (actor Actor) ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (RelationshipList, Warnings, error)

func (Actor) StageApplicationPackage

func (actor Actor) StageApplicationPackage(packageGUID string) (Build, Warnings, error)

func (Actor) StagePackage

func (actor Actor) StagePackage(packageGUID, appName, spaceGUID string) (<-chan Droplet, <-chan Warnings, <-chan error)

func (Actor) StartApplication

func (actor Actor) StartApplication(appGUID string) (Warnings, error)

StartApplication starts an application.

func (Actor) StopApplication

func (actor Actor) StopApplication(appGUID string) (Warnings, error)

StopApplication stops an application.

func (Actor) TerminateTask

func (actor Actor) TerminateTask(taskGUID string) (Task, Warnings, error)

func (Actor) UAAAPIVersion

func (actor Actor) UAAAPIVersion() string

UAAAPIVersion returns the UAA API version.

func (Actor) UnmapRoute

func (actor Actor) UnmapRoute(routeGUID string, destinationGUID string) (Warnings, error)

func (*Actor) UnsetEnvironmentVariableByApplicationNameAndSpace

func (actor *Actor) UnsetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, environmentVariableName string) (Warnings, error)

UnsetEnvironmentVariableByApplicationNameAndSpace removes an environment variable from an application. It must be restarted for changes to take effect.

func (Actor) UnsetSpaceQuota

func (actor Actor) UnsetSpaceQuota(spaceQuotaName, spaceName, orgGUID string) (Warnings, error)

func (Actor) UnsharePrivateDomain

func (actor Actor) UnsharePrivateDomain(domainName string, orgName string) (Warnings, error)

func (Actor) UnshareServiceInstanceByServiceInstanceAndSpace

func (actor Actor) UnshareServiceInstanceByServiceInstanceAndSpace(serviceInstanceGUID string, sharedToSpaceGUID string) (Warnings, error)

func (Actor) UpdateAppFeature

func (actor Actor) UpdateAppFeature(app Application, enabled bool, featureName string) (Warnings, error)

func (Actor) UpdateApplication

func (actor Actor) UpdateApplication(app Application) (Application, Warnings, error)

UpdateApplication updates the buildpacks on an application

func (*Actor) UpdateApplicationLabelsByApplicationName

func (actor *Actor) UpdateApplicationLabelsByApplicationName(appName string, spaceGUID string, labels map[string]types.NullString) (Warnings, error)

func (Actor) UpdateBuildpackByNameAndStack

func (actor Actor) UpdateBuildpackByNameAndStack(buildpackName string, buildpackStack string, buildpack Buildpack) (Buildpack, Warnings, error)

func (*Actor) UpdateBuildpackLabelsByBuildpackNameAndStack

func (actor *Actor) UpdateBuildpackLabelsByBuildpackNameAndStack(buildpackName string, stack string, labels map[string]types.NullString) (Warnings, error)

func (*Actor) UpdateDomainLabelsByDomainName

func (actor *Actor) UpdateDomainLabelsByDomainName(domainName string, labels map[string]types.NullString) (Warnings, error)

func (*Actor) UpdateOrganizationLabelsByOrganizationName

func (actor *Actor) UpdateOrganizationLabelsByOrganizationName(orgName string, labels map[string]types.NullString) (Warnings, error)

func (Actor) UpdateOrganizationQuota

func (actor Actor) UpdateOrganizationQuota(quotaName string, newName string, limits QuotaLimits) (Warnings, error)

func (Actor) UpdateProcessByTypeAndApplication

func (actor Actor) UpdateProcessByTypeAndApplication(processType string, appGUID string, updatedProcess Process) (Warnings, error)

func (*Actor) UpdateRouteLabels

func (actor *Actor) UpdateRouteLabels(routeName string, spaceGUID string, labels map[string]types.NullString) (Warnings, error)

func (Actor) UpdateServiceBroker

func (actor Actor) UpdateServiceBroker(serviceBrokerGUID string, model ServiceBrokerModel) (Warnings, error)

func (*Actor) UpdateServiceBrokerLabelsByServiceBrokerName

func (actor *Actor) UpdateServiceBrokerLabelsByServiceBrokerName(serviceBrokerName string, labels map[string]types.NullString) (Warnings, error)

func (*Actor) UpdateServiceOfferingLabels

func (actor *Actor) UpdateServiceOfferingLabels(serviceOfferingName string, serviceBrokerName string, labels map[string]types.NullString) (Warnings, error)

func (*Actor) UpdateServicePlanLabels

func (actor *Actor) UpdateServicePlanLabels(servicePlanName string, serviceOfferingName string, serviceBrokerName string, labels map[string]types.NullString) (Warnings, error)

func (Actor) UpdateSpaceFeature

func (actor Actor) UpdateSpaceFeature(spaceName string, orgGUID string, enabled bool, feature string) (Warnings, error)

func (*Actor) UpdateSpaceLabelsBySpaceName

func (actor *Actor) UpdateSpaceLabelsBySpaceName(spaceName string, orgGUID string, labels map[string]types.NullString) (Warnings, error)

func (Actor) UpdateSpaceQuota

func (actor Actor) UpdateSpaceQuota(currentName, orgGUID, newName string, limits QuotaLimits) (Warnings, error)

func (*Actor) UpdateStackLabelsByStackName

func (actor *Actor) UpdateStackLabelsByStackName(stackName string, labels map[string]types.NullString) (Warnings, error)

func (Actor) UploadBitsPackage

func (actor Actor) UploadBitsPackage(pkg Package, matchedResources []sharedaction.V3Resource, newResources io.Reader, newResourcesLength int64) (Package, Warnings, error)

func (Actor) UploadBuildpack

func (actor Actor) UploadBuildpack(guid string, pathToBuildpackBits string, progressBar SimpleProgressBar) (ccv3.JobURL, Warnings, error)

func (Actor) UploadDroplet

func (actor Actor) UploadDroplet(dropletGUID string, dropletPath string, progressReader io.Reader, size int64) (Warnings, error)

type Application

type Application struct {
	Name                string
	GUID                string
	StackName           string
	State               constant.ApplicationState
	LifecycleType       constant.AppLifecycleType
	LifecycleBuildpacks []string
	Metadata            *Metadata
}

Application represents a V3 actor application.

func (Application) Started

func (app Application) Started() bool

func (Application) Stopped

func (app Application) Stopped() bool

type ApplicationFeature

type ApplicationFeature ccv3.Buildpack

type ApplicationSummary

type ApplicationSummary struct {
	Application
	ProcessSummaries ProcessSummaries
	Routes           []Route
}

func (ApplicationSummary) GetIsolationSegmentName

func (a ApplicationSummary) GetIsolationSegmentName() (string, bool)

type Build

type Build struct {
	GUID string
}

type Buildpack

type Buildpack ccv3.Buildpack

type CloudControllerClient

type CloudControllerClient interface {
	ApplyOrganizationQuota(quotaGUID string, orgGUID string) (ccv3.RelationshipList, ccv3.Warnings, error)
	ApplySpaceQuota(quotaGUID string, spaceGUID string) (ccv3.RelationshipList, ccv3.Warnings, error)
	AppSSHEndpoint() string
	AppSSHHostKeyFingerprint() string
	CheckRoute(domainGUID string, hostname string, path string) (bool, ccv3.Warnings, error)
	CloudControllerAPIVersion() string
	CancelDeployment(deploymentGUID string) (ccv3.Warnings, error)
	CreateApplication(app ccv3.Application) (ccv3.Application, ccv3.Warnings, error)
	CreateApplicationDeployment(appGUID string, dropletGUID string) (string, ccv3.Warnings, error)
	CreateApplicationProcessScale(appGUID string, process ccv3.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)
	CreateBuildpack(bp ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error)
	CreateDomain(domain ccv3.Domain) (ccv3.Domain, ccv3.Warnings, error)
	CreateDroplet(appGUID string) (ccv3.Droplet, ccv3.Warnings, error)
	CreateIsolationSegment(isolationSegment ccv3.IsolationSegment) (ccv3.IsolationSegment, ccv3.Warnings, error)
	CreateOrganization(orgName string) (ccv3.Organization, ccv3.Warnings, error)
	CreateOrganizationQuota(orgQuota ccv3.OrganizationQuota) (ccv3.OrganizationQuota, ccv3.Warnings, error)
	CreatePackage(pkg ccv3.Package) (ccv3.Package, ccv3.Warnings, error)
	CreateRole(role ccv3.Role) (ccv3.Role, ccv3.Warnings, error)
	CreateRoute(route ccv3.Route) (ccv3.Route, ccv3.Warnings, error)
	CreateServiceBroker(serviceBroker ccv3.ServiceBrokerModel) (ccv3.JobURL, ccv3.Warnings, error)
	CreateSpace(space ccv3.Space) (ccv3.Space, ccv3.Warnings, error)
	CreateSpaceQuota(spaceQuota ccv3.SpaceQuota) (ccv3.SpaceQuota, ccv3.Warnings, error)
	CreateUser(userGUID string) (ccv3.User, ccv3.Warnings, error)
	DeleteApplication(guid string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteApplicationProcessInstance(appGUID string, processType string, instanceIndex int) (ccv3.Warnings, error)
	DeleteBuildpack(buildpackGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteDomain(domainGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteIsolationSegment(guid string) (ccv3.Warnings, error)
	DeleteIsolationSegmentOrganization(isolationSegmentGUID string, organizationGUID string) (ccv3.Warnings, error)
	DeleteOrganization(orgGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteOrganizationQuota(quotaGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteOrphanedRoutes(spaceGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteRole(roleGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteRoute(routeGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteServiceBroker(serviceBrokerGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteServiceInstanceRelationshipsSharedSpace(serviceInstanceGUID string, sharedToSpaceGUID string) (ccv3.Warnings, error)
	DeleteSpaceQuota(spaceQuotaGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteSpace(guid string) (ccv3.JobURL, ccv3.Warnings, error)
	DeleteUser(userGUID string) (ccv3.JobURL, ccv3.Warnings, error)
	EntitleIsolationSegmentToOrganizations(isoGUID string, orgGUIDs []string) (ccv3.RelationshipList, ccv3.Warnings, error)
	GetApplicationByNameAndSpace(appName string, spaceGUID string) (ccv3.Application, ccv3.Warnings, error)
	GetApplicationDropletCurrent(appGUID string) (ccv3.Droplet, ccv3.Warnings, error)
	GetApplicationEnvironment(appGUID string) (ccv3.Environment, ccv3.Warnings, error)
	GetApplicationManifest(appGUID string) ([]byte, ccv3.Warnings, error)
	GetApplicationProcessByType(appGUID string, processType string) (ccv3.Process, ccv3.Warnings, error)
	GetApplicationProcesses(appGUID string) ([]ccv3.Process, ccv3.Warnings, error)
	GetApplicationRoutes(appGUID string) ([]ccv3.Route, ccv3.Warnings, error)
	GetApplicationTasks(appGUID string, query ...ccv3.Query) ([]ccv3.Task, ccv3.Warnings, error)
	GetApplications(query ...ccv3.Query) ([]ccv3.Application, ccv3.Warnings, error)
	GetBuild(guid string) (ccv3.Build, ccv3.Warnings, error)
	GetBuildpacks(query ...ccv3.Query) ([]ccv3.Buildpack, ccv3.Warnings, error)
	GetDefaultDomain(orgGuid string) (ccv3.Domain, ccv3.Warnings, error)
	GetDeployment(guid string) (ccv3.Deployment, ccv3.Warnings, error)
	GetDeployments(query ...ccv3.Query) ([]ccv3.Deployment, ccv3.Warnings, error)
	GetDomain(GUID string) (ccv3.Domain, ccv3.Warnings, error)
	GetDomains(query ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error)
	GetDroplet(guid string) (ccv3.Droplet, ccv3.Warnings, error)
	GetDroplets(query ...ccv3.Query) ([]ccv3.Droplet, ccv3.Warnings, error)
	GetEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName) (ccv3.EnvironmentVariables, ccv3.Warnings, error)
	GetEvents(query ...ccv3.Query) ([]ccv3.Event, ccv3.Warnings, error)
	GetFeatureFlag(featureFlagName string) (ccv3.FeatureFlag, ccv3.Warnings, error)
	GetFeatureFlags() ([]ccv3.FeatureFlag, ccv3.Warnings, error)
	GetInfo() (ccv3.Info, ccv3.ResourceLinks, ccv3.Warnings, error)
	GetIsolationSegment(guid string) (ccv3.IsolationSegment, ccv3.Warnings, error)
	GetIsolationSegmentOrganizations(isolationSegmentGUID string) ([]ccv3.Organization, ccv3.Warnings, error)
	GetIsolationSegments(query ...ccv3.Query) ([]ccv3.IsolationSegment, ccv3.Warnings, error)
	GetNewApplicationProcesses(appGUID string, deploymentGUID string) ([]ccv3.Process, ccv3.Warnings, error)
	GetOrganization(orgGUID string) (ccv3.Organization, ccv3.Warnings, error)
	GetOrganizationDefaultIsolationSegment(orgGUID string) (ccv3.Relationship, ccv3.Warnings, error)
	GetOrganizationDomains(orgGUID string, query ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error)
	GetOrganizationQuota(quotaGUID string) (ccv3.OrganizationQuota, ccv3.Warnings, error)
	GetOrganizationQuotas(query ...ccv3.Query) ([]ccv3.OrganizationQuota, ccv3.Warnings, error)
	GetOrganizations(query ...ccv3.Query) ([]ccv3.Organization, ccv3.Warnings, error)
	GetPackage(guid string) (ccv3.Package, ccv3.Warnings, error)
	GetPackages(query ...ccv3.Query) ([]ccv3.Package, ccv3.Warnings, error)
	GetPackageDroplets(packageGUID string, query ...ccv3.Query) ([]ccv3.Droplet, ccv3.Warnings, error)
	GetProcess(processGUID string) (ccv3.Process, ccv3.Warnings, error)
	GetProcessInstances(processGUID string) ([]ccv3.ProcessInstance, ccv3.Warnings, error)
	GetProcessSidecars(processGUID string) ([]ccv3.Sidecar, ccv3.Warnings, error)
	GetRoles(query ...ccv3.Query) ([]ccv3.Role, ccv3.IncludedResources, ccv3.Warnings, error)
	RootResponse() (ccv3.Info, ccv3.Warnings, error)
	GetRouteDestinations(routeGUID string) ([]ccv3.RouteDestination, ccv3.Warnings, error)
	GetRoutes(query ...ccv3.Query) ([]ccv3.Route, ccv3.Warnings, error)
	GetServiceBrokers(query ...ccv3.Query) ([]ccv3.ServiceBroker, ccv3.Warnings, error)
	GetServiceInstances(query ...ccv3.Query) ([]ccv3.ServiceInstance, ccv3.Warnings, error)
	GetServiceOfferings(query ...ccv3.Query) ([]ccv3.ServiceOffering, ccv3.Warnings, error)
	GetServicePlans(query ...ccv3.Query) ([]ccv3.ServicePlan, ccv3.Warnings, error)
	GetSpaceFeature(spaceGUID string, featureName string) (bool, ccv3.Warnings, error)
	GetSpaceIsolationSegment(spaceGUID string) (ccv3.Relationship, ccv3.Warnings, error)
	GetSpaceQuota(spaceQuotaGUID string) (ccv3.SpaceQuota, ccv3.Warnings, error)
	GetSpaces(query ...ccv3.Query) ([]ccv3.Space, ccv3.Warnings, error)
	GetSpaceQuotas(query ...ccv3.Query) ([]ccv3.SpaceQuota, ccv3.Warnings, error)
	GetSSHEnabled(appGUID string) (ccv3.SSHEnabled, ccv3.Warnings, error)
	GetAppFeature(appGUID string, featureName string) (ccv3.ApplicationFeature, ccv3.Warnings, error)
	GetStacks(query ...ccv3.Query) ([]ccv3.Stack, ccv3.Warnings, error)
	GetUser(userGUID string) (ccv3.User, ccv3.Warnings, error)
	GetUsers(query ...ccv3.Query) ([]ccv3.User, ccv3.Warnings, error)
	MapRoute(routeGUID string, appGUID string) (ccv3.Warnings, error)
	PollJob(jobURL ccv3.JobURL) (ccv3.Warnings, error)
	ResourceMatch(resources []ccv3.Resource) ([]ccv3.Resource, ccv3.Warnings, error)
	SetApplicationDroplet(appGUID string, dropletGUID string) (ccv3.Relationship, ccv3.Warnings, error)
	SharePrivateDomainToOrgs(domainGuid string, sharedOrgs ccv3.SharedOrgs) (ccv3.Warnings, error)
	ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (ccv3.RelationshipList, ccv3.Warnings, error)
	TargetCF(settings ccv3.TargetSettings) (ccv3.Warnings, error)
	UnmapRoute(routeGUID string, destinationGUID string) (ccv3.Warnings, error)
	UnsharePrivateDomainFromOrg(domainGUID string, sharedOrgGUID string) (ccv3.Warnings, error)
	UpdateAppFeature(appGUID string, enabled bool, featureName string) (ccv3.Warnings, error)
	UpdateApplication(app ccv3.Application) (ccv3.Application, ccv3.Warnings, error)
	UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (ccv3.JobURL, ccv3.Warnings, error)
	UpdateApplicationEnvironmentVariables(appGUID string, envVars ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error)
	UpdateApplicationRestart(appGUID string) (ccv3.Application, ccv3.Warnings, error)
	UpdateApplicationStart(appGUID string) (ccv3.Application, ccv3.Warnings, error)
	UpdateApplicationStop(appGUID string) (ccv3.Application, ccv3.Warnings, error)
	UpdateBuildpack(buildpack ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error)
	UpdateEnvironmentVariableGroup(group constant.EnvironmentVariableGroupName, envVars ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error)
	UpdateFeatureFlag(flag ccv3.FeatureFlag) (ccv3.FeatureFlag, ccv3.Warnings, error)
	UpdateOrganization(org ccv3.Organization) (ccv3.Organization, ccv3.Warnings, error)
	UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID string, isolationSegmentGUID string) (ccv3.Relationship, ccv3.Warnings, error)
	UpdateOrganizationQuota(orgQuota ccv3.OrganizationQuota) (ccv3.OrganizationQuota, ccv3.Warnings, error)
	UpdateProcess(process ccv3.Process) (ccv3.Process, ccv3.Warnings, error)
	UpdateResourceMetadata(resource string, resourceGUID string, metadata ccv3.Metadata) (ccv3.ResourceMetadata, ccv3.Warnings, error)
	UpdateResourceMetadataAsync(resource string, resourceGUID string, metadata ccv3.Metadata) (ccv3.JobURL, ccv3.Warnings, error)
	UpdateSpace(space ccv3.Space) (ccv3.Space, ccv3.Warnings, error)
	UpdateSpaceApplyManifest(spaceGUID string, rawManifest []byte, query ...ccv3.Query) (ccv3.JobURL, ccv3.Warnings, error)
	UpdateSpaceFeature(spaceGUID string, enabled bool, featureName string) (ccv3.Warnings, error)
	UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (ccv3.Relationship, ccv3.Warnings, error)
	UpdateSpaceQuota(spaceQuota ccv3.SpaceQuota) (ccv3.SpaceQuota, ccv3.Warnings, error)
	UnsetSpaceQuota(spaceQuotaGUID, spaceGUID string) (ccv3.Warnings, error)
	UpdateServiceBroker(serviceBrokerGUID string, serviceBroker ccv3.ServiceBrokerModel) (ccv3.JobURL, ccv3.Warnings, error)
	UpdateTaskCancel(taskGUID string) (ccv3.Task, ccv3.Warnings, error)
	UploadBitsPackage(pkg ccv3.Package, matchedResources []ccv3.Resource, newResources io.Reader, newResourcesLength int64) (ccv3.Package, ccv3.Warnings, error)
	UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (ccv3.JobURL, ccv3.Warnings, error)
	UploadDropletBits(dropletGUID string, dropletPath string, droplet io.Reader, dropletLength int64) (ccv3.JobURL, ccv3.Warnings, error)
	UploadPackage(pkg ccv3.Package, zipFilepath string) (ccv3.Package, ccv3.Warnings, error)
}

CloudControllerClient is the interface to the cloud controller V3 API.

type Config

type Config interface {
	AccessToken() string
	DialTimeout() time.Duration
	PollingInterval() time.Duration
	RefreshToken() string
	SSHOAuthClient() string
	SetAccessToken(token string)
	SetRefreshToken(token string)
	SetTargetInformation(api string, apiVersion string, auth string, minCLIVersion string, doppler string, routing string, skipSSLValidation bool)
	SetTokenInformation(accessToken string, refreshToken string, token string)
	SetUAAClientCredentials(client string, clientSecret string)
	SetUAAGrantType(grantType string)
	SkipSSLValidation() bool
	StagingTimeout() time.Duration
	StartupTimeout() time.Duration
	Target() string
	UAAGrantType() string
	UnsetOrganizationAndSpaceInformation()
}

type Deployment

type Deployment ccv3.Deployment

type DetailedApplicationSummary

type DetailedApplicationSummary struct {
	ApplicationSummary
	CurrentDroplet Droplet
}

v7action.DetailedApplicationSummary represents an application with its processes and droplet.

type DockerImageCredentials

type DockerImageCredentials struct {
	Path     string
	Username string
	Password string
}

type Domain

type Domain ccv3.Domain

func (Domain) Shared

func (domain Domain) Shared() bool

type Downloader

type Downloader interface {
	Download(url string, tmpDirPath string) (string, error)
}

type Droplet

type Droplet struct {
	GUID       string
	State      constant.DropletState
	CreatedAt  string
	Stack      string
	Image      string
	Buildpacks []DropletBuildpack
}

Droplet represents a Cloud Controller droplet.

type DropletBuildpack

type DropletBuildpack ccv3.DropletBuildpack

type EnvironmentVariableGroup

type EnvironmentVariableGroup ccv3.EnvironmentVariables

EnvironmentVariableGroup represents a CC environment variable group (e.g. staging or running)

type EnvironmentVariableGroups

type EnvironmentVariableGroups ccv3.Environment

EnvironmentVariableGroups represents all environment variables for application

type EnvironmentVariablePair

type EnvironmentVariablePair struct {
	Key   string
	Value string
}

EnvironmentVariablePair represents an environment variable and its value on an application

type Event

type Event struct {
	GUID        string
	Time        time.Time
	Type        string
	ActorName   string
	Description string
}

type FeatureFlag

type FeatureFlag ccv3.FeatureFlag

type IsolationSegment

type IsolationSegment ccv3.IsolationSegment

IsolationSegment represents a V3 actor IsolationSegment.

type IsolationSegmentSummary

type IsolationSegmentSummary struct {
	Name         string
	EntitledOrgs []string
}

type JobURL

type JobURL ccv3.JobURL

type ManifestParser

type ManifestParser interface {
	AppNames() []string
	RawAppManifest(name string) ([]byte, error)
}

type Metadata

type Metadata ccv3.Metadata

Metadata represents V3 resource metadata

type Organization

type Organization ccv3.Organization

Organization represents a V7 actor organization.

type OrganizationQuota

type OrganizationQuota ccv3.OrganizationQuota

type OrganizationSummary

type OrganizationSummary struct {
	Organization
	DomainNames []string
	QuotaName   string
	SpaceNames  []string

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

type Package

type Package ccv3.Package

type Process

type Process ccv3.Process

Process represents a V3 actor process.

type ProcessHealthCheck

type ProcessHealthCheck struct {
	ProcessType       string
	HealthCheckType   constant.HealthCheckType
	Endpoint          string
	InvocationTimeout int64
}

type ProcessHealthChecks

type ProcessHealthChecks []ProcessHealthCheck

func (ProcessHealthChecks) Sort

func (phs ProcessHealthChecks) Sort()

type ProcessInstance

type ProcessInstance ccv3.ProcessInstance

func (ProcessInstance) Running

func (instance ProcessInstance) Running() bool

Running will return true if the instance is running.

func (*ProcessInstance) StartTime

func (instance *ProcessInstance) StartTime() time.Time

StartTime returns the time that the instance started.

type ProcessInstances

type ProcessInstances []ccv3.ProcessInstance

func (ProcessInstances) AllCrashed

func (pi ProcessInstances) AllCrashed() bool

func (ProcessInstances) AnyRunning

func (pi ProcessInstances) AnyRunning() bool

func (ProcessInstances) Empty

func (pi ProcessInstances) Empty() bool

type ProcessSummaries

type ProcessSummaries []ProcessSummary

func (ProcessSummaries) Sort

func (ps ProcessSummaries) Sort()

func (ProcessSummaries) String

func (ps ProcessSummaries) String() string

type ProcessSummary

type ProcessSummary struct {
	Process

	Sidecars []Sidecar

	InstanceDetails []ProcessInstance
}

ProcessSummary represents a process with instance details.

func (ProcessSummary) HealthyInstanceCount

func (p ProcessSummary) HealthyInstanceCount() int

func (ProcessSummary) TotalInstanceCount

func (p ProcessSummary) TotalInstanceCount() int

type ProgressBar

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

func NewProgressBar

func NewProgressBar() *ProgressBar

func (*ProgressBar) Initialize

func (p *ProgressBar) Initialize(path string) (io.Reader, int64, error)

func (*ProgressBar) Terminate

func (p *ProgressBar) Terminate()

type Quota

type Quota ccv3.Quota

type QuotaLimits

type QuotaLimits struct {
	TotalMemoryInMB       *types.NullInt
	PerProcessMemoryInMB  *types.NullInt
	TotalInstances        *types.NullInt
	PaidServicesAllowed   *bool
	TotalServiceInstances *types.NullInt
	TotalRoutes           *types.NullInt
	TotalReservedPorts    *types.NullInt
}

type RelationshipList

type RelationshipList ccv3.RelationshipList

type Role

type Role ccv3.Role

type Route

type Route struct {
	GUID         string
	SpaceGUID    string
	DomainGUID   string
	Host         string
	Path         string
	DomainName   string
	SpaceName    string
	URL          string
	Destinations []RouteDestination
	Metadata     *Metadata
}

type RouteDestination

type RouteDestination struct {
	GUID string
	App  RouteDestinationApp
}

type RouteDestinationApp

type RouteDestinationApp ccv3.RouteDestinationApp

type RouteSummary

type RouteSummary struct {
	Route
	AppNames []string
}

type SSHActor

type SSHActor interface {
	ExecuteSecureShell(sshOptions sharedaction.SSHOptions) error
}

type SSHAuthentication

type SSHAuthentication struct {
	Endpoint           string
	HostKeyFingerprint string
	Passcode           string
	Username           string
}

type ServiceBroker

type ServiceBroker = ccv3.ServiceBroker

type ServiceBrokerModel

type ServiceBrokerModel = ccv3.ServiceBrokerModel

type ServiceInstance

type ServiceInstance ccv3.ServiceInstance

type ServiceOffering

type ServiceOffering ccv3.ServiceOffering

type ServicePlan

type ServicePlan ccv3.ServicePlan

type SharedActor

type SharedActor interface {
	GatherArchiveResources(archivePath string) ([]sharedaction.Resource, error)
	GatherDirectoryResources(sourceDir string) ([]sharedaction.Resource, error)
	ZipArchiveResources(sourceArchivePath string, filesToInclude []sharedaction.Resource) (string, error)
	ZipDirectoryResources(sourceDir string, filesToInclude []sharedaction.Resource) (string, error)
}

type SharedOrgs

type SharedOrgs ccv3.SharedOrgs

type Sidecar

type Sidecar ccv3.Sidecar

type SimpleProgressBar

type SimpleProgressBar interface {
	Initialize(path string) (io.Reader, int64, error)
	Terminate()
}

type SortOrder

type SortOrder string

SortOrder is used for sorting.

const (
	Ascending  SortOrder = "Ascending"
	Descending SortOrder = "Descending"
)

type Space

type Space ccv3.Space

type SpaceQuota

type SpaceQuota ccv3.SpaceQuota

type SpaceSummary

type SpaceSummary struct {
	Space
	Name                 string
	OrgName              string
	AppNames             []string
	ServiceInstanceNames []string
	IsolationSegmentName string
	QuotaName            string
}

type Stack

type Stack ccv3.Stack

type TargetSettings

type TargetSettings ccv3.TargetSettings

type Task

type Task ccv3.Task

Task represents a V3 actor Task.

type UAAClient

type UAAClient interface {
	APIVersion() string
	Authenticate(credentials map[string]string, origin string, grantType constant.GrantType) (string, string, error)
	CreateUser(username string, password string, origin string) (uaa.User, error)
	DeleteUser(userGuid string) (uaa.User, error)
	GetSSHPasscode(accessToken string, sshOAuthClient string) (string, error)
	ListUsers(userName, origin string) ([]uaa.User, error)
	RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error)
	ValidateClientUser(clientID string) error
}

type User

type User ccv3.User

User represents a CLI user. This means that v7action.User has the same fields as a ccv3.User

type Warnings

type Warnings []string

Warnings is a list of warnings returned back from the cloud controller

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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