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

Refs local endpoint #150

Merged
merged 1 commit into from Apr 14, 2020
Merged

Refs local endpoint #150

merged 1 commit into from Apr 14, 2020

Conversation

aphelionz
Copy link
Contributor

@aphelionz aphelionz commented Apr 10, 2020

This PR adds a conformance-passing /api/v0/refs/local endpoint.

I added a list function to the BlockStore trait.

TODO:

  • There's probably too much Result, but maybe not. It seems like there are possibilities for failure at many steps
  • Speaking of that, error handling is needed as well. Looking at how to deal with that and clean things up.

Note that this includes the work from #137 and will be rebased

@aphelionz aphelionz marked this pull request as ready for review April 14, 2020 12:04
src/repo/fs.rs Outdated Show resolved Hide resolved
src/repo/mem.rs Outdated Show resolved Hide resolved
src/repo/mem.rs Outdated Show resolved Hide resolved
src/repo/mod.rs Outdated Show resolved Hide resolved
src/repo/mem.rs Outdated Show resolved Hide resolved
http/src/v0/refs.rs Outdated Show resolved Hide resolved
http/src/v0/refs.rs Outdated Show resolved Hide resolved
http/src/v0/refs.rs Outdated Show resolved Hide resolved
http/src/v0/refs.rs Outdated Show resolved Hide resolved
use multihash::Sha2_256;

#[tokio::test]
async fn test_inner_local() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test looks incomplete...?

Copy link
Collaborator

@koivunej koivunej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to squash and merge, since the first commit has only WIP as subject.

@koivunej
Copy link
Collaborator

Test failures look transient...

@aphelionz
Copy link
Contributor Author

Fixed the commit msg 👍

Copy link
Collaborator

@koivunej koivunej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this in. I'll need to work on the stream err handling and we'll need to go over my proposed changes.

Adding list to BlockStore trait and cleanup support

Adding list functionality and tests

wip dag put

Update Cargo.toml

Co-Authored-By: Joonas Koivunen <joonas.koivunen@gmail.com>

Update Cargo.toml

Delete config

rustfmt

fix: examples and unused"

fix: switching back to Vecs

feat: adding list functions to repo and ipfs

feat: working endpoint

fix: more sane newline adding

fix: clippy

fix: cargo fmt

fix: inner Result

fix: warp filter chain fixes part 1

fix: HandledErr and some cargo fmt

fix: StringError

removing HandledErr

fix: HandledErr

fix: unwrap placement
@aphelionz aphelionz merged commit c8cabd1 into rs-ipfs:master Apr 14, 2020
@aphelionz aphelionz deleted the refs-local-endpoint branch April 14, 2020 16:26
@aphelionz aphelionz linked an issue Apr 15, 2020 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for /refs endpoints
2 participants