Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmds: rm old lib #5786

Merged
merged 1 commit into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions commands/command.go

This file was deleted.

23 changes: 6 additions & 17 deletions commands/request.go → commands/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import (
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"

config "gx/ipfs/QmXctaABKwgzmQgNM4bucMJf7zJnxxvhmPM1Pw95dxUfB5/go-ipfs-config"
files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files"
"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
"gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
)

var log = logging.Logger("command")

// Context represents request context
type Context struct {
Online bool
ConfigRoot string
Expand Down Expand Up @@ -55,9 +57,9 @@ func (c *Context) GetNode() (*core.IpfsNode, error) {
return c.node, err
}

// GetApi returns CoreAPI instance backed by ipfs node.
// GetAPI returns CoreAPI instance backed by ipfs node.
// It may construct the node with the provided function
func (c *Context) GetApi() (coreiface.CoreAPI, error) {
func (c *Context) GetAPI() (coreiface.CoreAPI, error) {
if c.api == nil {
n, err := c.GetNode()
if err != nil {
Expand Down Expand Up @@ -109,16 +111,3 @@ func (c *Context) Close() {
c.node.Close()
}
}

// Request represents a call to a command from a consumer
type Request interface {
Path() []string
Option(name string) *cmdkit.OptionValue
Options() cmdkit.OptMap
Arguments() []string
StringArguments() []string
Files() files.File
Context() context.Context
InvocContext() *Context
Command() *Command
}
68 changes: 0 additions & 68 deletions commands/legacy/command.go

This file was deleted.

57 changes: 0 additions & 57 deletions commands/legacy/legacy.go

This file was deleted.

Loading