@cryptotaxi247 / kubo / commits / fa0fef336

coreapi: minor doc fixes

License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>

Łukasz Magiera committed Mar 10, 2018 at 18:52 UTC fa0fef336df0ced721f933b29612121d753f1a31
2 files changed +15 -11
core/coreapi/coreapi.go
+7 -5
@@ -24,35 +24,37 @@ func NewCoreAPI(n *core.IpfsNode) coreiface.CoreAPI {
24 return api
25 }
26
27 -// Unixfs returns the UnixfsAPI interface backed by the go-ipfs node
27 +// Unixfs returns the UnixfsAPI interface implementation backed by the go-ipfs node
28 func (api *CoreAPI) Unixfs() coreiface.UnixfsAPI {
29 return (*UnixfsAPI)(api)
30 }
31
32 +// Block returns the BlockAPI interface implementation backed by the go-ipfs node
33 func (api *CoreAPI) Block() coreiface.BlockAPI {
34 return &BlockAPI{api, nil}
35 }
36
36 -// Dag returns the DagAPI interface backed by the go-ipfs node
37 +// Dag returns the DagAPI interface implementation backed by the go-ipfs node
38 func (api *CoreAPI) Dag() coreiface.DagAPI {
39 return &DagAPI{api, nil}
40 }
41
41 -// Name returns the NameAPI interface backed by the go-ipfs node
42 +// Name returns the NameAPI interface implementation backed by the go-ipfs node
43 func (api *CoreAPI) Name() coreiface.NameAPI {
44 return &NameAPI{api, nil}
45 }
46
46 -// Key returns the KeyAPI interface backed by the go-ipfs node
47 +// Key returns the KeyAPI interface implementation backed by the go-ipfs node
48 func (api *CoreAPI) Key() coreiface.KeyAPI {
49 return &KeyAPI{api, nil}
50 }
51
51 -//Object returns the ObjectAPI interface backed by the go-ipfs node
52 +//Object returns the ObjectAPI interface implementation backed by the go-ipfs node
53 func (api *CoreAPI) Object() coreiface.ObjectAPI {
54 return &ObjectAPI{api, nil}
55 }
56
57 +// Pin returns the PinAPI interface implementation backed by the go-ipfs node
58 func (api *CoreAPI) Pin() coreiface.PinAPI {
59 return &PinAPI{api, nil}
60 }
core/coreapi/interface/coreapi.go
+8 -6
@@ -8,22 +8,24 @@ import (
8 ipld "gx/ipfs/Qme5bWv7wtjUNGsK2BNGVUFPKiuxWrsqrtvYwCLRw8YFES/go-ipld-format"
9 )
10
11 -// CoreAPI defines an unified interface to IPFS for Go programs.
11 +// CoreAPI defines an unified interface to IPFS for Go programs
12 type CoreAPI interface {
13 - // Unixfs returns an implementation of Unixfs API.
13 + // Unixfs returns an implementation of Unixfs API
14 Unixfs() UnixfsAPI
15
16 - // Block returns an implementation of Block API.
16 + // Block returns an implementation of Block API
17 Block() BlockAPI
18
19 - // Dag returns an implementation of Dag API.
19 + // Dag returns an implementation of Dag API
20 Dag() DagAPI
21
22 - // Name returns an implementation of Name API.
22 + // Name returns an implementation of Name API
23 Name() NameAPI
24
25 - // Key returns an implementation of Key API.
25 + // Key returns an implementation of Key API
26 Key() KeyAPI
27 +
28 + // Pin returns an implementation of Pin API
29 Pin() PinAPI
30
31 // ObjectAPI returns an implementation of Object API