1. 06 7月, 2018 2 次提交
    • pbdagreader: use FSNode instead of protobuf structure · acb9e231
      Focus on the UnixFS layer and avoid explicit references to protocol buffers
      format (used to serialize objects of that layer). Use the `unixfs.FSNode`
      structure which it abstracts from the `unixfs.pb.Data` format.
      
      Replace `PBDagReader` field `ftpb.Data` with `ft.FSNode`, renaming it to `file`
      (which is the type of UnixFS object represented in the reader) and changing its
      comment removing the "cached" reference, as this structure is not used here as a
      cache (`PBDagReader` doesn't modify the DAG, it's read-only). Also, removed
      unused `ProtoNode` field to avoid confusions, as it would normally be present if
      the `FSNode` was in fact used as a cache of the contents of the `ProtoNode`.
      
      An example of the advantage of shifting the focus from the format to the UnixFS
      layer is dropping the of use `len(pb.Blocksizes)` in favor of the more clear
      `NumChildren()` abstraction.
      
      Added `BlockSize()` accessor.
      
      License: MIT
      Signed-off-by: 's avatarLucas Molas <schomatis@gmail.com>
      Lucas Molas 提交于
  2. 30 6月, 2018 1 次提交
  3. 29 6月, 2018 1 次提交
  4. 28 6月, 2018 3 次提交
  5. 27 6月, 2018 4 次提交
  6. 26 6月, 2018 6 次提交
  7. 22 6月, 2018 1 次提交
  8. 21 6月, 2018 1 次提交
  9. 18 6月, 2018 1 次提交
  10. 17 6月, 2018 4 次提交
  11. 16 6月, 2018 2 次提交
  12. 15 6月, 2018 3 次提交
  13. 14 6月, 2018 1 次提交
  14. 13 6月, 2018 8 次提交
  15. 12 6月, 2018 2 次提交