ipfs

package
v0.0.0-...-4eea697 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiURLs []string) (*Client, error)

func (*Client) Add

func (i *Client) Add(ctx context.Context, fileContent []byte) (*cid.Cid, error)

Add file to an IPFS node with CID version 0 Returns CID or error

func (*Client) Close

func (i *Client) Close()

func (*Client) Get

func (i *Client) Get(ctx context.Context, CID *cid.Cid) (io.ReadCloser, error)

Get file from IPFS node by CID Returns ReadCloser or error Need to Close()

Jump to

Keyboard shortcuts

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