Documentation ¶
Index ¶
- func CastStringTimeFromSToMs(time string) string
- func Contains(hay []string, needles []string) bool
- func CopyMap(old map[string]string) map[string]string
- func CreateJSONFromStringMap(input map[string]string) string
- func GenIndex(index, timeString string) string
- func GenJSONValueString(input string) string
- func GetYearMonthFromStringTimeMs(timeString string) (int, int)
- func IsStringANumber(input string) bool
- func PrintMapAsString(toPrint map[string]string, fieldSeparator, assignmentSeparator string) string
- func RequestedReturnCodeIsOK(client http.Client, url, function string) bool
- func SanitizeElasicInput(input string) string
- func SanitizeInfluxInput(input string) string
- func SanitizeMap(input map[string]string) map[string]string
- func SentReturnCodeIsOK(client http.Client, url, function string, data string) (bool, string)
- func StringIntToStringFloat(inputInt string) string
- func StringToMap(input, entrySplitter, keyValueSplitter string) map[string]string
- func SumIntSliceTillPos(slice []int, pos int) int
- func VersionOrdinal(version string) string
- func WaitForPort(typ, address string, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastStringTimeFromSToMs ¶
CastStringTimeFromSToMs adds three zeros to the timestring to cast from Seconds to Milliseconds.
func CreateJSONFromStringMap ¶ added in v0.2.0
CreateJSONFromStringMap creates a part of a JSON object
func GenIndex ¶ added in v0.2.0
GenIndex generates an index depending on the config, ending with year and month
func GenJSONValueString ¶ added in v0.2.0
GenJSONValueString quotes the string if it's not a number.
func GetYearMonthFromStringTimeMs ¶ added in v0.2.0
GetYearMonthFromStringTimeMs returns the year and the month of a string which is in ms.
func IsStringANumber ¶ added in v0.2.0
IsStringANumber returns true if the given string can be casted to int or float.
func PrintMapAsString ¶
PrintMapAsString prints a map in the influxdb tags format.
func RequestedReturnCodeIsOK ¶ added in v0.2.0
RequestedReturnCodeIsOK makes an HEAD or GET request. If the returncode is 2XX it will return true.
func SanitizeElasicInput ¶ added in v0.2.0
SanitizeElasicInput escapes backslashes and trims single ticks.
func SanitizeInfluxInput ¶
SanitizeInfluxInput adds backslashes to special chars.
func SanitizeMap ¶ added in v0.2.0
SanitizeMap calls SanitizeInfluxInput in key and value
func SentReturnCodeIsOK ¶ added in v0.2.0
SentReturnCodeIsOK makes the given request. If the returncode is 2XX it will return true and the body else the error message.
func StringIntToStringFloat ¶
StringIntToStringFloat adds a '.0' to a string if it does not contain a dot.
func StringToMap ¶
StringToMap splits a string by two splitter an returns a map.
func SumIntSliceTillPos ¶
SumIntSliceTillPos summarise an int slice till a given position.
func VersionOrdinal ¶ added in v0.2.0
VersionOrdinal from here: https://stackoverflow.com/questions/18409373/how-to-compare-two-version-number-strings-in-golang/18411978#18411978
Types ¶
This section is empty.