nftstorage

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

NFT.Storage is a long-term storage service designed for off-chain NFT data (like metadata, images, and other assets) for up to 31GiB in size. Data is content addressed using IPFS, meaning the URL pointing to a piece of data (“ipfs://…”) is completely unique to that data.

Docs: https://nft.storage/api-docs/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NFTStorage

type NFTStorage struct {
	*http.Client

	Apikey string
}

NFTStorage represents an NFTStorage configuration.

func (*NFTStorage) PinDir

func (nft *NFTStorage) PinDir(name string) (string, error)

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

func (*NFTStorage) PinFile

func (nft *NFTStorage) PinFile(fp string) (string, error)

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

func (*NFTStorage) PinHash

func (nft *NFTStorage) PinHash(hash string) (bool, error)

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

func (*NFTStorage) PinWithBytes

func (nft *NFTStorage) PinWithBytes(buf []byte) (string, error)

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

func (*NFTStorage) PinWithReader

func (nft *NFTStorage) PinWithReader(rd io.Reader) (string, error)

PinWithReader pins content to NFTStorage 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