code: func (f Index) Iterate(fn IndexIterFunc, options *IterateOptions) (err error) {
  	if options == nil {
  		options = new(IterateOptions)
  	}
  	// construct a prefix with Index prefix and optional common key prefix
  	prefix := append(f.prefix, options.Prefix...)
  	// start from the prefix
  	startKey := prefix
  	if options.StartFrom != nil {
  		// start from the provided StartFrom Item key value
  		startKey, err = f.encodeKeyFunc(*options.StartFrom)
  		if err != nil {
  			return err
  		}
  	}
  	it := f.db.NewIterator()
  	defer it.Release()
  
  	// move the cursor to the start key
  	ok := it.Seek(startKey)
  	if !ok {
  		// stop iterator if seek has failed
  		return it.Error()
  	}
  	if options.SkipStartFromItem && bytes.Equal(startKey, it.Key()) {
  		// skip the start from Item if it is the first key
  		// and it is explicitly configured to skip it
  		ok = it.Next()
  	}
  	for ; ok; ok = it.Next() {
  		item, err := f.itemFromIterator(it, prefix)
  		if err != nil {
  			if err == leveldb.ErrNotFound {
  				break
  			}
  			return err
  		}
  		stop, err := fn(item)
  		if err != nil {
  			return err
  		}
  		if stop {
  			break
  		}
  	}
  	return it.Error()
  }
docs: // Iterate function iterates over keys of the Index.
  // If IterateOptions is nil, the iterations is over all keys.