MCPcopy Create free account
hub / github.com/AdRoll/baker / validate

Method validate

input/kcl.go:53–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51var appNameRx = regexp.MustCompile(`^[a-zA-Z_0-9]+$`)
52
53func (cfg *KCLConfig) validate() error {
54 if !appNameRx.MatchString(cfg.AppName) {
55 return fmt.Errorf("invalid 'AppName' '%s', accepts only [A-Za-z0-9_]+", cfg.AppName)
56 }
57 if cfg.InitialPosition != "LATEST" && cfg.InitialPosition != "TRIM_HORIZON" {
58 return fmt.Errorf("invalid 'InitialPosition' '%s', accepts only 'LATEST' or 'TRIM_HORIZON'", cfg.InitialPosition)
59 }
60 return nil
61}
62
63func (cfg *KCLConfig) fillDefaults() {
64 if cfg.AwsRegion == "" {

Callers 3

runFilterChainMethod · 0.80
NewKCLFunction · 0.80

Calls

no outgoing calls

Tested by 1