Skip to content

Commit a90bfd2

Browse files
committed
cmds: rm old lib
License: MIT Signed-off-by: Overbool <[email protected]>
1 parent b7a4853 commit a90bfd2

File tree

10 files changed

+7
-901
lines changed

10 files changed

+7
-901
lines changed

commands/command.go

-68
This file was deleted.

commands/request.go renamed to commands/context.go

+6-17
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ import (
1010
coreapi "github.com/ipfs/go-ipfs/core/coreapi"
1111
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"
1212

13-
files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files"
1413
"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
1514
config "gx/ipfs/QmbK4EmM2Xx5fmbqK38TGP3PpY66r3tkXLZTcc7dF9mFwM/go-ipfs-config"
16-
"gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit"
15+
logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C/go-log"
1716
)
1817

18+
var log = logging.Logger("command")
19+
20+
// Context represents request context
1921
type Context struct {
2022
Online bool
2123
ConfigRoot string
@@ -55,9 +57,9 @@ func (c *Context) GetNode() (*core.IpfsNode, error) {
5557
return c.node, err
5658
}
5759

58-
// GetApi returns CoreAPI instance backed by ipfs node.
60+
// GetAPI returns CoreAPI instance backed by ipfs node.
5961
// It may construct the node with the provided function
60-
func (c *Context) GetApi() (coreiface.CoreAPI, error) {
62+
func (c *Context) GetAPI() (coreiface.CoreAPI, error) {
6163
if c.api == nil {
6264
n, err := c.GetNode()
6365
if err != nil {
@@ -109,16 +111,3 @@ func (c *Context) Close() {
109111
c.node.Close()
110112
}
111113
}
112-
113-
// Request represents a call to a command from a consumer
114-
type Request interface {
115-
Path() []string
116-
Option(name string) *cmdkit.OptionValue
117-
Options() cmdkit.OptMap
118-
Arguments() []string
119-
StringArguments() []string
120-
Files() files.File
121-
Context() context.Context
122-
InvocContext() *Context
123-
Command() *Command
124-
}

commands/legacy/command.go

-68
This file was deleted.

commands/legacy/legacy.go

-57
This file was deleted.

0 commit comments

Comments
 (0)