Documentation ¶
Index ¶
- func DaysBetween(fromTime, toTime time.Time) int
- func DeDupFilters(filters map[string][]string)
- func DiffArray(a, b []string) (inANotB []string)
- func IsSafeUUID(uuid string) bool
- func KvMatches(matchKey string, matchVal string, kv *common.Kv) bool
- func UniqueStringSlice(stringSlice []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaysBetween ¶
DaysBetween get the calendar days between two timestamp
func DeDupFilters ¶
Take out the duplicate entries if they exist.. not need to return the map.. maps are passed by ref. getting the duplicates out of the filters avoids the filtersQuery from becoming less efficient by having duplicate clauses. Duplicates in filter entries also make deep filtering impossible because deep filtering at the moment requires that we have exactly one profile and no controls or one profile and one control. If we have duplicates, it's easy to see why deep filtering would therefore, break.
func DiffArray ¶
DiffArray - A util func that takes two string arrays (a and b), and returns an array containing elements that are in a but not b
func IsSafeUUID ¶
Ensuring it only has valid UUID characters TODO: unit tests
func UniqueStringSlice ¶
Types ¶
This section is empty.