Documentation
¶
Index ¶
- type AppLimit
- type Application
- type Domain
- type Droplet
- type DropletBuildpack
- type IncludedUsers
- type Metadata
- type Organization
- type OrganizationQuota
- type Quota
- type Relationship
- type RelationshipList
- type Relationships
- type ResourceMetadata
- type Role
- type Route
- type RouteDestination
- type RouteDestinationApp
- type RouteLimit
- type Rule
- type SecurityGroup
- type ServiceBroker
- type ServiceBrokerCredentialsType
- type ServiceInstance
- type ServiceInstanceType
- type ServiceLimit
- type ServiceOffering
- type ServicePlan
- type ServicePlanCost
- type ServicePlanVisibility
- type ServicePlanVisibilityDetail
- type ServicePlanVisibilityType
- type Space
- type SpaceQuota
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppLimit ¶
type AppLimit struct {
TotalMemory *types.NullInt `json:"total_memory_in_mb,omitempty"`
InstanceMemory *types.NullInt `json:"per_process_memory_in_mb,omitempty"`
TotalAppInstances *types.NullInt `json:"total_instances,omitempty"`
}
func (*AppLimit) UnmarshalJSON ¶
type Application ¶
type Application struct {
// GUID is the unique application identifier.
GUID string
// StackName is the name of the stack on which the application runs.
StackName string
// LifecycleBuildpacks is a list of the names of buildpacks.
LifecycleBuildpacks []string
// LifecycleType is the type of the lifecycle.
LifecycleType constant.AppLifecycleType
// Metadata is used for custom tagging of API resources
Metadata *Metadata
// Name is the name given to the application.
Name string
// SpaceGUID is the unique identifier of the parent space.
SpaceGUID string
// State is the desired state of the application.
State constant.ApplicationState
}
Application represents a Cloud Controller V3 Application.
func (Application) MarshalJSON ¶
func (a Application) MarshalJSON() ([]byte, error)
MarshalJSON converts an Application into a Cloud Controller Application.
func (Application) Started ¶
func (a Application) Started() bool
func (Application) Stopped ¶
func (a Application) Stopped() bool
func (*Application) UnmarshalJSON ¶
func (a *Application) UnmarshalJSON(data []byte) error
UnmarshalJSON helps unmarshal a Cloud Controller Application response.
type Domain ¶
type Domain struct {
GUID string `json:"guid,omitempty"`
Name string `json:"name"`
Internal types.NullBool `json:"internal,omitempty"`
OrganizationGUID string `jsonry:"relationships.organization.data.guid,omitempty"`
RouterGroup string `jsonry:"router_group.guid,omitempty"`
Protocols []string `jsonry:"supported_protocols,omitempty"`
// Metadata is used for custom tagging of API resources
Metadata *Metadata `json:"metadata,omitempty"`
}
func (Domain) MarshalJSON ¶
func (*Domain) UnmarshalJSON ¶
type Droplet ¶
type Droplet struct {
//Buildpacks are the detected buildpacks from the staging process.
Buildpacks []DropletBuildpack `json:"buildpacks,omitempty"`
// CreatedAt is the timestamp that the Cloud Controller created the droplet.
CreatedAt string `json:"created_at"`
// GUID is the unique droplet identifier.
GUID string `json:"guid"`
// Image is the Docker image name.
Image string `json:"image"`
// Stack is the root filesystem to use with the buildpack.
Stack string `json:"stack,omitempty"`
// State is the current state of the droplet.
State constant.DropletState `json:"state"`
// IsCurrent does not exist on the API layer, only on the actor layer; we ignore it w.r.t. JSON
IsCurrent bool `json:"-"`
}
Droplet represents a Cloud Controller droplet's metadata. A droplet is a set of compiled bits for a given application.
type DropletBuildpack ¶
type DropletBuildpack struct {
// Name is the buildpack name.
Name string `json:"name"`
//DetectOutput is the output during buildpack detect process.
DetectOutput string `json:"detect_output"`
}
DropletBuildpack is the name and output of a buildpack used to create a droplet.
type IncludedUsers ¶
type IncludedUsers map[constant.IncludedType]User
IncludedUsers represent a set of users included on an API response.
type Metadata ¶
type Metadata struct {
Labels map[string]types.NullString `json:"labels,omitempty"`
}
type Organization ¶
type Organization struct {
// GUID is the unique organization identifier.
GUID string `json:"guid,omitempty"`
// Name is the name of the organization.
Name string `json:"name"`
// QuotaGUID is the GUID of the organization Quota applied to this Organization
QuotaGUID string `json:"-"`
// Metadata is used for custom tagging of API resources
Metadata *Metadata `json:"metadata,omitempty"`
}
Organization represents a Cloud Controller V3 Organization.
func (*Organization) UnmarshalJSON ¶
func (org *Organization) UnmarshalJSON(data []byte) error
type OrganizationQuota ¶
type OrganizationQuota struct {
Quota
}
OrganizationQuota represents a Cloud Controller organization quota.
type Quota ¶
type Quota struct {
// GUID is the unique ID of the organization quota.
GUID string `json:"guid,omitempty"`
// Name is the name of the organization quota
Name string `json:"name"`
// Apps contain the various limits that are associated with applications
Apps AppLimit `json:"apps"`
// Services contain the various limits that are associated with services
Services ServiceLimit `json:"services"`
// Routes contain the various limits that are associated with routes
Routes RouteLimit `json:"routes"`
}
type Relationship ¶
type Relationship struct {
GUID string
}
Relationship represents a one to one relationship. An empty GUID will be marshaled as `null`.
func (Relationship) MarshalJSON ¶
func (r Relationship) MarshalJSON() ([]byte, error)
func (*Relationship) UnmarshalJSON ¶
func (r *Relationship) UnmarshalJSON(data []byte) error
type RelationshipList ¶
type RelationshipList struct {
GUIDs []string
}
RelationshipList represents a one to many relationship.
func (RelationshipList) MarshalJSON ¶
func (r RelationshipList) MarshalJSON() ([]byte, error)
func (*RelationshipList) UnmarshalJSON ¶
func (r *RelationshipList) UnmarshalJSON(data []byte) error
type Relationships ¶
type Relationships map[constant.RelationshipType]Relationship
Relationships represent associations between resources. Relationships is a map of RelationshipTypes to Relationship.
type ResourceMetadata ¶
type ResourceMetadata struct {
Metadata *Metadata `json:"metadata,omitempty"`
}
type Role ¶
type Role struct {
// GUID is the unique identifier for the role.
GUID string `json:"guid"`
// Type is the type of the role.
Type constant.RoleType `json:"type"`
// UserGUID is the unique identifier of the user who has this role.
UserGUID string
// Username is the name of the user who has this role, e.g. "admin", "user@example.com"
Username string
// Origin is the identity server, default "uaa". Active Directory can also be an origin
Origin string
// OrgGUID is the unique identifier of the org where this role applies,
// if it is an org role.
OrgGUID string
// SpaceGUID is the unique identifier of the space where this role applies,
// if it is a space role.
SpaceGUID string
}
func (Role) MarshalJSON ¶
MarshalJSON converts a Role into a Cloud Controller Application.
func (*Role) UnmarshalJSON ¶
UnmarshalJSON helps unmarshal a Cloud Controller Role response.
type Route ¶
type Route struct {
GUID string
SpaceGUID string
DomainGUID string
Host string
Path string
Protocol string
Port int
URL string
Destinations []RouteDestination
Metadata *Metadata
}
func (Route) MarshalJSON ¶
func (*Route) UnmarshalJSON ¶
type RouteDestination ¶
type RouteDestination struct {
GUID string
App RouteDestinationApp
}
type RouteDestinationApp ¶
type RouteLimit ¶
type RouteLimit struct {
TotalRoutes *types.NullInt `json:"total_routes,omitempty"`
TotalReservedPorts *types.NullInt `json:"total_reserved_ports,omitempty"`
}
func (*RouteLimit) UnmarshalJSON ¶
func (sl *RouteLimit) UnmarshalJSON(rawJSON []byte) error
type SecurityGroup ¶
type SecurityGroup struct {
Name string `jsonry:"name,omitempty"`
GUID string `jsonry:"guid,omitempty"`
Rules []Rule `jsonry:"rules,omitempty"`
StagingGloballyEnabled *bool `jsonry:"globally_enabled.staging,omitempty"`
RunningGloballyEnabled *bool `jsonry:"globally_enabled.running,omitempty"`
StagingSpaceGUIDs []string `jsonry:"relationships.staging_spaces.data[].guid,omitempty"`
RunningSpaceGUIDs []string `jsonry:"relationships.running_spaces.data[].guid,omitempty"`
}
func (SecurityGroup) MarshalJSON ¶
func (sg SecurityGroup) MarshalJSON() ([]byte, error)
func (*SecurityGroup) UnmarshalJSON ¶
func (sg *SecurityGroup) UnmarshalJSON(data []byte) error
type ServiceBroker ¶
type ServiceBroker struct {
// GUID is a unique service broker identifier.
GUID string `json:"guid,omitempty"`
// Name is the name of the service broker.
Name string `json:"name,omitempty"`
// URL is the url of the service broker.
URL string `json:"url,omitempty"`
// CredentialsType is always "basic"
CredentialsType ServiceBrokerCredentialsType `jsonry:"authentication.type,omitempty"`
// Username is the Basic Auth username for the service broker.
Username string `jsonry:"authentication.credentials.username,omitempty"`
// Password is the Basic Auth password for the service broker.
Password string `jsonry:"authentication.credentials.password,omitempty"`
// Space GUID for the space that the broker is in. Empty when not a space-scoped service broker.
SpaceGUID string `jsonry:"relationships.space.data.guid,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
}
func (ServiceBroker) MarshalJSON ¶
func (s ServiceBroker) MarshalJSON() ([]byte, error)
func (*ServiceBroker) UnmarshalJSON ¶
func (s *ServiceBroker) UnmarshalJSON(data []byte) error
type ServiceBrokerCredentialsType ¶
type ServiceBrokerCredentialsType string
const (
ServiceBrokerBasicCredentials ServiceBrokerCredentialsType = "basic"
)
type ServiceInstance ¶
type ServiceInstance struct {
// Type is either "user-provided" or "managed"
Type ServiceInstanceType `jsonry:"type,omitempty"`
// GUID is a unique service instance identifier.
GUID string `jsonry:"guid,omitempty"`
// Name is the name of the service instance.
Name string `jsonry:"name,omitempty"`
// SpaceGUID is the space that this service instance relates to
SpaceGUID string `jsonry:"relationships.space.data.guid,omitempty"`
}
func (ServiceInstance) MarshalJSON ¶
func (s ServiceInstance) MarshalJSON() ([]byte, error)
func (*ServiceInstance) UnmarshalJSON ¶
func (s *ServiceInstance) UnmarshalJSON(data []byte) error
type ServiceInstanceType ¶
type ServiceInstanceType string
const (
UserProvidedServiceInstance ServiceInstanceType = "user-provided"
)
type ServiceLimit ¶
type ServiceLimit struct {
TotalServiceInstances *types.NullInt `json:"total_service_instances,omitempty"`
PaidServicePlans *bool `json:"paid_services_allowed,omitempty"`
}
func (*ServiceLimit) UnmarshalJSON ¶
func (sl *ServiceLimit) UnmarshalJSON(rawJSON []byte) error
type ServiceOffering ¶
type ServiceOffering struct {
// GUID is a unique service offering identifier.
GUID string `json:"guid"`
// Name is the name of the service offering.
Name string `json:"name"`
// Description of the service offering
Description string `json:"description"`
// ServiceBrokerGUID is the guid of the service broker
ServiceBrokerGUID string `jsonry:"relationships.service_broker.data.guid"`
// ServiceBrokerName is the name of the service broker
ServiceBrokerName string `json:"-"`
Metadata *Metadata `json:"metadata"`
}
func (*ServiceOffering) UnmarshalJSON ¶
func (s *ServiceOffering) UnmarshalJSON(data []byte) error
type ServicePlan ¶
type ServicePlan struct {
// GUID is a unique service plan identifier.
GUID string `json:"guid"`
// Name is the name of the service plan.
Name string `json:"name"`
// Description of the Service Plan.
Description string `json:"description"`
// Whether the Service Plan is available
Available bool `json:"available"`
// VisibilityType can be "public", "admin", "organization" or "space"
VisibilityType ServicePlanVisibilityType `json:"visibility_type"`
// Free shows whether or not the Service Plan is free of charge.
Free bool `json:"free"`
// Cost shows the cost of a paid service plan
Costs []ServicePlanCost `json:"costs"`
// ServicePlanGUID is the GUID of the service offering
ServiceOfferingGUID string `jsonry:"relationships.service_offering.data.guid"`
// SpaceGUID is the space that a plan from a space-scoped broker relates to
SpaceGUID string `jsonry:"relationships.space.data.guid"`
Metadata *Metadata `json:"metadata"`
}
func (*ServicePlan) UnmarshalJSON ¶
func (p *ServicePlan) UnmarshalJSON(data []byte) error
type ServicePlanCost ¶
type ServicePlanVisibility ¶
type ServicePlanVisibility struct {
// Type is one of 'public', 'organization', 'space' or 'admin'
Type ServicePlanVisibilityType `json:"type"`
// Organizations list of organizations for the service plan
Organizations []ServicePlanVisibilityDetail `json:"organizations,omitempty"`
// Space that the plan is visible in
Space ServicePlanVisibilityDetail `json:"space"`
}
ServicePlanVisibility represents a Cloud Controller V3 Service Plan Visibility.
func (ServicePlanVisibility) MarshalJSON ¶
func (s ServicePlanVisibility) MarshalJSON() ([]byte, error)
func (*ServicePlanVisibility) UnmarshalJSON ¶
func (s *ServicePlanVisibility) UnmarshalJSON(data []byte) error
type ServicePlanVisibilityDetail ¶
type ServicePlanVisibilityDetail struct {
// Name is the organization name
Name string `json:"name,omitempty"`
// GUID of the organization
GUID string `json:"guid"`
}
func (ServicePlanVisibilityDetail) OmitJSONry ¶
func (s ServicePlanVisibilityDetail) OmitJSONry() bool
type ServicePlanVisibilityType ¶
type ServicePlanVisibilityType string
const ( ServicePlanVisibilityPublic ServicePlanVisibilityType = "public" ServicePlanVisibilityOrganization ServicePlanVisibilityType = "organization" ServicePlanVisibilitySpace ServicePlanVisibilityType = "space" ServicePlanVisibilityAdmin ServicePlanVisibilityType = "admin" )
type Space ¶
type Space struct {
// GUID is a unique space identifier.
GUID string `json:"guid,omitempty"`
// Name is the name of the space.
Name string `json:"name"`
// Relationships list the relationships to the space.
Relationships Relationships `json:"relationships,omitempty"`
// Metadata is used for custom tagging of API resources
Metadata *Metadata `json:"metadata,omitempty"`
}
Space represents a Cloud Controller V3 Space.
type SpaceQuota ¶
type SpaceQuota struct {
Quota
// OrgGUID is the unique ID of the owning organization
OrgGUID string
// SpaceGUIDs are the list of unique ID's of the associated spaces
SpaceGUIDs []string
}
func (SpaceQuota) MarshalJSON ¶
func (sq SpaceQuota) MarshalJSON() ([]byte, error)
func (*SpaceQuota) UnmarshalJSON ¶
func (sq *SpaceQuota) UnmarshalJSON(data []byte) error
Source Files
¶
- application_resource.go
- domain_resource.go
- droplet_resource.go
- metadata_resource.go
- organization_quota_resource.go
- organization_resource.go
- quota_resource.go
- relationship_resource.go
- role_resource.go
- route_resource.go
- security_group_resource.go
- service_broker_resource.go
- service_instance_resource.go
- service_offering_resource.go
- service_plan_resource.go
- service_plan_visibility_resource.go
- space_quota_resource.go
- space_resource.go
- user_resource.go