提交 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 { ...@@ -24,35 +24,37 @@ func NewCoreAPI(n *core.IpfsNode) coreiface.CoreAPI {
return api 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 { func (api *CoreAPI) Unixfs() coreiface.UnixfsAPI {
return (*UnixfsAPI)(api) return (*UnixfsAPI)(api)
} }
// Block returns the BlockAPI interface implementation backed by the go-ipfs node
func (api *CoreAPI) Block() coreiface.BlockAPI { func (api *CoreAPI) Block() coreiface.BlockAPI {
return &BlockAPI{api, nil} 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 { func (api *CoreAPI) Dag() coreiface.DagAPI {
return &DagAPI{api, nil} 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 { func (api *CoreAPI) Name() coreiface.NameAPI {
return &NameAPI{api, nil} 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 { func (api *CoreAPI) Key() coreiface.KeyAPI {
return &KeyAPI{api, nil} 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 { func (api *CoreAPI) Object() coreiface.ObjectAPI {
return &ObjectAPI{api, nil} return &ObjectAPI{api, nil}
} }
// Pin returns the PinAPI interface implementation backed by the go-ipfs node
func (api *CoreAPI) Pin() coreiface.PinAPI { func (api *CoreAPI) Pin() coreiface.PinAPI {
return &PinAPI{api, nil} return &PinAPI{api, nil}
} }
......
...@@ -8,22 +8,24 @@ import ( ...@@ -8,22 +8,24 @@ import (
ipld "gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/go-ipld-format" 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 { type CoreAPI interface {
// Unixfs returns an implementation of Unixfs API. // Unixfs returns an implementation of Unixfs API
Unixfs() UnixfsAPI Unixfs() UnixfsAPI
// Block returns an implementation of Block API. // Block returns an implementation of Block API
Block() BlockAPI Block() BlockAPI
// Dag returns an implementation of Dag API. // Dag returns an implementation of Dag API
Dag() DagAPI Dag() DagAPI
// Name returns an implementation of Name API. // Name returns an implementation of Name API
Name() NameAPI Name() NameAPI
// Key returns an implementation of Key API. // Key returns an implementation of Key API
Key() KeyAPI Key() KeyAPI
// Pin returns an implementation of Pin API
Pin() PinAPI Pin() PinAPI
// ObjectAPI returns an implementation of Object API // ObjectAPI returns an implementation of Object API
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论