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