# Functions
Convert2WaitBackoff converts to a wait backoff option.
ConvertToDNSLabel converts an arbitrary string into a valid Kubernetes DNS label.
ElementsMatch returns true if the two provided string slices contain the same elements while avoiding duplications.
FormatEndpoint returns a formatted api endpoint.
FormattedURL returns a formatted url.
GenerateConfigMapVolumeSpecs builds a "volume" and "volumeMount"spec with a configMapKeySelector.
GenerateEnvFromConfigMapSpec builds a "envFrom" spec with a configMapKeySelector.
GenerateEnvFromSecretSpec builds a "envFrom" spec with a secretKeySelector.
GenerateSecretVolumeSpecs builds a "volume" and "volumeMount"spec with a secretKeySelector.
GetClientConfig return rest config, if path not specified, assume in cluster config.
GetConfigMapFromVolume retrieves the value of mounted config map volume "/argo-events/config/${configMapRef.name}/${configMapRef.key}" is expected to be the file path.
GetConfigMapVolumePath returns the path of the mounted configmap.
GetEnvFromConfigMap retrieves the value of envFrom.configMapRef "${configMapRef.name}_" is expected to be defined as "prefix".
GetEnvFromSecret retrieves the value of envFrom.secretRef "${secretRef.name}_" is expected to be defined as "prefix".
GetObjectHash returns hash of a given object.
GetSaramaConfigFromYAMLString parse yaml string to sarama.config.
GetSecretFromVolume retrieves the value of mounted secret volume "/argo-events/secrets/${secretRef.name}/${secretRef.key}" is expected to be the file path.
GetSecretValue retrieves the secret value from the secret in namespace with name and key.
GetSecretVolumePath returns the path of the mounted secret.
GetTLSConfig returns a tls configuration for given cert and key or skips the certs if InsecureSkipVerify is true.
Hasher hashes a string.
IsRetryableKubeAPIError returns if the error is a retryable kubernetes error.
MustUnJSON unmarshalls JSON or panics.
ParseExclusionDates parses the exclusion dates from the vals string according to RFC 5545.
ParseTime parses time string in "HH:MM:SS" format into time.Time, which date is same as baseDate in UTC.
For a given cron specification, return the previous activation time If no time can be found to satisfy the schedule, return the zero time.
generate a random string with given length.
SendErrorResponse sends http error response.
SendInternalErrorResponse sends http internal error response.
SendResponse sends http response with given status code.
SendSuccessResponse sends http success response.
SliceContains checks if a string slice contains a specific string.
VolumesFromSecretsOrConfigMaps builds volumes and volumeMounts spec based on the obj and its children's secretKeyselector or configMapKeySelector.