Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
interface-go-dms3-core
Commits
2c3137f0
Commit
2c3137f0
authored
Jan 22, 2018
by
ForrestWeston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interface docs for coreapi interface
License: MIT Signed-off-by:
ForrestWeston
<
forrest@protocol.ai
>
parent
d28b9301
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
interface.go
interface.go
+14
-1
No files found.
interface.go
View file @
2c3137f0
...
@@ -17,9 +17,13 @@ import (
...
@@ -17,9 +17,13 @@ import (
// Path is a generic wrapper for paths used in the API. A path can be resolved
// Path is a generic wrapper for paths used in the API. A path can be resolved
// to a CID using one of Resolve functions in the API.
// to a CID using one of Resolve functions in the API.
type
Path
interface
{
type
Path
interface
{
// String returns the path as a string.
String
()
string
String
()
string
// Cid returns cid referred to by path
Cid
()
*
cid
.
Cid
Cid
()
*
cid
.
Cid
// Root returns cid of root path
Root
()
*
cid
.
Cid
Root
()
*
cid
.
Cid
// Resolved returns whether path has been fully resolved
Resolved
()
bool
Resolved
()
bool
}
}
...
@@ -33,22 +37,31 @@ type Reader interface {
...
@@ -33,22 +37,31 @@ type Reader interface {
io
.
Closer
io
.
Closer
}
}
// IpnsEntry specifies the interface to IpnsEntries
type
IpnsEntry
interface
{
type
IpnsEntry
interface
{
// Name returns IpnsEntry name
Name
()
string
Name
()
string
// Value returns IpnsEntry value
Value
()
Path
Value
()
Path
}
}
// Key specifies the interface to Keys in KeyAPI Keystore
type
Key
interface
{
type
Key
interface
{
// Key returns key name
Name
()
string
Name
()
string
// Path returns key path
Path
()
Path
Path
()
Path
}
}
// 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
// Dag returns an implementation of Dag API.
Dag
()
DagAPI
Dag
()
DagAPI
// Name returns an implementation of Name API.
Name
()
NameAPI
Name
()
NameAPI
// Key returns an implementation of Key API.
Key
()
KeyAPI
Key
()
KeyAPI
// ResolvePath resolves the path using Unixfs resolver
// ResolvePath resolves the path using Unixfs resolver
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment