code: func Parse(rd io.Reader) (*Configuration, error) {
  	in, err := ioutil.ReadAll(rd)
  	if err != nil {
  		return nil, err
  	}
  
  	p := NewParser("registry", []VersionedParseInfo{
  		{
  			Version: MajorMinorVersion(0, 1),
  			ParseAs: reflect.TypeOf(v0_1Configuration{}),
  			ConversionFunc: func(c interface{}) (interface{}, error) {
  				if v0_1, ok := c.(*v0_1Configuration); ok {
  					if v0_1.Log.Level == Loglevel("") {
  						if v0_1.Loglevel != Loglevel("") {
  							v0_1.Log.Level = v0_1.Loglevel
  						} else {
  							v0_1.Log.Level = Loglevel("info")
  						}
  					}
  					if v0_1.Loglevel != Loglevel("") {
  						v0_1.Loglevel = Loglevel("")
  					}
  					if v0_1.Storage.Type() == "" {
  						return nil, errors.New("no storage configuration provided")
  					}
  					return (*Configuration)(v0_1), nil
  				}
  				return nil, fmt.Errorf("expected *v0_1Configuration, received %#v", c)
  			},
  		},
  	})
  
  	config := new(Configuration)
  	err = p.Parse(in, config)
  	if err != nil {
  		return nil, err
  	}
  
  	return config, nil
  }
docs: // Parse parses an input configuration yaml document into a Configuration struct
  // This should generally be capable of handling old configuration format versions
  //
  // Environment variables may be used to override configuration parameters other than version,
  // following the scheme below:
  // Configuration.Abc may be replaced by the value of REGISTRY_ABC,
  // Configuration.Abc.Xyz may be replaced by the value of REGISTRY_ABC_XYZ, and so forth