generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: namings, fields, clarity, comments, documentation
- 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)
- Loading branch information
Showing
27 changed files
with
744 additions
and
607 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.