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: 30 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

View Source
var Root = &cmds.Command{
	Description: "Global P2P Merkle-DAG filesystem",
	Help: `Basic commands:

    init          Initialize ipfs local configurationx
    add <path>    Add an object to ipfs
    cat <ref>     Show ipfs object data
    ls <ref>      List links from an object

Tool commands:

    config        Manage configuration
    update        Download and apply go-ipfs updates
    version       Show ipfs version information
    commands      List all available commands

Advanced Commands:

    mount         Mount an ipfs read-only mountpoint
    serve         Serve an interface to ipfs
    diag          Print diagnostics

Plumbing commands:

    block         Interact with raw blocks in the datastore
    object        Interact with raw dag nodes


Use "ipfs <command> --help" for more information about a command.
`,

	Options: []cmds.Option{
		cmds.StringOption("config", "c", "Path to the configuration file to use"),
		cmds.BoolOption("debug", "D", "Operate in debug mode"),
		cmds.BoolOption("help", "h", "Show the command help text"),
		cmds.BoolOption("local", "L", "Run the command locally, instead of using the daemon"),
	},
}

Functions

func MessageTextMarshaller

func MessageTextMarshaller(res cmds.Response) ([]byte, error)

func PrintDiagnostics

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

Types

type AddOutput

type AddOutput struct {
	Added []*Object
}

type Block

type Block struct {
	Key    string
	Length int
}

type BootstrapOutput

type BootstrapOutput struct {
	Peers []*config.BootstrapPeer
}

type Command

type Command struct {
	Name        string
	Subcommands []Command
}

type ConfigField

type ConfigField struct {
	Key   string
	Value interface{}
}

type DiagnosticConnection

type DiagnosticConnection struct {
	ID      string
	Latency int64
}

type DiagnosticOutput

type DiagnosticOutput struct {
	Peers []DiagnosticPeer
}

type DiagnosticPeer

type DiagnosticPeer struct {
	ID           string
	LifeSpan     float64
	BandwidthIn  uint64
	BandwidthOut uint64
	Connections  []DiagnosticConnection
}

type IpnsEntry

type IpnsEntry struct {
	Name  string
	Value string
}
type Link struct {
	Name, Hash string
	Size       uint64
}

type LsOutput

type LsOutput struct {
	Objects []Object
}

type MessageOutput

type MessageOutput struct {
	Message string
}

type Node

type Node struct {
	Links []Link
	Data  []byte
}

type Object

type Object struct {
	Hash  string
	Links []Link
}

type RefsOutput

type RefsOutput struct {
	Refs []string
}

type TestOutput

type TestOutput struct {
	Foo string
	Bar int
}

type UpdateOutput

type UpdateOutput struct {
	OldVersion string
	NewVersion string
}

type VersionOutput

type VersionOutput struct {
	Version string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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