models

package
v6.0.2+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ORG_USER        = "OrgUser"
	ORG_MANAGER     = "OrgManager"
	BILLING_MANAGER = "BillingManager"
	ORG_AUDITOR     = "OrgAuditor"
	SPACE_MANAGER   = "SpaceManager"
	SPACE_DEVELOPER = "SpaceDeveloper"
	SPACE_AUDITOR   = "SpaceAuditor"
)

Variables

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

This section is empty.

Types

type AppFileFields

type AppFileFields struct {
	Path string
	Sha1 string
	Size int64
}

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 {
	BuildpackUrl       *string
	Command            *string
	DiskQuota          *uint64
	Domain             *string
	EnvironmentVars    *map[string]string
	Guid               *string
	HealthCheckTimeout *int
	Host               *string
	InstanceCount      *int
	Memory             *uint64
	Name               *string
	NoRoute            *bool
	Path               *string
	RunningInstances   *int
	Services           *[]string
	SpaceGuid          *string
	StackGuid          *string
	StackName          *string
	State              *string
}

func (*AppParams) Equals

func (app *AppParams) Equals(otherParams *AppParams) bool

func (*AppParams) Merge

func (app *AppParams) Merge(other *AppParams)

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 {
	Guid             string
	Name             string
	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 Buildpack

type Buildpack struct {
	Guid     string
	Name     string
	Position *int
	Enabled  *bool
	Key      string
	Filename string
	Locked   *bool
}

type DomainFields

type DomainFields struct {
	Guid                   string
	Name                   string
	OwningOrganizationGuid string
	Shared                 bool
}

func (DomainFields) UrlForHost

func (model DomainFields) UrlForHost(host string) string

type EventFields

type EventFields struct {
	Guid        string
	Name        string
	Timestamp   time.Time
	Description string
}

type InstanceState

type InstanceState string
const (
	InstanceStarting InstanceState = "starting"
	InstanceRunning  InstanceState = "running"
	InstanceFlapping InstanceState = "flapping"
	InstanceDown     InstanceState = "down"
)

type Organization

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

type OrganizationFields

type OrganizationFields struct {
	Guid            string
	Name            string
	QuotaDefinition QuotaFields
}

type QuotaFields

type QuotaFields struct {
	Guid        string
	Name        string
	MemoryLimit uint64 // in Megabytes
}

func NewQuotaFields

func NewQuotaFields(name string, memory uint64) (q QuotaFields)

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 {
	Guid     string
	Name     string
	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 {
	Guid             string
	Name             string
	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 ServiceOfferings

type ServiceOfferings []ServiceOffering

func (ServiceOfferings) Len

func (s ServiceOfferings) Len() int

func (ServiceOfferings) Less

func (s ServiceOfferings) Less(i, j int) bool

func (ServiceOfferings) Swap

func (s ServiceOfferings) Swap(i, j int)

type ServicePlan

type ServicePlan struct {
	ServicePlanFields
	ServiceOffering ServiceOfferingFields
}

type ServicePlanFields

type ServicePlanFields struct {
	Guid string
	Name string
}

type Space

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

type SpaceFields

type SpaceFields struct {
	Guid string
	Name string
}

type Stack

type Stack struct {
	Guid        string
	Name        string
	Description string
}

type UserFields

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

Jump to

Keyboard shortcuts

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