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 LastOperationFields
 - type Organization
 - type OrganizationFields
 - type PluginRepo
 - type QuotaFields
 - type QuotaResponse
 - type Route
 - type RoutePresenter
 - type RouteSummary
 - type RouterGroup
 - type RouterGroups
 - type SecurityGroup
 - type SecurityGroupFields
 - type SecurityGroupParams
 - type ServiceAuthTokenFields
 - type ServiceBindingFields
 - type ServiceBindingRequest
 - type ServiceBroker
 - type ServiceInstance
 - type ServiceInstanceCreateRequest
 - type ServiceInstanceFields
 - type ServiceInstanceUpdateRequest
 - type ServiceKey
 - type ServiceKeyFields
 - type ServiceKeyRequest
 - type ServiceOffering
 - type ServiceOfferingFields
 - type ServiceOfferings
 - type ServicePlan
 - type ServicePlanFields
 - type ServicePlanSummary
 - type ServicePlanVisibilityFields
 - type Space
 - type SpaceFields
 - type SpaceQuota
 - type SpaceQuotaResponse
 - type Stack
 - type UserFields
 - type UserProvidedService
 - type UserProvidedServiceEntity
 - type UserProvidedServiceSummary
 
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 AppInstanceFields ¶
type AppParams ¶
type AppParams struct {
	BuildpackURL       *string
	Command            *string
	DiskQuota          *int64
	Domains            *[]string
	EnvironmentVars    *map[string]interface{}
	GUID               *string
	HealthCheckType    *string
	HealthCheckTimeout *int
	DockerImage        *string
	Diego              *bool
	EnableSSH          *bool
	Hosts              *[]string
	RoutePath          *string
	InstanceCount      *int
	Memory             *int64
	Name               *string
	NoHostname         bool
	NoRoute            bool
	UseRandomRoute     bool
	UseRandomPort      bool
	Path               *string
	ServicesToBind     *[]string
	SpaceGUID          *string
	StackGUID          *string
	StackName          *string
	State              *string
	PackageUpdatedAt   *time.Time
	AppPorts           *[]int
}
    func (*AppParams) IsHostEmpty ¶
type Application ¶
type Application struct {
	ApplicationFields
	Stack    *Stack
	Routes   []RouteSummary
	Services []ServicePlanSummary
}
    func (Application) HasRoute ¶
func (model Application) HasRoute(route Route) bool
func (Application) ToParams ¶
func (model Application) ToParams() (params AppParams)
type ApplicationFields ¶
type ApplicationFields struct {
	GUID                 string
	Name                 string
	BuildpackURL         string
	Command              string
	Diego                bool
	DetectedStartCommand string
	DiskQuota            int64 // in Megabytes
	EnvironmentVars      map[string]interface{}
	InstanceCount        int
	Memory               int64 // in Megabytes
	RunningInstances     int
	HealthCheckType      string
	HealthCheckTimeout   int
	State                string
	SpaceGUID            string
	StackGUID            string
	PackageUpdatedAt     *time.Time
	PackageState         string
	StagingFailedReason  string
	Buildpack            string
	DetectedBuildpack    string
	DockerImage          string
	EnableSSH            bool
	AppPorts             []int
}
    type DomainFields ¶
type DomainFields struct {
	GUID                   string
	Name                   string
	OwningOrganizationGUID string
	RouterGroupGUID        string
	RouterGroupType        string
}
    func (DomainFields) URLForHostAndPath ¶
func (model DomainFields) URLForHostAndPath(host, path string, port int) 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 EventFields ¶
type FeatureFlag ¶
type InstanceState ¶
type InstanceState string
const ( InstanceStarting InstanceState = "starting" InstanceRunning InstanceState = "running" InstanceFlapping InstanceState = "flapping" InstanceDown InstanceState = "down" InstanceCrashed InstanceState = "crashed" )
type LastOperationFields ¶
type Organization ¶
type Organization struct {
	OrganizationFields
	Spaces      []SpaceFields
	Domains     []DomainFields
	SpaceQuotas []SpaceQuota
}
    type OrganizationFields ¶
type OrganizationFields struct {
	GUID            string
	Name            string
	QuotaDefinition QuotaFields
}
    type PluginRepo ¶
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"` // in Megabytes
	RoutesLimit             int    `json:"total_routes"`
	ServicesLimit           int    `json:"total_services"`
	NonBasicServicesAllowed bool   `json:"non_basic_services_allowed"`
	AppInstanceLimit        int    `json:"app_instance_limit"`
}
    type QuotaResponse ¶
type QuotaResponse struct {
	GUID                    string      `json:"guid,omitempty"`
	Name                    string      `json:"name"`
	MemoryLimit             int64       `json:"memory_limit"`          // in Megabytes
	InstanceMemoryLimit     int64       `json:"instance_memory_limit"` // in Megabytes
	RoutesLimit             int         `json:"total_routes"`
	ServicesLimit           int         `json:"total_services"`
	NonBasicServicesAllowed bool        `json:"non_basic_services_allowed"`
	AppInstanceLimit        json.Number `json:"app_instance_limit"`
}
    type Route ¶
type Route struct {
	GUID   string
	Host   string
	Domain DomainFields
	Path   string
	Port   int
	Space           SpaceFields
	Apps            []ApplicationFields
	ServiceInstance ServiceInstanceFields
}
    type RoutePresenter ¶
func (*RoutePresenter) URL ¶
func (r *RoutePresenter) URL() string
type RouteSummary ¶
type RouteSummary struct {
	GUID   string
	Host   string
	Domain DomainFields
	Path   string
	Port   int
}
    func (RouteSummary) URL ¶
func (r RouteSummary) URL() string
type RouterGroup ¶
type RouterGroups ¶
type RouterGroups []RouterGroup
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
	SpaceURL string `json:"spaces_url,omitempty"`
	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 ServiceBindingFields ¶
type ServiceBindingRequest ¶
type ServiceBroker ¶
type ServiceInstance ¶
type ServiceInstance struct {
	ServiceInstanceFields
	ServiceBindings []ServiceBindingFields
	ServiceKeys     []ServiceKeyFields
	ServicePlan     ServicePlanFields
	ServiceOffering ServiceOfferingFields
}
    func (ServiceInstance) IsUserProvided ¶
func (inst ServiceInstance) IsUserProvided() bool
type ServiceInstanceFields ¶
type ServiceKey ¶
type ServiceKey struct {
	Fields      ServiceKeyFields
	Credentials map[string]interface{}
}
    type ServiceKeyFields ¶
type ServiceKeyRequest ¶
type ServiceOffering ¶
type ServiceOffering struct {
	ServiceOfferingFields
	Plans []ServicePlanFields
}
    type ServiceOfferingFields ¶
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
	Free                bool
	Public              bool
	Description         string
	Active              bool
	ServiceOfferingGUID string
	OrgNames            []string
}
    func (ServicePlanFields) OrgHasVisibility ¶
func (servicePlanFields ServicePlanFields) OrgHasVisibility(orgName string) bool
type ServicePlanSummary ¶
type Space ¶
type Space struct {
	SpaceFields
	Organization     OrganizationFields
	Applications     []ApplicationFields
	ServiceInstances []ServiceInstanceFields
	Domains          []DomainFields
	SecurityGroups   []SecurityGroupFields
	SpaceQuotaGUID   string
}
    type SpaceFields ¶
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"` // in Megabytes
	RoutesLimit             int    `json:"total_routes"`
	ServicesLimit           int    `json:"total_services"`
	NonBasicServicesAllowed bool   `json:"non_basic_services_allowed"`
	OrgGUID                 string `json:"organization_guid"`
	AppInstanceLimit        int    `json:"app_instance_limit"`
}
    func (SpaceQuota) FormattedAppInstanceLimit ¶
func (q SpaceQuota) FormattedAppInstanceLimit() string
func (SpaceQuota) FormattedInstanceMemoryLimit ¶
func (q SpaceQuota) FormattedInstanceMemoryLimit() string
func (SpaceQuota) FormattedMemoryLimit ¶
func (q SpaceQuota) FormattedMemoryLimit() string
type SpaceQuotaResponse ¶
type SpaceQuotaResponse struct {
	GUID                    string      `json:"guid,omitempty"`
	Name                    string      `json:"name"`
	MemoryLimit             int64       `json:"memory_limit"`          // in Megabytes
	InstanceMemoryLimit     int64       `json:"instance_memory_limit"` // in Megabytes
	RoutesLimit             int         `json:"total_routes"`
	ServicesLimit           int         `json:"total_services"`
	NonBasicServicesAllowed bool        `json:"non_basic_services_allowed"`
	OrgGUID                 string      `json:"organization_guid"`
	AppInstanceLimit        json.Number `json:"app_instance_limit"`
}
    type UserFields ¶
type UserProvidedService ¶
type UserProvidedServiceEntity ¶
type UserProvidedServiceEntity struct {
	UserProvidedService `json:"entity"`
}
    type UserProvidedServiceSummary ¶
type UserProvidedServiceSummary struct {
	Total     int                         `json:"total_results"`
	Resources []UserProvidedServiceEntity `json:"resources"`
}
    
      
      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
 - plugin_repo.go
 - quota.go
 - route.go
 - route_summary.go
 - router_group.go
 - security_group.go
 - service_auth_token.go
 - service_binding.go
 - service_broker.go
 - service_instance.go
 - service_key.go
 - service_offering.go
 - service_plan.go
 - service_plan_visibility.go
 - space.go
 - space_quota.go
 - stack.go
 - user.go
 - user_provided_service.go
 - user_roles.go
 
 Click to show internal directories. 
   Click to hide internal directories.