code: func (s *Store) IntentionGet(ws memdb.WatchSet, id string) (uint64, *structs.Intention, error) {
  	tx := s.db.Txn(false)
  	defer tx.Abort()
  
  	// Get the table index.
  	idx := maxIndexTxn(tx, intentionsTableName)
  	if idx < 1 {
  		idx = 1
  	}
  
  	// Look up by its ID.
  	watchCh, intention, err := tx.FirstWatch(intentionsTableName, "id", id)
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed intention lookup: %s", err)
  	}
  	ws.Add(watchCh)
  
  	// Convert the interface{} if it is non-nil
  	var result *structs.Intention
  	if intention != nil {
  		result = intention.(*structs.Intention)
  	}
  
  	return idx, result, nil
  }
docs: // IntentionGet returns the given intention by ID.