Documentation ¶
Index ¶
Constants ¶
View Source
const ActionTriggerResync = "action-trigger-resync"
Variables ¶
View Source
var ValidateTeamName validator.Func = func(fl validator.FieldLevel) bool { teamSlug := fl.Field().Interface().(string) r, _ := regexp.Compile("^[a-z-]+$") return r.MatchString(teamSlug) }
View Source
var ValidateTeamUsers validator.Func = func(fl validator.FieldLevel) bool { users, ok := fl.Field().Interface().([]string) if !ok { return false } return len(users) != 0 }
View Source
var ValidateUserEmails validator.Func = func(fl validator.FieldLevel) bool { users, ok := fl.Field().Interface().([]string) if !ok { return false } for _, user := range users { if user == "" { continue } _, err := mail.ParseAddress(user) if err != nil { return false } if !strings.HasSuffix(strings.ToLower(user), "nav.no") { return false } } return true }
Functions ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.