Documentation ¶
Index ¶
- Constants
- Variables
- func IsErrEmptyAnnotationName(err error) bool
- func IsErrHandlerNotFound(err error) bool
- func IsErrInvalidAnnotationPrefix(err error) bool
- func IsServiceBindingAnnotation(annotationKey string) (bool, error)
- func NewDefinitionBuilder(annotationName string, annotationValue string, ...) *annotationBackedDefinitionBuilder
- type BindingType
- type Definition
- type DefinitionBuilder
- type ErrEmptyAnnotationName
- type ErrInvalidAnnotationPrefix
- type SpecHandler
- type UnstructuredResourceReader
- type Value
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 IsErrHandlerNotFound ¶
func IsServiceBindingAnnotation ¶ added in v0.11.0
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 ¶
func (e ErrInvalidAnnotationPrefix) Error() string
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)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.