code: func (c *Connector) Upsert(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue) error {
  	ev, err := fieldValueMapFromClientMap(values)
  	if err != nil {
  		return err
  	}
  
  	ttl := dosa.NoTTL().Nanoseconds()
  	if ei.TTL != nil {
  		ttl = ei.TTL.Nanoseconds()
  	}
  
  	upsertRequest := dosarpc.UpsertRequest{
  		Ref:          entityInfoToSchemaRef(ei),
  		EntityValues: ev,
  		TTL:          &ttl,
  	}
  
  	err = c.client.Upsert(ctx, &upsertRequest, getHeaders(c.headers)...)
  
  	if !dosarpc.Dosa_Upsert_Helper.IsException(err) {
  		return errors.Wrap(err, "failed to Upsert due to network issue")
  	}
  
  	return errors.Wrap(err, "failed to Upsert")
  }
docs: // Upsert inserts or updates your data