ipfs

package
v0.0.0-...-f1d979d Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPFS

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

IPFS provides limited functionality to interact with the IPFS (https://ipfs.io)

func New

func New(url string) *IPFS

New creates new instance of IPFS from the provided url

func NewWithClient

func NewWithClient(url string, c *http.Client) *IPFS

NewWithClient creates new instance of IPFS from the provided url and http.Client

func (*IPFS) Add

func (f *IPFS) Add(ctx context.Context, r io.Reader) (string, error)

Add a file to ipfs from the given reader, returns the hash of the added file

func (*IPFS) Cat

func (f *IPFS) Cat(ctx context.Context, path string) (io.ReadCloser, error)

Cat the content at the given path. Callers need to drain and close the returned reader after usage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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