code: func (s SecretForDockerRegistryGeneratorV1) StructuredGenerate() (runtime.Object, error) {
  	if err := s.validate(); err != nil {
  		return nil, err
  	}
  	secret := &v1.Secret{}
  	secret.Name = s.Name
  	secret.Type = v1.SecretTypeDockerConfigJson
  	secret.Data = map[string][]byte{}
  	if len(s.FileSources) > 0 {
  		if err := handleFromFileSources(secret, s.FileSources); err != nil {
  			return nil, err
  		}
  	}
  	if len(s.FileSources) == 0 {
  		dockercfgJSONContent, err := handleDockerCfgJSONContent(s.Username, s.Password, s.Email, s.Server)
  		if err != nil {
  			return nil, err
  		}
  		secret.Data[v1.DockerConfigJsonKey] = dockercfgJSONContent
  	}
  	if s.AppendHash {
  		h, err := hash.SecretHash(secret)
  		if err != nil {
  			return nil, err
  		}
  		secret.Name = fmt.Sprintf("%s-%s", secret.Name, h)
  	}
  	return secret, nil
  }
docs: // StructuredGenerate outputs a secret object using the configured fields