Documentation ¶
Index ¶
- func BestGatewayNodeFrom(ipfsURL string, isFxHash bool) string
- func DefaultGatewayFrom(ipfsURL string) string
- func GetHeader(ctx context.Context, path string) (http.Header, error)
- func GetResponse(ctx context.Context, path string) (io.ReadCloser, error)
- func IsIpfsGatewayURL(ipfsURL string) bool
- func IsIpfsProtoURL(ipfsURL string) bool
- func IsIpfsURL(ipfsURL string) bool
- func NewShell() *shell.Shell
- func PathGatewayFrom(gatewayHost, ipfsURL string) string
- type ErrInfuraQuotaExceeded
- type HTTPReader
- type IPFSReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BestGatewayNodeFrom ¶
BestGatewayNodeFrom rewrites an IPFS URL to a gateway URL using the appropriate gateway
func DefaultGatewayFrom ¶
DefaultGatewayFrom rewrites an IPFS URL to a gateway URL using the default gateway
func GetResponse ¶
func IsIpfsGatewayURL ¶
func IsIpfsProtoURL ¶
func PathGatewayFrom ¶
PathGatewayFrom is a helper function that rewrites an IPFS URI to an IPFS gateway URL
Types ¶
type ErrInfuraQuotaExceeded ¶
type ErrInfuraQuotaExceeded struct {
Err error
}
func (ErrInfuraQuotaExceeded) Error ¶
func (r ErrInfuraQuotaExceeded) Error() string
func (ErrInfuraQuotaExceeded) Unwrap ¶
func (r ErrInfuraQuotaExceeded) Unwrap() error
type HTTPReader ¶
HTTPReader is a reader that uses a HTTP gateway to read from
func (HTTPReader) Do ¶
func (r HTTPReader) Do(ctx context.Context, path string) (io.ReadCloser, error)
type IPFSReader ¶
IPFSReader is a reader that uses an IPFS shell to read from IPFS
func (IPFSReader) Do ¶
func (r IPFSReader) Do(ctx context.Context, path string) (io.ReadCloser, error)
Click to show internal directories.
Click to hide internal directories.