code: func (d *driver) getCapabilities() (*driverapi.Capability, error) {
  	var capResp api.GetCapabilityResponse
  	if err := d.call("GetCapabilities", nil, &capResp); err != nil {
  		return nil, err
  	}
  
  	c := &driverapi.Capability{}
  	switch capResp.Scope {
  	case "global":
  		c.DataScope = datastore.GlobalScope
  	case "local":
  		c.DataScope = datastore.LocalScope
  	default:
  		return nil, fmt.Errorf("invalid capability: expecting 'local' or 'global', got %s", capResp.Scope)
  	}
  
  	switch capResp.ConnectivityScope {
  	case "global":
  		c.ConnectivityScope = datastore.GlobalScope
  	case "local":
  		c.ConnectivityScope = datastore.LocalScope
  	case "":
  		c.ConnectivityScope = c.DataScope
  	default:
  		return nil, fmt.Errorf("invalid capability: expecting 'local' or 'global', got %s", capResp.Scope)
  	}
  
  	return c, nil
  }
docs: // Get capability from client