binding

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationPrefix                = "service.binding"
	ProvisionedServiceAnnotationKey = "servicebinding.io/provisioned-service"
	TypeKey                         = AnnotationPrefix + "/type"
)

Variables

View Source
var ErrInvalidAnnotationName = errors.New("invalid annotation name")

Functions

func IsErrEmptyAnnotationName

func IsErrEmptyAnnotationName(err error) bool

func IsErrHandlerNotFound

func IsErrHandlerNotFound(err error) bool

func IsErrInvalidAnnotationPrefix

func IsErrInvalidAnnotationPrefix(err error) bool

func IsServiceBindingAnnotation added in v0.11.0

func IsServiceBindingAnnotation(annotationKey string) (bool, error)

func NewDefinitionBuilder added in v0.7.0

func NewDefinitionBuilder(annotationName string, annotationValue string, configMapReader UnstructuredResourceReader, secretReader UnstructuredResourceReader) *annotationBackedDefinitionBuilder

Types

type BindingType

type BindingType string

bindingType encodes the medium the binding should deliver the configuration value.

const (
	// TypeVolumeMount indicates the binding should happen through a volume mount.
	TypeVolumeMount BindingType = "volumemount"
	// TypeEnvVar indicates the binding should happen through environment variables.
	TypeEnvVar BindingType = "env"
)

type Definition

type Definition interface {
	Apply(u *unstructured.Unstructured) (Value, error)
	GetPath() string
	NonExistingOptional(Value) bool
}

type DefinitionBuilder

type DefinitionBuilder interface {
	Build() (Definition, error)
}

type ErrEmptyAnnotationName

type ErrEmptyAnnotationName string

func (ErrEmptyAnnotationName) Error

func (e ErrEmptyAnnotationName) Error() string

type ErrInvalidAnnotationPrefix

type ErrInvalidAnnotationPrefix string

func (ErrInvalidAnnotationPrefix) Error

type SpecHandler

type SpecHandler struct {
	// contains filtered or unexported fields
}

func NewSpecHandler

func NewSpecHandler(
	kubeClient dynamic.Interface,
	annotationKey string,
	annotationValue string,
	obj unstructured.Unstructured,
) (*SpecHandler, error)

func (*SpecHandler) Handle

func (s *SpecHandler) Handle() (result, error)

type UnstructuredResourceReader added in v0.7.0

type UnstructuredResourceReader func(namespace string, name string) (*unstructured.Unstructured, error)

type Value

type Value interface {
	Get() interface{}
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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