Documentation ¶
Index ¶
- Constants
- func Since(t *Time) time.Duration
- func Until(t *Time) time.Duration
- type Bucket
- func (b *Bucket) AVG() float64
- func (b *Bucket) Add(v ...float64)
- func (b *Bucket) Len() int
- func (b *Bucket) Less(i, j int) bool
- func (b *Bucket) MAX() float64
- func (b *Bucket) MED() float64
- func (b *Bucket) MIN() float64
- func (b *Bucket) P(p float64) float64
- func (b *Bucket) P90() float64
- func (b *Bucket) P95() float64
- func (b *Bucket) P99() float64
- func (b *Bucket) SUM() float64
- func (b *Bucket) Swap(i, j int)
- type CycleList
- type Histogram
- type Line
- type List
- type M
- type Set
- type Time
- func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) *Time
- func FromTimestamp(ts int64) *Time
- func NewTime(t time.Time, layout ...string) *Time
- func Now() *Time
- func Parse(layout, value string) (*Time, error)
- func ParseInLocation(layout, value string, loc *time.Location) (*Time, error)
- func (t *Time) Add(d time.Duration) *Time
- func (t *Time) AddDate(years int, months int, days int) *Time
- func (t *Time) After(u *Time) bool
- func (t *Time) Before(u *Time) bool
- func (t *Time) Clock() (hour, min, sec int)
- func (t *Time) Date() (year int, month time.Month, day int)
- func (t *Time) Day() int
- func (t *Time) Equal(u *Time) bool
- func (t *Time) Format(layout string) string
- func (t *Time) Hour() int
- func (t *Time) IsZero() bool
- func (t *Time) Location() *time.Location
- func (t Time) MarshalBinary() ([]byte, error)
- func (t *Time) MarshalJSON() ([]byte, error)
- func (t *Time) Minute() int
- func (t *Time) Month() time.Month
- func (t *Time) Nanosecond() int
- func (t *Time) Scan(v interface{}) error
- func (t *Time) Second() int
- func (t *Time) String() string
- func (t *Time) Sub(u *Time) time.Duration
- func (t *Time) Time() time.Time
- func (t *Time) Timestamp() int64
- func (t *Time) Truncate(d time.Duration) *Time
- func (t *Time) UTC() *Time
- func (t *Time) Unix() int64
- func (t *Time) UnmarshalBinary(b []byte) error
- func (t *Time) UnmarshalJSON(b []byte) error
- func (t *Time) Value() (driver.Value, error)
- func (t *Time) Weekday() time.Weekday
- func (t *Time) Year() int
- type Timestamp
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CycleList ¶
type CycleList struct {
// contains filtered or unexported fields
}
CycleList CycleList
type Histogram ¶
type Histogram struct { Le []float64 // contains filtered or unexported fields }
func NewHistogram ¶
type Line ¶
type Line []*float64
Line Line
func (Line) RangeMatch ¶
RangeMatch 设置一个条件, 统计连续满足改条件的数据范围取值有哪些 check函数判断是否有效,有效=true,无效=false minRange int 最小的持续区间
type List ¶
type List []string
List defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (List) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*List) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type M ¶
type M map[string]interface{}
M defiend JSON data type, need to implements driver.Valuer, sql.Scanner interface
func (M) MarshalJSON ¶
MarshalJSON to output non base64 encoded []byte
func (*M) UnmarshalJSON ¶
UnmarshalJSON to deserialize []byte
type Time ¶
Time time: 2006-01-02 15:04:05
func FromTimestamp ¶
func Parse ¶
Parse parses a formatted string and returns the time value it represents. The layout defines the format by showing )how the reference time, defined to be
func ParseInLocation ¶
ParseInLocation is like Parse but differs in two important ways. First, in the absence of time zone information, Parse interprets a time as UTC; ParseInLocation interprets the time as in the given location. Second, when given a zone offset or abbreviation, Parse tries to match it against the Local location; ParseInLocation uses the given location.
func (*Time) AddDate ¶
AddDate returns the time corresponding to adding the given number of years, months, and days to t. For example, AddDate(-1, 2, 3) applied to January 1, 2011 returns March 4, 2010. AddDate normalizes its result in the same way that Date does, so, for example, adding one month to October 31 yields December 1, the normalized form for November 31.
func (*Time) Equal ¶
Equal reports whether t and u represent the same time instant. Two times can be equal even if they are in different locations. For example, 6:00 +0200 and 4:00 UTC are Equal. See the documentation on the Time type for the pitfalls of using == with Time values; most code should use Equal instead.
func (*Time) Format ¶
Format returns a textual representation of the time value formatted according to layout, which defines the format by showing how the reference time, defined to be
func (Time) MarshalBinary ¶
MarshalBinary implement encoding.BinaryMarshaler.
func (*Time) MarshalJSON ¶
MarshalJSON marshaler interface
func (*Time) Minute ¶
Minute returns the minute offset within the hour specified by t, in the range [0, 59].
func (*Time) Nanosecond ¶
Nanosecond returns the nanosecond offset within the second specified by t, in the range [0, 999999999].
func (*Time) Second ¶
Second returns the second offset within the minute specified by t, in the range [0, 59].
func (*Time) Sub ¶
Sub returns the duration t-u. If the result exceeds the maximum (or minimum) value that can be stored in a Duration, the maximum (or minimum) duration will be returned. To compute t-d for a duration d, use t.Add(-d).
func (*Time) Truncate ¶
Truncate returns a new time with the time truncated to the given number of seconds.
func (*Time) UnmarshalBinary ¶
UnmarshalBinary implement encoding.BinaryUnmarshaler.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON unmarshaler interface
type Timestamp ¶
type Timestamp int64
func (*Timestamp) MarshalBinary ¶
func (*Timestamp) UnmarshalBinary ¶
UnmarshalBinary implement encoding.BinaryUnmarshaler.