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.
Index ¶
- type Web3Storage
- func (web3 *Web3Storage) PinDir(name string) (string, error)
- func (web3 *Web3Storage) PinFile(fp string) (string, error)
- func (web3 *Web3Storage) PinHash(hash string) (bool, error)
- func (web3 *Web3Storage) PinWithBytes(buf []byte) (string, error)
- func (web3 *Web3Storage) PinWithReader(rd io.Reader) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Web3Storage ¶
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.