data

package
v0.0.0-...-feb569f Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ServiceBindingKind       = "ServiceBinding"
	ServiceBindingKindPlural = "ServiceBindings"
)
View Source
const (
	ServiceBrokerKind       = "ServiceBroker"
	ServiceBrokerKindPlural = "ServiceBrokers"
)
View Source
const (
	ServiceClassKind       = "ServiceClass"
	ServiceClassKindPlural = "ServiceClasses"
)
View Source
const APIVersion = "steward.deis.io/v1"

Variables

This section is empty.

Functions

func ServiceBindingAPIResource

func ServiceBindingAPIResource() *unversioned.APIResource

ServiceBindingAPIResource returns an APIResource to describe the ServiceBinding third party resource

func ServiceBrokerAPIResource

func ServiceBrokerAPIResource() *unversioned.APIResource

ServiceBrokerAPIResource returns an APIResource to describe the ServiceBroker third party resource

func ServiceClassAPIResource

func ServiceClassAPIResource() *unversioned.APIResource

func ServiceInstanceAPIResource

func ServiceInstanceAPIResource() *unversioned.APIResource

ServiceInstanceAPIResource returns an APIResource to describe the ServiceInstance third party resource

func TranslateToTPR

func TranslateToTPR(raw runtime.Object, tpr runtime.Object, expectedKind string) error

TranslateToTPR translates a raw runtime.Object into the given tpr. In many cases, this will be used to convert a *runtime.Unstructured into a third party resource.

If the translation fails, a non-nil error will be returned. In ese cases, tpr may have been written to, but its contents are not guaranteed.

This code was inspired by the TPRObjectToSCObject function introduced in https://github.com/kubernetes-incubator/service-catalog/pull/37/files

func TranslateToUnstructured

func TranslateToUnstructured(obj runtime.Object) (*runtime.Unstructured, error)

TranslateToUnstructured converts a runtime.Object into a *runtime.Unstructured.

This code was inspired by the SCObjectToTPRObject function introduced in https://github.com/kubernetes-incubator/service-catalog/pull/37

Types

type ErrMismatchedKinds

type ErrMismatchedKinds struct {
	RawKind  string
	Expected string
}

func (ErrMismatchedKinds) Error

func (e ErrMismatchedKinds) Error() string

type ServiceBinding

type ServiceBinding struct {
	unversioned.TypeMeta `json:",inline"`
	api.ObjectMeta       `json:"metadata,omitempty"`

	Spec   ServiceBindingSpec   `json:"spec"`
	Status ServiceBindingStatus `json:"status"`
}

type ServiceBindingSpec

type ServiceBindingSpec struct {
	ID                 string              `json:"id"`
	ServiceInstanceRef api.ObjectReference `json:"service_instance_ref"`
	Parameters         lib.JSONObject      `json:"parameters"`
	SecretName         string              `json:"secret_name"`
}

type ServiceBindingState

type ServiceBindingState string
const (
	ServiceBindingStatePending ServiceBindingState = "Pending"
	ServiceBindingStateBound   ServiceBindingState = "Bound"
	ServiceBindingStateFailed  ServiceBindingState = "Failed"
)

type ServiceBindingStatus

type ServiceBindingStatus struct {
	State ServiceBindingState `json:"state"`
}

type ServiceBroker

type ServiceBroker struct {
	unversioned.TypeMeta `json:",inline"`
	v1.ObjectMeta        `json:"metadata,omitempty"`

	Spec   framework.ServiceBrokerSpec
	Status ServiceBrokerStatus
}

type ServiceBrokerState

type ServiceBrokerState string
const (
	ServiceBrokerStatePending   ServiceBrokerState = "Pending"
	ServiceBrokerStateAvailable ServiceBrokerState = "Available"
	ServiceBrokerStateFailed    ServiceBrokerState = "Failed"
)

type ServiceBrokerStatus

type ServiceBrokerStatus struct {
	State ServiceBrokerState `json:"state"`
}

type ServiceClass

type ServiceClass struct {
	unversioned.TypeMeta `json:",inline"`
	v1.ObjectMeta        `json:"metadata,omitempty"`
	ServiceBrokerRef     api.ObjectReference `json:"service_broker_ref"`
	ID                   string              `json:"id"`
	ServiceBrokerName    string              `json:"service_broker_name"`
	Bindable             bool                `json:"bindable"`
	Plans                []ServicePlan       `json:"plans"`
	PlanUpdatable        bool                `json:"updatable"`
	Description          string              `json:"description"`
}

type ServiceInstance

type ServiceInstance struct {
	unversioned.TypeMeta `json:",inline"`
	v1.ObjectMeta        `json:"metadata,omitempty"`

	Spec   ServiceInstanceSpec   `json:"spec"`
	Status ServiceInstanceStatus `json:"status"`
}

type ServiceInstanceSpec

type ServiceInstanceSpec struct {
	ID              string              `json:"id"`
	ServiceClassRef api.ObjectReference `json:"service_class_ref"`
	// PlanID is the reference to the ServicePlan for this service instance.
	PlanID string `json:"plan_id"`

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

type ServiceInstanceState

type ServiceInstanceState string
const (
	ServiceInstanceKind                                  = "ServiceInstance"
	ServiceInstanceKindPlural                            = "ServiceInstances"
	ServiceInstanceStatePending     ServiceInstanceState = "Pending"
	ServiceInstanceStateProvisioned ServiceInstanceState = "Provisioned"
	ServiceInstanceStateFailed      ServiceInstanceState = "Failed"
	ServiceInstanceStateUnknown     ServiceInstanceState = "Unkown"
)

type ServiceInstanceStatus

type ServiceInstanceStatus struct {
	Status       ServiceInstanceState `json:"status"`
	StatusReason string               `json:"status_reason"`
}

type ServicePlan

type ServicePlan struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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