validator

package
v0.19.986 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MinCronInterval = 5 * time.Minute

MinCronInterval is the minimum allowed interval between consecutive fires of any user-defined cron schedule (e.g. action triggers, drift scans).

Variables

This section is empty.

Functions

func CronSchedule

func CronSchedule(v *validator.Validate, val string) error

func FormatValidationError

func FormatValidationError(err error) error

FormatValidationError formats validation errors with custom messages for specific tags

func InterpolatedName

func InterpolatedName(v *validator.Validate, val string) error

func MinScheduleInterval added in v0.19.986

func MinScheduleInterval(sched cron.Schedule) time.Duration

MinScheduleInterval returns the smallest gap between two consecutive fires of the given schedule, sampled over the next minIntervalProbeFires fires.

Exposed so callers outside the struct-tag flow (e.g. the syncer-side `ValidateCronSchedule` helper) can apply the same rule without re-parsing.

func New

func New() *validator.Validate

Types

This section is empty.

Jump to

Keyboard shortcuts

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