// Generated by tmpl // https://github.com/benbjohnson/tmpl package influxql // FloatPoint represents a point with a float64 value. type FloatPoint struct { Name string Tags Tags Time int64 Nil bool Value float64 Aux []interface{} } func (v *FloatPoint) name() string { return v.Name } func (v *FloatPoint) tags() Tags { return v.Tags } func (v *FloatPoint) time() int64 { return v.Time } func (v *FloatPoint) nil() bool { return v.Nil } func (v *FloatPoint) value() interface{} { if v.Nil { return nil } return v.Value } func (v *FloatPoint) aux() []interface{} { return v.Aux } // Clone returns a copy of v. func (v *FloatPoint) Clone() *FloatPoint { if v == nil { return nil } other := *v if v.Aux != nil { other.Aux = make([]interface{}, len(v.Aux)) copy(other.Aux, v.Aux) } return &other } // floatPoints represents a slice of points sortable by value. type floatPoints []FloatPoint func (a floatPoints) Len() int { return len(a) } func (a floatPoints) Less(i, j int) bool { return a[i].Time < a[j].Time } func (a floatPoints) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // floatPointsByValue represents a slice of points sortable by value. type floatPointsByValue []FloatPoint func (a floatPointsByValue) Len() int { return len(a) } func (a floatPointsByValue) Less(i, j int) bool { return a[i].Value < a[j].Value } func (a floatPointsByValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // IntegerPoint represents a point with a int64 value. type IntegerPoint struct { Name string Tags Tags Time int64 Nil bool Value int64 Aux []interface{} } func (v *IntegerPoint) name() string { return v.Name } func (v *IntegerPoint) tags() Tags { return v.Tags } func (v *IntegerPoint) time() int64 { return v.Time } func (v *IntegerPoint) nil() bool { return v.Nil } func (v *IntegerPoint) value() interface{} { if v.Nil { return nil } return v.Value } func (v *IntegerPoint) aux() []interface{} { return v.Aux } // Clone returns a copy of v. func (v *IntegerPoint) Clone() *IntegerPoint { if v == nil { return nil } other := *v if v.Aux != nil { other.Aux = make([]interface{}, len(v.Aux)) copy(other.Aux, v.Aux) } return &other } // integerPoints represents a slice of points sortable by value. type integerPoints []IntegerPoint func (a integerPoints) Len() int { return len(a) } func (a integerPoints) Less(i, j int) bool { return a[i].Time < a[j].Time } func (a integerPoints) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // integerPointsByValue represents a slice of points sortable by value. type integerPointsByValue []IntegerPoint func (a integerPointsByValue) Len() int { return len(a) } func (a integerPointsByValue) Less(i, j int) bool { return a[i].Value < a[j].Value } func (a integerPointsByValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // StringPoint represents a point with a string value. type StringPoint struct { Name string Tags Tags Time int64 Nil bool Value string Aux []interface{} } func (v *StringPoint) name() string { return v.Name } func (v *StringPoint) tags() Tags { return v.Tags } func (v *StringPoint) time() int64 { return v.Time } func (v *StringPoint) nil() bool { return v.Nil } func (v *StringPoint) value() interface{} { if v.Nil { return nil } return v.Value } func (v *StringPoint) aux() []interface{} { return v.Aux } // Clone returns a copy of v. func (v *StringPoint) Clone() *StringPoint { if v == nil { return nil } other := *v if v.Aux != nil { other.Aux = make([]interface{}, len(v.Aux)) copy(other.Aux, v.Aux) } return &other } // stringPoints represents a slice of points sortable by value. type stringPoints []StringPoint func (a stringPoints) Len() int { return len(a) } func (a stringPoints) Less(i, j int) bool { return a[i].Time < a[j].Time } func (a stringPoints) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // stringPointsByValue represents a slice of points sortable by value. type stringPointsByValue []StringPoint func (a stringPointsByValue) Len() int { return len(a) } func (a stringPointsByValue) Less(i, j int) bool { return a[i].Value < a[j].Value } func (a stringPointsByValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // BooleanPoint represents a point with a bool value. type BooleanPoint struct { Name string Tags Tags Time int64 Nil bool Value bool Aux []interface{} } func (v *BooleanPoint) name() string { return v.Name } func (v *BooleanPoint) tags() Tags { return v.Tags } func (v *BooleanPoint) time() int64 { return v.Time } func (v *BooleanPoint) nil() bool { return v.Nil } func (v *BooleanPoint) value() interface{} { if v.Nil { return nil } return v.Value } func (v *BooleanPoint) aux() []interface{} { return v.Aux } // Clone returns a copy of v. func (v *BooleanPoint) Clone() *BooleanPoint { if v == nil { return nil } other := *v if v.Aux != nil { other.Aux = make([]interface{}, len(v.Aux)) copy(other.Aux, v.Aux) } return &other } // booleanPoints represents a slice of points sortable by value. type booleanPoints []BooleanPoint func (a booleanPoints) Len() int { return len(a) } func (a booleanPoints) Less(i, j int) bool { return a[i].Time < a[j].Time } func (a booleanPoints) Swap(i, j int) { a[i], a[j] = a[j], a[i] } // booleanPointsByValue represents a slice of points sortable by value. type booleanPointsByValue []BooleanPoint func (a booleanPointsByValue) Len() int { return len(a) } func (a booleanPointsByValue) Less(i, j int) bool { return !a[i].Value } func (a booleanPointsByValue) Swap(i, j int) { a[i], a[j] = a[j], a[i] }