code: func ConfigReferencesFromGRPC(s []*swarmapi.ConfigReference) []*swarmtypes.ConfigReference {
  	refs := []*swarmtypes.ConfigReference{}
  
  	for _, r := range s {
  		ref := &swarmtypes.ConfigReference{
  			ConfigID:   r.ConfigID,
  			ConfigName: r.ConfigName,
  		}
  
  		if t, ok := r.Target.(*swarmapi.ConfigReference_File); ok {
  			ref.File = &swarmtypes.ConfigReferenceFileTarget{
  				Name: t.File.Name,
  				UID:  t.File.UID,
  				GID:  t.File.GID,
  				Mode: t.File.Mode,
  			}
  		}
  
  		refs = append(refs, ref)
  	}
  
  	return refs
  }
docs: // ConfigReferencesFromGRPC converts a slice of grpc ConfigReference to ConfigReference