cf

package
v0.0.0-...-9019959 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2014 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CF_API_TIMEOUT = 10 * time.Second
View Source
var Cf = func(args ...string) *Session {
	return runner.Run("cf", args...)
}

Functions

func ApiRequest

func ApiRequest(method, endpoint string, response interface{}, data ...string)

func AsUser

func AsUser(userContext UserContext, actions func())

func InitiateUserContext

func InitiateUserContext(userContext UserContext) (originalCfHomeDir, currentCfHomeDir string)

func RestoreUserContext

func RestoreUserContext(_ UserContext, originalCfHomeDir, currentCfHomeDir string)

func TargetSpace

func TargetSpace(userContext UserContext)

Types

type GenericResource

type GenericResource struct {
	Metadata struct {
		Guid string `json:"guid"`
	} `json:"metadata"`
}

type QueryResponse

type QueryResponse struct {
	Resources []GenericResource `struct:"resources"`
}

type UserContext

type UserContext struct {
	ApiUrl   string
	Username string
	Password string
	Org      string
	Space    string

	SkipSSLValidation bool
}

func NewUserContext

func NewUserContext(apiUrl, username, password, org, space string, skipSSLValidation bool) UserContext

Jump to

Keyboard shortcuts

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