Пример #1
0
func ValidateNetworks(v interface{}, param string) error {
	st := reflect.ValueOf(v)

	if st.Kind() == reflect.Map {
		netErrors := &confutils.ConfigError{
			Type: confutils.NetworkType,
			Id:   "Networks",
		}

		return confutils.ValidateMap(netErrors, st)
	}

	return nil
}
Пример #2
0
func ValidateUsers(v interface{}, param string) error {
	st := reflect.ValueOf(v)

	if st.Kind() == reflect.Map {
		userErrors := &confutils.ConfigError{
			Type: confutils.UserType,
			Id:   "Users",
		}

		return confutils.ValidateMap(userErrors, st)
	}

	return nil
}
Пример #3
0
func ValidateCerts(v interface{}, param string) error {
	st := reflect.ValueOf(v)

	if st.Kind() == reflect.Map {
		certErrors := &confutils.ConfigError{
			Type: confutils.CertType,
			Id:   "Certs",
		}

		return confutils.ValidateMap(certErrors, st)
	}

	return nil
}