Documentation
¶
Index ¶
- func GetImageReferenceByName(cd *cdv2.ComponentDescriptor, name string) (string, error)
- func GetImageReferenceFromList(cdList *cdv2.ComponentDescriptorList, componentName, resourceName string) (string, error)
- func GetLabel(labels []v2.Label, name string) (v2.Label, bool)
- func GetLabelIdx(labels []v2.Label, name string) int
- func MergeIdentityObjectMeta(a, b v2.IdentityObjectMeta) v2.IdentityObjectMeta
- func MergeResources(a, b v2.Resource) v2.Resource
- func MergeSources(a, b v2.Source) v2.Source
- func ParseImageReference(imageReference string) (string, string, string, error)
- func SetExtraIdentityField(o *v2.IdentityObjectMeta, key, val string)
- func SetLabel(labels []v2.Label, name string, val interface{}) ([]v2.Label, error)
- func SetRawLabel(labels []v2.Label, name string, val []byte) []v2.Label
- func StringDefined(s string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageReferenceByName ¶
func GetImageReferenceByName(cd *cdv2.ComponentDescriptor, name string) (string, error)
GetImageReferenceByName returns the image reference of a resource with the given name from a component descriptor.
func GetImageReferenceFromList ¶
func GetImageReferenceFromList(cdList *cdv2.ComponentDescriptorList, componentName, resourceName string) (string, error)
GetImageReferenceFromList returns the image reference of a resource with the given name from a component descriptor. If the component name and resource name is not unique the first found object is used.
func GetLabelIdx ¶
GetLabelIdx returns the index with a given name. if the label with the given name does not exist, -1 is returned.
func MergeIdentityObjectMeta ¶
func MergeIdentityObjectMeta(a, b v2.IdentityObjectMeta) v2.IdentityObjectMeta
MergeIdentityObjectMeta merges two identity objects. Labels are merged by their name not by their index.
func MergeResources ¶
MergeResources merges two resources whereas the second one will overwrite defined attributes. Labels are merged by their name not by their index.
func MergeSources ¶
MergeSources merges two sources whereas the second one will overwrite defined attributes. Labels are merged by their name not by their index.
func ParseImageReference ¶
ParseImageReference takes an image reference e.g eu.gcr.io/gardener-project/gardener/gardenlet:v1.11.3 returns first argument: the image repository second argument: the tag or the SHA256 third argument: the separator (either ":" when it is a tag or "@" if it is a SHA256)
func SetExtraIdentityField ¶
func SetExtraIdentityField(o *v2.IdentityObjectMeta, key, val string)
SetExtraIdentityField sets a extra identity field of a identity object.
func SetRawLabel ¶
SetRawLabel adds the given name and val as label to the given list
func StringDefined ¶
StringDefined validates if a string is defined
Types ¶
This section is empty.