internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addon

type Addon struct {
	ID                  AddonID
	Name                AddonName
	Version             semver.Version
	Description         string
	Plans               map[AddonPlanID]AddonPlan
	Metadata            AddonMetadata
	RepositoryURL       string
	Tags                []AddonTag
	Requires            []string
	Bindable            bool
	BindingsRetrievable bool
	PlanUpdatable       *bool
	Docs                []AddonDocs
	Status              v1alpha1.AddonStatus
	Reason              v1alpha1.AddonStatusReason
	Message             string
	SecretRef           corev1.SecretReference
}

Addon represents addon as defined by OSB API.

func (Addon) IsProvisioningAllowed

func (b Addon) IsProvisioningAllowed(namespace Namespace, collection []*Instance) bool

IsProvisioningAllowed determines addon can be provision on indicated namespace if addon has provisionOnlyOnce flag on true then check if addon already exist in this namespace

type AddonDocs

type AddonDocs struct {
	Template cms.CommonDocsTopicSpec
}

AddonDocs contains data to create ClusterDocsTopic for every ClusterServiceClass.

type AddonID

type AddonID string

AddonID is a AddonWithCharts identifier as defined by Open Service Broker API.

type AddonMetadata

type AddonMetadata struct {
	DisplayName         string
	ProviderDisplayName string
	LongDescription     string
	DocumentationURL    string
	SupportURL          string
	ProvisionOnlyOnce   bool
	// ImageURL is graphical representation of the addon.
	// Currently SVG is required.
	ImageURL string
	Labels   Labels
}

AddonMetadata holds addon metadata as defined by OSB API.

func (AddonMetadata) DeepCopy

func (b AddonMetadata) DeepCopy() AddonMetadata

DeepCopy returns a new AddonMetadata object.

func (AddonMetadata) ToMap

func (b AddonMetadata) ToMap() map[string]interface{}

ToMap collect data from AddonMetadata to format compatible with YAML encoder.

type AddonName

type AddonName string

AddonName is a AddonWithCharts name as defined by Open Service Broker API.

type AddonPlan

type AddonPlan struct {
	ID           AddonPlanID
	Name         AddonPlanName
	Description  string
	Schemas      map[PlanSchemaType]PlanSchema
	ChartRef     ChartRef
	ChartValues  ChartValues
	Metadata     AddonPlanMetadata
	Bindable     *bool
	Free         *bool
	BindTemplate AddonPlanBindTemplate
}

AddonPlan is a container for whole data of addon plan. Each addon needs to have at least one plan.

type AddonPlanBindTemplate

type AddonPlanBindTemplate []byte

AddonPlanBindTemplate represents template used for helm chart installation

type AddonPlanID

type AddonPlanID string

AddonPlanID is an identifier of AddonWithCharts plan as defined by Open Service Broker API.

type AddonPlanMetadata

type AddonPlanMetadata struct {
	DisplayName string
}

AddonPlanMetadata provides metadata of the addon.

func (AddonPlanMetadata) ToMap

func (b AddonPlanMetadata) ToMap() map[string]interface{}

ToMap function is converting Metadata to format compatible with YAML encoder.

type AddonPlanName

type AddonPlanName string

AddonPlanName is the name of the AddonWithCharts plan as defined by Open Service Broker API

type AddonTag

type AddonTag string

AddonTag is a Tag attached to AddonWithCharts.

type AddonVersion

type AddonVersion string

AddonVersion is a AddonWithCharts version which is defined in the index file

type AddonWithCharts

type AddonWithCharts struct {
	Addon  *Addon
	Charts []*chart.Chart
}

AddonWithCharts aggregates an addon with its chart(s)

type ChartName

type ChartName string

ChartName is a type expressing name of the chart

type ChartRef

type ChartRef struct {
	Name    ChartName
	Version semver.Version
}

ChartRef provide reference to addon's chart

func (*ChartRef) GobDecode

func (cr *ChartRef) GobDecode(in []byte) error

GobDecode is decoding chart info

func (ChartRef) GobEncode

func (cr ChartRef) GobEncode() ([]byte, error)

GobEncode implements GobEncoder for custom encoding

type ChartValues

type ChartValues map[string]interface{}

ChartValues are used as container for chart's values. It's currently populated from yaml file or request parameters. TODO: switch to more concrete type

type CommonAddon

CommonAddon holds common addon configuration structs

type Index

type Index struct {
	Entries map[AddonName][]IndexEntry `json:"entries"`
}

Index contains collection of all addons from the given repository

type IndexEntry

type IndexEntry struct {
	// Name is set to index entry key name
	Name AddonName `json:"-"`
	// DisplayName is the entry name, currently treated by us as DisplayName
	DisplayName string       `json:"name"`
	Description string       `json:"description"`
	Version     AddonVersion `json:"version"`
}

IndexEntry contains information about single addon entry

type Instance

type Instance struct {
	ID            InstanceID
	ServiceID     ServiceID
	ServicePlanID ServicePlanID
	ReleaseName   ReleaseName
	Namespace     Namespace
	ParamsHash    string
}

Instance contains info about Service exposed via Service Catalog.

type InstanceBindData

type InstanceBindData struct {
	InstanceID  InstanceID
	Credentials InstanceCredentials
}

InstanceBindData contains data about service instance and it's credentials.

type InstanceCredentials

type InstanceCredentials map[string]string

InstanceCredentials are created when we bind a service instance.

type InstanceID

type InstanceID string

InstanceID is a service instance identifier.

func (InstanceID) IsZero

func (id InstanceID) IsZero() bool

IsZero checks if InstanceID equals zero.

type InstanceOperation

type InstanceOperation struct {
	InstanceID       InstanceID
	OperationID      OperationID
	Type             OperationType
	State            OperationState
	StateDescription *string

	// ParamsHash is an immutable hash for operation parameters
	// used to match requests.
	ParamsHash string

	// CreatedAt points to creation time of the operation.
	// Field should be treated as immutable and is responsibility of storage implementation.
	// It should be set by storage Insert method.
	CreatedAt time.Time
}

InstanceOperation represents single operation.

type Labels

type Labels map[string]string

Labels are key-value pairs which add metadata information for addon.

type Namespace

type Namespace string

Namespace is the name of namespace in k8s

const (
	// ClusterWide is a value which refers to cluster wide resources.
	ClusterWide Namespace = ""
)

type OperationID

type OperationID string

OperationID is used as binding operation identifier.

func (OperationID) IsZero

func (id OperationID) IsZero() bool

IsZero checks if OperationID equals zero

type OperationState

type OperationState string

OperationState defines the possible states of an asynchronous request to a broker.

const (
	// OperationStateInProgress means that operation is in progress
	OperationStateInProgress OperationState = "in progress"
	// OperationStateSucceeded means that request succeeded
	OperationStateSucceeded OperationState = "succeeded"
	// OperationStateFailed means that request failed
	OperationStateFailed OperationState = "failed"
)

func (OperationState) String

func (os OperationState) String() string

String returns state of the operation.

type OperationType

type OperationType string

OperationType defines the possible types of an asynchronous operation to a broker.

const (
	// OperationTypeCreate means creating OperationType
	OperationTypeCreate OperationType = "create"
	// OperationTypeRemove means removing OperationType
	OperationTypeRemove OperationType = "remove"
	// OperationTypeUndefined means undefined OperationType
	OperationTypeUndefined OperationType = ""
)

type PlanSchema

type PlanSchema jsonschema.Schema

PlanSchema is schema definition used for creating parameters

type PlanSchemaType

type PlanSchemaType string

PlanSchemaType describes type of the schema file.

const (
	// SchemaTypeBind represents 'bind' schema plan
	SchemaTypeBind PlanSchemaType = "bind"
	// SchemaTypeProvision represents 'provision' schema plan
	SchemaTypeProvision PlanSchemaType = "provision"
	// SchemaTypeUpdate represents 'update' schema plan
	SchemaTypeUpdate PlanSchemaType = "update"
)

type ReleaseName

type ReleaseName string

ReleaseName is the name of the Helm (Tiller) release.

type ServiceID

type ServiceID string

ServiceID is an ID of the Service exposed via Service Catalog.

type ServicePlanID

type ServicePlanID string

ServicePlanID is an ID of the Plan of Service exposed via Service Catalog.

Directories

Path Synopsis
automock
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
automock
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
automock
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
automock
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
automock
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
platform
logger
Package logger is responsible for logging.
Package logger is responsible for logging.
logger/spy
Package spy provides an implementation of go-sdk.logger that helps test logging.
Package spy provides an implementation of go-sdk.logger that helps test logging.
ptr
Package ptr provides conversion rules to pointers for DTO construction.
Package ptr provides conversion rules to pointers for DTO construction.
time
Package time provide features which supplements standard time package.
Package time provide features which supplements standard time package.
testing
Package testing provides test functions for storage.
Package testing provides test functions for storage.

Jump to

Keyboard shortcuts

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