MCPcopy Index your code
hub / github.com/cortexlabs/cortex / ValidateInterfaceMapProvided

Function ValidateInterfaceMapProvided

pkg/lib/configreader/interface_map.go:72–81  ·  view source on GitHub ↗
(val map[string]interface{}, v *InterfaceMapValidation)

Source from the content-addressed store, hash-verified

70}
71
72func ValidateInterfaceMapProvided(val map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error) {
73 if v.CantBeSpecifiedErrStr != nil {
74 return nil, ErrorFieldCantBeSpecified(*v.CantBeSpecifiedErrStr)
75 }
76
77 if !v.AllowExplicitNull && val == nil {
78 return nil, ErrorCannotBeNull(v.Required)
79 }
80 return validateInterfaceMap(val, v)
81}
82
83func validateInterfaceMap(val map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error) {
84 if v.RequireCortexResources {

Callers 1

InterfaceMapFunction · 0.85

Calls 3

ErrorCannotBeNullFunction · 0.85
validateInterfaceMapFunction · 0.85

Tested by

no test coverage detected