feat(gateway): implement IPIP-402 extensions for gateway CAR requests#303
Merged
feat(gateway): implement IPIP-402 extensions for gateway CAR requests#303
Conversation
0b2dac0 to
8f39b1a
Compare
aschmahmann
commented
May 16, 2023
Jorropo
reviewed
May 16, 2023
Jorropo
reviewed
May 16, 2023
Codecov Report
@@ Coverage Diff @@
## main #303 +/- ##
==========================================
- Coverage 50.15% 50.08% -0.08%
==========================================
Files 281 278 -3
Lines 33763 33983 +220
==========================================
+ Hits 16935 17019 +84
- Misses 15046 15173 +127
- Partials 1782 1791 +9
|
a400896 to
42f28cb
Compare
aschmahmann
commented
May 16, 2023
hacdias
reviewed
May 16, 2023
42f28cb to
cd4653b
Compare
aschmahmann
commented
May 16, 2023
aschmahmann
commented
May 16, 2023
6520009 to
37c40dd
Compare
lidel
reviewed
May 17, 2023
5 tasks
d62808d to
03debb9
Compare
lidel
reviewed
May 29, 2023
7647b01 to
cdc0436
Compare
fe573f5 to
817991c
Compare
4544260 to
07a0bef
Compare
lidel
previously requested changes
Jun 7, 2023
df19eb1 to
a93ce13
Compare
a93ce13 to
c5f0cad
Compare
Co-authored-by: Henrique Dias <[email protected]>
- Improve documentation of public API that to conform with pkg.go.dev
stylings. Can be previewed with:
`go install golang.org/x/pkgsite/cmd/pkgsite@latest && pkgsite`
Note that there's a bug that makes the comments in struct fields not
formatted: golang/go#56004
- Renamed a few things for consistency and clarity:
- `BlocksGateway` to `BlocksBackend` (it is an `IPFSBackend`)
- `api` to `backend` (it is an `IPFSBackend`)
- `WithHostname` to `NewHostnameHandler`
- `Specification` to `PublicGateway`
- `ErrorResponse` to `ErrorStatusCode`
- `DagEntityByteRange` to `DagByteRange` (there isn't other)
- Unexported `ServeContent`, which was never meant to be public
- Removed `webRequestError`, which is already handled by `webError`.
Added a test to ensure that is the case.
- Removed return types from functions that always returned nil.
- Exported `DagScopeEntity`, `DagScopeAll`, `DagScopeBlock` as they are `DagScope`
- Change some usages of global `log` variable to request-scoped `logger` for more context
- Handle CAR before maybe resolving path (CAR handles it differently)
- Response formats as constants (avoids typos, etc)
- this also allows to return the PathMetadata, which also allows to set the correct X-Ipfs-Root header.
c5f0cad to
7be4474
Compare
hacdias
approved these changes
Jun 8, 2023
Member
|
Plan is:
|
Contributor
|
2023-06-08 maintainer conversation: We'll let the spec conversation around CAR roots drive if there are any CAR spec changes and ipld/go-car updates required. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #283.