ipfs

package
v0.0.0-...-7a19e20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package ipfs can download objects via IPFS API server.

Index

Constants

View Source
const Source = "/ipfs"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Client

func (*Client) CanonicalURI

func (c *Client) CanonicalURI(uri string) (string, error)

CanonicalURI implements gate/server.Source.CanonicalURI.

func (*Client) OpenURI

func (c *Client) OpenURI(ctx context.Context, uri string, maxSize int) (io.ReadCloser, int64, error)

OpenURI implements gate/server.Source.OpenURI.

type Config

type Config struct {
	Addr   string
	Client *http.Client
}

func (*Config) Configured

func (c *Config) Configured() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL