Add validator interface to unify and for readability #11

Merged
xdrm-brackets merged 6 commits from refactor/config-validator into 0.3.0 2020-03-28 11:33:35 +00:00
1 changed files with 5 additions and 0 deletions
Showing only changes of commit 54705b7472 - Show all commits

View File

@ -8,6 +8,11 @@ import (
var availableHTTPMethods = []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete}
// validator unifies the check and format routine
type validator interface {
Validate(...datatype.T) error
}
// Server represents a full server configuration
type Server struct {
Types []datatype.T