code: func (storage *Storage) UnmarshalYAML(unmarshal func(interface{}) error) error {
  	var storageMap map[string]Parameters
  	err := unmarshal(&storageMap)
  	if err == nil {
  		if len(storageMap) > 1 {
  			types := make([]string, 0, len(storageMap))
  			for k := range storageMap {
  				switch k {
  				case "maintenance":
  					// allow for configuration of maintenance
  				case "cache":
  					// allow configuration of caching
  				case "delete":
  					// allow configuration of delete
  				case "redirect":
  					// allow configuration of redirect
  				default:
  					types = append(types, k)
  				}
  			}
  
  			if len(types) > 1 {
  				return fmt.Errorf("must provide exactly one storage type. Provided: %v", types)
  			}
  		}
  		*storage = storageMap
  		return nil
  	}
  
  	var storageType string
  	err = unmarshal(&storageType)
  	if err == nil {
  		*storage = Storage{storageType: Parameters{}}
  		return nil
  	}
  
  	return err
  }
docs: // UnmarshalYAML implements the yaml.Unmarshaler interface
  // Unmarshals a single item map into a Storage or a string into a Storage type with no parameters