Documentation ¶
Index ¶
- Constants
- func AddOrReplaceEnvironment(env []string, newEnvName string, newEnvVal string) []string
- func AppGUID(appName string) string
- func BuildConfigurablePlugin(pluginType string, name string, version string, pluginCommands []PluginCommand) string
- func CF(args ...string) *Session
- func CFWithEnv(envVars map[string]string, args ...string) *Session
- func CFWithStdin(stdin io.Reader, args ...string) *Session
- func CheckEnvironmentTargetedCorrectly(targetedOrganizationRequired bool, targetedSpaceRequired bool, testOrg string, ...)
- func ClearTarget()
- func ConfirmStagingLogs(session *gexec.Session)
- func ConvertPathToRegularExpression(path string) string
- func CreateOrg(org string)
- func CreateOrgAndSpace(org string, space string)
- func CreateSpace(space string)
- func CustomCF(cfEnv CFEnv, args ...string) *Session
- func DebugCustomCF(cfEnv CFEnv, args ...string) *Session
- func DefaultSharedDomain() string
- func DestroyHomeDir(homeDir string)
- func DisableFeatureFlag(flagName string)
- func DomainName(prefix ...string) string
- func DownloadFirstAppPackage(appName string, tmpZipFilepath string)
- func EnableFeatureFlag(flagName string)
- func FindOrCreateTCPRouterGroup(node int) string
- func GetAPI() string
- func GetAppGuid(appName string) string
- func GetCredentials() (string, string)
- func GetFirstAppPackageGuid(appName string) string
- func GetIsolationSegmentGUID(name string) string
- func GetOrgGUID(orgName string) string
- func GetSpaceGUID(spaceName string) string
- func InstallConfigurablePlugin(name string, version string, pluginCommands []PluginCommand)
- func InstallConfigurablePluginFailsUninstall(name string, version string, pluginCommands []PluginCommand)
- func InvalidAccessToken() string
- func LoginCF() string
- func LoginCFWithClientCredentials() string
- func LogoutCF()
- func ManagedServiceInstanceGUID(managedServiceInstanceName string) string
- func MapRouteToApplication(app string, domain string, host string, path string)
- func NewAppName() string
- func NewIsolationSegmentName(infix ...string) string
- func NewOrgName() string
- func NewPassword() string
- func NewPluginRepositoryServer(pluginRepo PluginRepository) *Server
- func NewPluginRepositoryTLSServer(pluginRepo PluginRepository) *Server
- func NewSecurityGroupName(infix ...string) string
- func NewServiceBrokerName() string
- func NewSpaceName() string
- func NewUsername() string
- func PluginPlatform() string
- func PrefixedRandomName(namePrefix string) string
- func QuickDeleteOrg(orgName string)
- func QuickDeleteOrgIfExists(orgName string)
- func QuickDeleteSpace(spaceName string)
- func QuotaName(name ...string) string
- func RandomName() string
- func RandomPort() int
- func RunIfExperimental(msg string)
- func SetAPI() (string, string)
- func SetConfig(cb func(conf *configv3.Config))
- func SetConfigContent(dir string, rawConfig string)
- func SetHomeDir() string
- func SetupCF(org string, space string)
- func SetupReadOnlyOrgAndSpace() (string, string)
- func SetupSynchronizedSuite(setup func())
- func Sha1Sum(path string) string
- func Sha256Sum(path string) string
- func Sha256SumDirectory(dir string) string
- func SkipIfClientCredentialsNotSet() (string, string)
- func SkipIfExperimental(msg string)
- func SkipIfPrivateDockerInfoNotSet() (string, string, string)
- func StartAndTargetServerWithAPIVersions(v2Version string, v3Version string) *Server
- func StartAndTargetServerWithoutV3API() *Server
- func TargetOrg(org string)
- func TargetOrgAndSpace(org string, space string)
- func TurnOffColors()
- func TurnOnExperimental()
- func UnmapRouteFromApplication(app string, domain string, host string, path string)
- func UnsetAPI()
- func UserProvidedServiceInstanceGUID(userProvidedServiceInstanceName string) string
- func VerifyAppPackageContents(appName string, files ...string)
- func WithBananaPantsApp(f func(dir string))
- func WithCrashingApp(f func(dir string))
- func WithHelloWorldApp(f func(dir string))
- func WithManifest(manifest map[string]interface{}, f func(manifestDir string))
- func WithMultiBuildpackApp(f func(dir string))
- func WithNoResourceMatchedApp(f func(dir string))
- func WithProcfileApp(f func(dir string))
- func WriteCommand(args []string)
- func WriteManifest(path string, manifest map[string]interface{})
- func Zipit(source, target, prefix string) error
- type AppInstanceRow
- type AppProcessTable
- type AppTable
- type Assets
- type Binary
- type CFEnv
- type Domain
- type Package
- type Plan
- type PlanSchemas
- type Plugin
- type PluginCommand
- type PluginRepository
- type PluginRepositoryServerWithPlugin
- func (pluginRepoServer *PluginRepositoryServerWithPlugin) Cleanup()
- func (pluginRepoServer *PluginRepositoryServerWithPlugin) Init(pluginName string, version string, platform string, ...)
- func (pluginRepoServer *PluginRepositoryServerWithPlugin) PluginSize() int64
- func (pluginRepoServer *PluginRepositoryServerWithPlugin) URL() string
- type Route
- type SecurityGroup
- type ServiceBroker
- type ServiceInstanceGUID
- type User
Constants ¶
const ( DebugCommandPrefix = "\nCMD>" DebugOutPrefix = "OUT: " DebugErrPrefix = "ERR: " )
const ( GUIDRegex = "[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}" ISO8601Regex = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{1,3}[+-]\\d{4}" StaticfileBuildpackStartCommand = "$HOME/boot.sh" UserFriendlyDateRegex = "[A-Z][a-z]{2} \\d{2} [A-Z][a-z]{2} \\d{2}:\\d{2}:\\d{2} [A-Z]+ \\d{4}" )
const ( DefaultV2Version string = "2.100.0" DefaultV3Version string = "3.33.3" )
const ( DefaultMemoryLimit = "256M" DefaultDiskLimit = "1G" )
const MaxTestPort = 1034
MaxTestPort should be defined by the CF router group for integration tests.
const MinTestPort = 1024
MinTestPort should be defined by the CF router group for integration tests.
Variables ¶
This section is empty.
Functions ¶
func AddOrReplaceEnvironment ¶
func BuildConfigurablePlugin ¶
func BuildConfigurablePlugin(pluginType string, name string, version string, pluginCommands []PluginCommand) string
func CFWithStdin ¶
func ClearTarget ¶
func ClearTarget()
func ConfirmStagingLogs ¶
func ConvertPathToRegularExpression ¶
ConvertPathToRegularExpression converts a windows file path into a string which may be embedded in a ginkgo-compatible regular expression.
func CreateOrgAndSpace ¶
func CreateSpace ¶
func CreateSpace(space string)
func DebugCustomCF ¶
func DefaultSharedDomain ¶
func DefaultSharedDomain() string
func DestroyHomeDir ¶
func DestroyHomeDir(homeDir string)
func DisableFeatureFlag ¶
func DisableFeatureFlag(flagName string)
func DomainName ¶
func DownloadFirstAppPackage ¶
func EnableFeatureFlag ¶
func EnableFeatureFlag(flagName string)
func GetAppGuid ¶
func GetCredentials ¶
GetCredentials returns back the username and the password.
func GetFirstAppPackageGuid ¶
func GetIsolationSegmentGUID ¶
func GetOrgGUID ¶
func GetSpaceGUID ¶
func InstallConfigurablePlugin ¶
func InstallConfigurablePlugin(name string, version string, pluginCommands []PluginCommand)
func InstallConfigurablePluginFailsUninstall ¶
func InstallConfigurablePluginFailsUninstall(name string, version string, pluginCommands []PluginCommand)
func InvalidAccessToken ¶
func InvalidAccessToken() string
func LoginCFWithClientCredentials ¶
func LoginCFWithClientCredentials() string
func ManagedServiceInstanceGUID ¶
ManagedServiceInstanceGUID returns the GUID for a managed service instance.
func MapRouteToApplication ¶
func NewAppName ¶
func NewAppName() string
func NewIsolationSegmentName ¶
func NewOrgName ¶
func NewOrgName() string
func NewPassword ¶
func NewPassword() string
func NewPluginRepositoryServer ¶
func NewPluginRepositoryServer(pluginRepo PluginRepository) *Server
func NewPluginRepositoryTLSServer ¶
func NewPluginRepositoryTLSServer(pluginRepo PluginRepository) *Server
func NewSecurityGroupName ¶
func NewServiceBrokerName ¶
func NewServiceBrokerName() string
func NewSpaceName ¶
func NewSpaceName() string
func NewUsername ¶
func NewUsername() string
func PluginPlatform ¶
func PluginPlatform() string
func PrefixedRandomName ¶
func QuickDeleteOrg ¶
func QuickDeleteOrg(orgName string)
func QuickDeleteOrgIfExists ¶
func QuickDeleteOrgIfExists(orgName string)
func QuickDeleteSpace ¶
func QuickDeleteSpace(spaceName string)
func RandomName ¶
func RandomName() string
func RandomPort ¶
func RandomPort() int
func RunIfExperimental ¶
func RunIfExperimental(msg string)
RunIfExperimental is for tests that should be skipped if CF_CLI_EXPERIMENTAL is set to false.
func SetConfigContent ¶
func SetHomeDir ¶
func SetHomeDir() string
func SetupSynchronizedSuite ¶
func SetupSynchronizedSuite(setup func())
func Sha256SumDirectory ¶
Sha256SumDirectory calculates the SHA256 sum of a directory.
func SkipIfExperimental ¶
func SkipIfExperimental(msg string)
SkipIfExperimental is for tests that should be skipped if CF_CLI_EXPERIMENTAL is set to true.
func StartAndTargetServerWithoutV3API ¶
func StartAndTargetServerWithoutV3API() *Server
func TargetOrgAndSpace ¶
func TurnOffColors ¶
func TurnOffColors()
func TurnOnExperimental ¶
func TurnOnExperimental()
func UserProvidedServiceInstanceGUID ¶
UserProvidedServiceInstanceGUID returns the GUID for a user provided service instance.
func WithBananaPantsApp ¶
func WithBananaPantsApp(f func(dir string))
WithBananaPantsApp creates a simple application to use with your CLI command (typically CF Push). When pushing, be aware of specifying '-b staticfile_buildpack" so that your app will correctly start up with the proper buildpack.
func WithCrashingApp ¶
func WithCrashingApp(f func(dir string))
func WithHelloWorldApp ¶
func WithHelloWorldApp(f func(dir string))
WithHelloWorldApp creates a simple application to use with your CLI command (typically CF Push). When pushing, be aware of specifying '-b staticfile_buildpack" so that your app will correctly start up with the proper buildpack.
func WithManifest ¶
func WithMultiBuildpackApp ¶
func WithMultiBuildpackApp(f func(dir string))
func WithNoResourceMatchedApp ¶
func WithNoResourceMatchedApp(f func(dir string))
WithNoResourceMatchedApp creates a simple application to use with your CLI command (typically CF Push). When pushing, be aware of specifying '-b staticfile_buildpack" so that your app will correctly start up with the proper buildpack.
func WithProcfileApp ¶
func WithProcfileApp(f func(dir string))
WithProcfileApp creates an application to use with your CLI command that contains Procfile defining web and worker processes.
func WriteCommand ¶
func WriteCommand(args []string)
func WriteManifest ¶
Types ¶
type AppInstanceRow ¶
type AppProcessTable ¶
type AppProcessTable struct { Title string Instances []AppInstanceRow }
type Domain ¶
func (Domain) CreateShared ¶
func (d Domain) CreateShared()
func (Domain) CreateWithRouterGroup ¶
func (Domain) DeleteShared ¶
func (d Domain) DeleteShared()
type Plan ¶
type Plan struct { Name string `json:"name"` ID string `json:"id"` Schemas PlanSchemas `json:"schemas"` }
type PlanSchemas ¶
type PlanSchemas struct { ServiceInstance struct { Create struct { Parameters map[string]interface{} `json:"parameters"` } `json:"create"` Update struct { Parameters map[string]interface{} `json:"parameters"` } `json:"update"` } `json:"service_instance"` ServiceBinding struct { Create struct { Parameters map[string]interface{} `json:"parameters"` } `json:"create"` } `json:"service_binding"` }
type PluginCommand ¶
type PluginRepository ¶
type PluginRepository struct {
Plugins []Plugin `json:"plugins"`
}
type PluginRepositoryServerWithPlugin ¶
type PluginRepositoryServerWithPlugin struct {
// contains filtered or unexported fields
}
func NewPluginRepositoryServerWithPlugin ¶
func NewPluginRepositoryServerWithPlugin(pluginName string, version string, platform string, shouldCalculateChecksum bool) *PluginRepositoryServerWithPlugin
func (*PluginRepositoryServerWithPlugin) Cleanup ¶
func (pluginRepoServer *PluginRepositoryServerWithPlugin) Cleanup()
func (*PluginRepositoryServerWithPlugin) Init ¶
func (pluginRepoServer *PluginRepositoryServerWithPlugin) Init(pluginName string, version string, platform string, shouldCalculateChecksum bool)
func (*PluginRepositoryServerWithPlugin) PluginSize ¶
func (pluginRepoServer *PluginRepositoryServerWithPlugin) PluginSize() int64
func (*PluginRepositoryServerWithPlugin) URL ¶
func (pluginRepoServer *PluginRepositoryServerWithPlugin) URL() string
type SecurityGroup ¶
type SecurityGroup struct { Name string `json:"-"` Protocol string `json:"protocol"` Destination string `json:"destination"` Ports string `json:"ports"` Description string `json:"description"` }
func NewSecurityGroup ¶
func (SecurityGroup) Create ¶
func (s SecurityGroup) Create()
type ServiceBroker ¶
type ServiceBroker struct { Name string Path string AppsDomain string Service struct { Name string `json:"name"` ID string `json:"id"` DashboardClient struct { ID string `json:"id"` Secret string `json:"secret"` RedirectUri string `json:"redirect_uri"` } } SyncPlans []Plan AsyncPlans []Plan }
func NewServiceBroker ¶
func (ServiceBroker) Configure ¶
func (b ServiceBroker) Configure(shareable bool)
func (ServiceBroker) Create ¶
func (b ServiceBroker) Create()
func (ServiceBroker) Delete ¶
func (b ServiceBroker) Delete()
func (ServiceBroker) Destroy ¶
func (b ServiceBroker) Destroy()
func (ServiceBroker) Push ¶
func (b ServiceBroker) Push()
func (ServiceBroker) ToJSON ¶
func (b ServiceBroker) ToJSON(shareable bool) string
func (ServiceBroker) Update ¶
func (b ServiceBroker) Update()
type ServiceInstanceGUID ¶
type ServiceInstanceGUID struct { Resources []struct { Metadata struct { GUID string `json:"guid"` } `json:"metadata"` } `json:"resources"` }
Source Files ¶
- app.go
- app_instance_table.go
- client_credentials.go
- command.go
- config.go
- constants.go
- docker.go
- environment.go
- fake_server.go
- feature_flags.go
- file.go
- isolation_segment.go
- login.go
- name_generator.go
- org_and_space.go
- package.go
- plugin.go
- plugin_repo.go
- plugin_repo_platform_unix.go
- quota.go
- random_port.go
- route.go
- route_mapping.go
- security_group.go
- service_broker.go
- service_instance.go
- sha.go
- skip_experimental.go
- user.go