code: func Secrets(namespace Namespace, secrets map[string]composetypes.SecretConfig) ([]swarm.SecretSpec, error) {
  	result := []swarm.SecretSpec{}
  	for name, secret := range secrets {
  		if secret.External.External {
  			continue
  		}
  
  		var obj swarmFileObject
  		var err error
  		if secret.Driver != "" {
  			obj, err = driverObjectConfig(namespace, name, composetypes.FileObjectConfig(secret))
  		} else {
  			obj, err = fileObjectConfig(namespace, name, composetypes.FileObjectConfig(secret))
  		}
  		if err != nil {
  			return nil, err
  		}
  		spec := swarm.SecretSpec{Annotations: obj.Annotations, Data: obj.Data}
  		if secret.Driver != "" {
  			spec.Driver = &swarm.Driver{
  				Name:    secret.Driver,
  				Options: secret.DriverOpts,
  			}
  		}
  		if secret.TemplateDriver != "" {
  			spec.Templating = &swarm.Driver{
  				Name: secret.TemplateDriver,
  			}
  		}
  		result = append(result, spec)
  	}
  	return result, nil
  }
docs: // Secrets converts secrets from the Compose type to the engine API type