UnmarshalStringMapToSecrets
Unmarshals a string map into a slice of core.Secret objects, processing only entries with keys that have a specific prefix.
def UnmarshalStringMapToSecrets(
m: map[string]string
) - > ([]*core.Secret, error)
Unmarshals a map of strings into a slice of core.Secret objects. This function iterates through the input map, identifies entries with keys prefixed by 'annotationPrefix', and attempts to unmarshal their values into Secret objects, returning any unmarshaling errors.
Parameters
| Name | Type | Description |
|---|---|---|
| m | map[string]string | The input map where keys are strings and values are strings, potentially containing marshaled secret data. |
Returns
| Type | Description |
|---|---|
([]*core.Secret, error) | A slice of unmarshaled core.Secret objects and an error if any secret fails to unmarshal. |