{"modulePath":"github.com/redhat-developer/service-binding-operator","version":"v0.1.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package annotations\n\n## Constants\n\n```go\nconst (\n\t// BindingTypeVolumeMount indicates the binding should happen through a volume mount.\n\tBindingTypeVolumeMount bindingType = \"volumemount\"\n\t// BindingTypeEnvVar indicates the binding should happen through environment variables.\n\tBindingTypeEnvVar bindingType = \"env\"\n)\n```\n\n```go\nconst AttributeValue = \"binding:env:attribute\"\n```\n\n```go\nconst ConfigMapValue = \"binding:env:object:configmap\"\n```\n\n```go\nconst SecretValue = \"binding:env:object:secret\"\n```\n\n```go\nconst (\n\t// ServiceBindingOperatorAnnotationPrefix is the prefix of Service Binding Operator related annotations.\n\tServiceBindingOperatorAnnotationPrefix = \"servicebindingoperator.redhat.io/\"\n)\n```\n\n```go\nconst VolumeMountSecretValue = \"binding:volumemount:secret\"\n```\n\n## Variables\n\n```go\nvar ErrEmptyAnnotationName = errors.New(\"empty annotation name\")\n```\n\n```go\nvar ErrInvalidAnnotationName = errors.New(\"invalid annotation name\")\n```\n\n```go\nvar ErrInvalidAnnotationPrefix = errors.New(\"invalid annotation prefix\")\n```\n\n```go\nvar ResourceNameFieldNotFoundErr = errors.New(\"secret name field not found\")\n```\n\n## Functions\n\n```go\nfunc IsAttribute(s string) bool\n```\nIsAttribute returns true if the annotation value should trigger the attribute handler.\n\n```go\nfunc IsConfigMap(s string) bool\n```\nIsConfigMap returns true if the annotation value should trigger config map handler.\n\n```go\nfunc IsErrHandlerNotFound(err error) bool\n```\n\n```go\nfunc IsSecret(s string) bool\n```\nIsSecret returns true if the annotation value should trigger the secret handler.\n\n## Types\n\n```go\ntype AttributeHandler struct {\n\t// contains filtered or unexported fields\n}\n```\nAttributeHandler handles \"binding:env:attribute\" annotations.\n\n```go\nfunc NewAttributeHandler(\n\tbindingInfo *BindingInfo,\n\tresource unstructured.Unstructured,\n) *AttributeHandler\n```\nNewAttributeHandler constructs an AttributeHandler.\n\n```go\nfunc (h *AttributeHandler) Handle() (Result, error)\n```\nHandle returns a unstructured object according to the \"binding:env:attribute\" annotation strategy.\n\n```go\ntype BindingInfo struct {\n\t// ResourceReferencePath is the field in the Backing Service CR referring to a bindable property, either\n\t// embedded or a reference to a related object..\n\tResourceReferencePath string\n\t// SourcePath is the field that will be collected from the Backing Service CR or a related object.\n\tSourcePath string\n\t// Descriptor is the field reference to another manifest.\n\tDescriptor string\n\t// Value is the original annotation value.\n\tValue string\n}\n```\nBindingInfo represents the pieces of a binding as parsed from an annotation.\n\n```go\nfunc NewBindingInfo(name string, value string) (*BindingInfo, error)\n```\nNewBindingInfo parses the encoded in the annotation name, returning its parts.\n\n```go\ntype ErrHandlerNotFound string\n```\n\n```go\nfunc (e ErrHandlerNotFound) Error() string\n```\n\n```go\ntype ErrInvalidBindingValue string\n```\n\n```go\nfunc (e ErrInvalidBindingValue) Error() string\n```\n\n```go\ntype Handler interface {\n\t// Handle returns binding data.\n\tHandle() (Result, error)\n}\n```\nHandler should be implemented by types that want to offer a mechanism to provide binding data to the system.\n\n```go\nfunc BuildHandler(\n\tkubeClient dynamic.Interface,\n\tobj *unstructured.Unstructured,\n\tannotationKey string,\n\tannotationValue string,\n\trestMapper meta.RESTMapper,\n) (Handler, error)\n```\nBuildHandler attempts to create an annotation handler for the given annotationKey and annotationValue. kubeClient is required by some annotation handlers, and an error is returned in the case it is required by an annotation handler but is not defined.\n\n```go\nfunc NewConfigMapHandler(\n\tclient dynamic.Interface,\n\tbindingInfo *BindingInfo,\n\tresource unstructured.Unstructured,\n\trestMapper meta.RESTMapper,\n) (Handler, error)\n```\nNewConfigMapHandler constructs an annotation handler that can extract related data from config maps.\n\n```go\nfunc NewSecretHandler(\n\tclient dynamic.Interface,\n\tbindingInfo *BindingInfo,\n\tresource unstructured.Unstructured,\n\trestMapper meta.RESTMapper,\n) (Handler, error)\n```\nNewSecretHandler constructs a SecretHandler.\n\n```go\ntype InvalidArgumentErr string\n```\n\n```go\nfunc (e InvalidArgumentErr) Error() string\n```\n\n```go\ntype ResourceHandler struct {\n\t// contains filtered or unexported fields\n}\n```\nResourceHandler handles annotations related to external resources.\n\n```go\nfunc NewResourceHandler(\n\tclient dynamic.Interface,\n\tbindingInfo *BindingInfo,\n\tresource unstructured.Unstructured,\n\trelatedGroupVersionResource schema.GroupVersionResource,\n\tinputPathPrefix *string,\n\trestMapper meta.RESTMapper,\n) (*ResourceHandler, error)\n```\nNewSecretHandler constructs a SecretHandler.\n\n```go\nfunc (h *ResourceHandler) Handle() (Result, error)\n```\nHandle returns the value for an external resource strategy.\n\n```go\ntype Result struct {\n\t// Data contains the annotation data collected by an annotation handler inside a deep structure\n\t// with its root being the value specified in the Path field.\n\tData map[string]interface{}\n\t// Type indicates where the Object field should be injected in the application; can be either\n\t// \"env\" or \"volumemount\".\n\tType bindingType\n\t// Path is the nested location the collected data can be found in the Data field.\n\tPath string\n}\n```\nResult contains data that has been collected by an annotation handler.\n\n```go\ntype UnknownBindingTypeErr string\n```\n\n```go\nfunc (e UnknownBindingTypeErr) Error() string\n```\n\n","path":"github.com/redhat-developer/service-binding-operator/pkg/controller/servicebindingrequest/annotations","name":"annotations","synopsis":"","isRedistributable":true}
