Documentation
¶
Index ¶
Constants ¶
const ( All Simple = "all" None = "none" Second = "second" Minute = "minute" FifteenMinute = "fifteen_minute" ThirtyMinute = "thirty_minute" Hour = "hour" Day = "day" Week = "week" Month = "month" Quarter = "quarter" Year = "year" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct {
Typ string `json:"type,omitempty"`
}
Base is the base for granularity.
type Duration ¶
type Duration struct { Base Duration time.Duration `json:"duration,omitempty"` Origin time.Time `json:"origin,omitempty"` }
Duration granularity is specified as an exact duration in milliseconds and timestamps are returned as UTC. Duration granularity values are in millis. https://druid.apache.org/docs/latest/querying/granularities.html#duration-granularities
func (*Duration) SetDuration ¶
SetDuration sets duration.
type Period ¶
type Period struct { Base Period time.Duration `json:"period,omitempty"` Origin time.Time `json:"origin,omitempty"` TimeZone types.DateTimeZone `json:"timeZone,omitempty"` }
Period granularity is specified as arbitrary period combinations of years, months, weeks, hours, minutes and seconds (e.g. P2W, P3M, PT1H30M, PT0.750S) in ISO8601 format. https://druid.apache.org/docs/latest/querying/granularities.html#period-granularities
func (*Period) SetTimeZone ¶
func (p *Period) SetTimeZone(timeZone types.DateTimeZone) *Period
SetTimeZone sets timezone.
type Simple ¶
type Simple string
Simple granularities are specified as a string and bucket timestamps by their UTC time. https://druid.apache.org/docs/latest/querying/granularities.html#simple-granularities
func (*Simple) SetGranularity ¶
SetGranularity sets granularity.