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