Documentation
¶
Index ¶
- Constants
- func BindableValue(v bool) *bool
- func FreeValue(v bool) *bool
- func GetJsonNames(s reflect.Value) (res []string)
- type BindDetails
- type BindResource
- type Binding
- type DeprovisionDetails
- type DeprovisionServiceSpec
- type DetailsWithRawContext
- type DetailsWithRawParameters
- type ExperimentalVolumeMount
- type ExperimentalVolumeMountPrivate
- type GetBindingSpec
- type GetInstanceDetailsSpec
- type LastOperation
- type LastOperationState
- type MaintenanceInfo
- type PollDetails
- type PreviousValues
- type ProvisionDetails
- type ProvisionedServiceSpec
- type RequiredPermission
- type Schema
- type Service
- type ServiceBindingSchema
- type ServiceBroker
- type ServiceDashboardClient
- type ServiceInstanceSchema
- type ServiceMetadata
- type ServicePlan
- type ServicePlanCost
- type ServicePlanMetadata
- type ServiceSchemas
- type SharedDevice
- type UnbindDetails
- type UnbindSpec
- type UpdateDetails
- type UpdateServiceSpec
- type VolumeMount
Constants ¶
View Source
const ( PermissionRouteForwarding = RequiredPermission("route_forwarding") PermissionSyslogDrain = RequiredPermission("syslog_drain") PermissionVolumeMount = RequiredPermission("volume_mount") )
Variables ¶
This section is empty.
Functions ¶
func BindableValue ¶
func GetJsonNames ¶
Types ¶
type BindDetails ¶
type BindDetails struct {
AppGUID string `json:"app_guid"`
PlanID string `json:"plan_id"`
ServiceID string `json:"service_id"`
BindResource *BindResource `json:"bind_resource,omitempty"`
RawContext json.RawMessage `json:"context,omitempty"`
RawParameters json.RawMessage `json:"parameters,omitempty"`
}
func (BindDetails) GetRawContext ¶
func (d BindDetails) GetRawContext() json.RawMessage
func (BindDetails) GetRawParameters ¶
func (d BindDetails) GetRawParameters() json.RawMessage
type BindResource ¶
type Binding ¶
type Binding struct {
IsAsync bool `json:"is_async"`
AlreadyExists bool `json:"already_exists"`
OperationData string `json:"operation_data"`
Credentials interface{} `json:"credentials"`
SyslogDrainURL string `json:"syslog_drain_url"`
RouteServiceURL string `json:"route_service_url"`
VolumeMounts []VolumeMount `json:"volume_mounts"`
}
type DeprovisionDetails ¶
type DeprovisionServiceSpec ¶
type DetailsWithRawContext ¶
type DetailsWithRawContext interface {
GetRawContext() json.RawMessage
}
type DetailsWithRawParameters ¶
type DetailsWithRawParameters interface {
GetRawParameters() json.RawMessage
}
type ExperimentalVolumeMount ¶
type ExperimentalVolumeMount struct {
ContainerPath string `json:"container_path"`
Mode string `json:"mode"`
Private ExperimentalVolumeMountPrivate `json:"private"`
}
type GetBindingSpec ¶
type GetBindingSpec struct {
Credentials interface{}
SyslogDrainURL string
RouteServiceURL string
VolumeMounts []VolumeMount
Parameters interface{}
}
type GetInstanceDetailsSpec ¶
type LastOperation ¶
type LastOperation struct {
State LastOperationState `json:"state"`
Description string `json:"description"`
}
type LastOperationState ¶
type LastOperationState string
const ( InProgress LastOperationState = "in progress" Succeeded LastOperationState = "succeeded" Failed LastOperationState = "failed" )
type MaintenanceInfo ¶
type MaintenanceInfo struct {
Public map[string]string `json:"public,omitempty"`
Private string `json:"private,omitempty"`
Version string `json:"version,omitempty"`
Description string `json:"description,omitempty"`
}
func (*MaintenanceInfo) Equals ¶
func (m *MaintenanceInfo) Equals(input MaintenanceInfo) bool
type PollDetails ¶
type PreviousValues ¶
type ProvisionDetails ¶
type ProvisionDetails struct {
ServiceID string `json:"service_id"`
PlanID string `json:"plan_id"`
OrganizationGUID string `json:"organization_guid"`
SpaceGUID string `json:"space_guid"`
RawContext json.RawMessage `json:"context,omitempty"`
RawParameters json.RawMessage `json:"parameters,omitempty"`
MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"`
}
func (ProvisionDetails) GetRawContext ¶
func (d ProvisionDetails) GetRawContext() json.RawMessage
func (ProvisionDetails) GetRawParameters ¶
func (d ProvisionDetails) GetRawParameters() json.RawMessage
type ProvisionedServiceSpec ¶
type RequiredPermission ¶
type RequiredPermission string
type Service ¶
type Service struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Bindable bool `json:"bindable"`
InstancesRetrievable bool `json:"instances_retrievable,omitempty"`
BindingsRetrievable bool `json:"bindings_retrievable,omitempty"`
Tags []string `json:"tags,omitempty"`
PlanUpdatable bool `json:"plan_updateable"`
Plans []ServicePlan `json:"plans"`
Requires []RequiredPermission `json:"requires,omitempty"`
Metadata *ServiceMetadata `json:"metadata,omitempty"`
DashboardClient *ServiceDashboardClient `json:"dashboard_client,omitempty"`
}
type ServiceBindingSchema ¶
type ServiceBindingSchema struct {
Create Schema `json:"create,omitempty"`
}
type ServiceBroker ¶
type ServiceBroker interface {
// Services gets the catalog of services offered by the service broker
// GET /v2/catalog
Services(ctx context.Context) ([]Service, error)
// Provision creates a new service instance
// PUT /v2/service_instances/{instance_id}
Provision(ctx context.Context, instanceID string, details ProvisionDetails, asyncAllowed bool) (ProvisionedServiceSpec, error)
// Deprovision deletes an existing service instance
// DELETE /v2/service_instances/{instance_id}
Deprovision(ctx context.Context, instanceID string, details DeprovisionDetails, asyncAllowed bool) (DeprovisionServiceSpec, error)
// GetInstance fetches information about a service instance
// GET /v2/service_instances/{instance_id}
GetInstance(ctx context.Context, instanceID string) (GetInstanceDetailsSpec, error)
// Update modifies an existing service instance
// PATCH /v2/service_instances/{instance_id}
Update(ctx context.Context, instanceID string, details UpdateDetails, asyncAllowed bool) (UpdateServiceSpec, error)
// LastOperation fetches last operation state for a service instance
// GET /v2/service_instances/{instance_id}/last_operation
LastOperation(ctx context.Context, instanceID string, details PollDetails) (LastOperation, error)
// Bind creates a new service binding
// PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}
Bind(ctx context.Context, instanceID, bindingID string, details BindDetails, asyncAllowed bool) (Binding, error)
// Unbind deletes an existing service binding
// DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id}
Unbind(ctx context.Context, instanceID, bindingID string, details UnbindDetails, asyncAllowed bool) (UnbindSpec, error)
// GetBinding fetches an existing service binding
// GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}
GetBinding(ctx context.Context, instanceID, bindingID string) (GetBindingSpec, error)
// LastBindingOperation fetches last operation state for a service binding
// GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation
LastBindingOperation(ctx context.Context, instanceID, bindingID string, details PollDetails) (LastOperation, error)
}
Each method of the ServiceBroker interface maps to an individual endpoint of the Open Service Broker API. The specification is available here: https://github.com/openservicebrokerapi/servicebroker/blob/v2.14/spec.md The OpenAPI documentation is available here: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/openservicebrokerapi/servicebroker/v2.14/openapi.yaml
type ServiceDashboardClient ¶
type ServiceInstanceSchema ¶
type ServiceMetadata ¶
type ServiceMetadata struct {
DisplayName string `json:"displayName,omitempty"`
ImageUrl string `json:"imageUrl,omitempty"`
LongDescription string `json:"longDescription,omitempty"`
ProviderDisplayName string `json:"providerDisplayName,omitempty"`
DocumentationUrl string `json:"documentationUrl,omitempty"`
SupportUrl string `json:"supportUrl,omitempty"`
AdditionalMetadata map[string]interface{}
}
func (ServiceMetadata) MarshalJSON ¶
func (sm ServiceMetadata) MarshalJSON() ([]byte, error)
func (*ServiceMetadata) UnmarshalJSON ¶
func (sm *ServiceMetadata) UnmarshalJSON(data []byte) error
type ServicePlan ¶
type ServicePlan struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Free *bool `json:"free,omitempty"`
Bindable *bool `json:"bindable,omitempty"`
Metadata *ServicePlanMetadata `json:"metadata,omitempty"`
Schemas *ServiceSchemas `json:"schemas,omitempty"`
MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"`
}
type ServicePlanCost ¶
type ServicePlanMetadata ¶
type ServicePlanMetadata struct {
DisplayName string `json:"displayName,omitempty"`
Bullets []string `json:"bullets,omitempty"`
Costs []ServicePlanCost `json:"costs,omitempty"`
AdditionalMetadata map[string]interface{}
}
func (ServicePlanMetadata) MarshalJSON ¶
func (spm ServicePlanMetadata) MarshalJSON() ([]byte, error)
func (*ServicePlanMetadata) UnmarshalJSON ¶
func (spm *ServicePlanMetadata) UnmarshalJSON(data []byte) error
type ServiceSchemas ¶
type ServiceSchemas struct {
Instance ServiceInstanceSchema `json:"service_instance,omitempty"`
Binding ServiceBindingSchema `json:"service_binding,omitempty"`
}
type SharedDevice ¶
type SharedDevice struct {
}
type UnbindDetails ¶
type UnbindSpec ¶
type UpdateDetails ¶
type UpdateDetails struct {
ServiceID string `json:"service_id"`
PlanID string `json:"plan_id"`
RawParameters json.RawMessage `json:"parameters,omitempty"`
PreviousValues PreviousValues `json:"previous_values"`
RawContext json.RawMessage `json:"context,omitempty"`
MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"`
}
func (UpdateDetails) GetRawParameters ¶
func (d UpdateDetails) GetRawParameters() json.RawMessage
type UpdateServiceSpec ¶
type VolumeMount ¶
type VolumeMount struct {
Driver string `json:"driver"`
ContainerDir string `json:"container_dir"`
Mode string `json:"mode"`
DeviceType string `json:"device_type"`
Device SharedDevice `json:"device"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.