提交 fa0fef33 作者: Łukasz Magiera

coreapi: minor doc fixes

License: MIT
Signed-off-by: 's avatarŁukasz Magiera <magik6k@gmail.com>
上级 f218b69e
......@@ -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}
}
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论