Documentation ¶
Overview ¶
Package v2action contains the business logic for the commands/v6 package Actors in this package should only call CC v2 API endpoints
Index ¶
- Constants
- Variables
- func ActorToCCRoute(route Route) ccv2.Route
- func Zipit(source, target, prefix string) error
- type Actor
- func (actor Actor) Authenticate(ID string, secret string, origin string, grantType constant.GrantType) error
- func (actor Actor) AuthorizationEndpoint() string
- func (actor Actor) BindSecurityGroupToSpace(securityGroupGUID string, spaceGUID string, ...) (Warnings, error)
- func (actor Actor) BindServiceByApplicationAndServiceInstance(appGUID string, serviceInstanceGUID string) (Warnings, error)
- func (actor Actor) BindServiceBySpace(appName string, serviceInstanceName string, spaceGUID string, ...) (ServiceBinding, Warnings, error)
- func (actor Actor) CheckRoute(route Route) (bool, Warnings, error)
- func (actor Actor) ClearTarget()
- func (actor Actor) CloudControllerAPIVersion() string
- func (actor Actor) CreateApplication(application Application) (Application, Warnings, error)
- func (actor Actor) CreateApplicationManifestByNameAndSpace(appName string, spaceGUID string) (manifest.Application, Warnings, error)
- func (actor *Actor) CreateBuildpack(name string, position int, enabled bool) (Buildpack, Warnings, error)
- func (actor Actor) CreateOrganization(orgName string, quotaName string) (Organization, Warnings, error)
- func (actor Actor) CreateRoute(route Route, generatePort bool) (Route, Warnings, error)
- func (actor Actor) CreateRouteWithExistenceCheck(orgGUID string, spaceName string, route Route, generatePort bool) (Route, Warnings, error)
- func (actor Actor) CreateServiceBroker(serviceBrokerName, username, password, brokerURI, spaceGUID string) (ServiceBroker, Warnings, error)
- func (actor Actor) CreateServiceInstance(...) (ServiceInstance, Warnings, error)
- func (actor Actor) CreateServiceKey(serviceInstanceName, keyName, spaceGUID string, ...) (ServiceKey, Warnings, error)
- func (actor Actor) CreateSharedDomain(domain string, routerGroup RouterGroup, isInternal bool) (Warnings, error)
- func (actor Actor) CreateSpace(spaceName, orgName, quotaName string) (Space, Warnings, error)
- func (actor Actor) CreateUser(username string, password string, origin string) (User, Warnings, error)
- func (actor Actor) DeleteOrganization(orgName string) (Warnings, error)
- func (actor Actor) DeleteRoute(routeGUID string) (Warnings, error)
- func (actor Actor) DeleteSpaceByNameAndOrganizationName(spaceName string, orgName string) (Warnings, error)
- func (actor Actor) DeleteUnmappedRoutes(spaceGUID string) (Warnings, error)
- func (actor Actor) DisablePlanForAllOrgs(serviceName, servicePlanName, brokerName string) (Warnings, error)
- func (actor Actor) DisablePlanForOrg(serviceName, servicePlanName, orgName, brokerName string) (Warnings, error)
- func (actor Actor) DisableServiceForAllOrgs(serviceName, brokerName string) (Warnings, error)
- func (actor Actor) DisableServiceForOrg(serviceName, orgName, brokerName string) (Warnings, error)
- func (actor Actor) EnablePlanForAllOrgs(serviceName, servicePlanName, brokerName string) (Warnings, error)
- func (actor Actor) EnablePlanForOrg(serviceName, servicePlanName, orgName, brokerName string) (Warnings, error)
- func (actor Actor) EnableServiceForAllOrgs(serviceName, brokerName string) (Warnings, error)
- func (actor Actor) EnableServiceForOrg(serviceName, orgName, brokerName string) (Warnings, error)
- func (actor Actor) FindRouteBoundToSpaceWithSettings(route Route) (Route, Warnings, error)
- func (actor Actor) GetApplication(guid string) (Application, Warnings, error)
- func (actor Actor) GetApplicationByNameAndSpace(name string, spaceGUID string) (Application, Warnings, error)
- func (actor Actor) GetApplicationInstancesByApplication(guid string) (map[int]ApplicationInstance, Warnings, error)
- func (actor Actor) GetApplicationInstancesWithStatsByApplication(guid string) ([]ApplicationInstanceWithStats, Warnings, error)
- func (actor Actor) GetApplicationRoutes(applicationGUID string) (Routes, Warnings, error)
- func (actor Actor) GetApplicationSummaryByNameAndSpace(name string, spaceGUID string) (ApplicationSummary, Warnings, error)
- func (actor Actor) GetApplicationsBySpace(spaceGUID string) ([]Application, Warnings, error)
- func (actor Actor) GetDomain(domainGUID string) (Domain, Warnings, error)
- func (actor Actor) GetDomains(orgGUID string) ([]Domain, Warnings, error)
- func (actor Actor) GetDomainsByNameAndOrganization(domainNames []string, orgGUID string) ([]Domain, Warnings, error)
- func (actor Actor) GetFeatureFlags() ([]FeatureFlag, Warnings, error)
- func (actor Actor) GetLoginPrompts() map[string]coreconfig.AuthPrompt
- func (actor Actor) GetOrganization(guid string) (Organization, Warnings, error)
- func (actor Actor) GetOrganizationByName(orgName string) (Organization, Warnings, error)
- func (actor Actor) GetOrganizationDomains(orgGUID string) ([]Domain, Warnings, error)
- func (actor Actor) GetOrganizationQuota(guid string) (OrganizationQuota, Warnings, error)
- func (actor Actor) GetOrganizationQuotaByName(quotaName string) (OrganizationQuota, Warnings, error)
- func (actor Actor) GetOrganizationSpaces(orgGUID string) ([]Space, Warnings, error)
- func (actor Actor) GetOrganizationSummaryByName(orgName string) (OrganizationSummary, Warnings, error)
- func (actor Actor) GetOrganizations() ([]Organization, Warnings, error)
- func (actor Actor) GetOrphanedRoutesBySpace(spaceGUID string) ([]Route, Warnings, error)
- func (actor Actor) GetPrivateDomain(domainGUID string) (Domain, Warnings, error)
- func (actor Actor) GetRecentLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) ([]sharedaction.LogMessage, Warnings, error)
- func (actor Actor) GetRouteApplications(routeGUID string) ([]Application, Warnings, error)
- func (actor Actor) GetRouteByComponents(route Route) (Route, Warnings, error)
- func (actor Actor) GetRouterGroupByName(routerGroupName string, client RouterClient) (RouterGroup, error)
- func (actor Actor) GetSSHPasscode() (string, error)
- func (actor Actor) GetSecurityGroupByName(securityGroupName string) (SecurityGroup, Warnings, error)
- func (actor Actor) GetSecurityGroupsWithOrganizationSpaceAndLifecycle(includeStaging bool) ([]SecurityGroupWithOrganizationSpaceAndLifecycle, Warnings, error)
- func (actor Actor) GetService(serviceGUID string) (Service, Warnings, error)
- func (actor Actor) GetServiceBindingByApplicationAndServiceInstance(appGUID string, serviceInstanceGUID string) (ServiceBinding, Warnings, error)
- func (actor Actor) GetServiceBindingsByServiceInstance(serviceInstanceGUID string) ([]ServiceBinding, Warnings, error)
- func (actor Actor) GetServiceBindingsByUserProvidedServiceInstance(userProvidedServiceInstanceGUID string) ([]ServiceBinding, Warnings, error)
- func (actor Actor) GetServiceBrokerByName(brokerName string) (ServiceBroker, Warnings, error)
- func (actor Actor) GetServiceBrokers() ([]ServiceBroker, Warnings, error)
- func (actor Actor) GetServiceByNameAndBrokerName(serviceName, serviceBrokerName string) (Service, Warnings, error)
- func (actor Actor) GetServiceInstance(guid string) (ServiceInstance, Warnings, error)
- func (actor Actor) GetServiceInstanceByNameAndSpace(name string, spaceGUID string) (ServiceInstance, Warnings, error)
- func (actor Actor) GetServiceInstanceSharedFromByServiceInstance(serviceInstanceGUID string) (ServiceInstanceSharedFrom, Warnings, error)
- func (actor Actor) GetServiceInstanceSharedTosByServiceInstance(serviceInstanceGUID string) ([]ServiceInstanceSharedTo, Warnings, error)
- func (actor Actor) GetServiceInstanceSummaryByNameAndSpace(name string, spaceGUID string) (ServiceInstanceSummary, Warnings, error)
- func (actor Actor) GetServiceInstancesByApplication(appGUID string) ([]ServiceInstance, Warnings, error)
- func (actor Actor) GetServiceInstancesBySpace(spaceGUID string) ([]ServiceInstance, Warnings, error)
- func (actor Actor) GetServiceInstancesSummaryBySpace(spaceGUID string) ([]ServiceInstanceSummary, Warnings, error)
- func (actor Actor) GetServicePlan(servicePlanGUID string) (ServicePlan, Warnings, error)
- func (actor *Actor) GetServicePlanVisibilities(planGUID string) ([]ServicePlanVisibility, Warnings, error)
- func (actor Actor) GetServicePlansForService(serviceName, brokerName string) ([]ServicePlan, Warnings, error)
- func (actor Actor) GetServiceSummaryByName(serviceName string) (ServiceSummary, Warnings, error)
- func (actor Actor) GetServiceSummaryForSpaceByName(spaceGUID, serviceName string) (ServiceSummary, Warnings, error)
- func (actor Actor) GetServicesSummaries() ([]ServiceSummary, Warnings, error)
- func (actor Actor) GetServicesSummariesForSpace(spaceGUID string) ([]ServiceSummary, Warnings, error)
- func (actor Actor) GetServicesWithPlans(filters ...Filter) (ServicesWithPlans, Warnings, error)
- func (actor Actor) GetSharedDomain(domainGUID string) (Domain, Warnings, error)
- func (actor Actor) GetSpaceByOrganizationAndName(orgGUID string, spaceName string) (Space, Warnings, error)
- func (actor Actor) GetSpaceQuota(guid string) (SpaceQuota, Warnings, error)
- func (actor Actor) GetSpaceQuotaByName(quotaName, orgGUID string) (SpaceQuota, Warnings, error)
- func (actor Actor) GetSpaceRoutes(spaceGUID string) ([]Route, Warnings, error)
- func (actor Actor) GetSpaceRunningSecurityGroupsBySpace(spaceGUID string) ([]SecurityGroup, Warnings, error)
- func (actor Actor) GetSpaceStagingSecurityGroupsBySpace(spaceGUID string) ([]SecurityGroup, Warnings, error)
- func (actor Actor) GetSpaceSummaryByOrganizationAndName(orgGUID string, name string) (SpaceSummary, Warnings, error)
- func (actor Actor) GetStack(guid string) (Stack, Warnings, error)
- func (actor Actor) GetStackByName(stackName string) (Stack, Warnings, error)
- func (actor Actor) GetStreamingLogs(appGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc)
- func (actor Actor) GetStreamingLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc, Warnings, ...)
- func (actor Actor) GrantOrgManagerByUsername(guid string, username string) (Warnings, error)
- func (actor Actor) GrantSpaceDeveloperByUsername(spaceGUID string, username string) (Warnings, error)
- func (actor Actor) GrantSpaceManagerByUsername(orgGUID string, spaceGUID string, username string) (Warnings, error)
- func (actor Actor) MapRouteToApplication(routeGUID string, appGUID string) (Warnings, error)
- func (actor Actor) MinCLIVersion() string
- func (actor Actor) OrganizationExistsWithName(orgName string) (bool, Warnings, error)
- func (actor Actor) ParseAccessToken(accessToken string) (jwt.JWT, error)
- func (actor Actor) PollJob(job Job) (Warnings, error)
- func (actor *Actor) PrepareBuildpackBits(inputPath string, tmpDirPath string, downloader Downloader) (string, error)
- func (actor Actor) PurgeServiceOffering(service Service) (Warnings, error)
- func (actor Actor) RefreshAccessToken(refreshToken string) (string, error)
- func (actor *Actor) RenameBuildpack(oldName string, newName string, stackName string) (Warnings, error)
- func (actor Actor) ResourceMatch(allResources []Resource) ([]Resource, []Resource, Warnings, error)
- func (actor Actor) RestageApplication(app Application) (<-chan ApplicationStateChange, <-chan string, <-chan error)
- func (actor Actor) RestartApplication(app Application) (<-chan ApplicationStateChange, <-chan string, <-chan error)
- func (actor Actor) ScheduleTokenRefresh(after func(time.Duration) <-chan time.Time, stop chan struct{}, ...) (<-chan error, error)
- func (actor Actor) ServiceExistsWithName(serviceName string) (bool, Warnings, error)
- func (actor Actor) SetApplicationHealthCheckTypeByNameAndSpace(name string, spaceGUID string, ...) (Application, Warnings, error)
- func (actor Actor) SetSpaceQuota(spaceGUID, quotaGUID string) (Warnings, error)
- func (actor Actor) SetTarget(settings TargetSettings) (Warnings, error)
- func (actor Actor) StartApplication(app Application) (<-chan ApplicationStateChange, <-chan string, <-chan error)
- func (actor Actor) UAAAPIVersion() string
- func (actor Actor) UnbindSecurityGroupByNameAndSpace(securityGroupName string, spaceGUID string, ...) (Warnings, error)
- func (actor Actor) UnbindSecurityGroupByNameOrganizationNameAndSpaceName(securityGroupName string, orgName string, spaceName string, ...) (Warnings, error)
- func (actor Actor) UnbindServiceBySpace(appName string, serviceInstanceName string, spaceGUID string) (ServiceBinding, Warnings, error)
- func (actor Actor) UnmapRouteFromApplication(routeGUID string, appGUID string) (Warnings, error)
- func (actor Actor) UpdateApplication(application Application) (Application, Warnings, error)
- func (actor *Actor) UpdateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error)
- func (actor *Actor) UpdateBuildpackByNameAndStack(name, currentStack string, position types.NullInt, locked types.NullBool, ...) (string, Warnings, error)
- func (actor Actor) UpdateServiceInstanceMaintenanceInfo(guid string, maintenanceInfo MaintenanceInfo) (Warnings, error)
- func (actor Actor) UpdateUserProvidedServiceInstance(guid string, instance UserProvidedServiceInstance) (Warnings, error)
- func (actor Actor) UploadApplicationPackage(appGUID string, existingResources []Resource, newResources io.Reader, ...) (Job, Warnings, error)
- func (actor *Actor) UploadBuildpack(GUID string, pathToBuildpackBits string, progBar SimpleProgressBar) (Warnings, error)
- func (actor *Actor) UploadBuildpackFromPath(inputPath, buildpackGUID string, progressBar SimpleProgressBar) (Warnings, error)
- func (actor Actor) UploadDroplet(appGUID string, droplet io.Reader, dropletLength int64) (Job, Warnings, error)
- func (Actor) WriteApplicationManifest(manifestApp manifest.Application, manifestFilePath string) error
- type Application
- func (application Application) CalculatedBuildpack() string
- func (application Application) CalculatedCommand() string
- func (application Application) CalculatedHealthCheckEndpoint() string
- func (application Application) StagingCompleted() bool
- func (application Application) StagingFailed() bool
- func (application Application) StagingFailedMessage() string
- func (application Application) StagingFailedNoAppDetected() bool
- func (application Application) Started() bool
- func (application Application) Stopped() bool
- func (application Application) String() string
- type ApplicationInstance
- type ApplicationInstanceState
- type ApplicationInstanceWithStats
- type ApplicationStateChange
- type ApplicationSummary
- type BoundApplication
- type Buildpack
- type CloudControllerClient
- type Config
- type Domain
- type Downloader
- type FeatureFlag
- type FeatureFlagState
- type Filter
- type Job
- type LastOperation
- type MaintenanceInfo
- type NOAAClient
- type Organization
- type OrganizationQuota
- type OrganizationSummary
- type ProgressBar
- type Resource
- type Route
- type RouterClient
- type RouterGroup
- type Routes
- type SecurityGroup
- type SecurityGroupRule
- type SecurityGroupWithOrganizationSpaceAndLifecycle
- type Service
- type ServiceBinding
- type ServiceBroker
- type ServiceBrokerSummary
- type ServiceInstance
- type ServiceInstanceShareType
- type ServiceInstanceSharedFrom
- type ServiceInstanceSharedTo
- type ServiceInstanceSummary
- func (s ServiceInstanceSummary) IsNotShared() bool
- func (s ServiceInstanceSummary) IsShareable() bool
- func (s ServiceInstanceSummary) IsSharedFrom() bool
- func (s ServiceInstanceSummary) IsSharedTo() bool
- func (s ServiceInstanceSummary) UpgradeAvailable() bool
- func (s ServiceInstanceSummary) UpgradeSupported() bool
- type ServiceKey
- type ServicePlan
- type ServicePlanSummary
- type ServicePlanVisibility
- type ServiceSummary
- type ServicesWithPlans
- type SimpleProgressBar
- type Space
- type SpaceQuota
- type SpaceSummary
- type SpaceWithLifecycle
- type Stack
- type TargetSettings
- type UAAClient
- type User
- type UserProvidedServiceInstance
- func (u UserProvidedServiceInstance) WithCredentials(creds map[string]interface{}) UserProvidedServiceInstance
- func (u UserProvidedServiceInstance) WithRouteServiceURL(url string) UserProvidedServiceInstance
- func (u UserProvidedServiceInstance) WithSyslogDrainURL(url string) UserProvidedServiceInstance
- func (u UserProvidedServiceInstance) WithTags(tags []string) UserProvidedServiceInstance
- type Warnings
Constants ¶
const ( DefaultFolderPermissions = 0755 DefaultArchiveFilePermissions = 0744 MaxResourceMatchChunkSize = 1000 )
Variables ¶
var DefaultIgnoreLines = []string{
".cfignore",
".DS_Store",
".git",
".gitignore",
".hg",
".svn",
"_darcs",
"manifest.yaml",
"manifest.yml",
}
Functions ¶
func ActorToCCRoute ¶
Types ¶
type Actor ¶
type Actor struct { CloudControllerClient CloudControllerClient Config Config UAAClient UAAClient // contains filtered or unexported fields }
Actor handles all business logic for Cloud Controller v2 operations.
func NewActor ¶
func NewActor(ccClient CloudControllerClient, uaaClient UAAClient, config Config) *Actor
NewActor returns a new actor.
func (Actor) Authenticate ¶
func (actor Actor) Authenticate(ID string, secret string, origin string, grantType constant.GrantType) error
Authenticate authenticates the user in UAA and sets the returned tokens in the config.
It unsets the currently targeted org and space whether authentication succeeds or not.
func (Actor) AuthorizationEndpoint ¶
func (Actor) BindSecurityGroupToSpace ¶
func (Actor) BindServiceByApplicationAndServiceInstance ¶
func (actor Actor) BindServiceByApplicationAndServiceInstance(appGUID string, serviceInstanceGUID string) (Warnings, error)
BindServiceByApplicationAndServiceInstance binds the service instance to an application.
func (Actor) BindServiceBySpace ¶
func (actor Actor) BindServiceBySpace(appName string, serviceInstanceName string, spaceGUID string, bindingName string, parameters map[string]interface{}) (ServiceBinding, Warnings, error)
BindServiceBySpace binds the service instance to an application for a given space.
func (Actor) ClearTarget ¶
func (actor Actor) ClearTarget()
ClearTarget clears target information from the actor.
func (Actor) CloudControllerAPIVersion ¶
CloudControllerAPIVersion returns the Cloud Controller API version.
func (Actor) CreateApplication ¶
func (actor Actor) CreateApplication(application Application) (Application, Warnings, error)
CreateApplication creates an application.
func (Actor) CreateApplicationManifestByNameAndSpace ¶
func (*Actor) CreateBuildpack ¶
func (Actor) CreateOrganization ¶
func (actor Actor) CreateOrganization(orgName string, quotaName string) (Organization, Warnings, error)
CreateOrganization creates an Organization based on the provided orgName.
func (Actor) CreateRoute ¶
func (Actor) CreateRouteWithExistenceCheck ¶
func (Actor) CreateServiceBroker ¶
func (actor Actor) CreateServiceBroker(serviceBrokerName, username, password, brokerURI, spaceGUID string) (ServiceBroker, Warnings, error)
CreateServiceBroker returns a ServiceBroker and any warnings or errors.
func (Actor) CreateServiceInstance ¶
func (actor Actor) CreateServiceInstance(spaceGUID, serviceName, servicePlanName, serviceInstanceName, brokerName string, params map[string]interface{}, tags []string) (ServiceInstance, Warnings, error)
CreateServiceInstance creates a new service instance with the provided attributes.
func (Actor) CreateServiceKey ¶
func (Actor) CreateSharedDomain ¶
func (Actor) CreateSpace ¶
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) DeleteOrganization ¶
DeleteOrganization deletes the Organization associated with the provided GUID. Once the deletion request is sent, it polls the deletion job until it's finished.
func (Actor) DeleteRoute ¶
DeleteRoute deletes the Route associated with the provided Route GUID.
func (Actor) DeleteSpaceByNameAndOrganizationName ¶
func (Actor) DeleteUnmappedRoutes ¶
DeleteUnmappedRoutes deletes the unmapped routes associated with the provided Space GUID.
func (Actor) DisablePlanForAllOrgs ¶
func (actor Actor) DisablePlanForAllOrgs(serviceName, servicePlanName, brokerName string) (Warnings, error)
DisablePlanForAllOrgs disables access to a specific plan of the given service, from the given broker in all orgs.
func (Actor) DisablePlanForOrg ¶
func (actor Actor) DisablePlanForOrg(serviceName, servicePlanName, orgName, brokerName string) (Warnings, error)
DisablePlanForOrg disables access to a specific plan of the given service from the given broker in a specific org.
func (Actor) DisableServiceForAllOrgs ¶
DisableServiceForAllOrgs disables access for the given service in all orgs.
func (Actor) DisableServiceForOrg ¶
DisableServiceForOrg disables access for the given service in a specific org.
func (Actor) EnablePlanForAllOrgs ¶
func (actor Actor) EnablePlanForAllOrgs(serviceName, servicePlanName, brokerName string) (Warnings, error)
EnablePlanForAllOrgs enables access to a specific plan of the given service in all orgs.
func (Actor) EnablePlanForOrg ¶
func (actor Actor) EnablePlanForOrg(serviceName, servicePlanName, orgName, brokerName string) (Warnings, error)
EnablePlanForOrg enables access to a specific plan of the given service in a specific org.
func (Actor) EnableServiceForAllOrgs ¶
EnableServiceForAllOrgs enables access for the given service in all orgs.
func (Actor) EnableServiceForOrg ¶
EnableServiceForOrg enables access for the given service in a specific org.
func (Actor) FindRouteBoundToSpaceWithSettings ¶
FindRouteBoundToSpaceWithSettings finds the route with the given host, domain and space. If it is unable to find the route, it will check if it exists anywhere in the system. When the route exists in another space, RouteInDifferentSpaceError is returned. Use this when you know the space GUID.
func (Actor) GetApplication ¶
func (actor Actor) GetApplication(guid string) (Application, Warnings, error)
GetApplication returns the application.
func (Actor) GetApplicationByNameAndSpace ¶
func (actor Actor) GetApplicationByNameAndSpace(name string, spaceGUID string) (Application, Warnings, error)
GetApplicationByNameAndSpace returns an application with matching name in the space.
func (Actor) GetApplicationInstancesByApplication ¶
func (Actor) GetApplicationInstancesWithStatsByApplication ¶
func (actor Actor) GetApplicationInstancesWithStatsByApplication(guid string) ([]ApplicationInstanceWithStats, Warnings, error)
func (Actor) GetApplicationRoutes ¶
GetApplicationRoutes returns a list of routes associated with the provided Application GUID.
func (Actor) GetApplicationSummaryByNameAndSpace ¶
func (Actor) GetApplicationsBySpace ¶
func (actor Actor) GetApplicationsBySpace(spaceGUID string) ([]Application, Warnings, error)
GetApplicationsBySpace returns all applications in a space.
func (Actor) GetDomain ¶
GetDomain returns the shared or private domain associated with the provided Domain GUID.
func (Actor) GetDomainsByNameAndOrganization ¶
func (actor Actor) GetDomainsByNameAndOrganization(domainNames []string, orgGUID string) ([]Domain, Warnings, error)
GetDomainsByNameAndOrganization returns back a list of domains given a list of domains names and the organization GUID. If no domains are given, than this command will not lookup any domains.
func (Actor) GetFeatureFlags ¶
func (actor Actor) GetFeatureFlags() ([]FeatureFlag, Warnings, error)
func (Actor) GetLoginPrompts ¶
func (actor Actor) GetLoginPrompts() map[string]coreconfig.AuthPrompt
func (Actor) GetOrganization ¶
func (actor Actor) GetOrganization(guid string) (Organization, Warnings, error)
GetOrganization returns an Organization based on the provided guid.
func (Actor) GetOrganizationByName ¶
func (actor Actor) GetOrganizationByName(orgName string) (Organization, Warnings, error)
GetOrganizationByName returns an Organization based off of the name given.
func (Actor) GetOrganizationDomains ¶
GetOrganizationDomains returns the shared and private domains associated with an organization.
func (Actor) GetOrganizationQuota ¶
func (actor Actor) GetOrganizationQuota(guid string) (OrganizationQuota, Warnings, error)
func (Actor) GetOrganizationQuotaByName ¶
func (actor Actor) GetOrganizationQuotaByName(quotaName string) (OrganizationQuota, Warnings, error)
func (Actor) GetOrganizationSpaces ¶
GetOrganizationSpaces 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() ([]Organization, Warnings, error)
GetOrganizations returns all the available organizations.
func (Actor) GetOrphanedRoutesBySpace ¶
GetOrphanedRoutesBySpace returns a list of orphaned routes associated with the provided Space GUID.
func (Actor) GetPrivateDomain ¶
GetPrivateDomain returns the private domain associated with the provided Domain GUID.
func (Actor) GetRecentLogsForApplicationByNameAndSpace ¶
func (actor Actor) GetRecentLogsForApplicationByNameAndSpace(appName string, spaceGUID string, client sharedaction.LogCacheClient) ([]sharedaction.LogMessage, Warnings, error)
func (Actor) GetRouteApplications ¶
func (actor Actor) GetRouteApplications(routeGUID string) ([]Application, Warnings, error)
GetRouteApplications returns a list of apps associated with the provided Route GUID.
func (Actor) GetRouteByComponents ¶
GetRouteByComponents returns the route with the matching host, domain, path, and port. Use this when you don't know the space GUID. TCP routes require a port to be uniquely identified HTTP routes using shared domains require a hostname or path to be uniquely identified
func (Actor) GetRouterGroupByName ¶
func (actor Actor) GetRouterGroupByName(routerGroupName string, client RouterClient) (RouterGroup, error)
func (Actor) GetSSHPasscode ¶
func (Actor) GetSecurityGroupByName ¶
func (actor Actor) GetSecurityGroupByName(securityGroupName string) (SecurityGroup, Warnings, error)
func (Actor) GetSecurityGroupsWithOrganizationSpaceAndLifecycle ¶
func (actor Actor) GetSecurityGroupsWithOrganizationSpaceAndLifecycle(includeStaging bool) ([]SecurityGroupWithOrganizationSpaceAndLifecycle, Warnings, error)
GetSecurityGroupsWithOrganizationSpaceAndLifecycle returns a list of security groups with org and space information, optionally including staging spaces.
func (Actor) GetService ¶
GetService fetches a service by GUID.
func (Actor) GetServiceBindingByApplicationAndServiceInstance ¶
func (actor Actor) GetServiceBindingByApplicationAndServiceInstance(appGUID string, serviceInstanceGUID string) (ServiceBinding, Warnings, error)
GetServiceBindingByApplicationAndServiceInstance returns a service binding given an application GUID and and service instance GUID.
func (Actor) GetServiceBindingsByServiceInstance ¶
func (actor Actor) GetServiceBindingsByServiceInstance(serviceInstanceGUID string) ([]ServiceBinding, Warnings, error)
func (Actor) GetServiceBindingsByUserProvidedServiceInstance ¶
func (actor Actor) GetServiceBindingsByUserProvidedServiceInstance(userProvidedServiceInstanceGUID string) ([]ServiceBinding, Warnings, error)
func (Actor) GetServiceBrokerByName ¶
func (actor Actor) GetServiceBrokerByName(brokerName string) (ServiceBroker, Warnings, error)
GetServiceBrokerByName returns a ServiceBroker and any warnings or errors.
func (Actor) GetServiceBrokers ¶
func (actor Actor) GetServiceBrokers() ([]ServiceBroker, Warnings, error)
GetServiceBrokers returns all ServiceBrokers and any warnings or errors.
func (Actor) GetServiceByNameAndBrokerName ¶
func (actor Actor) GetServiceByNameAndBrokerName(serviceName, serviceBrokerName string) (Service, Warnings, error)
GetServiceByNameAndBrokerName returns services based on the name and broker provided. If a service broker name is provided, only services for that broker will be returned. If there are no services, a ServiceNotFoundError will be returned.
NOTE: this will fail for non-admin users if the broker name is specified, as only admin users are able to view the list of service brokers.
func (Actor) GetServiceInstance ¶
func (actor Actor) GetServiceInstance(guid string) (ServiceInstance, Warnings, error)
func (Actor) GetServiceInstanceByNameAndSpace ¶
func (Actor) GetServiceInstanceSharedFromByServiceInstance ¶
func (actor Actor) GetServiceInstanceSharedFromByServiceInstance(serviceInstanceGUID string) (ServiceInstanceSharedFrom, Warnings, error)
func (Actor) GetServiceInstanceSharedTosByServiceInstance ¶
func (actor Actor) GetServiceInstanceSharedTosByServiceInstance(serviceInstanceGUID string) ([]ServiceInstanceSharedTo, Warnings, error)
func (Actor) GetServiceInstanceSummaryByNameAndSpace ¶
func (Actor) GetServiceInstancesByApplication ¶
func (actor Actor) GetServiceInstancesByApplication(appGUID string) ([]ServiceInstance, Warnings, error)
func (Actor) GetServiceInstancesBySpace ¶
func (actor Actor) GetServiceInstancesBySpace(spaceGUID string) ([]ServiceInstance, Warnings, error)
func (Actor) GetServiceInstancesSummaryBySpace ¶
func (actor Actor) GetServiceInstancesSummaryBySpace(spaceGUID string) ([]ServiceInstanceSummary, Warnings, error)
func (Actor) GetServicePlan ¶
func (actor Actor) GetServicePlan(servicePlanGUID string) (ServicePlan, Warnings, error)
func (*Actor) GetServicePlanVisibilities ¶
func (actor *Actor) GetServicePlanVisibilities(planGUID string) ([]ServicePlanVisibility, Warnings, error)
GetServicePlanVisibilities fetches service plan visibilities for a plan by GUID.
func (Actor) GetServicePlansForService ¶
func (actor Actor) GetServicePlansForService(serviceName, brokerName string) ([]ServicePlan, Warnings, error)
GetServicePlansForService returns a list of plans associated with the service and the broker if provided
func (Actor) GetServiceSummaryByName ¶
func (actor Actor) GetServiceSummaryByName(serviceName string) (ServiceSummary, Warnings, error)
func (Actor) GetServiceSummaryForSpaceByName ¶
func (actor Actor) GetServiceSummaryForSpaceByName(spaceGUID, serviceName string) (ServiceSummary, Warnings, error)
func (Actor) GetServicesSummaries ¶
func (actor Actor) GetServicesSummaries() ([]ServiceSummary, Warnings, error)
func (Actor) GetServicesSummariesForSpace ¶
func (actor Actor) GetServicesSummariesForSpace(spaceGUID string) ([]ServiceSummary, Warnings, error)
func (Actor) GetServicesWithPlans ¶
func (actor Actor) GetServicesWithPlans(filters ...Filter) (ServicesWithPlans, Warnings, error)
GetServicesWithPlans returns a map of Services to ServicePlans for a particular broker. A particular service with associated plans from a broker can be fetched by additionally providing a service label filter.
func (Actor) GetSharedDomain ¶
GetSharedDomain returns the shared domain associated with the provided Domain GUID.
func (Actor) GetSpaceByOrganizationAndName ¶
func (actor Actor) GetSpaceByOrganizationAndName(orgGUID string, spaceName string) (Space, Warnings, error)
GetSpaceByOrganizationAndName returns an Space based on the org and name.
func (Actor) GetSpaceQuota ¶
func (actor Actor) GetSpaceQuota(guid string) (SpaceQuota, Warnings, error)
func (Actor) GetSpaceQuotaByName ¶
func (actor Actor) GetSpaceQuotaByName(quotaName, orgGUID string) (SpaceQuota, Warnings, error)
GetSpaceQuotaByName finds the quota by name and returns an error if not found
func (Actor) GetSpaceRoutes ¶
GetSpaceRoutes returns a list of routes associated with the provided Space GUID.
func (Actor) GetSpaceRunningSecurityGroupsBySpace ¶
func (actor Actor) GetSpaceRunningSecurityGroupsBySpace(spaceGUID string) ([]SecurityGroup, Warnings, error)
GetSpaceRunningSecurityGroupsBySpace returns a list of all security groups bound to this space in the 'running' lifecycle phase.
func (Actor) GetSpaceStagingSecurityGroupsBySpace ¶
func (actor Actor) GetSpaceStagingSecurityGroupsBySpace(spaceGUID string) ([]SecurityGroup, Warnings, error)
GetSpaceStagingSecurityGroupsBySpace returns a list of all security groups bound to this space in the 'staging' lifecycle phase. with an optional
func (Actor) GetSpaceSummaryByOrganizationAndName ¶
func (Actor) GetStack ¶
GetStack returns the stack information associated with the provided stack GUID.
func (Actor) GetStackByName ¶
GetStackByName returns the provided stack
func (Actor) GetStreamingLogs ¶
func (actor Actor) GetStreamingLogs(appGUID string, client sharedaction.LogCacheClient) (<-chan sharedaction.LogMessage, <-chan error, context.CancelFunc)
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) GrantOrgManagerByUsername ¶
GrantOrgManagerByUsername gives the Org Manager role to the provided user.
func (Actor) GrantSpaceDeveloperByUsername ¶
func (actor Actor) GrantSpaceDeveloperByUsername(spaceGUID string, username string) (Warnings, error)
GrantSpaceDeveloperByUsername makes the provided user a Space Developer in the space with the provided guid.
func (Actor) GrantSpaceManagerByUsername ¶
func (actor Actor) GrantSpaceManagerByUsername(orgGUID string, spaceGUID string, username string) (Warnings, error)
GrantSpaceManagerByUsername makes the provided user a Space Manager in the space with the provided guid.
func (Actor) MapRouteToApplication ¶
func (Actor) MinCLIVersion ¶
MinCLIVersion returns the minimum CLI version that the Cloud Controller requires.
func (Actor) OrganizationExistsWithName ¶
OrganizationExistsWithName returns true if there is an Organization with the provided name, otherwise false.
func (Actor) ParseAccessToken ¶
func (*Actor) PrepareBuildpackBits ¶
func (Actor) PurgeServiceOffering ¶
func (Actor) RefreshAccessToken ¶
func (*Actor) RenameBuildpack ¶
func (Actor) ResourceMatch ¶
ResourceMatch returns a set of matched resources and unmatched resources in the order they were given in allResources.
func (Actor) RestageApplication ¶
func (actor Actor) RestageApplication(app Application) (<-chan ApplicationStateChange, <-chan string, <-chan error)
RestageApplication restarts a given application. If already stopped, no stop call will be sent.
func (Actor) RestartApplication ¶
func (actor Actor) RestartApplication(app Application) (<-chan ApplicationStateChange, <-chan string, <-chan error)
RestartApplication restarts a given application. If already stopped, no stop call will be sent.
func (Actor) ScheduleTokenRefresh ¶
func (Actor) ServiceExistsWithName ¶
ServiceExistsWithName returns true if there is an Organization with the provided name, otherwise false.
func (Actor) SetApplicationHealthCheckTypeByNameAndSpace ¶
func (actor Actor) SetApplicationHealthCheckTypeByNameAndSpace(name string, spaceGUID string, healthCheckType constant.ApplicationHealthCheckType, httpEndpoint string) (Application, Warnings, error)
SetApplicationHealthCheckTypeByNameAndSpace updates an application's health check type if it is not already the desired type.
func (Actor) SetSpaceQuota ¶
SetSpaceQuota sets the space quota for the corresponding space
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) StartApplication ¶
func (actor Actor) StartApplication(app Application) (<-chan ApplicationStateChange, <-chan string, <-chan error)
StartApplication restarts a given application. If already stopped, no stop call will be sent.
func (Actor) UAAAPIVersion ¶
UAAAPIVersion returns the UAA API version.
func (Actor) UnbindSecurityGroupByNameAndSpace ¶
func (Actor) UnbindSecurityGroupByNameOrganizationNameAndSpaceName ¶
func (Actor) UnbindServiceBySpace ¶
func (actor Actor) UnbindServiceBySpace(appName string, serviceInstanceName string, spaceGUID string) (ServiceBinding, Warnings, error)
UnbindServiceBySpace deletes the service binding between an application and service instance for a given space.
func (Actor) UnmapRouteFromApplication ¶
func (Actor) UpdateApplication ¶
func (actor Actor) UpdateApplication(application Application) (Application, Warnings, error)
UpdateApplication updates an application.
func (*Actor) UpdateBuildpack ¶
func (*Actor) UpdateBuildpackByNameAndStack ¶
func (Actor) UpdateServiceInstanceMaintenanceInfo ¶
func (actor Actor) UpdateServiceInstanceMaintenanceInfo(guid string, maintenanceInfo MaintenanceInfo) (Warnings, error)
UpdateServiceInstanceMaintenanceInfo requests that the service instance be updated to the specified `maintenance_info`
func (Actor) UpdateUserProvidedServiceInstance ¶
func (actor Actor) UpdateUserProvidedServiceInstance(guid string, instance UserProvidedServiceInstance) (Warnings, error)
UpdateUserProvidedServiceInstance requests that the service instance be updated with the specified data
func (Actor) UploadApplicationPackage ¶
func (*Actor) UploadBuildpack ¶
func (*Actor) UploadBuildpackFromPath ¶
func (actor *Actor) UploadBuildpackFromPath(inputPath, buildpackGUID string, progressBar SimpleProgressBar) (Warnings, error)
func (Actor) UploadDroplet ¶
func (Actor) WriteApplicationManifest ¶
func (Actor) WriteApplicationManifest(manifestApp manifest.Application, manifestFilePath string) error
type Application ¶
type Application ccv2.Application
Application represents an application.
func (Application) CalculatedBuildpack ¶
func (application Application) CalculatedBuildpack() string
CalculatedBuildpack returns the buildpack that will be used.
func (Application) CalculatedCommand ¶
func (application Application) CalculatedCommand() string
CalculatedCommand returns the command that will be used.
func (Application) CalculatedHealthCheckEndpoint ¶
func (application Application) CalculatedHealthCheckEndpoint() string
CalculatedHealthCheckEndpoint returns the health check endpoint. If the health check type is not http it will return the empty string.
func (Application) StagingCompleted ¶
func (application Application) StagingCompleted() bool
StagingCompleted returns true if the application has been staged.
func (Application) StagingFailed ¶
func (application Application) StagingFailed() bool
StagingFailed returns true if staging the application failed.
func (Application) StagingFailedMessage ¶
func (application Application) StagingFailedMessage() string
StagingFailedMessage returns the verbose description of the failure or the reason if the verbose description is empty.
func (Application) StagingFailedNoAppDetected ¶
func (application Application) StagingFailedNoAppDetected() bool
StagingFailedNoAppDetected returns true when the staging failed due to a NoAppDetectedError.
func (Application) Started ¶
func (application Application) Started() bool
Started returns true when the application is started.
func (Application) Stopped ¶
func (application Application) Stopped() bool
Stopped returns true when the application is stopped.
func (Application) String ¶
func (application Application) String() string
type ApplicationInstance ¶
type ApplicationInstance ccv2.ApplicationInstance
func (ApplicationInstance) Crashed ¶
func (instance ApplicationInstance) Crashed() bool
func (ApplicationInstance) Flapping ¶
func (instance ApplicationInstance) Flapping() bool
func (ApplicationInstance) Running ¶
func (instance ApplicationInstance) Running() bool
type ApplicationInstanceState ¶
type ApplicationInstanceState constant.ApplicationInstanceState
type ApplicationInstanceWithStats ¶
type ApplicationInstanceWithStats struct { // CPU is the instance's CPU utilization percentage. CPU float64 // Details are arbitrary information about the instance. Details string // Disk is the instance's disk usage in bytes. Disk int64 // DiskQuota is the instance's allowed disk usage in bytes. DiskQuota int64 // ID is the instance ID. ID int // IsolationSegment that the app instance is currently running on. IsolationSegment string // Memory is the instance's memory usage in bytes. Memory int64 // MemoryQuota is the instance's allowed memory usage in bytes. MemoryQuota int64 // Since is the Unix time stamp that represents the time the instance was // created. Since float64 // State is the instance's state. State ApplicationInstanceState }
func (ApplicationInstanceWithStats) TimeSinceCreation ¶
func (instance ApplicationInstanceWithStats) TimeSinceCreation() time.Time
type ApplicationStateChange ¶
type ApplicationStateChange string
const ( ApplicationStateStopping ApplicationStateChange = "stopping" ApplicationStateStaging ApplicationStateChange = "staging" ApplicationStateStarting ApplicationStateChange = "starting" )
type ApplicationSummary ¶
type ApplicationSummary struct { Application Stack Stack IsolationSegment string RunningInstances []ApplicationInstanceWithStats Routes []Route }
func (ApplicationSummary) StartingOrRunningInstanceCount ¶
func (app ApplicationSummary) StartingOrRunningInstanceCount() int
type BoundApplication ¶
type BoundApplication struct { AppName string LastOperation LastOperation ServiceBindingName string }
type CloudControllerClient ¶
type CloudControllerClient interface { CheckRoute(route ccv2.Route) (bool, ccv2.Warnings, error) CreateApplication(app ccv2.Application) (ccv2.Application, ccv2.Warnings, error) CreateBuildpack(buildpack ccv2.Buildpack) (ccv2.Buildpack, ccv2.Warnings, error) CreateOrganization(orgName string, quotaGUID string) (ccv2.Organization, ccv2.Warnings, error) CreateRoute(route ccv2.Route, generatePort bool) (ccv2.Route, ccv2.Warnings, error) CreateServiceBinding(appGUID string, serviceBindingGUID string, bindingName string, acceptsIncomplete bool, parameters map[string]interface{}) (ccv2.ServiceBinding, ccv2.Warnings, error) CreateServiceBroker(serviceBroker, username, password, URL, spaceGUID string) (ccv2.ServiceBroker, ccv2.Warnings, error) CreateServiceInstance(spaceGUID, servicePlanGUID, serviceInstance string, parameters map[string]interface{}, tags []string) (ccv2.ServiceInstance, ccv2.Warnings, error) CreateServiceKey(serviceInstanceGUID string, keyName string, parameters map[string]interface{}) (ccv2.ServiceKey, ccv2.Warnings, error) CreateServicePlanVisibility(planGUID string, orgGUID string) (ccv2.ServicePlanVisibility, ccv2.Warnings, error) CreateSpace(spaceName string, orgGUID string) (ccv2.Space, ccv2.Warnings, error) CreateUser(uaaUserID string) (ccv2.User, ccv2.Warnings, error) DeleteOrganizationJob(orgGUID string) (ccv2.Job, ccv2.Warnings, error) DeleteRoute(routeGUID string) (ccv2.Warnings, error) DeleteRouteApplication(routeGUID string, appGUID string) (ccv2.Warnings, error) DeleteSecurityGroupSpace(securityGroupGUID string, spaceGUID string) (ccv2.Warnings, error) DeleteSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (ccv2.Warnings, error) DeleteService(serviceGUID string, purge bool) (ccv2.Warnings, error) DeleteServiceBinding(serviceBindingGUID string, acceptsIncomplete bool) (ccv2.ServiceBinding, ccv2.Warnings, error) DeleteServicePlanVisibility(servicePlanVisibilityGUID string) (ccv2.Warnings, error) DeleteSpaceJob(spaceGUID string) (ccv2.Job, ccv2.Warnings, error) DeleteSpaceUnmappedRoutes(spaceGUID string) (ccv2.Warnings, error) GetApplication(guid string) (ccv2.Application, ccv2.Warnings, error) GetApplicationApplicationInstanceStatuses(guid string) (map[int]ccv2.ApplicationInstanceStatus, ccv2.Warnings, error) GetApplicationApplicationInstances(guid string) (map[int]ccv2.ApplicationInstance, ccv2.Warnings, error) GetApplicationRoutes(appGUID string, filters ...ccv2.Filter) ([]ccv2.Route, ccv2.Warnings, error) GetApplications(filters ...ccv2.Filter) ([]ccv2.Application, ccv2.Warnings, error) GetBuildpacks(filters ...ccv2.Filter) ([]ccv2.Buildpack, ccv2.Warnings, error) GetConfigFeatureFlags() ([]ccv2.FeatureFlag, ccv2.Warnings, error) GetJob(jobGUID string) (ccv2.Job, ccv2.Warnings, error) GetOrganization(guid string) (ccv2.Organization, ccv2.Warnings, error) GetOrganizationPrivateDomains(orgGUID string, filters ...ccv2.Filter) ([]ccv2.Domain, ccv2.Warnings, error) GetOrganizationQuota(guid string) (ccv2.OrganizationQuota, ccv2.Warnings, error) GetOrganizationQuotas(filters ...ccv2.Filter) ([]ccv2.OrganizationQuota, ccv2.Warnings, error) GetOrganizations(filters ...ccv2.Filter) ([]ccv2.Organization, ccv2.Warnings, error) GetPrivateDomain(domainGUID string) (ccv2.Domain, ccv2.Warnings, error) GetRouteApplications(routeGUID string, filters ...ccv2.Filter) ([]ccv2.Application, ccv2.Warnings, error) GetRoutes(filters ...ccv2.Filter) ([]ccv2.Route, ccv2.Warnings, error) GetSecurityGroupSpaces(securityGroupGUID string) ([]ccv2.Space, ccv2.Warnings, error) GetSecurityGroupStagingSpaces(securityGroupGUID string) ([]ccv2.Space, ccv2.Warnings, error) GetSecurityGroups(filters ...ccv2.Filter) ([]ccv2.SecurityGroup, ccv2.Warnings, error) GetService(serviceGUID string) (ccv2.Service, ccv2.Warnings, error) GetServiceBindings(filters ...ccv2.Filter) ([]ccv2.ServiceBinding, ccv2.Warnings, error) GetServiceBrokers(filters ...ccv2.Filter) ([]ccv2.ServiceBroker, ccv2.Warnings, error) GetServiceInstance(serviceInstanceGUID string) (ccv2.ServiceInstance, ccv2.Warnings, error) GetServiceInstanceServiceBindings(serviceInstanceGUID string) ([]ccv2.ServiceBinding, ccv2.Warnings, error) GetServiceInstances(filters ...ccv2.Filter) ([]ccv2.ServiceInstance, ccv2.Warnings, error) GetServicePlan(servicePlanGUID string) (ccv2.ServicePlan, ccv2.Warnings, error) GetServicePlanVisibilities(filters ...ccv2.Filter) ([]ccv2.ServicePlanVisibility, ccv2.Warnings, error) GetServicePlans(filters ...ccv2.Filter) ([]ccv2.ServicePlan, ccv2.Warnings, error) GetServices(filters ...ccv2.Filter) ([]ccv2.Service, ccv2.Warnings, error) GetSpaceQuotaDefinition(guid string) (ccv2.SpaceQuota, ccv2.Warnings, error) GetSpaceQuotas(orgGUID string) ([]ccv2.SpaceQuota, ccv2.Warnings, error) GetSpaceRoutes(spaceGUID string, filters ...ccv2.Filter) ([]ccv2.Route, ccv2.Warnings, error) GetSpaceSecurityGroups(spaceGUID string, filters ...ccv2.Filter) ([]ccv2.SecurityGroup, ccv2.Warnings, error) GetSpaceServiceInstances(spaceGUID string, includeUserProvidedServices bool, filters ...ccv2.Filter) ([]ccv2.ServiceInstance, ccv2.Warnings, error) GetSpaceServices(spaceGUID string, filters ...ccv2.Filter) ([]ccv2.Service, ccv2.Warnings, error) GetSpaceSummary(spaceGUID string) (ccv2.SpaceSummary, ccv2.Warnings, error) GetSpaceStagingSecurityGroups(spaceGUID string, filters ...ccv2.Filter) ([]ccv2.SecurityGroup, ccv2.Warnings, error) GetSpaces(filters ...ccv2.Filter) ([]ccv2.Space, ccv2.Warnings, error) GetStack(guid string) (ccv2.Stack, ccv2.Warnings, error) GetStacks(filters ...ccv2.Filter) ([]ccv2.Stack, ccv2.Warnings, error) GetUserProvidedServiceInstanceServiceBindings(userProvidedServiceInstanceGUID string) ([]ccv2.ServiceBinding, ccv2.Warnings, error) PollJob(job ccv2.Job) (ccv2.Warnings, error) RestageApplication(app ccv2.Application) (ccv2.Application, ccv2.Warnings, error) SetSpaceQuota(spaceGUID string, quotaGUID string) (ccv2.Warnings, error) TargetCF(settings ccv2.TargetSettings) (ccv2.Warnings, error) UpdateApplication(app ccv2.Application) (ccv2.Application, ccv2.Warnings, error) UpdateBuildpack(buildpack ccv2.Buildpack) (ccv2.Buildpack, ccv2.Warnings, error) UpdateOrganizationManager(guid string, uaaID string) (ccv2.Warnings, error) UpdateOrganizationManagerByUsername(guid string, username string) (ccv2.Warnings, error) UpdateOrganizationUser(guid string, uaaID string) (ccv2.Warnings, error) UpdateOrganizationUserByUsername(guid string, username string) (ccv2.Warnings, error) UpdateResourceMatch(resourcesToMatch []ccv2.Resource) ([]ccv2.Resource, ccv2.Warnings, error) UpdateRouteApplication(routeGUID string, appGUID string) (ccv2.Route, ccv2.Warnings, error) UpdateSecurityGroupSpace(securityGroupGUID string, spaceGUID string) (ccv2.Warnings, error) UpdateSecurityGroupStagingSpace(securityGroupGUID string, spaceGUID string) (ccv2.Warnings, error) UpdateServiceInstanceMaintenanceInfo(serviceInstanceGUID string, maintenanceInfo ccv2.MaintenanceInfo) (ccv2.Warnings, error) UpdateServicePlan(guid string, public bool) (ccv2.Warnings, error) UpdateSpaceDeveloper(spaceGUID string, uaaID string) (ccv2.Warnings, error) UpdateSpaceDeveloperByUsername(spaceGUID string, username string) (ccv2.Warnings, error) UpdateSpaceManager(spaceGUID string, uaaID string) (ccv2.Warnings, error) UpdateSpaceManagerByUsername(spaceGUID string, username string) (ccv2.Warnings, error) UpdateUserProvidedServiceInstance(instanceGUID string, instance ccv2.UserProvidedServiceInstance) (ccv2.Warnings, error) UploadApplicationPackage(appGUID string, existingResources []ccv2.Resource, newResources ccv2.Reader, newResourcesLength int64) (ccv2.Job, ccv2.Warnings, error) UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (ccv2.Warnings, error) UploadDroplet(appGUID string, droplet io.Reader, dropletLength int64) (ccv2.Job, ccv2.Warnings, error) API() string APIVersion() string AuthorizationEndpoint() string DopplerEndpoint() string MinCLIVersion() string RoutingEndpoint() string }
CloudControllerClient is a Cloud Controller V2 client.
type Config ¶
type Config interface { AccessToken() string BinaryName() string DialTimeout() time.Duration PollingInterval() time.Duration RefreshToken() string SetAccessToken(accessToken string) SetRefreshToken(refreshToken string) SetTargetInformation(api string, apiVersion string, auth string, minCLIVersion string, doppler string, routing string, skipSSLValidation bool) SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string) SetUAAClientCredentials(client string, clientSecret string) SetUAAGrantType(uaaGrantType string) SkipSSLValidation() bool SSHOAuthClient() string StagingTimeout() time.Duration StartupTimeout() time.Duration Target() string UAAGrantType() string UnsetOrganizationAndSpaceInformation() UnsetSpaceInformation() Verbose() (bool, []string) }
type Domain ¶
Domain represents a CLI Domain.
type Downloader ¶
type FeatureFlag ¶
type FeatureFlag ccv2.FeatureFlag
func (FeatureFlag) State ¶
func (f FeatureFlag) State() FeatureFlagState
type FeatureFlagState ¶
type FeatureFlagState string
const ( FeatureFlagEnabled FeatureFlagState = "enabled" FeatureFlagDisabled FeatureFlagState = "disabled" )
type LastOperation ¶
type LastOperation ccv2.LastOperation
type MaintenanceInfo ¶
type MaintenanceInfo ccv2.MaintenanceInfo
type NOAAClient ¶
type NOAAClient interface { Close() error RecentLogs(appGUID string, authToken string) ([]*events.LogMessage, error) SetOnConnectCallback(cb func()) TailingLogs(appGUID, authToken string) (<-chan *events.LogMessage, <-chan error) }
NOAAClient is a client for getting logs.
type OrganizationQuota ¶
type OrganizationQuota ccv2.OrganizationQuota
type OrganizationSummary ¶
type OrganizationSummary struct { Organization QuotaName string DomainNames []string SpaceNames []string }
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
func NewProgressBar ¶
func NewProgressBar() *ProgressBar
func (*ProgressBar) Initialize ¶
func (*ProgressBar) Terminate ¶
func (p *ProgressBar) Terminate()
type Route ¶
type Route struct { Domain Domain GUID string Host string Path string Port types.NullInt SpaceGUID string }
Route represents a CLI Route.
func (Route) RandomTCPPort ¶
func (Route) Validate ¶
Validate will return an error if there are invalid HTTP or TCP settings for it's given domain.
func (Route) ValidateWithRandomPort ¶
ValidateWithRandomPort will return an error if a random port is requested for an HTTP route, or if the route is TCP, a random port wasn't requested, and the route has no port set.
type RouterClient ¶
type RouterClient interface {
GetRouterGroupByName(string) (router.RouterGroup, error)
}
RouterClient is a Router API client.
type RouterGroup ¶
type RouterGroup router.RouterGroup
type SecurityGroup ¶
type SecurityGroup ccv2.SecurityGroup
SecurityGroup represents a CF SecurityGroup.
type SecurityGroupRule ¶
type SecurityGroupWithOrganizationSpaceAndLifecycle ¶
type SecurityGroupWithOrganizationSpaceAndLifecycle struct { SecurityGroup *SecurityGroup Organization *Organization Space *Space Lifecycle constant.SecurityGroupLifecycle }
SecurityGroupWithOrganizationSpaceAndLifecycle represents a security group with organization and space information.
type ServiceBinding ¶
type ServiceBinding ccv2.ServiceBinding
ServiceBinding represents the link between a service instance and an application.
func (ServiceBinding) IsInProgress ¶
func (serviceBinding ServiceBinding) IsInProgress() bool
type ServiceBroker ¶
type ServiceBroker ccv2.ServiceBroker
type ServiceBrokerSummary ¶
type ServiceBrokerSummary struct { ServiceBroker Services []ServiceSummary }
type ServiceInstance ¶
type ServiceInstance ccv2.ServiceInstance
ServiceInstance represents an instance of a service.
func (ServiceInstance) IsManaged ¶
func (instance ServiceInstance) IsManaged() bool
IsManaged returns true if the service instance is managed, otherwise false.
func (ServiceInstance) IsUserProvided ¶
func (instance ServiceInstance) IsUserProvided() bool
IsUserProvided returns true if the service instance is user provided, otherwise false.
type ServiceInstanceSharedFrom ¶
type ServiceInstanceSharedFrom ccv2.ServiceInstanceSharedFrom
type ServiceInstanceSharedTo ¶
type ServiceInstanceSharedTo ccv2.ServiceInstanceSharedTo
type ServiceInstanceSummary ¶
type ServiceInstanceSummary struct { ServiceInstance ServicePlan ServicePlan Service Service ServiceInstanceSharingFeatureFlag bool BoundApplications []BoundApplication }
func (ServiceInstanceSummary) IsNotShared ¶
func (s ServiceInstanceSummary) IsNotShared() bool
func (ServiceInstanceSummary) IsShareable ¶
func (s ServiceInstanceSummary) IsShareable() bool
func (ServiceInstanceSummary) IsSharedFrom ¶
func (s ServiceInstanceSummary) IsSharedFrom() bool
func (ServiceInstanceSummary) IsSharedTo ¶
func (s ServiceInstanceSummary) IsSharedTo() bool
func (ServiceInstanceSummary) UpgradeAvailable ¶
func (s ServiceInstanceSummary) UpgradeAvailable() bool
func (ServiceInstanceSummary) UpgradeSupported ¶
func (s ServiceInstanceSummary) UpgradeSupported() bool
type ServiceKey ¶
type ServiceKey ccv2.ServiceKey
ServiceKey represents a set of credentials for a service instance.
type ServicePlan ¶
type ServicePlan ccv2.ServicePlan
type ServicePlanSummary ¶
type ServicePlanSummary struct { ServicePlan // VisibleTo is a list of Organization names that have access to this service // plan. VisibleTo []string }
type ServicePlanVisibility ¶
type ServicePlanVisibility ccv2.ServicePlanVisibility
type ServiceSummary ¶
type ServiceSummary struct { Service Plans []ServicePlanSummary }
type ServicesWithPlans ¶
type ServicesWithPlans map[Service][]ServicePlan
ServicesWithPlans is an association between a Service and the plans it offers.
type SimpleProgressBar ¶
type SpaceQuota ¶
type SpaceQuota ccv2.SpaceQuota
type SpaceSummary ¶
type SpaceWithLifecycle ¶
type SpaceWithLifecycle struct { ccv2.Space Lifecycle constant.SecurityGroupLifecycle }
type TargetSettings ¶
type TargetSettings ccv2.TargetSettings
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) GetSSHPasscode(accessToken string, sshOAuthClient string) (string, error) LoginPrompts() map[string][]string RefreshAccessToken(refreshToken string) (uaa.RefreshedTokens, error) }
type UserProvidedServiceInstance ¶
type UserProvidedServiceInstance ccv2.UserProvidedServiceInstance
UserProvidedServiceInstance represents an instance of a user-provided service.
func (UserProvidedServiceInstance) WithCredentials ¶
func (u UserProvidedServiceInstance) WithCredentials(creds map[string]interface{}) UserProvidedServiceInstance
func (UserProvidedServiceInstance) WithRouteServiceURL ¶
func (u UserProvidedServiceInstance) WithRouteServiceURL(url string) UserProvidedServiceInstance
func (UserProvidedServiceInstance) WithSyslogDrainURL ¶
func (u UserProvidedServiceInstance) WithSyslogDrainURL(url string) UserProvidedServiceInstance
func (UserProvidedServiceInstance) WithTags ¶
func (u UserProvidedServiceInstance) WithTags(tags []string) UserProvidedServiceInstance
Source Files ¶
- actor.go
- application.go
- application_instance.go
- application_instance_with_stats.go
- application_summary.go
- auth.go
- buildpack.go
- cloud_controller_client.go
- config.go
- domain.go
- feature_flag.go
- fix_mode_unix.go
- job.go
- logging.go
- manifest.go
- noaa_client.go
- organization.go
- organization_quota.go
- organization_summary.go
- resource.go
- route.go
- router_client.go
- router_group.go
- security_group.go
- service.go
- service_access.go
- service_binding.go
- service_broker.go
- service_broker_summary.go
- service_instance.go
- service_instance_shared_from.go
- service_instance_shared_to.go
- service_instance_summary.go
- service_instance_user_provided.go
- service_key.go
- service_plan.go
- service_plan_summary.go
- service_plan_visibility.go
- service_summary.go
- shared_domain.go
- space.go
- space_quota.go
- space_summary.go
- ssh.go
- stack.go
- target.go
- token.go
- uaa_client.go
- user.go
- version.go
Directories ¶
Path | Synopsis |
---|---|
compositefakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |