helpers

package
v6.23.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMemoryLimit = "256M"
	DefaultDiskLimit   = "1G"
)

Variables

This section is empty.

Functions

func AddOrReplaceEnvironment

func AddOrReplaceEnvironment(env []string, newEnvName string, newEnvVal string) []string

func BindRouteToApplication

func BindRouteToApplication(app string, domain string, host string, path string)

func CF

func CF(args ...string) *Session

func CFWithEnv

func CFWithEnv(envVars map[string]string, args ...string) *Session

func CFWithStdin

func CFWithStdin(stdin io.Reader, args ...string) *Session

func ClearTarget

func ClearTarget()

func CreateOrg

func CreateOrg(org string)

func CreateOrgAndSpace

func CreateOrgAndSpace(org string, space string)

func CreateSpace

func CreateSpace(space string)

func DestroyHomeDir

func DestroyHomeDir(homeDir string)

func DomainName

func DomainName(prefix ...string) string

func GetAPI

func GetAPI() string

func GetAppGuid

func GetAppGuid(appName string) string

func GetCredentials

func GetCredentials() (string, string)

func LoginCF

func LoginCF() string

func LogoutCF

func LogoutCF()

func NewOrgName

func NewOrgName() string

func PrefixedRandomName

func PrefixedRandomName(namePrefix string) string

func QuotaName

func QuotaName(name ...string) string

func RandomName

func RandomName() string

func RandomPassword

func RandomPassword() string

func RandomUsername

func RandomUsername() string

func RunIfExperimental

func RunIfExperimental(msg string)

RunIfExperimental is for tests that should be skipped if CF_CLI_EXPERIMENTAL is set to false.

func SetAPI

func SetAPI() (string, string)

func SetConfig

func SetConfig(cb func(conf *configv3.Config))

func SetHomeDir

func SetHomeDir() string

func SetupReadOnlyOrgAndSpace

func SetupReadOnlyOrgAndSpace() (string, string)

func SkipIfExperimental

func SkipIfExperimental(msg string)

SkipIfExperimental is for tests that should be skipped if CF_CLI_EXPERIMENTAL is set to true.

func TargetOrg

func TargetOrg(org string)

func TargetOrgAndSpace

func TargetOrgAndSpace(org string, space string)

func TurnOffColors

func TurnOffColors()

func UnbindRouteToApplication

func UnbindRouteToApplication(app string, domain string, host string, path string)

func UnsetAPI

func UnsetAPI()

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 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.

Types

type Assets

type Assets struct {
	ServiceBroker string
}

func NewAssets

func NewAssets() Assets

type Domain

type Domain struct {
	Org  string
	Name string
}

func NewDomain

func NewDomain(org string, name string) Domain

func (Domain) Create

func (d Domain) Create()

func (Domain) CreateShared

func (d Domain) CreateShared()

func (Domain) CreateWithRouterGroup

func (d Domain) CreateWithRouterGroup(routerGroup string)

func (Domain) Delete

func (d Domain) Delete()

func (Domain) Share

func (d Domain) Share()

type Plan

type Plan struct {
	Name string `json:"name"`
	ID   string `json:"id"`
}

type Route

type Route struct {
	Space  string
	Host   string
	Domain string
	Path   string
}

func NewRoute

func NewRoute(space string, domain string, hostname string, path string) Route

func (Route) Create

func (r Route) Create()

func (Route) Delete

func (r Route) Delete()

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 NewServiceBroker(name string, path string, appsDomain string, serviceName string, planName string) ServiceBroker

func (ServiceBroker) Configure

func (b ServiceBroker) Configure()

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() string

Jump to

Keyboard shortcuts

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