Documentation ¶
Index ¶
- Constants
- Variables
- func AvgMaxPos(vals []float64) (avg float64, max float64, maxPos float64)
- func Exists(path string) (bool, error)
- func IsIP(ip string) bool
- func IsLoopback(ip string) bool
- func IsSpecialIP(ip string) bool
- func IsURL(str string) bool
- func Mean(numList []float64) float64
- func RFC1918(ip string) bool
- func StdDev(numList []float64) float64
- func TypeConvert(m interface{}, desiredType reflect.Kind) (interface{}, int)
- func ValidIP(ip string) bool
- func Variance(numList []float64) float64
- type ByStringLength
- type Cache
- type SortableInt64
Constants ¶
const (
BSONFAIL = "FAIL"
)
BSONFAIL is a bson.ObjectId failure indicator
const URL string = `` /* 322-byte string literal not displayed */
Variables ¶
var BAD = -1
var GOOD = 0
Functions ¶
func AvgMaxPos ¶
AvgMaxPos calculating mean (average), maximum value, and position of max value in a data set
func Exists ¶
* Name: Exists * Purpose: Returns true if file or directory exists, false otherwise * comments:
func IsIP ¶
* Name: IsIP * Purpose: Returns true if string is a valid IP address, false otherwise * comments:
func IsLoopback ¶
* Name: IsLoopback * Purpose: Returns true if string is a valid IP address, false otherwise * comments:
func IsSpecialIP ¶
IsSpecialIP attempts to filter some IPs that we don't care about
func StdDev ¶
StdDev calculating the standard deviation (quantified amount of variation or dispersion) of a data set
func TypeConvert ¶
* Name: TypeConvert * Purpose: Dynamic type converter * comments:
Types ¶
type ByStringLength ¶
type ByStringLength []string
ByStringLength Functions that, in combination with golang sort, allow users to sort a slice/list of strings by string length (shortest -> longest)
func (ByStringLength) Len ¶
func (s ByStringLength) Len() int
func (ByStringLength) Less ¶
func (s ByStringLength) Less(i, j int) bool
func (ByStringLength) Swap ¶
func (s ByStringLength) Swap(i, j int)
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a simple cache mechanism to avoid db lookups
type SortableInt64 ¶
type SortableInt64 []int64
SortableInt64 functions that allow a golang sort of int64s
func (SortableInt64) Len ¶
func (s SortableInt64) Len() int
func (SortableInt64) Less ¶
func (s SortableInt64) Less(i, j int) bool
func (SortableInt64) Swap ¶
func (s SortableInt64) Swap(i, j int)