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-ld-format
Commits
a7f84633
Commit
a7f84633
authored
Jun 16, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
depend on go-block-format
This way it's clear that all nodes are valid blocks.
parent
1e5ffb60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
format.go
format.go
+3
-8
package.json
package.json
+6
-0
No files found.
format.go
View file @
a7f84633
...
...
@@ -4,6 +4,8 @@ import (
"context"
"fmt"
blocks
"github.com/ipfs/go-block-format"
cid
"github.com/ipfs/go-cid"
)
...
...
@@ -18,14 +20,13 @@ type Resolver interface {
}
type
Node
interface
{
blocks
.
Block
Resolver
// ResolveLink is a helper function that calls resolve and asserts the
// output is a link
ResolveLink
(
path
[]
string
)
(
*
Link
,
[]
string
,
error
)
Cid
()
*
cid
.
Cid
// Copy returns a deep copy of this node
Copy
()
Node
...
...
@@ -37,12 +38,6 @@ type Node interface {
// Size returns the size in bytes of the serialized object
Size
()
(
uint64
,
error
)
// RawData marshals the node and returns the marshaled bytes
RawData
()
[]
byte
String
()
string
Loggable
()
map
[
string
]
interface
{}
}
type
NodeGetter
interface
{
...
...
package.json
View file @
a7f84633
...
...
@@ -12,6 +12,12 @@
"hash"
:
"QmZe3S3sXMWar3oPmrd8jHV8NoAWfPfLGFD8PsK3YrYpqv"
,
"name"
:
"go-cid"
,
"version"
:
"0.7.13"
},
{
"author"
:
"stebalien"
,
"hash"
:
"QmeK8xFAXx4GBpZG6mizck1XAunVtxP8Tmvir5FMwp5MYb"
,
"name"
:
"go-block-format"
,
"version"
:
"0.1.0"
}
],
"gxVersion"
:
"0.10.0"
,
...
...
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