code: func DecodeConfigEntry(raw map[string]interface{}) (ConfigEntry, error) {
  	lib.TranslateKeys(raw, map[string]string{
  		"kind":          "Kind",
  		"name":          "Name",
  		"connect":       "Connect",
  		"sidecar_proxy": "SidecarProxy",
  		"protocol":      "Protocol",
  		"Config":        "",
  	})
  
  	var entry ConfigEntry
  
  	kindVal, ok := raw["Kind"]
  	if !ok {
  		return nil, fmt.Errorf("Payload does not contain a Kind key at the top level")
  	}
  
  	if kindStr, ok := kindVal.(string); ok {
  		newEntry, err := MakeConfigEntry(kindStr, "")
  		if err != nil {
  			return nil, err
  		}
  		entry = newEntry
  	} else {
  		return nil, fmt.Errorf("Kind value in payload is not a string")
  	}
  
  	decodeConf := &mapstructure.DecoderConfig{
  		DecodeHook: mapstructure.StringToTimeDurationHookFunc(),
  		Result:     &entry,
  	}
  
  	decoder, err := mapstructure.NewDecoder(decodeConf)
  	if err != nil {
  		return nil, err
  	}
  
  	return entry, decoder.Decode(raw)
  }
docs: // DecodeConfigEntry can be used to decode a ConfigEntry from a raw map value.
  // Currently its used in the HTTP API to decode ConfigEntry structs coming from
  // JSON. Unlike some of our custom binary encodings we don't have a preamble including
  // the kind so we will not have a concrete type to decode into. In those cases we must
  // first decode into a map[string]interface{} and then call this function to decode
  // into a concrete type.