domain

package
v6.4.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: Apache-2.0 Imports: 5 Imported by: 59

Documentation

Index

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 BindableValue(v bool) *bool

func FreeValue

func FreeValue(v bool) *bool

func GetJsonNames

func GetJsonNames(s reflect.Value) (res []string)

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 BindResource struct {
	AppGuid            string `json:"app_guid,omitempty"`
	SpaceGuid          string `json:"space_guid,omitempty"`
	Route              string `json:"route,omitempty"`
	CredentialClientID string `json:"credential_client_id,omitempty"`
}

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 DeprovisionDetails struct {
	PlanID    string `json:"plan_id"`
	ServiceID string `json:"service_id"`
	Force     bool   `json:"force"`
}

type DeprovisionServiceSpec

type DeprovisionServiceSpec struct {
	IsAsync       bool
	OperationData string
}

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 ExperimentalVolumeMountPrivate

type ExperimentalVolumeMountPrivate struct {
	Driver  string `json:"driver"`
	GroupID string `json:"group_id"`
	Config  string `json:"config"`
}

type GetBindingSpec

type GetBindingSpec struct {
	Credentials     interface{}
	SyslogDrainURL  string
	RouteServiceURL string
	VolumeMounts    []VolumeMount
	Parameters      interface{}
}

type GetInstanceDetailsSpec

type GetInstanceDetailsSpec struct {
	ServiceID    string      `json:"service_id"`
	PlanID       string      `json:"plan_id"`
	DashboardURL string      `json:"dashboard_url"`
	Parameters   interface{} `json:"parameters"`
}

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 PollDetails struct {
	ServiceID     string `json:"service_id"`
	PlanID        string `json:"plan_id"`
	OperationData string `json:"operation"`
}

type PreviousValues

type PreviousValues struct {
	PlanID    string `json:"plan_id"`
	ServiceID string `json:"service_id"`
	OrgID     string `json:"organization_id"`
	SpaceID   string `json:"space_id"`
}

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 ProvisionedServiceSpec struct {
	IsAsync       bool
	AlreadyExists bool
	DashboardURL  string
	OperationData string
}

type RequiredPermission

type RequiredPermission string

type Schema

type Schema struct {
	Parameters map[string]interface{} `json:"parameters"`
}

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 ServiceDashboardClient struct {
	ID          string `json:"id"`
	Secret      string `json:"secret"`
	RedirectURI string `json:"redirect_uri"`
}

type ServiceInstanceSchema

type ServiceInstanceSchema struct {
	Create Schema `json:"create,omitempty"`
	Update Schema `json:"update,omitempty"`
}

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"`
	Shareable           *bool  `json:"shareable,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 ServicePlanCost struct {
	Amount map[string]float64 `json:"amount"`
	Unit   string             `json:"unit"`
}

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 {
	VolumeId    string                 `json:"volume_id"`
	MountConfig map[string]interface{} `json:"mount_config"`
}

type UnbindDetails

type UnbindDetails struct {
	PlanID    string `json:"plan_id"`
	ServiceID string `json:"service_id"`
}

type UnbindSpec

type UnbindSpec struct {
	IsAsync       bool
	OperationData string
}

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 UpdateServiceSpec struct {
	IsAsync       bool
	DashboardURL  string
	OperationData string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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