Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
fa0fef33
提交
fa0fef33
authored
3月 10, 2018
作者:
Łukasz Magiera
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
coreapi: minor doc fixes
License: MIT Signed-off-by:
Łukasz Magiera
<
magik6k@gmail.com
>
上级
f218b69e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
11 行删除
+15
-11
coreapi.go
core/coreapi/coreapi.go
+7
-5
coreapi.go
core/coreapi/interface/coreapi.go
+8
-6
没有找到文件。
core/coreapi/coreapi.go
浏览文件 @
fa0fef33
...
...
@@ -24,35 +24,37 @@ func NewCoreAPI(n *core.IpfsNode) coreiface.CoreAPI {
return
api
}
// Unixfs returns the UnixfsAPI interface backed by the go-ipfs node
// Unixfs returns the UnixfsAPI interface
implementation
backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Unixfs
()
coreiface
.
UnixfsAPI
{
return
(
*
UnixfsAPI
)(
api
)
}
// Block returns the BlockAPI interface implementation backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Block
()
coreiface
.
BlockAPI
{
return
&
BlockAPI
{
api
,
nil
}
}
// Dag returns the DagAPI interface backed by the go-ipfs node
// Dag returns the DagAPI interface
implementation
backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Dag
()
coreiface
.
DagAPI
{
return
&
DagAPI
{
api
,
nil
}
}
// Name returns the NameAPI interface backed by the go-ipfs node
// Name returns the NameAPI interface
implementation
backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Name
()
coreiface
.
NameAPI
{
return
&
NameAPI
{
api
,
nil
}
}
// Key returns the KeyAPI interface backed by the go-ipfs node
// Key returns the KeyAPI interface
implementation
backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Key
()
coreiface
.
KeyAPI
{
return
&
KeyAPI
{
api
,
nil
}
}
//Object returns the ObjectAPI interface backed by the go-ipfs node
//Object returns the ObjectAPI interface
implementation
backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Object
()
coreiface
.
ObjectAPI
{
return
&
ObjectAPI
{
api
,
nil
}
}
// Pin returns the PinAPI interface implementation backed by the go-ipfs node
func
(
api
*
CoreAPI
)
Pin
()
coreiface
.
PinAPI
{
return
&
PinAPI
{
api
,
nil
}
}
...
...
core/coreapi/interface/coreapi.go
浏览文件 @
fa0fef33
...
...
@@ -8,22 +8,24 @@ import (
ipld
"gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/go-ipld-format"
)
// CoreAPI defines an unified interface to IPFS for Go programs
.
// CoreAPI defines an unified interface to IPFS for Go programs
type
CoreAPI
interface
{
// Unixfs returns an implementation of Unixfs API
.
// Unixfs returns an implementation of Unixfs API
Unixfs
()
UnixfsAPI
// Block returns an implementation of Block API
.
// Block returns an implementation of Block API
Block
()
BlockAPI
// Dag returns an implementation of Dag API
.
// Dag returns an implementation of Dag API
Dag
()
DagAPI
// Name returns an implementation of Name API
.
// Name returns an implementation of Name API
Name
()
NameAPI
// Key returns an implementation of Key API
.
// Key returns an implementation of Key API
Key
()
KeyAPI
// Pin returns an implementation of Pin API
Pin
()
PinAPI
// ObjectAPI returns an implementation of Object API
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论