File tree Expand file tree Collapse file tree 4 files changed +625
-3
lines changed Expand file tree Collapse file tree 4 files changed +625
-3
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,6 @@ authors = ["Ross Schulman <ross@rbs.io>"]
5
5
6
6
[dependencies ]
7
7
hyper = " *"
8
- serde = " 0.4.3"
8
+
9
+ [dependencies .protobuf ]
10
+ git = " https://github.com/stepancheg/rust-protobuf.git"
Original file line number Diff line number Diff line change 1
1
extern crate hyper;
2
- extern crate serde;
2
+ extern crate protobuf;
3
+
4
+ mod merkledag;
3
5
4
6
use std:: io:: Read ;
5
7
6
8
use hyper:: Client ;
7
9
use hyper:: header:: Connection ;
8
- use serde:: json:: { self , Value } ;
9
10
10
11
#[ derive( Debug ) ]
11
12
pub enum IPFSError {
Original file line number Diff line number Diff line change
1
+ package merkledag.pb ;
2
+
3
+
4
+ // An IPFS MerkleDAG Link
5
+ message PBLink {
6
+
7
+ // multihash of the target object
8
+ optional bytes Hash = 1 ;
9
+
10
+ // utf string name. should be unique per object
11
+ optional string Name = 2 ;
12
+
13
+ // cumulative size of target object
14
+ optional uint64 Tsize = 3 ;
15
+ }
16
+
17
+ // An IPFS MerkleDAG Node
18
+ message PBNode {
19
+
20
+ // refs to other objects
21
+ repeated PBLink Links = 2 ;
22
+
23
+ // opaque user data
24
+ optional bytes Data = 1 ;
25
+ }
You can’t perform that action at this time.
0 commit comments