Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Add refs endpoint #147

Merged
merged 42 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
bd362ea
fix: request logger name for good
Apr 13, 2020
e7030d8
wip: initial broilerplate
Apr 7, 2020
1524f3a
wip: initial edges
Apr 7, 2020
1e56108
wip: fmt and fix botched syntax
Apr 7, 2020
a6af055
wip: cleanup and notes
Apr 7, 2020
a04a004
feat: ipfspath parsing and walking
Apr 9, 2020
fd8f255
refactor: rewrite to walk the path before streaming
Apr 12, 2020
4c0ed8b
refactor: rem warn, add comments
Apr 12, 2020
cb526b0
fix: handling 0 for ipld link
Apr 12, 2020
fa2b6d9
wip almost get integrated but...
Apr 12, 2020
96891aa
wip: get first tests to pass
Apr 14, 2020
1755cd0
feat: format string support
Apr 14, 2020
c1aa1ef
fix: manual RefsOptions deserialization
Apr 14, 2020
0a4eebf
refactor: cleanup refs
Apr 14, 2020
8157f8e
fix: resolve multiple paths
Apr 14, 2020
cc1ea82
add: complete boilerplate for <linkname>
Apr 14, 2020
0be759a
add: dag-pb specific ipfspath walking
Apr 14, 2020
96d6659
add: make IpfsPath better debuggable
Apr 14, 2020
4fb66df
doc: possibly need to change status code for WalkFailed
Apr 14, 2020
3d0ae11
refactor: log block loading failed messages
Apr 14, 2020
1a1fafb
wip: adjust logging
Apr 14, 2020
df08ec9
add: parsing failed yielding
Apr 14, 2020
a7140ec
add: "specialize" ipld_links for dag-pb
Apr 14, 2020
b448b5b
feat: support visiting unique nodes
Apr 14, 2020
b100c3e
fix: instead of stopping, filter out too deep elements
Apr 14, 2020
d0e7101
refactor: reorg and document
Apr 14, 2020
f007130
refactor: minor cleanup and docs
Apr 15, 2020
e0b34a4
fix: refs tests, enable unique test
Apr 15, 2020
19087b3
fix: use specific rust-ipld version with cbor fix
Apr 15, 2020
139fbe9
refactor: allow dead_code StringError::new
Apr 15, 2020
e2522eb
refactor: use the Edge for refs-local as well
Apr 15, 2020
9bc4c1a
fix: refs_local test, move all tests under mod test
Apr 15, 2020
bff3978
chore: cargo fmt and reorder tests
Apr 15, 2020
1700add
doc: replace fixme with confirmed
Apr 15, 2020
359088b
add: port tests for ipfspath
Apr 15, 2020
e67f819
fix: remove unwrap from refs-local
Apr 15, 2020
6783bbc
fix: unignore good_but_unsupported test
Apr 16, 2020
30935ed
add: test cases for slash dedup per discussion
Apr 16, 2020
0aff18a
add: walk dag-cbor tests for IpfsPath
Apr 16, 2020
d6a122f
add: dag-pb path walking test
Apr 16, 2020
8639a59
add: tests for walking over a cbor link
Apr 16, 2020
d1da378
add: test case for dapb link listing
Apr 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 49 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ byteorder = "1.3.4"
dirs = "2.0.2"
domain = { git = "https://github.com/nlnetlabs/domain", rev="084964", features = ["resolv"] }
futures = { version = "0.3.4", features = ["compat", "io-compat"] }
libipld = { git = "https://github.com/ipfs-rust/rust-ipld", features = ["dag-pb"] }
libipld = { git = "https://github.com/ipfs-rust/rust-ipld", rev = "b2286c53c13f3eeec2a3766387f2926838e8e4c9", features = ["dag-pb", "dag-json"] }
libp2p = "0.16.2"
log = "0.4.8"
multibase = "0.8.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ async-std = "1.5.0"
env_logger = "0.7.1"
futures = "0.3.4"
ipfs = { path = ".." }
libipld = { git = "https://github.com/ipfs-rust/rust-ipld", features = ["dag-pb"] }
libipld = { git = "https://github.com/ipfs-rust/rust-ipld", rev = "b2286c53c13f3eeec2a3766387f2926838e8e4c9", features = ["dag-pb", "dag-json"] }
multihash = "0.10.1"
8 changes: 7 additions & 1 deletion http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ base64 = "0.12.0"
env_logger = "0.7.1"
futures = "0.3.4"
ipfs = { path = "../" }
libipld = { git = "https://github.com/ipfs-rust/rust-ipld", features = ["dag-pb", "dag-json"] }
libipld = { git = "https://github.com/ipfs-rust/rust-ipld", rev = "b2286c53c13f3eeec2a3766387f2926838e8e4c9", features = ["dag-pb", "dag-json"] }
log = "0.4.8"
multibase = "0.8.0"
multihash = "0.10.1"
Expand All @@ -28,3 +28,9 @@ structopt = "0.3.12"
thiserror = "1.0.14"
tokio = { version = "0.2.16", features = ["full"] }
warp = "0.2.2"
async-stream = "0.2.1"
pin-project = "0.4.8"
url = "2.1.1"

[dev-dependencies]
hex = "0.4.2"
2 changes: 2 additions & 0 deletions http/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![recursion_limit = "512"]

pub mod v0;

pub mod config;
2 changes: 1 addition & 1 deletion http/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn serve<Types: IpfsTypes>(
let (shutdown_tx, mut shutdown_rx) = tokio::sync::mpsc::channel::<()>(1);

let routes = v0::routes(ipfs, shutdown_tx);
let routes = routes.with(warp::log("rust-ipfs-http-v0"));
let routes = routes.with(warp::log(env!("CARGO_PKG_NAME")));

let ipfs = ipfs.clone();

Expand Down
2 changes: 1 addition & 1 deletion http/src/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ where
.or(warp::path!("ping" / ..).and_then(not_implemented))
.or(pubsub::routes(ipfs))
.or(refs::local(ipfs))
// .or(warp::path!("refs").and_then(refs::of_path))
.or(refs::refs(ipfs))
.or(warp::path!("repo" / ..).and_then(not_implemented))
.or(warp::path!("stats" / ..).and_then(not_implemented))
.or(swarm::connect(ipfs))
Expand Down
Loading