Documentation
¶
Index ¶
- type APILink
- type APILinks
- type AppLimit
- type Application
- type ApplicationFeature
- type Build
- type Deployment
- type Domain
- type Droplet
- type DropletBuildpack
- type EnvironmentVariables
- type IsolationSegment
- type K8sUser
- type LastOperation
- type LastOperationState
- type LastOperationType
- type Metadata
- type Organization
- type OrganizationQuota
- type Package
- type Process
- type Quota
- type Relationship
- type RelationshipList
- type Relationships
- type ResourceMetadata
- type Revision
- type Route
- type RouteDestination
- type RouteDestinationApp
- type RouteLimit
- type ServiceBroker
- type ServiceBrokerCredentialsType
- type ServiceCredentialBinding
- type ServiceCredentialBindingDetails
- type ServiceCredentialBindingType
- type ServiceInstance
- type ServiceInstanceType
- type ServiceInstanceUsageSummary
- type ServiceInstanceUsageSummaryList
- type ServiceLimit
- type ServiceOffering
- type ServicePlan
- type ServicePlanCost
- type ServicePlanVisibility
- type ServicePlanVisibilityDetail
- type ServicePlanVisibilityType
- type SharedToSpacesListWrapper
- type Space
- type Stack
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APILink ¶
type APILink struct {
// HREF is the fully qualified URL for the link.
HREF string `json:"href"`
// Method indicate the desired action to be performed on the identified
// resource.
Method string `json:"method"`
// Meta contains additional metadata about the API.
Meta struct {
// Version of the API
Version string `json:"version"`
// Fingerprint to authenticate api with
HostKeyFingerprint string `json:"host_key_fingerprint"`
// Identifier for UAA queries
OAuthClient string `json:"oath_client"`
} `json:"meta"`
}
APILink represents a generic link from a response object.
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 ApplicationFeature ¶
type Build ¶
type Build struct {
// CreatedAt is the time with zone when the build was created.
CreatedAt string
// DropletGUID is the unique identifier for the resulting droplet from the
// staging process.
DropletGUID string
// Error describes errors during the build process.
Error string
// GUID is the unique build identifier.
GUID string
// PackageGUID is the unique identifier for package that is the input to the
// staging process.
PackageGUID string
// State is the state of the build.
State constant.BuildState
}
Build represent the process of staging an application package.
func (Build) MarshalJSON ¶
MarshalJSON converts a Build into a Cloud Controller Application.
func (*Build) UnmarshalJSON ¶
UnmarshalJSON helps unmarshal a Cloud Controller Build response.
type Deployment ¶
type Deployment struct {
GUID string
State constant.DeploymentState
StatusValue constant.DeploymentStatusValue
StatusReason constant.DeploymentStatusReason
RevisionGUID string
DropletGUID string
CreatedAt string
UpdatedAt string
Relationships Relationships
NewProcesses []Process
}
func (Deployment) MarshalJSON ¶
func (d Deployment) MarshalJSON() ([]byte, error)
MarshalJSON converts a Deployment into a Cloud Controller Deployment.
func (*Deployment) UnmarshalJSON ¶
func (d *Deployment) UnmarshalJSON(data []byte) error
UnmarshalJSON helps unmarshal a Cloud Controller Deployment 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"`
// BuildpackName is the the name reported by the buildpack.
BuildpackName string `json:"buildpack_name"`
// DetectOutput is the output of the buildpack detect script.
DetectOutput string `json:"detect_output"`
// Version is the version of the detected buildpack.
Version string `json:"version"`
}
DropletBuildpack is the name and output of a buildpack used to create a droplet.
type EnvironmentVariables ¶
type EnvironmentVariables map[string]types.FilteredString
func (EnvironmentVariables) MarshalJSON ¶
func (variables EnvironmentVariables) MarshalJSON() ([]byte, error)
func (*EnvironmentVariables) UnmarshalJSON ¶
func (variables *EnvironmentVariables) UnmarshalJSON(data []byte) error
type IsolationSegment ¶
type IsolationSegment struct {
//GUID is the unique ID of the isolation segment.
GUID string `json:"guid,omitempty"`
//Name is the name of the isolation segment.
Name string `json:"name"`
}
IsolationSegment represents a Cloud Controller Isolation Segment.
type LastOperation ¶
type LastOperation struct {
// Type is either "create", "update" or "delete"
Type LastOperationType `json:"type,omitempty"`
// State is either "in progress", "succeeded", or "failed"
State LastOperationState `json:"state,omitempty"`
// Description contains more details
Description string `json:"description,omitempty"`
// CreatedAt is the time when the operation started
CreatedAt string `json:"created_at,omitempty"`
// UpdatedAt is the time when the operation was last updated
UpdatedAt string `json:"updated_at,omitempty"`
}
func (LastOperation) OmitJSONry ¶
func (l LastOperation) OmitJSONry() bool
type LastOperationState ¶
type LastOperationState string
const ( OperationInProgress LastOperationState = "in progress" OperationSucceeded LastOperationState = "succeeded" OperationFailed LastOperationState = "failed" )
type LastOperationType ¶
type LastOperationType string
const ( CreateOperation LastOperationType = "create" UpdateOperation LastOperationType = "update" DeleteOperation LastOperationType = "delete" )
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 Package ¶
type Package struct {
// CreatedAt is the time with zone when the object was created.
CreatedAt string
// DockerImage is the registry address of the docker image.
DockerImage string
// DockerPassword is the password for the docker image's registry.
DockerPassword string
// DockerUsername is the username for the docker image's registry.
DockerUsername string
// GUID is the unique identifier of the package.
GUID string
// Links are links to related resources.
Links APILinks
// Relationships are a list of relationships to other resources.
Relationships Relationships
// State is the state of the package.
State constant.PackageState
// Type is the package type.
Type constant.PackageType
}
Package represents a Cloud Controller V3 Package.
func (Package) MarshalJSON ¶
MarshalJSON converts a Package into a Cloud Controller Package.
func (*Package) UnmarshalJSON ¶
UnmarshalJSON helps unmarshal a Cloud Controller Package response.
type Process ¶
type Process struct {
GUID string
Type string
// Command is the process start command. Note: This value will be obfuscated when obtained from listing.
Command types.FilteredString
HealthCheckType constant.HealthCheckType
HealthCheckEndpoint string
HealthCheckInvocationTimeout int64
HealthCheckTimeout int64
Instances types.NullInt
MemoryInMB types.NullUint64
DiskInMB types.NullUint64
AppGUID string
}
func (Process) MarshalJSON ¶
func (*Process) UnmarshalJSON ¶
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 Revision ¶
type Revision struct {
GUID string `json:"guid"`
Version int `json:"version"`
Deployable bool `json:"deployable"`
Description string `json:"description"`
Droplet Droplet `json:"droplet"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
Revision : application revision
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 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 ServiceCredentialBinding ¶
type ServiceCredentialBinding struct {
// Type is either "app" or "key"
Type ServiceCredentialBindingType `jsonry:"type,omitempty"`
// GUID is a unique service credential binding identifier.
GUID string `jsonry:"guid,omitempty"`
// Name is the name of the service credential binding.
Name string `jsonry:"name,omitempty"`
// ServiceInstanceGUID is the service instance that this binding originates from
ServiceInstanceGUID string `jsonry:"relationships.service_instance.data.guid,omitempty"`
// AppGUID is the application that this binding is attached to
AppGUID string `jsonry:"relationships.app.data.guid,omitempty"`
// AppName is the application name. It is not part of the API response, and is here as pragmatic convenience.
AppName string `jsonry:"-"`
// AppSpaceGUID is the space guid of the app. It is not part of the API response, and is here as pragmatic convenience.
AppSpaceGUID string `jsonry:"-"`
// LastOperation is the last operation on the service credential binding
LastOperation LastOperation `jsonry:"last_operation"`
// Parameters can be specified when creating a binding
// Omit empty to fix errors with user-provided services
Parameters types.OptionalObject `jsonry:"parameters,omitempty"`
}
func (ServiceCredentialBinding) MarshalJSON ¶
func (s ServiceCredentialBinding) MarshalJSON() ([]byte, error)
func (*ServiceCredentialBinding) UnmarshalJSON ¶
func (s *ServiceCredentialBinding) UnmarshalJSON(data []byte) error
type ServiceCredentialBindingDetails ¶
type ServiceCredentialBindingDetails struct {
Credentials map[string]interface{} `json:"credentials"`
}
type ServiceCredentialBindingType ¶
type ServiceCredentialBindingType string
const ( AppBinding ServiceCredentialBindingType = "app" KeyBinding ServiceCredentialBindingType = "key" )
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"`
// ServicePlanGUID is the service plan that this service instance relates to
ServicePlanGUID string `jsonry:"relationships.service_plan.data.guid,omitempty"`
// Tags are used by apps to identify service instances.
Tags types.OptionalStringSlice `jsonry:"tags"`
// SyslogDrainURL is where logs are streamed
SyslogDrainURL types.OptionalString `jsonry:"syslog_drain_url"`
// RouteServiceURL is where requests for bound routes will be forwarded
RouteServiceURL types.OptionalString `jsonry:"route_service_url"`
// DashboardURL is where the service can be monitored
DashboardURL types.OptionalString `jsonry:"dashboard_url"`
// Credentials are passed to the app
Credentials types.OptionalObject `jsonry:"credentials"`
// UpgradeAvailable says whether the plan is at a higher version
UpgradeAvailable types.OptionalBoolean `json:"upgrade_available"`
// MaintenanceInfoVersion is the version this service is at
MaintenanceInfoVersion string `jsonry:"maintenance_info.version,omitempty"`
// Parameters are passed to the service broker
Parameters types.OptionalObject `jsonry:"parameters"`
// LastOperation is the last operation on the service instance
LastOperation LastOperation `jsonry:"last_operation"`
Metadata *Metadata `json:"metadata,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" ManagedServiceInstance ServiceInstanceType = "managed" )
type ServiceInstanceUsageSummary ¶
type ServiceInstanceUsageSummary struct {
SpaceGUID string `jsonry:"space.guid""`
BoundAppCount int `jsonry:"bound_app_count"`
}
func (*ServiceInstanceUsageSummary) UnmarshalJSON ¶
func (s *ServiceInstanceUsageSummary) UnmarshalJSON(data []byte) error
type ServiceInstanceUsageSummaryList ¶
type ServiceInstanceUsageSummaryList struct {
UsageSummary []ServiceInstanceUsageSummary `jsonry:"usage_summary"`
}
func (*ServiceInstanceUsageSummaryList) UnmarshalJSON ¶
func (s *ServiceInstanceUsageSummaryList) 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 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"`
// DocumentationURL of the service offering
DocumentationURL string `json:"documentation_url"`
// Tags are used by apps to identify service instances.
Tags types.OptionalStringSlice `jsonry:"tags"`
// 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:"-"`
// Shareable if the offering support service instance sharing
AllowsInstanceSharing bool `json:"shareable"`
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 SharedToSpacesListWrapper ¶
type SharedToSpacesListWrapper struct {
}
func (*SharedToSpacesListWrapper) UnmarshalJSON ¶
func (s *SharedToSpacesListWrapper) UnmarshalJSON(data []byte) error
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 Stack ¶
type Stack struct {
// GUID is a unique stack identifier.
GUID string `json:"guid"`
// Name is the name of the stack.
Name string `json:"name"`
// Description is the description for the stack
Description string `json:"description"`
// Metadata is used for custom tagging of API resources
Metadata *Metadata `json:"metadata,omitempty"`
}
Source Files
¶
- api_links_resource.go
- application_feature_resource.go
- application_resource.go
- build_resource.go
- deployment_resource.go
- domain_resource.go
- droplet_resource.go
- environment_variables_resource.go
- isolation_segment_resource.go
- last_operation_resource.go
- metadata_resource.go
- organization_quota_resource.go
- organization_resource.go
- package_resource.go
- process_resource.go
- quota_resource.go
- relationship_resource.go
- revision_resource.go
- route_resource.go
- service_broker_resource.go
- service_credential_binding_details_resource.go
- service_credential_binding_resource.go
- service_instance_resource.go
- service_instance_usage_summary_resource.go
- service_offering_resource.go
- service_plan_resource.go
- service_plan_visibility_resource.go
- shared_to_spaces_resource.go
- space_resource.go
- stack_resource.go
- user_resource.go