entities

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) *v1.ServiceClass

ServiceClassEntityToModel translates the ServiceClass entity representation (DB) to the model representation (API).

func ServiceInstanceEntityToModel

func ServiceInstanceEntityToModel(e *ServiceInstance, b *ServiceBinding) *v1.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 *v1.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 *v1.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.

Jump to

Keyboard shortcuts

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