Documentation
¶
Index ¶
- Constants
- Variables
- type AppFileFields
- type AppInstanceFields
- type AppParams
- type Application
- type ApplicationFields
- type Buildpack
- type DomainFields
- type Environment
- type EnvironmentVariable
- type EventFields
- type FeatureFlag
- type InstanceState
- type Organization
- type OrganizationFields
- type QuotaFields
- type Route
- type RouteSummary
- type SecurityGroup
- type SecurityGroupFields
- type SecurityGroupParams
- type ServiceAuthTokenFields
- type ServiceBindingFields
- type ServiceBroker
- type ServiceInstance
- type ServiceInstanceFields
- type ServiceOffering
- type ServiceOfferingFields
- type ServiceOfferings
- type ServicePlan
- type ServicePlanFields
- type ServicePlanVisibilityFields
- type Space
- type SpaceFields
- type SpaceQuota
- type Stack
- type UserFields
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 int64 // in bytes
DiskUsage int64
MemQuota int64
MemUsage int64
}
type AppParams ¶
type AppParams struct {
BuildpackUrl *string
Command *string
DiskQuota *int64
Domain *string
EnvironmentVars *map[string]string
Guid *string
HealthCheckTimeout *int
Host *string
InstanceCount *int
Memory *int64
Name *string
NoRoute bool
UseRandomHostname bool
Path *string
ServicesToBind *[]string
SpaceGuid *string
StackGuid *string
StackName *string
State *string
}
type Application ¶
type Application struct {
ApplicationFields
Stack *Stack
Routes []RouteSummary
}
type ApplicationFields ¶
type ApplicationFields struct {
Guid string
Name string
BuildpackUrl string
Command string
DiskQuota int64 // in Megabytes
EnvironmentVars map[string]string
InstanceCount int
Memory int64 // in Megabytes
RunningInstances int
State string
SpaceGuid string
PackageUpdatedAt *time.Time
}
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 Environment ¶
type Environment struct {
System map[string]interface{} `json:"system_env_json,omitempty"`
Environment map[string]interface{} `json:"environment_json,omitempty"`
Running map[string]interface{} `json:"running_env_json,omitempty"`
Staging map[string]interface{} `json:"staging_env_json,omitempty"`
Application map[string]interface{} `json:"application_env_json,omitempty"`
}
func NewEnvironment ¶
func NewEnvironment() *Environment
type EnvironmentVariable ¶
type EnvironmentVariable struct {
Name string
Value string
}
func NewEnvironmentVariable ¶
func NewEnvironmentVariable(name string, value string) (e EnvironmentVariable)
type EventFields ¶
type EventFields struct {
Guid string
Name string
Timestamp time.Time
Description string
ActorName string
}
type FeatureFlag ¶
type FeatureFlag struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
ErrorMessage string `json:"error_message"`
}
func NewFeatureFlag ¶
func NewFeatureFlag(name string, enabled bool, errorMessage string) (f FeatureFlag)
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
SpaceQuotas []SpaceQuota
}
type OrganizationFields ¶
type OrganizationFields struct {
Guid string
Name string
QuotaDefinition QuotaFields
}
type QuotaFields ¶
type QuotaFields struct {
Guid string `json:"guid,omitempty"`
Name string `json:"name"`
MemoryLimit int64 `json:"memory_limit"` // in Megabytes
InstanceMemoryLimit int64 `json:"instance_memory_limit,omitempty"` // in Megabytes
RoutesLimit int `json:"total_routes"`
ServicesLimit int `json:"total_services"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
}
func NewQuotaFields ¶
func NewQuotaFields(name string, memory int64, routes int, services int, nonbasicservices bool) (q QuotaFields)
type Route ¶
type Route struct {
Guid string
Host string
Domain DomainFields
Space SpaceFields
Apps []ApplicationFields
}
type RouteSummary ¶
type RouteSummary struct {
Guid string
Host string
Domain DomainFields
}
type SecurityGroup ¶
type SecurityGroup struct {
SecurityGroupFields
Spaces []Space
}
represents a fully instantiated model returned by the CC (e.g.: with its attributes and the fields for its child objects)
type SecurityGroupFields ¶
type SecurityGroupFields struct {
Name string
Guid string
Rules []map[string]interface{}
}
represents just the attributes for an security group
type SecurityGroupParams ¶
type SecurityGroupParams struct {
Name string `json:"name,omitempty"`
Guid string `json:"guid,omitempty"`
Rules []map[string]interface{} `json:"rules"`
}
represents the JSON that we send up to CC when the user creates / updates a record
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
Services []ServiceOffering
}
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]interface{}
}
type ServiceOffering ¶
type ServiceOffering struct {
ServiceOfferingFields
Plans []ServicePlanFields
}
type ServiceOfferingFields ¶
type ServiceOfferingFields struct {
Guid string
BrokerGuid string
Label string
Provider string
Version string
Description string
DocumentationUrl string
}
type ServiceOfferings ¶
type ServiceOfferings []ServiceOffering
type ServicePlan ¶
type ServicePlan struct {
ServicePlanFields
ServiceOffering ServiceOfferingFields
}
type ServicePlanFields ¶
type ServicePlanFields struct {
Guid string
Name string
Free bool
Public bool
Description string
Active bool
ServiceOfferingGuid string
OrgNames []string
}
func (ServicePlanFields) OrgHasVisibility ¶
func (servicePlanFields ServicePlanFields) OrgHasVisibility(orgName string) bool
type ServicePlanVisibilityFields ¶
type ServicePlanVisibilityFields struct {
Guid string `json:"guid"`
ServicePlanGuid string `json:"service_plan_guid"`
OrganizationGuid string `json:"organization_guid"`
}
type Space ¶
type Space struct {
SpaceFields
Organization OrganizationFields
Applications []ApplicationFields
ServiceInstances []ServiceInstanceFields
Domains []DomainFields
SecurityGroups []SecurityGroupFields
SpaceQuotaGuid string
}
type SpaceFields ¶
type SpaceFields struct {
Guid string
Name string
}
type SpaceQuota ¶
type SpaceQuota struct {
Guid string `json:"guid,omitempty"`
Name string `json:"name"`
MemoryLimit int64 `json:"memory_limit"` // in Megabytes
InstanceMemoryLimit int64 `json:"instance_memory_limit,omitempty"` // in Megabytes
RoutesLimit int `json:"total_routes"`
ServicesLimit int `json:"total_services"`
NonBasicServicesAllowed bool `json:"non_basic_services_allowed"`
OrgGuid string `json:"organization_guid"`
}
func NewSpaceQuota ¶
func NewSpaceQuota(name string, memory int64, routes int, services int, nonbasicservices bool, orgGuid string) (q SpaceQuota)
type UserFields ¶
type UserFields struct {
Guid string
Username string
Password string
IsAdmin bool
}
Source Files
¶
- app_event.go
- app_file.go
- app_instance.go
- application.go
- buildpack.go
- domain.go
- environment.go
- environment_variable.go
- feature_flag.go
- organization.go
- quota.go
- route.go
- security_group.go
- service_auth_token.go
- service_binding.go
- service_broker.go
- service_instance.go
- service_offering.go
- service_plan.go
- service_plan_visibility.go
- space.go
- space_quota.go
- stack.go
- user.go
- user_roles.go
Click to show internal directories.
Click to hide internal directories.