ipfs

package
v0.0.0-...-a1d2bbf Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: MIT Imports: 4 Imported by: 0

README

Ipfs

Wrapper around Ipfs Api

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNodeOffline is returned when performing an operation to a
	// disconnected ipfs node.
	ErrNodeOffline = errors.New("ipfs: node not live")

	// ErrNodeNotInitialized is returned when accessing a nil pointer to
	// the ipfs shell instance.
	ErrNodeNotInitialized = errors.New("ipfs: node not initialized")
)
View Source
var (
	// Shell holds a ipfs shell instance for access to the
	// the ipfs network. (Default: Infura node)
	Shell *shell.Shell
)

Functions

func InitShell

func InitShell(addr string)

InitShell initialize a new shell.

func IsLive

func IsLive() (bool, error)

IsLive return true if ipfs node is live.

func UploadFile

func UploadFile(p string) (string, error)

UploadFile takes a file path and upload it to ipfs and return the generate hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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