code: func ConfigFromGRPC(s *swarmapi.Config) swarmtypes.Config {
  	config := swarmtypes.Config{
  		ID: s.ID,
  		Spec: swarmtypes.ConfigSpec{
  			Annotations: annotationsFromGRPC(s.Spec.Annotations),
  			Data:        s.Spec.Data,
  		},
  	}
  
  	config.Version.Index = s.Meta.Version.Index
  	// Meta
  	config.CreatedAt, _ = gogotypes.TimestampFromProto(s.Meta.CreatedAt)
  	config.UpdatedAt, _ = gogotypes.TimestampFromProto(s.Meta.UpdatedAt)
  
  	if s.Spec.Templating != nil {
  		config.Spec.Templating = &types.Driver{
  			Name:    s.Spec.Templating.Name,
  			Options: s.Spec.Templating.Options,
  		}
  	}
  
  	return config
  }
docs: // ConfigFromGRPC converts a grpc Config to a Config.