cf

package
v6.0.0-beta2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2013 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "6.0.0.rc1-SHA"
	Usage   = "A command line tool to interact with Cloud Foundry"
)
View Source
const (
	InstanceStarting InstanceState = "starting"
	InstanceRunning                = "running"
	InstanceFlapping               = "flapping"
	InstanceDown                   = "down"
)
View Source
const (
	UaaEndpointKey             EndpointType = "uaa"
	LoggregatorEndpointKey                  = "loggregator"
	CloudControllerEndpointKey              = "cloud_controller"
)
View Source
const (
	USER_EXISTS                 = "20002"
	USER_NOT_FOUND              = "20003"
	ORG_EXISTS                  = "30002"
	SPACE_EXISTS                = "40002"
	SERVICE_INSTANCE_NAME_TAKEN = "60002"
	APP_NOT_STAGED              = "170002"
	APP_STOPPED                 = "220001"
	BUILDPACK_EXISTS            = "290001"
)
View Source
const (
	ORG_MANAGER     = "OrgManager"
	BILLING_MANAGER = "BillingManager"
	ORG_AUDITOR     = "OrgAuditor"
	SPACE_MANAGER   = "SpaceManager"
	SPACE_DEVELOPER = "SpaceDeveloper"
	SPACE_AUDITOR   = "SpaceAuditor"
)

Variables

View Source
var DefaultIgnoreFiles = []string{
	".cfignore",
	".git",
	".svn",
	"_darcs",
}
View Source
var SpaceRoleToUserInput = map[string]string{
	SPACE_MANAGER:   "SpaceManager",
	SPACE_DEVELOPER: "SpaceDeveloper",
	SPACE_AUDITOR:   "SpaceAuditor",
}
View Source
var UserInputToOrgRole = map[string]string{
	"OrgManager":     ORG_MANAGER,
	"BillingManager": BILLING_MANAGER,
	"OrgAuditor":     ORG_AUDITOR,
}
View Source
var UserInputToSpaceRole = map[string]string{
	"SpaceManager":   SPACE_MANAGER,
	"SpaceDeveloper": SPACE_DEVELOPER,
	"SpaceAuditor":   SPACE_AUDITOR,
}

Functions

func CopyFiles

func CopyFiles(appFiles []AppFileFields, fromDir, toDir string) (err error)

func Name

func Name() string

func WaitForClose

func WaitForClose(stop chan bool)

Types

type AppFileFields

type AppFileFields struct {
	Path string
	Sha1 string
	Size int64
}

func AppFilesInDir

func AppFilesInDir(dir string) (appFiles []AppFileFields, err error)

type AppInstanceFields

type AppInstanceFields struct {
	State     InstanceState
	Since     time.Time
	CpuUsage  float64 // percentage
	DiskQuota uint64  // in bytes
	DiskUsage uint64
	MemQuota  uint64
	MemUsage  uint64
}

type AppParams

type AppParams struct {
	generic.Map
}

func NewAppParams

func NewAppParams(data interface{}) (params AppParams)

func NewAppParamsFromContext

func NewAppParamsFromContext(c *cli.Context) (appParams AppParams, err error)

func NewEmptyAppParams

func NewEmptyAppParams() AppParams

func (AppParams) ToMap

func (app AppParams) ToMap() generic.Map

type AppSet

type AppSet []AppParams

func NewAppSet

func NewAppSet(apps interface{}) (set AppSet)

func NewEmptyAppSet

func NewEmptyAppSet() AppSet

type AppSummary

type AppSummary struct {
	ApplicationFields
	RouteSummaries []RouteSummary
}

type Application

type Application struct {
	ApplicationFields
	Stack  Stack
	Routes []RouteSummary
}

func (Application) ToParams

func (model Application) ToParams() (params AppParams)

type ApplicationFields

type ApplicationFields struct {
	BasicFields
	BuildpackUrl     string
	Command          string
	DiskQuota        uint64 // in Megabytes
	EnvironmentVars  map[string]string
	InstanceCount    int
	Memory           uint64 // in Megabytes
	RunningInstances int
	State            string
	SpaceGuid        string
}

type ApplicationZipper

type ApplicationZipper struct{}

func (ApplicationZipper) Zip

func (zipper ApplicationZipper) Zip(dirOrZipFile string, targetFile *os.File) (err error)

type BasicFields

type BasicFields struct {
	Guid string
	Name string
}

func (BasicFields) String

func (model BasicFields) String() string

type Buildpack

type Buildpack struct {
	BasicFields
	Position *int
}

type Domain

type Domain struct {
	DomainFields
	Spaces []SpaceFields
}

type DomainFields

type DomainFields struct {
	BasicFields
	OwningOrganizationGuid string
	Shared                 bool
}

func (DomainFields) UrlForHost

func (model DomainFields) UrlForHost(host string) string

type EndpointType

type EndpointType string

type EventFields

type EventFields struct {
	InstanceIndex   int
	Timestamp       time.Time
	ExitDescription string
	ExitStatus      int
}

type InstanceState

type InstanceState string

type Organization

type Organization struct {
	OrganizationFields
	Spaces  []SpaceFields
	Domains []DomainFields
}

type OrganizationFields

type OrganizationFields struct {
	BasicFields
}

type QuotaFields

type QuotaFields struct {
	BasicFields
	MemoryLimit uint64 // in Megabytes
}

type Route

type Route struct {
	RouteSummary
	Space SpaceFields
	Apps  []ApplicationFields
}

type RouteFields

type RouteFields struct {
	Guid string
	Host string
}

type RouteSummary

type RouteSummary struct {
	RouteFields
	Domain DomainFields
}

func (RouteSummary) URL

func (model RouteSummary) URL() string

type ServiceAuthTokenFields

type ServiceAuthTokenFields struct {
	Guid     string
	Label    string
	Provider string
	Token    string
}

type ServiceBindingFields

type ServiceBindingFields struct {
	Guid    string
	Url     string
	AppGuid string
}

type ServiceBroker

type ServiceBroker struct {
	BasicFields
	Username string
	Password string
	Url      string
}

type ServiceInstance

type ServiceInstance struct {
	ServiceInstanceFields
	ServiceBindings []ServiceBindingFields
	ServicePlan     ServicePlanFields
	ServiceOffering ServiceOfferingFields
}

func (ServiceInstance) IsUserProvided

func (inst ServiceInstance) IsUserProvided() bool

type ServiceInstanceFields

type ServiceInstanceFields struct {
	BasicFields
	SysLogDrainUrl   string
	ApplicationNames []string
	Params           map[string]string
}

type ServiceOffering

type ServiceOffering struct {
	ServiceOfferingFields
	Plans []ServicePlanFields
}

type ServiceOfferingFields

type ServiceOfferingFields struct {
	Guid             string
	Label            string
	Provider         string
	Version          string
	Description      string
	DocumentationUrl string
}

type ServicePlan

type ServicePlan struct {
	ServicePlanFields
	ServiceOffering ServiceOfferingFields
}

type ServicePlanFields

type ServicePlanFields struct {
	BasicFields
}

type Space

type Space struct {
	SpaceFields
	Organization     OrganizationFields
	Applications     []ApplicationFields
	ServiceInstances []ServiceInstanceFields
	Domains          []DomainFields
}

type SpaceFields

type SpaceFields struct {
	BasicFields
}

type Stack

type Stack struct {
	BasicFields
	Description string
}

type UserFields

type UserFields struct {
	Guid     string
	Username string
	Password string
	IsAdmin  bool
}

type Zipper

type Zipper interface {
	Zip(dirToZip string, targetFile *os.File) (err error)
}

Jump to

Keyboard shortcuts

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