commands

package
v0.0.0-...-c9e5fdf Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2014 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDepthLimitExceeded = fmt.Errorf("depth limit exceeded")

Error indicating the max depth has been exceded.

View Source
var ErrObjectTooLarge = errors.New("input object was too large. limit is 512kbytes")

ErrObjectTooLarge is returned when too much data was read from stdin. current limit 512k

View Source
var ErrUnknownObjectEnc = errors.New("unknown object encoding")

ErrUnknownObjectEnc is returned if a invalid encoding is supplied

Functions

func Add

func Add(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

Add is a command that imports files and directories -- given as arguments -- into ipfs.

func AddPath

func AddPath(n *core.IpfsNode, fpath string, depth int, out io.Writer) (*dag.Node, error)

AddPath adds a particular path to ipfs.

func BlockGet

func BlockGet(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

BlockGet retrives a raw ipfs block from the node's BlockService

func BlockPut

func BlockPut(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

BlockPut reads everything from conn and saves the data to the nodes BlockService

func Cat

func Cat(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func Diag

func Diag(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func Log

func Log(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

Log changes the log level of a subsystem

func Ls

func Ls(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func ObjectData

func ObjectData(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

ObjectData takes a key string from args and writes out the raw bytes of that node (if there is one)

func ObjectGet

func ObjectGet(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

ObjectGet takes a key string from args and a format option and serializes the dagnode to that format

func ObjectLinks(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

ObjectLinks takes a key string from args and lists the links it points to

func ObjectPut

func ObjectPut(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

ObjectPut takes a format option, serilizes bytes from stdin and updates the dag with that data

func Pin

func Pin(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func PrintDiagnostics

func PrintDiagnostics(info []*diagn.DiagInfo, out io.Writer)

func Publish

func Publish(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func Refs

func Refs(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func Resolve

func Resolve(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func Unpin

func Unpin(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

func UpdateApply

func UpdateApply(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

UpdateApply applys an update of the ipfs binary and shuts down the node if successful

func UpdateCheck

func UpdateCheck(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

UpdateCheck checks wether there is an update available

func UpdateLog

func UpdateLog(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Writer) error

UpdateLog lists the version available online

Types

type CmdFunc

type CmdFunc func(*core.IpfsNode, []string, map[string]interface{}, io.Writer) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳