Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
e700b165
提交
e700b165
authored
11月 13, 2014
作者:
Matt Bell
提交者:
Juan Batiz-Benet
11月 14, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ported remaining command helptext to HelpText struct
上级
6597a5f7
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
50 行增加
和
19 行删除
+50
-19
daemon.go
cmd/ipfs2/daemon.go
+4
-1
init.go
cmd/ipfs2/init.go
+4
-3
tour.go
cmd/ipfs2/tour.go
+9
-3
block.go
core/commands2/block.go
+7
-3
config.go
core/commands2/config.go
+10
-4
diag.go
core/commands2/diag.go
+3
-1
pin.go
core/commands2/pin.go
+3
-1
publish.go
core/commands2/publish.go
+10
-3
没有找到文件。
cmd/ipfs2/daemon.go
浏览文件 @
e700b165
...
...
@@ -15,8 +15,11 @@ import (
)
var
daemonCmd
=
&
cmds
.
Command
{
Helptext
:
cmds
.
HelpText
{
Tagline
:
"run a network-connected ipfs node"
,
// TODO adjust copy
},
Options
:
[]
cmds
.
Option
{},
Help
:
"run a network-connected ipfs node"
,
// TODO adjust copy
Subcommands
:
map
[
string
]
*
cmds
.
Command
{},
Run
:
daemonFunc
,
}
...
...
cmd/ipfs2/init.go
浏览文件 @
e700b165
...
...
@@ -15,9 +15,10 @@ import (
)
var
initCmd
=
&
cmds
.
Command
{
Description
:
"Initializes IPFS config file"
,
Help
:
`Initializes IPFS configuration files and generates a new keypair.
`
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Initializes IPFS config file"
,
ShortDescription
:
"Initializes IPFS configuration files and generates a new keypair."
,
},
Options
:
[]
cmds
.
Option
{
cmds
.
IntOption
(
"bits"
,
"b"
,
"Number of bits to use in the generated RSA private key (defaults to 4096)"
),
...
...
cmd/ipfs2/tour.go
浏览文件 @
e700b165
...
...
@@ -60,7 +60,9 @@ IPFS very quickly. To start, run:
}
var
cmdIpfsTourNext
=
&
cmds
.
Command
{
Description
:
"Show the next IPFS Tour topic"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Show the next IPFS Tour topic"
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
var
w
bytes
.
Buffer
...
...
@@ -90,7 +92,9 @@ var cmdIpfsTourNext = &cmds.Command{
}
var
cmdIpfsTourRestart
=
&
cmds
.
Command
{
Description
:
"Restart the IPFS Tour"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Restart the IPFS Tour"
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
path
:=
req
.
Context
()
.
ConfigRoot
...
...
@@ -109,7 +113,9 @@ var cmdIpfsTourRestart = &cmds.Command{
}
var
cmdIpfsTourList
=
&
cmds
.
Command
{
Description
:
"Show a list of IPFS Tour topics"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Show a list of IPFS Tour topics"
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
cfg
,
err
:=
req
.
Context
()
.
GetConfig
()
...
...
core/commands2/block.go
浏览文件 @
e700b165
...
...
@@ -80,9 +80,13 @@ It outputs to stdout, and <key> is a base58 encoded multihash.
}
var
blockPutCmd
=
&
cmds
.
Command
{
Description
:
"Stores input as an IPFS block"
,
Help
:
`ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.`
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Stores input as an IPFS block"
,
ShortDescription
:
`
ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.
`
,
},
Arguments
:
[]
cmds
.
Argument
{
cmds
.
FileArg
(
"data"
,
true
,
false
,
"The data to be stored as an IPFS block"
),
...
...
core/commands2/config.go
浏览文件 @
e700b165
...
...
@@ -116,10 +116,13 @@ Set the value of the 'datastore.path' key:
}
var
configShowCmd
=
&
cmds
.
Command
{
Description
:
"Outputs the content of the config file"
,
Help
:
`WARNING: Your private key is stored in the config file, and it will be
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Outputs the content of the config file"
,
ShortDescription
:
`
WARNING: Your private key is stored in the config file, and it will be
included in the output of this command.
`
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
filename
,
err
:=
config
.
Filename
(
req
.
Context
()
.
ConfigRoot
)
...
...
@@ -132,10 +135,13 @@ included in the output of this command.
}
var
configEditCmd
=
&
cmds
.
Command
{
Description
:
"Opens the config file for editing in $EDITOR"
,
Help
:
`To use 'ipfs config edit', you must have the $EDITOR environment
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Opens the config file for editing in $EDITOR"
,
ShortDescription
:
`
To use 'ipfs config edit', you must have the $EDITOR environment
variable set to your preferred text editor.
`
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
filename
,
err
:=
config
.
Filename
(
req
.
Context
()
.
ConfigRoot
)
...
...
core/commands2/diag.go
浏览文件 @
e700b165
...
...
@@ -29,7 +29,9 @@ type DiagnosticOutput struct {
}
var
diagCmd
=
&
cmds
.
Command
{
Description
:
"Generates diagnostic reports"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Generates diagnostic reports"
,
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"net"
:
diagNetCmd
,
...
...
core/commands2/pin.go
浏览文件 @
e700b165
...
...
@@ -10,7 +10,9 @@ import (
)
var
pinCmd
=
&
cmds
.
Command
{
Description
:
"Keeps objects stored locally"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Keeps objects stored locally"
,
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"add"
:
addPinCmd
,
...
...
core/commands2/publish.go
浏览文件 @
e700b165
...
...
@@ -14,8 +14,15 @@ import (
var
errNotOnline
=
errors
.
New
(
"This command must be run in online mode. Try running 'ipfs daemon' first."
)
var
publishCmd
=
&
cmds
.
Command
{
Description
:
"Publish an object to IPNS"
,
Help
:
`IPNS is a PKI namespace, where names are the hashes of public keys, and
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Publish an object to IPNS"
,
ShortDescription
:
`
IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
`
,
LongDescription
:
`
IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
...
...
@@ -30,8 +37,8 @@ Publish a <ref> to another public key:
> ipfs name publish QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
published name QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n to QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
`
,
},
Arguments
:
[]
cmds
.
Argument
{
cmds
.
StringArg
(
"name"
,
false
,
false
,
"The IPNS name to publish to. Defaults to your node's peerID"
),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论