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: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址