Documentation ¶
Index ¶
- func CreateOrUpdate(getUpdateCreator GetUpdateCreator, cm corev1.ConfigMap) error
- func Exists(cmGetter Getter, nsName types.NamespacedName) (bool, error)
- func ReadData(getter Getter, key client.ObjectKey) (map[string]string, error)
- func ReadFileLikeField(getter Getter, objectKey client.ObjectKey, externalKey string, ...) (string, error)
- func ReadKey(getter Getter, key string, objectKey client.ObjectKey) (string, error)
- func UpdateField(getUpdater GetUpdater, objectKey client.ObjectKey, key, value string) error
- type Creator
- type Deleter
- type GetUpdateCreateDeleter
- type GetUpdateCreator
- type GetUpdater
- type Getter
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdate ¶
func CreateOrUpdate(getUpdateCreator GetUpdateCreator, cm corev1.ConfigMap) error
CreateOrUpdate creates the given ConfigMap if it doesn't exist, or updates it if it does.
func Exists ¶
func Exists(cmGetter Getter, nsName types.NamespacedName) (bool, error)
Exists return whether a configmap with the given namespaced name exists.
func ReadFileLikeField ¶
func ReadFileLikeField( getter Getter, objectKey client.ObjectKey, externalKey string, internalKey string, ) (string, error)
ReadFileLikeField reads a ConfigMap with file-like properties and returns the value inside one of the fields.
func ReadKey ¶
ReadKey accepts a ConfigMap Getter, the object of the ConfigMap to get, and the key within the config map to read. It returns the string value, and an error if one occurred.
func UpdateField ¶
func UpdateField(getUpdater GetUpdater, objectKey client.ObjectKey, key, value string) error
UpdateField updates the sets "key" to the given "value".
Types ¶
type GetUpdateCreateDeleter ¶
type GetUpdateCreator ¶
type GetUpdater ¶
Click to show internal directories.
Click to hide internal directories.