Add validator interface

This commit is contained in:
Jingfang Liu
2018-10-02 15:09:19 -07:00
parent ad093555a6
commit fa89a0ab4d
7 changed files with 132 additions and 49 deletions

View File

@@ -24,3 +24,10 @@ type Decoder interface {
// Decode yields the next object from the input, else io.EOF
Decode(interface{}) error
}
// Validator provides functions to validate annotations and labels
type Validator interface {
MakeAnnotationValidator() func(map[string]string) error
MakeLabelValidator() func(map[string]string) error
ValidateNamespace(string) []string
}