Commit a7f84633 authored by Steven Allen's avatar Steven Allen

depend on go-block-format

This way it's clear that all nodes are valid blocks.
parent 1e5ffb60
......@@ -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 {
......
......@@ -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",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment