periodical

package
v0.0.0-...-ee57881 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DependencySet = wire.NewSet(
	wire.Struct(new(ArgumentParser), "*"),
)
View Source
var ErrInvalidPeriodical = errors.New("Invalid periodical format")

Functions

This section is empty.

Types

type ArgumentParser

type ArgumentParser struct {
	Clock clock.Clock
}

func (*ArgumentParser) Parse

func (p *ArgumentParser) Parse(input string) (Type, *time.Time, error)

ParseAnalyticCollectCountPeriodicalArgument parse the argument input and returns periodical and the start date of the periodical if periodical is hourly, t is the start of the hour. if periodical is daily, t is the start of the day. if periodical is monthly, t is the start of the day on the first day of the month. if periodical is weekly, t is the start of the day on the monday of the week. Supported input format: - this-hour - today - this-week - this-month - last-hour - yesterday - last-week - last-month - 2016-01-02T15 - 2016-01-02 - 2016-01 - 2016-W37

type Type

type Type string
const (
	Hourly  Type = "hourly"
	Daily   Type = "daily"
	Weekly  Type = "weekly"
	Monthly Type = "monthly"
)

Jump to

Keyboard shortcuts

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