Documentation
¶
Index ¶
- func CheckMapIsNotEmpty(m map[string]string) error
- func MD5Hash(text string) string
- func MD5HashFromTime(t time.Time) string
- func ParsePath(rawPath, defaultExtension, configProvider string) (endpoint, path, extension string, err error)
- func ReplacePlaceholders(str, prefix, label, new string) string
- func StringSliceContains(slice []string, str string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMapIsNotEmpty ¶
CheckMapIsNotEmpty returns error if any key or value from map is empty.
func MD5HashFromTime ¶
MD5HashFromTime return MD5 hash of given time. It used for generate event ID.
func ParsePath ¶
func ParsePath(rawPath, defaultExtension, configProvider string) (endpoint, path, extension string, err error)
ParsePath parses given path for endpoint, path and extension. Example:
rawPath : http://127.0.0.1:4001/config/hugo.json endpoint : http://127.0.0.1:4001 or 127.0.0.1:4001 (for consul) path : /config/hugo.json or cut /v1/kv/ (for consul) extension: json
If extension is not set, defaultExtension will be returned.
func ReplacePlaceholders ¶
ReplacePlaceholders replaces placeholders for given params:
s - destination string prefix - type of label: LABEL or ANNOTATION label - label/annotation name new - new value
func StringSliceContains ¶
StringSliceContains check slice contains string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.