Documentation ¶
Overview ¶
*
- Copyright (c) 2016 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
*
- Copyright (c) 2016 Intel Corporation *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Index ¶
- Variables
- func CheckIfServiceAlreadyExist(serviceName string) bool
- func CreateDynamicService(dynamicService DynamicService) (KubernetesBlueprint, PlanMetadata, ServiceMetadata, error)
- func RegisterOfferingInCatalog(service ServiceMetadata, blueprint KubernetesBlueprint)
- func UnregisterOfferingFromCatalog(service ServiceMetadata)
- func WhatToCreateByServiceAndPlanId(service_id, plan_id string) (ServiceMetadata, PlanMetadata, error)
- type DynamicService
- type KubernetesBlueprint
- type KubernetesComponent
- func CreateKubernetesComponentFromBlueprint(blueprint KubernetesBlueprint) (*KubernetesComponent, error)
- func GetParsedKubernetesComponent(catalogPath, instanceId, org, space string, svcMeta ServiceMetadata, ...) (*KubernetesComponent, error)
- func ParseKubernetesComponent(blueprint KubernetesBlueprint, ...) (*KubernetesComponent, error)
- type PlanMetadata
- type ServiceMetadata
- type ServicesMetadata
Constants ¶
This section is empty.
Variables ¶
View Source
var CatalogPath string = "./catalogData/"
View Source
var TEMP_DYNAMIC_BLUEPRINTS = map[string]KubernetesBlueprint{}
Functions ¶
func CreateDynamicService ¶
func CreateDynamicService(dynamicService DynamicService) (KubernetesBlueprint, PlanMetadata, ServiceMetadata, error)
func RegisterOfferingInCatalog ¶
func RegisterOfferingInCatalog(service ServiceMetadata, blueprint KubernetesBlueprint)
func UnregisterOfferingFromCatalog ¶
func UnregisterOfferingFromCatalog(service ServiceMetadata)
func WhatToCreateByServiceAndPlanId ¶
func WhatToCreateByServiceAndPlanId(service_id, plan_id string) (ServiceMetadata, PlanMetadata, error)
Types ¶
type DynamicService ¶
type DynamicService struct { ServiceName string `json:"serviceName"` PlanName string `json:"planName"` IsPlanFree bool `json:"isPlanFree"` Containers []api.Container `json:"containers"` ServicePorts []api.ServicePort `json:"servicePorts"` CredentialMappings map[string]interface{} `json:"credentialMappings"` }
type KubernetesBlueprint ¶
type KubernetesBlueprint struct { Id int SecretsJson []string ReplicationControllerJson []string ServiceJson []string ServiceAcccountJson []string PersistentVolumeClaim []string CredentialsMapping string ReplicaTemplate string }
func GetKubernetesBlueprintByServiceAndPlan ¶
func GetKubernetesBlueprintByServiceAndPlan(catalogPath string, svcMeta ServiceMetadata, planMeta PlanMetadata) (KubernetesBlueprint, error)
type KubernetesComponent ¶
type KubernetesComponent struct { PersistentVolumeClaim []*api.PersistentVolumeClaim ReplicationControllers []*api.ReplicationController Services []*api.Service ServiceAccounts []*api.ServiceAccount Secrets []*api.Secret }
func CreateKubernetesComponentFromBlueprint ¶
func CreateKubernetesComponentFromBlueprint(blueprint KubernetesBlueprint) (*KubernetesComponent, error)
func GetParsedKubernetesComponent ¶
func GetParsedKubernetesComponent(catalogPath, instanceId, org, space string, svcMeta ServiceMetadata, planMeta PlanMetadata) (*KubernetesComponent, error)
func ParseKubernetesComponent ¶
func ParseKubernetesComponent(blueprint KubernetesBlueprint, instanceId, svcMetaId, planMetaId, org, space string) (*KubernetesComponent, error)
type PlanMetadata ¶
type PlanMetadata struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Free bool `json:"free"` InternalId string `json:"-"` }
func GetPlanMetadataByPlanIdInServiceMetadata ¶
func GetPlanMetadataByPlanIdInServiceMetadata(svc_metadata ServiceMetadata, plan_id string) (PlanMetadata, error)
type ServiceMetadata ¶
type ServiceMetadata struct { Id string `json:"id"` Name string `json:"name"` Description string `json:"description"` Bindable bool `json:"bindable"` Tags []string `json:"tags"` Plans []PlanMetadata `json:"plans"` InternalId string `json:"-"` }
func GetServiceByName ¶
func GetServiceByName(serviceName string) (ServiceMetadata, error)
func GetServiceMetadataByServiceId ¶
func GetServiceMetadataByServiceId(service_id string) (ServiceMetadata, error)
type ServicesMetadata ¶
type ServicesMetadata struct {
Services []ServiceMetadata `json:"services"`
}
var GLOBAL_SERVICES_METADATA *ServicesMetadata
add mutex... or return a deep copy (prefered).
func GetAvailableServicesMetadata ¶
func GetAvailableServicesMetadata() ServicesMetadata
Click to show internal directories.
Click to hide internal directories.