Documentation
¶
Index ¶
- func IsCron() validator.String
- func IsCronSchedule() validator.String
- func IsCronScheduleTimezone() validator.String
- func IsEmail() validator.String
- func IsURLHttpOrHttps() validator.String
- func ProjectKey() validator.String
- func RegexNotMatches(regexp *regexp.Regexp, message string) validator.String
- func RepoKey() validator.String
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCronSchedule ¶ added in v1.30.5
IsCronSchedule returns a validator which ensures that any configured string value is ONE of the following (cannot mix formats):
1. A standard cron expression with:
- minutes limited to 00, 15, 30, or 45
- hours in 2-digit format (00-23) Example: "30 09 * * MON"
2. A predefined descriptor:
- @hourly - Run once an hour at the beginning of the hour
- @daily - Run once a day at midnight
- @midnight - Same as @daily
- @weekly - Run once a week at midnight on Sunday
- @monthly - Run once a month at midnight of first day
- @yearly - Run once a year at midnight of Jan 1
- @annually - Same as @yearly
- @every <duration> - Run at fixed intervals (e.g. @every 1h30m) Duration must be positive (> 0)
func IsCronScheduleTimezone ¶ added in v1.30.6
IsCronScheduleTimezone returns a validator which ensures that any configured string value is a valid IANA timezone name (e.g., UTC, America/New_York, Europe/London).
func IsURLHttpOrHttps ¶
func ProjectKey ¶ added in v1.25.2
func RegexNotMatches ¶ added in v1.25.5
RegexNotMatches returns an AttributeValidator which ensures that any configured attribute value:
- Is a string.
- Not matches the given regular expression https://github.com/google/re2/wiki/Syntax.
Null (unconfigured) and unknown (known after apply) values are skipped. Optionally an error message can be provided to return something friendlier than "value must not match regular expression 'regexp'".
Types ¶
This section is empty.