granularity

package
v0.0.0-...-23e8124 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DurationGranularity

type DurationGranularity struct {
	GranularityType GranularityType `json:"type"`
	Duration        int64           `json:"duration"`
	Origin          string          `json:"origin,omitempty"`
}

func (DurationGranularity) Type

func (d DurationGranularity) Type() string

type Granularity

type Granularity interface {
	Type() string
}

type GranularityType

type GranularityType int
const (
	Duration GranularityType = iota
	Period
)

func (GranularityType) MarshalJSON

func (g GranularityType) MarshalJSON() ([]byte, error)

func (GranularityType) Name

func (g GranularityType) Name() string

func (GranularityType) Ordinal

func (g GranularityType) Ordinal() int

func (GranularityType) Values

func (g GranularityType) Values() *[]string

type PeriodGranularity

type PeriodGranularity struct {
	GranularityType GranularityType `json:"type"`
	Period          string          `json:"period"`
	TimeZone        string          `json:"timeZone"`
	Origin          string          `json:"origin,omitempty"`
}

func (PeriodGranularity) Type

func (p PeriodGranularity) Type() string

type SimpleGranularity

type SimpleGranularity int
const (
	ALL SimpleGranularity = iota
	NONE
	SECOND
	MINUTE
	FIFTEEN_MINUTE
	THIRTY_MINUTE
	HOUR
	DAY
	WEEK
	MONTH
	QUARTER
	YEAR
)

func (SimpleGranularity) MarshalJSON

func (s SimpleGranularity) MarshalJSON() ([]byte, error)

func (SimpleGranularity) Name

func (s SimpleGranularity) Name() string

func (SimpleGranularity) Ordinal

func (s SimpleGranularity) Ordinal() int

func (SimpleGranularity) Type

func (s SimpleGranularity) Type() string

func (SimpleGranularity) Values

func (s SimpleGranularity) Values() *[]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL