code: func LoadRoot(cfg map[string]string) (*Root, error) {
  	var root Root
  	var err error
  	spec, ok := cfg["private"]
  	if !ok {
  		return nil, ErrMissingPrivateKey
  	}
  
  	certPath, ok := cfg["certificate"]
  	if !ok {
  		return nil, ErrMissingCertificatePath
  	}
  
  	configPath, ok := cfg["config"]
  	if !ok {
  		return nil, ErrMissingConfigPath
  	}
  
  	root.PrivateKey, err = parsePrivateKeySpec(spec, cfg)
  	if err != nil {
  		return nil, err
  	}
  
  	in, err := ioutil.ReadFile(certPath)
  	if err != nil {
  		return nil, err
  	}
  
  	root.Certificate, err = helpers.ParseCertificatePEM(in)
  	if err != nil {
  		return nil, err
  	}
  
  	conf, err := config.LoadFile(configPath)
  	if err != nil {
  		return nil, err
  	}
  	root.Config = conf.Signing
  
  	nets := cfg["nets"]
  	if nets != "" {
  		root.ACL, err = parseACL(nets)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	dbConfig := cfg["dbconfig"]
  	if dbConfig != "" {
  		db, err := dbconf.DBFromConfig(dbConfig)
  		if err != nil {
  			return nil, err
  		}
  		root.DB = db
  	}
  
  	return &root, nil
  }
docs: // LoadRoot parses a config structure into a Root structure