commands

package
v6.3.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunCommandResultSuccess            = iota
	RunCommandResultFailed             = iota
	RunCommandResultRequirementsFailed = iota
)

Variables

View Source
var CommandDidPassRequirements bool

Functions

func NewContext

func NewContext(cmdName string, args []string) *cli.Context

func RunCommand

func RunCommand(cmd command.Command, args []string, requirementsFactory *testreq.FakeReqFactory) (passedRequirements bool)

Types

type FakeApiEndpointSetter

type FakeApiEndpointSetter struct {
	SetEndpoint string
}

func (*FakeApiEndpointSetter) SetApiEndpoint

func (setter *FakeApiEndpointSetter) SetApiEndpoint(endpoint string)

type FakeAppBinder

type FakeAppBinder struct {
	AppsToBind        []models.Application
	InstancesToBindTo []models.ServiceInstance

	BindApplicationReturns struct {
		Error error
	}
}

func (*FakeAppBinder) BindApplication

func (binder *FakeAppBinder) BindApplication(app models.Application, service models.ServiceInstance) error

type FakeAppDisplayer

type FakeAppDisplayer struct {
	AppToDisplay models.Application
}

func (*FakeAppDisplayer) ShowApp

func (displayer *FakeAppDisplayer) ShowApp(app models.Application)

type FakeAppRestarter

type FakeAppRestarter struct {
	AppToRestart models.Application
}

func (*FakeAppRestarter) ApplicationRestart

func (restarter *FakeAppRestarter) ApplicationRestart(appToRestart models.Application)

type FakeAppStarter

type FakeAppStarter struct {
	AppToStart models.Application
	Timeout    int
}

func (*FakeAppStarter) ApplicationStart

func (starter *FakeAppStarter) ApplicationStart(appToStart models.Application) (startedApp models.Application, err error)

func (*FakeAppStarter) ApplicationStartWithBuildpack

func (starter *FakeAppStarter) ApplicationStartWithBuildpack(app models.Application, buildpackUrl string) (startedApp models.Application, err error)

func (*FakeAppStarter) SetStartTimeoutInSeconds

func (starter *FakeAppStarter) SetStartTimeoutInSeconds(timeout int)

type FakeAppStopper

type FakeAppStopper struct {
	AppToStop models.Application
}

func (*FakeAppStopper) ApplicationStop

func (stopper *FakeAppStopper) ApplicationStop(app models.Application) (updatedApp models.Application, err error)

type FakeRouteCreator

type FakeRouteCreator struct {
	CreateRouteHostname     string
	CreateRouteDomainFields models.DomainFields
	CreateRouteSpaceFields  models.SpaceFields
	ReservedRoute           models.Route
}

func (*FakeRouteCreator) CreateRoute

func (cmd *FakeRouteCreator) CreateRoute(hostName string, domain models.DomainFields, space models.SpaceFields) (reservedRoute models.Route, apiErr error)

type RunCommandResult

type RunCommandResult int

func RunCommandMoreBetter

func RunCommandMoreBetter(cmd command.Command, requirementsFactory *testreq.FakeReqFactory, args ...string) (result RunCommandResult)

Jump to

Keyboard shortcuts

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