Documentation
¶
Index ¶
- func InitializeStatusMap()
- func ServiceClassEntityToModel(e *ServiceClass) *models.ServiceClass
- func ServiceInstanceEntityToModel(e *ServiceInstance, b *ServiceBinding) *models.ServiceInstance
- func ServiceInstanceModelToEntity(m *models.ServiceInstance) (*ServiceInstance, *ServiceBinding)
- type Broker
- type Schema
- type ServiceBinding
- type ServiceClass
- type ServiceInstance
- type ServicePlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeStatusMap ¶
func InitializeStatusMap()
InitializeStatusMap initializes the status mapping
func ServiceClassEntityToModel ¶
func ServiceClassEntityToModel(e *ServiceClass) *models.ServiceClass
ServiceClassEntityToModel translates the ServiceClass entity representation (DB) to the model representation (API).
func ServiceInstanceEntityToModel ¶
func ServiceInstanceEntityToModel(e *ServiceInstance, b *ServiceBinding) *models.ServiceInstance
ServiceInstanceEntityToModel translates the ServiceInstance entity representation (DB) to the model representation (API). Notice that the ServiceBinding is includeded as the API does not have a separate binding endpoint. Services are always created with a single binding.
func ServiceInstanceModelToEntity ¶
func ServiceInstanceModelToEntity(m *models.ServiceInstance) (*ServiceInstance, *ServiceBinding)
ServiceInstanceModelToEntity translates the ServiceInstance model representation (API) to the entity representation (DB). Notice that the ServiceBinding is includeded as the API does not have a separate binding endpoint. Services are always created with a single binding.
Types ¶
type Broker ¶
type Broker struct {
entitystore.BaseEntity
URL string `json:"url"`
}
Broker represents a service broker (which implements OSBAPI).
type Schema ¶
type Schema struct {
Create *spec.Schema `json:"create,omitempty"`
Update *spec.Schema `json:"update,omitempty"`
Bind *spec.Schema `json:"bind,omitempty"`
}
Schema represents contract for the three service operations (Create, Update, and Bind).
type ServiceBinding ¶
type ServiceBinding struct {
entitystore.BaseEntity
ServiceInstance string `json:"serviceInstance"`
Parameters interface{} `json:"parameters"`
SecretParameters []string `json:"secretParameters"`
BindingID string `json:"bindingID"`
BindingSecret string `json:"bindingSecret"`
}
ServiceBinding represents a binding or connection to the service. Generally this is in the form of credentials which can be made available to a function.
type ServiceClass ¶
type ServiceClass struct {
entitystore.BaseEntity
Description string `json:"description"`
ServiceID string `json:"serviceID"`
Broker string `json:"broker"`
Bindable bool `json:"bindable"`
Plans []ServicePlan `json:"plans"`
}
ServiceClass represents an available service type. The service plans are associated with the service class.
func ServiceClassModelToEntity ¶
func ServiceClassModelToEntity(m *models.ServiceClass) *ServiceClass
ServiceClassModelToEntity translates the ServiceClass model representation (API) to the entity representation (DB).
type ServiceInstance ¶
type ServiceInstance struct {
entitystore.BaseEntity
ServiceClass string `json:"serviceClass"`
ServicePlan string `json:"servicePlan"`
Namespace string `json:"namespace"`
Parameters interface{} `json:"parameters"`
SecretParameters []string `json:"secretParameters"`
InstanceID string `json:"instanceID"`
Bind bool `json:"bind"`
}
ServiceInstance represents a provisioned service.
type ServicePlan ¶
type ServicePlan struct {
entitystore.BaseEntity
Description string `json:"description"`
PlanID string `json:"planID"`
Schema Schema `json:"schema"`
Metadata interface{} `json:"metadata"`
Free bool `json:"free"`
Bindable bool `json:"bindable"`
}
ServicePlan represents a plan or flavor of a service. Different plans may have different schemas as well.