binding

package
v1.3.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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