binding

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationPrefix = "service.binding"
)

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

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 {
	GetPath() []string
	Apply(u *unstructured.Unstructured) (Value, error)
}

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 Value

type Value interface {
	Get() interface{}
}

Jump to

Keyboard shortcuts

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