code: func (l loader) New(ctx context.Context, url *backend.URL) (backend.Storage, error) {
  	alias := ctxutil.GetAlias(ctx)
  	agent := client.GetClient(ctx)
  	cfgdir := ctxutil.GetConfigDir(ctx)
  
  	out.Debug(ctx, "Using Storage Backend: %s", name)
  	token := url.Query.Get("token")
  	key := fmt.Sprintf("consul-%s-%s", alias, url.String())
  	if token == "" {
  		out.Debug(ctx, "Requesting token from secrets config: %s", key)
  		t, err := l.loadSecret(ctx, key, cfgdir, agent)
  		if err != nil {
  			return nil, errors.Wrapf(err, "failed to load token from secrets config: %s", err)
  		}
  		out.Debug(ctx, "Got token from secrets config: '%s'", t)
  		token = t
  	}
  	out.Debug(ctx, "Consul-Token: '%s'", token)
  	store, err := New(url.Host+":"+url.Port, url.Path, url.Query.Get("datacenter"), token)
  	if err != nil {
  		_ = agent.Remove(ctx, key)
  		return nil, err
  	}
  	// test connection and save token if it works
  	if err := store.Available(ctx); err != nil {
  		out.Debug(ctx, "Consul access not working. removing saved token")
  		_ = l.eraseSecret(ctx, key, cfgdir, agent)
  		return nil, err
  	}
  	out.Debug(ctx, "Consul access OK. saving token")
  	if err := l.storeSecret(ctx, key, token, cfgdir, agent); err != nil {
  		return nil, err
  	}
  	return store, nil
  }
docs: // New implements backend.StorageLoader