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 ServiceLimit
- 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 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 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 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