web3storage

package
v1.1.0-no-httpretry-fix Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Web3.Storage is a service to make building on top of Filecoin as simple as possible - giving the developers the power of open, distributed networks via a friendly JS client library. Behind the scenes, Web3.Storage is backed by Filecoin and makes content available via IPFS leveraging the unique properties of each network.

Docs: https://docs.web3.storage/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Web3Storage

type Web3Storage struct {
	*http.Client

	Apikey string
}

Web3Storage represents a Web3Storage configuration.

func (*Web3Storage) PinDir

func (web3 *Web3Storage) PinDir(name string) (string, error)

PinDir pins a directory to the Pinata pinning service. It alias to PinFile.

func (*Web3Storage) PinFile

func (web3 *Web3Storage) PinFile(fp string) (string, error)

PinFile pins content to Web3Storage by providing a file path, it returns an IPFS hash and an error.

func (*Web3Storage) PinHash

func (web3 *Web3Storage) PinHash(hash string) (bool, error)

PinHash pins content to Web3Storage by giving an IPFS hash, it returns the result and an error. Note: unsupported

func (*Web3Storage) PinWithBytes

func (web3 *Web3Storage) PinWithBytes(buf []byte) (string, error)

PinWithBytes pins content to Web3Storage by given byte slice, it returns an IPFS hash and an error.

func (*Web3Storage) PinWithReader

func (web3 *Web3Storage) PinWithReader(rd io.Reader) (string, error)

PinWithReader pins content to Web3Storage by given io.Reader, it returns an IPFS hash and an error.

Jump to

Keyboard shortcuts

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