resources

package
v8.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 APILinkMeta `json:"meta"`
}

APILink represents a generic link from a response object.

type APILinkMeta

type APILinkMeta 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"`
}
type APILinks map[string]APILink

APILinks is a directory of follow-up urls for the resource.

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

func (al *AppLimit) UnmarshalJSON(rawJSON []byte) error

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 ApplicationFeature struct {
	// Name of the application feature
	Name    string
	Enabled bool
}

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

func (b Build) MarshalJSON() ([]byte, error)

MarshalJSON converts a Build into a Cloud Controller Application.

func (*Build) UnmarshalJSON

func (b *Build) UnmarshalJSON(data []byte) error

UnmarshalJSON helps unmarshal a Cloud Controller Build response.

type Buildpack

type Buildpack struct {
	// Enabled is true when the buildpack can be used for staging.
	Enabled types.NullBool
	// Filename is the uploaded filename of the buildpack.
	Filename string
	// GUID is the unique identifier for the buildpack.
	GUID string
	// Locked is true when the buildpack cannot be updated.
	Locked types.NullBool
	// Name is the name of the buildpack. To be used by app buildpack field.
	// (only alphanumeric characters)
	Name string
	// Position is the order in which the buildpacks are checked during buildpack
	// auto-detection.
	Position types.NullInt
	// Stack is the name of the stack that the buildpack will use.
	Stack string
	// State is the current state of the buildpack.
	State string
	// Links are links to related resources.
	Links APILinks
	// Metadata is used for custom tagging of API resources
	Metadata *Metadata
}

Buildpack represents a Cloud Controller V3 buildpack.

func (Buildpack) MarshalJSON

func (buildpack Buildpack) MarshalJSON() ([]byte, error)

MarshalJSON converts a Package into a Cloud Controller Package.

func (*Buildpack) UnmarshalJSON

func (buildpack *Buildpack) UnmarshalJSON(data []byte) error

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 Diff

type Diff struct {
	Op    DiffOperation `json:"op"`
	Path  string        `json:"path"`
	Was   interface{}   `json:"was"`
	Value interface{}   `json:"value"`
}

type DiffOperation

type DiffOperation string
const AddOperation DiffOperation = "add"
const RemoveOperation DiffOperation = "remove"
const ReplaceOperation DiffOperation = "replace"

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) IsTCP

func (d *Domain) IsTCP() bool

func (Domain) MarshalJSON

func (d Domain) MarshalJSON() ([]byte, error)

func (Domain) Shared

func (d Domain) Shared() bool

func (*Domain) UnmarshalJSON

func (d *Domain) UnmarshalJSON(data []byte) error

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 FeatureFlag

type FeatureFlag struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

func (FeatureFlag) MarshalJSON

func (f FeatureFlag) MarshalJSON() ([]byte, error)

type IncludedUsers

type IncludedUsers map[constant.IncludedType]User

IncludedUsers represent a set of users included on an API response.

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 K8sUser

type K8sUser struct {
	Name string `json:"name"`
	Kind string `json:"kind"`
}

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 ManifestDiff

type ManifestDiff struct {
	Diffs []Diff `json:"diff"`
}

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

func (p Package) MarshalJSON() ([]byte, error)

MarshalJSON converts a Package into a Cloud Controller Package.

func (*Package) UnmarshalJSON

func (p *Package) UnmarshalJSON(data []byte) error

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 (p Process) MarshalJSON() ([]byte, error)

func (*Process) UnmarshalJSON

func (p *Process) UnmarshalJSON(data []byte) error

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"`
}

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

func (r Role) MarshalJSON() ([]byte, error)

MarshalJSON converts a Role into a Cloud Controller Application.

func (*Role) UnmarshalJSON

func (r *Role) UnmarshalJSON(data []byte) error

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 (r Route) MarshalJSON() ([]byte, error)

func (*Route) UnmarshalJSON

func (r *Route) UnmarshalJSON(data []byte) error

type RouteBinding

type RouteBinding struct {
	GUID                string               `jsonry:"guid,omitempty"`
	RouteServiceURL     string               `jsonry:"route_service_url,omitempty"`
	ServiceInstanceGUID string               `jsonry:"relationships.service_instance.data.guid,omitempty"`
	RouteGUID           string               `jsonry:"relationships.route.data.guid,omitempty"`
	LastOperation       LastOperation        `jsonry:"last_operation"`
	Parameters          types.OptionalObject `jsonry:"parameters"`
}

func (RouteBinding) MarshalJSON

func (s RouteBinding) MarshalJSON() ([]byte, error)

func (*RouteBinding) UnmarshalJSON

func (s *RouteBinding) UnmarshalJSON(data []byte) error

type RouteDestination

type RouteDestination struct {
	GUID     string
	App      RouteDestinationApp
	Port     int
	Protocol string
}

type RouteDestinationApp

type RouteDestinationApp struct {
	GUID    string
	Process struct {
		Type string
	}
}

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 Rule

type Rule struct {
	Protocol    string  `json:"protocol"`
	Destination string  `json:"destination"`
	Ports       *string `json:"ports,omitempty"`
	Type        *int    `json:"type,omitempty"`
	Code        *int    `json:"code,omitempty"`
	Description *string `json:"description,omitempty"`
	Log         *bool   `json:"log,omitempty"`
}

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 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
	Parameters types.OptionalObject `jsonry:"parameters"`
}

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"`
	// MaintenanceInfoDescription is the description of the associated version
	MaintenanceInfoDescription string `jsonry:"maintenance_info.description"`
	// MaintenanceInfoVersion is the version of the service plan
	MaintenanceInfoVersion string `jsonry:"maintenance_info.version"`

	Metadata *Metadata `json:"metadata"`
}

func (*ServicePlan) UnmarshalJSON

func (p *ServicePlan) UnmarshalJSON(data []byte) error

type ServicePlanCost

type ServicePlanCost struct {
	Amount   float64 `json:"amount"`
	Currency string  `json:"currency"`
	Unit     string  `json:"unit"`
}

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 {
	SharedToSpaceGUIDs []string       `jsonry:"data[].guid"`
	Spaces             []Space        `jsonry:"included.spaces"`
	Organizations      []Organization `jsonry:"included.organizations"`
}

func (*SharedToSpacesListWrapper) UnmarshalJSON

func (s *SharedToSpacesListWrapper) UnmarshalJSON(data []byte) error

type Sidecar

type Sidecar struct {
	GUID    string               `json:"guid"`
	Name    string               `json:"name"`
	Command types.FilteredString `json:"command"`
}

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 SpaceFeature

type SpaceFeature struct {
	Name    string
	Enabled bool
}

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

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"`
}

type Task

type Task struct {
	// Command represents the command that will be executed. May be excluded
	// based on the user's role.
	Command string `json:"command,omitempty"`
	// CreatedAt represents the time with zone when the object was created.
	CreatedAt string `json:"created_at,omitempty"`
	// DiskInMB represents the disk in MB allocated for the task.
	DiskInMB uint64 `json:"disk_in_mb,omitempty"`
	// GUID represents the unique task identifier.
	GUID string `json:"guid,omitempty"`
	// MemoryInMB represents the memory in MB allocated for the task.
	MemoryInMB uint64 `json:"memory_in_mb,omitempty"`
	// Name represents the name of the task.
	Name string `json:"name,omitempty"`
	// SequenceID represents the user-facing id of the task. This number is
	// unique for every task associated with a given app.
	SequenceID int64 `json:"sequence_id,omitempty"`
	// State represents the task state.
	State constant.TaskState `json:"state,omitempty"`
	// Tasks can use a process as a template to fill in
	// command, memory, disk values
	//
	// Using a pointer so that it can be set to nil to prevent
	// json serialization when no template is used
	Template *TaskTemplate `json:"template,omitempty"`
}

Task represents a Cloud Controller V3 Task.

type TaskProcessTemplate

type TaskProcessTemplate struct {
	Guid string `json:"guid,omitempty"`
}

type TaskTemplate

type TaskTemplate struct {
	Process TaskProcessTemplate `json:"process,omitempty"`
}

type User

type User struct {
	// GUID is the unique user identifier.
	GUID             string `json:"guid"`
	Username         string `json:"username"`
	PresentationName string `json:"presentation_name"`
	Origin           string `json:"origin"`
}

User represents a Cloud Controller User.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL