Add validator interface to unify and for readability #11
|
@ -8,6 +8,11 @@ import (
|
||||||
|
|
||||||
var availableHTTPMethods = []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete}
|
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
|
// Server represents a full server configuration
|
||||||
type Server struct {
|
type Server struct {
|
||||||
Types []datatype.T
|
Types []datatype.T
|
||||||
|
|
Loading…
Reference in New Issue