merkledag.proto 949 Bytes
Newer Older
1
package merkledag.pb;
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

import "code.google.com/p/gogoprotobuf/gogoproto/gogo.proto";

option (gogoproto.gostring_all) = true;
option (gogoproto.equal_all) = true;
option (gogoproto.verbose_equal_all) = true;
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.stringer_all) =  true;
option (gogoproto.populate_all) = true;
option (gogoproto.testgen_all) = true;
option (gogoproto.benchgen_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;


// An IPFS MerkleDAG Link
message PBLink {

  // multihash of the target object
  optional bytes Hash = 1;

  // utf string name. should be unique per object
  optional string Name = 2;

  // cumulative size of target object
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
28
  optional uint64 Tsize = 3;
Juan Batiz-Benet's avatar
Juan Batiz-Benet committed
29
}
Juan Batiz-Benet's avatar
renamed  
Juan Batiz-Benet committed
30 31 32 33 34 35 36 37 38 39

// An IPFS MerkleDAG Node
message PBNode {

  // refs to other objects
  repeated PBLink Links = 2;

  // opaque user data
  optional bytes Data = 1;
}