Add Cron interval to config
This commit is contained in:
parent
f52fe6abf3
commit
52dbfbf56e
6 changed files with 21 additions and 6 deletions
|
|
@ -47,6 +47,7 @@ var knownParsers map[string]Parser[any] = map[string]Parser[any]{
|
|||
"abspath": asGenericParser(ParseAbspath),
|
||||
"domain": asGenericParser(ParseValidDomain),
|
||||
"domains": asGenericParser(ParseValidDomains),
|
||||
"duration": asGenericParser(ParseDuration),
|
||||
"number": asGenericParser(ParseNumber),
|
||||
"port": asGenericParser(ParsePort),
|
||||
"https_url": asGenericParser(ParseHttpsURL),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/fsx"
|
||||
|
|
@ -116,3 +117,8 @@ func ParseSlug(env environment.Environment, s string) (string, error) {
|
|||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// ParseDuration parses a time.Duration
|
||||
func ParseDuration(env environment.Environment, s string) (time.Duration, error) {
|
||||
return time.ParseDuration(s)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue