cf

package
v0.0.0-...-5d070a7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CF

type CF struct {
	ShortTimeout time.Duration
	LongTimeout  time.Duration
	MaxRetries   int
	RetryBackoff retry.Backoff
}

CF is a testing wrapper around the cf cli

func (*CF) API

func (cf *CF) API(endpoint string, skipSSLValidation bool) func()

API is equivalent to `cf api {endpoint} [--skip-ssl-validation]`

func (*CF) Auth

func (cf *CF) Auth(user, password string) func()

Auth is equivalent to `cf auth {user} {password}`

func (*CF) AuthClient

func (cf *CF) AuthClient(client, clientSecret string) func()

Auth is equivalent to `cf auth {client} {client-secret} --client-credentials`

func (*CF) BindService

func (cf *CF) BindService(appName, instanceName string) func()

BindService is equivalent to `cf bind-service {appName} {instanceName}`

func (*CF) CreateAndBindSecurityGroup

func (cf *CF) CreateAndBindSecurityGroup(securityGroup, serviceName, org, space string) func()

CreateSecurityGroup is equivalent to `cf create-security-group {securityGroup} {configPath}`

func (*CF) CreateOrg

func (cf *CF) CreateOrg(org, quota string) func()

CreateOrg is equivalent to `cf create-org {org} -q {quota}`

func (*CF) CreateQuota

func (cf *CF) CreateQuota(name string, args ...string) func()

CreateQuota is equivalent to `cf create-quota {name} [args...]`

func (*CF) CreateService

func (cf *CF) CreateService(serviceName, planName, instanceName string, skip *bool) func()

CreateService is equivalent to `cf create-service {serviceName} {planName} {instanceName}`

func (CF) CreateServiceKey

func (cf CF) CreateServiceKey(serviceInstanceName, serviceKeyName string) func()

func (*CF) CreateSpace

func (cf *CF) CreateSpace(space string) func()

CreateSpace is equivalent to `cf create-space {space}`

func (*CF) CreateUser

func (cf *CF) CreateUser(name, password string) func()

CreateUser is equivalent to `cf create-user {name} {password}`

func (*CF) Delete

func (cf *CF) Delete(appName string) func()

Delete is equivalent to `cf delete {appName} -f`

func (*CF) DeleteOrg

func (cf *CF) DeleteOrg(name string) func()

DeleteOrg is equivalent to `cf delete-org {name} -f`

func (*CF) DeleteSecurityGroup

func (cf *CF) DeleteSecurityGroup(securityGroup string) func()

DeleteSecurityGroup is equivalent to `cf delete-security-group {securityGroup} -f`

func (*CF) DeleteService

func (cf *CF) DeleteService(instanceName string) func()

DeleteService is equivalent to `cf delete-service {instanceName} -f`

func (CF) DeleteServiceKey

func (cf CF) DeleteServiceKey(serviceInstanceName, serviceKeyName string) func()

func (*CF) DeleteUser

func (cf *CF) DeleteUser(name string) func()

DeleteUser is equivalent to `cf delete-user -f {name}`

func (*CF) EnableServiceAccess

func (cf *CF) EnableServiceAccess(org, service string) func()

EnableServiceAccess is equivalent to `cf enable-service-access -o {org} {service-offering}` In order to run enable-service-access idempotently we disable-service-access before.

func (*CF) EnableServiceAccessForPlan

func (cf *CF) EnableServiceAccessForPlan(org, service, plan string) func()

EnableServiceAccessForPlan is equivalent to `cf enable-service-access -o {org} {service-offering} -p {service-plan}` In order to run enable-service-access idempotently we disable-service-access before.

func (*CF) EnsureAllServiceInstancesGone

func (cf *CF) EnsureAllServiceInstancesGone() func()

func (*CF) EnsureServiceInstanceGone

func (cf *CF) EnsureServiceInstanceGone(instanceName string) func()

func (CF) GetServiceKey

func (cf CF) GetServiceKey(serviceInstanceName string, credentials *Credentials) func()

func (*CF) Logout

func (cf *CF) Logout() func()

Logout is equivalent to `cf logout`

func (*CF) Push

func (cf *CF) Push(appName string, args ...string) func()

Push is equivalent to `cf push {appName} [args...]`

func (*CF) Restage

func (cf *CF) Restage(appName string) func()

Restage is equivalent to `cf restage {appName}`

func (*CF) SetEnv

func (cf *CF) SetEnv(appName, environmentVariable, instanceName string) func()

SetEnv is equivalent to `cf set-env {appName} {envVarName} {instanceName}`

func (*CF) SetSpaceRole

func (cf *CF) SetSpaceRole(name, org, space, role string) func()

SetSpaceRole is equivalent to `cf set-space-role {name} {org} {space} {role}`

func (*CF) Start

func (cf *CF) Start(appName string) func()

Start is equivalent to `cf start {appName}`

func (*CF) TargetOrg

func (cf *CF) TargetOrg(org string) func()

TargetOrg is equivalent to `cf target -o {org}`

func (*CF) TargetOrgAndSpace

func (cf *CF) TargetOrgAndSpace(org, space string) func()

TargetOrgAndSpace is equivalent to `cf target -o {org} -s {space}`

func (*CF) UnbindService

func (cf *CF) UnbindService(appName, instanceName string) func()

UnbindService is equivalent to `cf unbind-service {appName} {instanceName}`

type Credentials

type Credentials struct {
	Host         string     `json:"host"`
	Port         int        `json:"port"`
	TLS_Port     int        `json:"tls_port"`
	TLS_Versions []string   `json:"tls_versions"`
	MasterName   string     `json:"master_name,omitempty"`
	Sentinels    []HostPort `json:"sentinels,omitempty"`
}

type HostPort

type HostPort struct {
	Host    string `json:"host"`
	Port    int    `json:"port"`
	TLSPort int    `json:"tls_port"`
}

type SecurityGroup

type SecurityGroup struct {
	Protocol    string `json:"protocol"`
	Destination string `json:"destination"`
	Ports       string `json:"ports"`
}

Jump to

Keyboard shortcuts

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