parse

package
v0.0.0-...-30035b8 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinutesMin         = 0
	MinutesMax         = 59
	HourMin            = 0
	HourMax            = 23
	DayOfMonthMin      = 1
	DayOfMonthMax      = 31
	MonthMin           = 1
	MonthMax           = 12
	DayOfWeekMin       = 0
	DayOfWeekMax       = 6
	MinutePosition     = 0
	HourPosition       = 1
	DayOfMonthPosition = 2
	MonthPosition      = 3
	DayOfWeekPosition  = 4
	CommandPosition    = 5
)

Variables

This section is empty.

Functions

func EveryOrRange

func EveryOrRange(expr string, min, max int) ([]int, error)

EveryOrRange returns a slice of integer and validates if all in correct range

func IntVal

func IntVal(expr string, min, max int) ([]int, error)

IntVal returns a single integer and validates if in correct range

func ListInt

func ListInt(expr string) ([]int, error)

ListInt returns a slice of integer and validates if all in correct range

func Parse

func Parse(cronStr string) (*cron.Cron, error)

Parse returns a Cron Object from an expression string

func ParseArg

func ParseArg(expr string, min, max int) ([]int, error)

ParseArg returns an array of int from a given expression string

func ParseDayExpr

func ParseDayExpr(expr string) string

ParseDayExpr returns a slice of integer converting days to corresponding integers and validates if in correct range

func ParseShortDayExpr

func ParseShortDayExpr(expr string) string

ParseShortDayExpr returns a slice of integer converting first three chars of days to corresponding integers and validates if in correct range

func ParseShortMonthExpr

func ParseShortMonthExpr(expr string) string

ParseShortMonthExpr returns a slice of integer converting first three chars of month to corresponding integers and validates if in correct range

Types

This section is empty.

Jump to

Keyboard shortcuts

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