shell

package module
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2016 License: MIT Imports: 9 Imported by: 0

README

Installation

$ go get github.com/noffle/fallback-ipfs-shell

Usage

import (
  shell "github.com/noffle/fallback-ipfs-shell/shell"
)
shell.NewShell() (shell.Shell, error)

Returns a Shell interface, preferring a local HTTP API node if it can find one, but falling back to producing a new ephemeral node that self-bootstraps.

shell.NewApiShell() (shell.Shell, error)

Returns a Shell interface, explicitly connecting to a local HTTP API node if it can find one.

shell.NewEmbeddedShell() (shell.Shell, error)

Returns a Shell interface, explicitly spawning a new IPFS node.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shell

type Shell interface {
	Add(r io.Reader) (string, error)
	AddLink(target string) (string, error)

	Cat(ipfspath string) (io.ReadCloser, error)
	Get(ipfspath, outdir string) error
	ResolvePath(ipath string) (string, error)
	List(ipath string) ([]*sh.LsLink, error)

	NewObject(template string) (string, error)
	PatchLink(root, npath, childhash string, create bool) (string, error)
	Patch(root, action string, args ...string) (string, error)
}

func NewApiShell

func NewApiShell() (Shell, error)

func NewEmbeddedShell

func NewEmbeddedShell() (Shell, error)

func NewShell

func NewShell() (Shell, error)

Jump to

Keyboard shortcuts

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