api

package
v3.7.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	XBrokerAPIVersion = "X-Broker-Api-Version"
	APIVersion        = "2.11"
)
View Source
const (
	ServiceMetadataDisplayName         = "displayName"
	ServiceMetadataImageURL            = "imageUrl"
	ServiceMetadataLongDescription     = "longDescription"
	ServiceMetadataProviderDisplayName = "providerDisplayName"
	ServiceMetadataDocumentationURL    = "documentationUrl"
	ServiceMetadataSupportURL          = "supportUrl"
)
View Source
const ContextPlatformKubernetes = "kubernetes"

Variables

View Source
var AsyncRequired = asyncRequiredResponse{
	Error:       "AsyncRequired",
	Description: "This service plan requires client support for asynchronous service operations.",
}

Functions

func ValidateBindRequest

func ValidateBindRequest(breq *BindRequest) field.ErrorList

func ValidateProvisionRequest

func ValidateProvisionRequest(preq *ProvisionRequest) field.ErrorList

func ValidateUUID

func ValidateUUID(path *field.Path, uuid string) field.ErrorList

Types

type BindRequest

type BindRequest struct {
	ServiceID    string `json:"service_id"`
	PlanID       string `json:"plan_id"`
	AppGUID      string `json:"app_guid,omitempty"`
	BindResource struct {
		AppGUID string `json:"app_guid,omitempty"`
		Route   string `json:"route,omitempty"`
	} `json:"bind_resource,omitempty"`
	Parameters map[string]string `json:"parameters,omitempty"`
}

type BindResponse

type BindResponse struct {
	Credentials     map[string]interface{} `json:"credentials,omitempty"`
	SyslogDrainURL  string                 `json:"syslog_drain_url,omitempty"`
	RouteServiceURL string                 `json:"route_service_url,omitempty"`
	VolumeMounts    []interface{}          `json:"volume_mounts,omitempty"`
}

type Broker

type Broker interface {
	WaitForReady() error
	Catalog() *Response
	Provision(instanceID string, preq *ProvisionRequest) *Response
	Deprovision(instanceID string) *Response
	Bind(instanceID string, bindingID string, breq *BindRequest) *Response
	Unbind(instanceID string, bindingID string) *Response
	LastOperation(instanceID string, operation Operation) *Response
}

type CatalogResponse

type CatalogResponse struct {
	Services []*Service `json:"services"`
}

type DashboardClient

type DashboardClient struct {
	ID          string `json:"id"`
	Secret      string `json:"secret"`
	RedirectURI string `json:"redirect_uri"`
}

type DeprovisionResponse

type DeprovisionResponse struct {
	Operation Operation `json:"operation,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Description string `json:"description"`
}

type KubernetesContext

type KubernetesContext struct {
	Platform  string `json:"platform"`
	Namespace string `json:"namespace"`
}

type LastOperationResponse

type LastOperationResponse struct {
	State       LastOperationState `json:"state"`
	Description string             `json:"description,omitempty"`
}

type LastOperationState

type LastOperationState string
const (
	LastOperationStateInProgress LastOperationState = "in progress"
	LastOperationStateSucceeded  LastOperationState = "succeeded"
	LastOperationStateFailed     LastOperationState = "failed"
)

type Operation

type Operation string
const (
	OperationProvisioning   Operation = "provisioning"
	OperationUpdating       Operation = "updating"
	OperationDeprovisioning Operation = "deprovisioning"
)

type Plan

type Plan struct {
	ID          string                 `json:"id"`
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	Free        bool                   `json:"free,omitempty"`
	Bindable    bool                   `json:"bindable,omitempty"`
	Schemas     Schema                 `json:"schemas,omitempty"`
}

type ProvisionRequest

type ProvisionRequest struct {
	ServiceID      string            `json:"service_id"`
	PlanID         string            `json:"plan_id"`
	Context        KubernetesContext `json:"context,omitempty"`
	OrganizationID string            `json:"organization_guid"`
	SpaceID        string            `json:"space_guid"`
	Parameters     map[string]string `json:"parameters,omitempty"`
}

type ProvisionResponse

type ProvisionResponse struct {
	DashboardURL string    `json:"dashboard_url,omitempty"`
	Operation    Operation `json:"operation,omitempty"`
}

type Response

type Response struct {
	Code int
	Body interface{}
	Err  error
}

func BadRequest

func BadRequest(err error) *Response

func Forbidden

func Forbidden(err error) *Response

func InternalServerError

func InternalServerError(err error) *Response

func NewResponse

func NewResponse(code int, body interface{}, err error) *Response

type Schema

type Schema struct {
	ServiceInstance ServiceInstances `json:"service_instance,omitempty"`
	ServiceBinding  ServiceBindings  `json:"service_binding,omitempty"`
}

type Service

type Service struct {
	Name            string                 `json:"name"`
	ID              string                 `json:"id"`
	Description     string                 `json:"description"`
	Tags            []string               `json:"tags,omitempty"`
	Requires        []string               `json:"requires,omitempty"`
	Bindable        bool                   `json:"bindable"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
	DashboardClient *DashboardClient       `json:"dashboard_client,omitempty"`
	PlanUpdatable   bool                   `json:"plan_updateable,omitempty"`
	Plans           []Plan                 `json:"plans"`
}

type ServiceBindings

type ServiceBindings struct {
	Create map[string]*jsschema.Schema `json:"create,omitempty"`
}

type ServiceInstances

type ServiceInstances struct {
	Create map[string]*jsschema.Schema `json:"create,omitempty"`
	Update map[string]*jsschema.Schema `json:"update,omitempty"`
}

type UnbindResponse

type UnbindResponse struct {
}

type UpdateRequest

type UpdateRequest struct {
	Context        KubernetesContext `json:"context,omitempty"`
	ServiceID      string            `json:"service_id"`
	PlanID         string            `json:"plan_id,omitempty"`
	Parameters     map[string]string `json:"parameters,omitempty"`
	PreviousValues struct {
		ServiceID      string `json:"service_id,omitempty"`
		PlanID         string `json:"plan_id,omitempty"`
		OrganizationID string `json:"organization_id,omitempty"`
		SpaceID        string `json:"space_id,omitempty"`
	} `json:"previous_values,omitempty"`
}

type UpdateResponse

type UpdateResponse struct {
	Operation Operation `json:"operation,omitempty"`
}

Jump to

Keyboard shortcuts

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