@@ -10,12 +10,14 @@ import (
10
10
coreapi "github.com/ipfs/go-ipfs/core/coreapi"
11
11
coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface"
12
12
13
- files "gx/ipfs/QmZMWMvWMVKCbHetJ4RgndbuEF1io2UpUxwQwtNjtYPzSC/go-ipfs-files"
14
13
"gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds"
15
14
config "gx/ipfs/QmbK4EmM2Xx5fmbqK38TGP3PpY66r3tkXLZTcc7dF9mFwM/go-ipfs-config"
16
- "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg /go-ipfs-cmdkit "
15
+ logging "gx/ipfs/QmcuXC5cxs79ro2cUuHs4HQ2bkDLJUYokwL8aivcX6HW3C /go-log "
17
16
)
18
17
18
+ var log = logging .Logger ("command" )
19
+
20
+ // Context represents request context
19
21
type Context struct {
20
22
Online bool
21
23
ConfigRoot string
@@ -55,9 +57,9 @@ func (c *Context) GetNode() (*core.IpfsNode, error) {
55
57
return c .node , err
56
58
}
57
59
58
- // GetApi returns CoreAPI instance backed by ipfs node.
60
+ // GetAPI returns CoreAPI instance backed by ipfs node.
59
61
// 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 ) {
61
63
if c .api == nil {
62
64
n , err := c .GetNode ()
63
65
if err != nil {
@@ -109,16 +111,3 @@ func (c *Context) Close() {
109
111
c .node .Close ()
110
112
}
111
113
}
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
- }
0 commit comments