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
go-dms3
Commits
600bd08a
Commit
600bd08a
authored
Jan 22, 2018
by
ForrestWeston
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs for coreapi name method impls
License: MIT Signed-off-by:
ForrestWeston
<
forrest@protocol.ai
>
parent
252ddc82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
core/coreapi/name.go
core/coreapi/name.go
+5
-0
No files found.
core/coreapi/name.go
View file @
600bd08a
...
...
@@ -29,14 +29,17 @@ type ipnsEntry struct {
value
coreiface
.
Path
}
// Name returns the ipnsEntry name.
func
(
e
*
ipnsEntry
)
Name
()
string
{
return
e
.
name
}
// Value returns the ipnsEntry value.
func
(
e
*
ipnsEntry
)
Value
()
coreiface
.
Path
{
return
e
.
value
}
// Publish announces new IPNS name and returns the new IPNS entry.
func
(
api
*
NameAPI
)
Publish
(
ctx
context
.
Context
,
p
coreiface
.
Path
,
opts
...
caopts
.
NamePublishOption
)
(
coreiface
.
IpnsEntry
,
error
)
{
options
,
err
:=
caopts
.
NamePublishOptions
(
opts
...
)
if
err
!=
nil
{
...
...
@@ -82,6 +85,8 @@ func (api *NameAPI) Publish(ctx context.Context, p coreiface.Path, opts ...caopt
},
nil
}
// Resolve attempts to resolve the newest version of the specified name and
// returns its path.
func
(
api
*
NameAPI
)
Resolve
(
ctx
context
.
Context
,
name
string
,
opts
...
caopts
.
NameResolveOption
)
(
coreiface
.
Path
,
error
)
{
options
,
err
:=
caopts
.
NameResolveOptions
(
opts
...
)
if
err
!=
nil
{
...
...
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