Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
c468a4db
提交
c468a4db
authored
11月 11, 2014
作者:
Matt Bell
提交者:
Juan Batiz-Benet
11月 14, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
core/commands2: Use Argument constructors in commands
上级
40e96a1f
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
23 行增加
和
41 行删除
+23
-41
tour.go
cmd/ipfs2/tour.go
+1
-2
add.go
core/commands2/add.go
+1
-1
block.go
core/commands2/block.go
+2
-2
bootstrap.go
core/commands2/bootstrap.go
+2
-2
cat.go
core/commands2/cat.go
+1
-2
config.go
core/commands2/config.go
+2
-4
log.go
core/commands2/log.go
+2
-4
ls.go
core/commands2/ls.go
+1
-2
object.go
core/commands2/object.go
+5
-10
pin.go
core/commands2/pin.go
+2
-4
publish.go
core/commands2/publish.go
+2
-4
refs.go
core/commands2/refs.go
+1
-2
resolve.go
core/commands2/resolve.go
+1
-2
没有找到文件。
cmd/ipfs2/tour.go
浏览文件 @
c468a4db
...
...
@@ -22,8 +22,7 @@ IPFS very quickly. To start, run:
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"number"
,
cmds
.
ArgString
,
false
,
false
,
"The number of the topic you would like to tour"
},
cmds
.
StringArg
(
"number"
,
false
,
false
,
"The number of the topic you would like to tour"
),
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"list"
:
cmdIpfsTourList
,
...
...
core/commands2/add.go
浏览文件 @
c468a4db
...
...
@@ -26,7 +26,7 @@ var addCmd = &cmds.Command{
cmds
.
BoolOption
(
"recursive"
,
"r"
,
"Must be specified when adding directories"
),
},
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"file"
,
cmds
.
ArgFile
,
true
,
true
,
"The path to a file to be added to IPFS"
}
,
cmds
.
FileArg
(
"file"
,
true
,
true
,
"The path to a file to be added to IPFS"
)
,
},
Description
:
"Add an object to ipfs."
,
Help
:
`Adds contents of <path> to ipfs. Use -r to add directories.
...
...
core/commands2/block.go
浏览文件 @
c468a4db
...
...
@@ -38,7 +38,7 @@ var blockGetCmd = &cmds.Command{
It outputs to stdout, and <key> is a base58 encoded multihash.`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"key"
,
cmds
.
ArgString
,
true
,
false
,
"The base58 multihash of an existing block to get"
}
,
cmds
.
StringArg
(
"key"
,
true
,
false
,
"The base58 multihash of an existing block to get"
)
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
n
:=
req
.
Context
()
.
Node
...
...
@@ -74,7 +74,7 @@ var blockPutCmd = &cmds.Command{
It reads from stdin, and <key> is a base58 encoded multihash.`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"data"
,
cmds
.
ArgFile
,
true
,
false
,
"The data to be stored as an IPFS block"
}
,
cmds
.
FileArg
(
"data"
,
true
,
false
,
"The data to be stored as an IPFS block"
)
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
n
:=
req
.
Context
()
.
Node
...
...
core/commands2/bootstrap.go
浏览文件 @
c468a4db
...
...
@@ -39,7 +39,7 @@ in the bootstrap list).
`
+
bootstrapSecurityWarning
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"peer"
,
cmds
.
ArgString
,
true
,
true
,
peerOptionDesc
}
,
cmds
.
StringArg
(
"peer"
,
true
,
true
,
peerOptionDesc
)
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
input
,
err
:=
bootstrapInputToPeers
(
req
.
Arguments
())
...
...
@@ -79,7 +79,7 @@ var bootstrapRemoveCmd = &cmds.Command{
`
+
bootstrapSecurityWarning
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"peer"
,
cmds
.
ArgString
,
true
,
true
,
peerOptionDesc
}
,
cmds
.
StringArg
(
"peer"
,
true
,
true
,
peerOptionDesc
)
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
input
,
err
:=
bootstrapInputToPeers
(
req
.
Arguments
())
...
...
core/commands2/cat.go
浏览文件 @
c468a4db
...
...
@@ -16,8 +16,7 @@ it contains.
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"ipfs-path"
,
cmds
.
ArgString
,
true
,
true
,
"The path to the IPFS object(s) to be outputted"
},
cmds
.
StringArg
(
"ipfs-path"
,
true
,
true
,
"The path to the IPFS object(s) to be outputted"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
node
:=
req
.
Context
()
.
Node
...
...
core/commands2/config.go
浏览文件 @
c468a4db
...
...
@@ -31,10 +31,8 @@ var configCmd = &cmds.Command{
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"key"
,
cmds
.
ArgString
,
true
,
false
,
"The key of the config entry (e.g.
\"
Addresses.API
\"
)"
},
cmds
.
Argument
{
"value"
,
cmds
.
ArgString
,
false
,
false
,
"The value to set the config entry to"
},
cmds
.
StringArg
(
"key"
,
true
,
false
,
"The key of the config entry (e.g.
\"
Addresses.API
\"
)"
),
cmds
.
StringArg
(
"value"
,
false
,
false
,
"The value to set the config entry to"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
args
:=
req
.
Arguments
()
...
...
core/commands2/log.go
浏览文件 @
c468a4db
...
...
@@ -14,10 +14,8 @@ output of a running daemon.
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"subsystem"
,
cmds
.
ArgString
,
true
,
false
,
"the subsystem logging identifier. Use * for all subsystems."
},
cmds
.
Argument
{
"level"
,
cmds
.
ArgString
,
true
,
false
,
"one of: debug, info, notice, warning, error, critical"
},
cmds
.
StringArg
(
"subsystem"
,
true
,
false
,
"the subsystem logging identifier. Use * for all subsystems."
),
cmds
.
StringArg
(
"level"
,
true
,
false
,
"one of: debug, info, notice, warning, error, critical"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
args
:=
req
.
Arguments
()
...
...
core/commands2/ls.go
浏览文件 @
c468a4db
...
...
@@ -31,8 +31,7 @@ it contains, with the following format:
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"ipfs-path"
,
cmds
.
ArgString
,
false
,
true
,
"The path to the IPFS object(s) to list links from"
},
cmds
.
StringArg
(
"ipfs-path"
,
false
,
true
,
"The path to the IPFS object(s) to list links from"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
node
:=
req
.
Context
()
.
Node
...
...
core/commands2/object.go
浏览文件 @
c468a4db
...
...
@@ -44,8 +44,7 @@ output is the raw data of the object.
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"key"
,
cmds
.
ArgString
,
true
,
false
,
"Key of the object to retrieve, in base58-encoded multihash format"
},
cmds
.
StringArg
(
"key"
,
true
,
false
,
"Key of the object to retrieve, in base58-encoded multihash format"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
n
:=
req
.
Context
()
.
Node
...
...
@@ -65,8 +64,7 @@ var objectLinksCmd = &cmds.Command{
It outputs to stdout, and <key> is a base58 encoded multihash.`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"key"
,
cmds
.
ArgString
,
true
,
false
,
"Key of the object to retrieve, in base58-encoded multihash format"
},
cmds
.
StringArg
(
"key"
,
true
,
false
,
"Key of the object to retrieve, in base58-encoded multihash format"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
n
:=
req
.
Context
()
.
Node
...
...
@@ -94,8 +92,7 @@ This command outputs data in the following encodings:
(Specified by the "--encoding" or "-enc" flags)`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"key"
,
cmds
.
ArgString
,
true
,
false
,
"Key of the object to retrieve
\n
(in base58-encoded multihash format)"
},
cmds
.
StringArg
(
"key"
,
true
,
false
,
"Key of the object to retrieve
\n
(in base58-encoded multihash format)"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
n
:=
req
.
Context
()
.
Node
...
...
@@ -146,10 +143,8 @@ Data should be in the format specified by <encoding>.
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"data"
,
cmds
.
ArgFile
,
true
,
false
,
"Data to be stored as a DAG object
\n
Must be encoded as specified in <encoding>"
},
cmds
.
Argument
{
"encoding"
,
cmds
.
ArgString
,
true
,
false
,
"Encoding type of <data>, either
\"
protobuf
\"
or
\"
json
\"
"
},
cmds
.
FileArg
(
"data"
,
true
,
false
,
"Data to be stored as a DAG object
\n
Must be encoded as specified in <encoding>"
),
cmds
.
StringArg
(
"encoding"
,
true
,
false
,
"Encoding type of <data>, either
\"
protobuf
\"
or
\"
json
\"
"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
n
:=
req
.
Context
()
.
Node
...
...
core/commands2/pin.go
浏览文件 @
c468a4db
...
...
@@ -25,8 +25,7 @@ on disk.
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"ipfs-path"
,
cmds
.
ArgString
,
true
,
true
,
"Path to object(s) to be pinned"
},
cmds
.
StringArg
(
"ipfs-path"
,
true
,
true
,
"Path to object(s) to be pinned"
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"recursive"
,
"r"
,
"Recursively pin the object linked to by the specified object(s)"
),
...
...
@@ -59,8 +58,7 @@ collected if needed.
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"ipfs-path"
,
cmds
.
ArgString
,
true
,
true
,
"Path to object(s) to be unpinned"
},
cmds
.
StringArg
(
"ipfs-path"
,
true
,
true
,
"Path to object(s) to be unpinned"
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"recursive"
,
"r"
,
"Recursively unpin the object linked to by the specified object(s)"
),
...
...
core/commands2/publish.go
浏览文件 @
c468a4db
...
...
@@ -34,10 +34,8 @@ Publish a <ref> to another public key:
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"name"
,
cmds
.
ArgString
,
false
,
false
,
"The IPNS name to publish to. Defaults to your node's peerID"
},
cmds
.
Argument
{
"ipfs-path"
,
cmds
.
ArgString
,
true
,
false
,
"IPFS path of the obejct to be published at <name>"
},
cmds
.
StringArg
(
"name"
,
false
,
false
,
"The IPNS name to publish to. Defaults to your node's peerID"
),
cmds
.
StringArg
(
"ipfs-path"
,
true
,
false
,
"IPFS path of the obejct to be published at <name>"
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
log
.
Debug
(
"Begin Publish"
)
...
...
core/commands2/refs.go
浏览文件 @
c468a4db
...
...
@@ -25,8 +25,7 @@ hashes it contains, with the following format:
Note: list all refs recursively with -r.`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"ipfs-path"
,
cmds
.
ArgString
,
true
,
true
,
"Path to the object(s) to list refs from"
},
cmds
.
StringArg
(
"ipfs-path"
,
true
,
true
,
"Path to the object(s) to list refs from"
),
},
Options
:
[]
cmds
.
Option
{
cmds
.
BoolOption
(
"unique"
,
"u"
,
"Omit duplicate refs from output"
),
...
...
core/commands2/resolve.go
浏览文件 @
c468a4db
...
...
@@ -28,8 +28,7 @@ Resolve te value of another name:
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"name"
,
cmds
.
ArgString
,
false
,
false
,
"The IPNS name to resolve. Defaults to your node's peerID."
},
cmds
.
StringArg
(
"name"
,
false
,
false
,
"The IPNS name to resolve. Defaults to your node's peerID."
),
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论