Commit 260c0336 authored by Jeromy's avatar Jeromy

rename package and split up interfaces

parent d4cdacd6
go-ipld-node
go-ipld-format
==================
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
......@@ -7,7 +7,7 @@ go-ipld-node
[![Coverage Status](https://coveralls.io/repos/github/ipfs/go-ipld-node/badge.svg?branch=master)](https://coveralls.io/github/ipfs/go-ipld-node?branch=master)
[![Travis CI](https://travis-ci.org/ipfs/go-ipld-node.svg?branch=master)](https://travis-ci.org/ipfs/go-ipld-node)
> go-ipld-node is the official 'node' interface for ipld, the interplanetary linked data format.
> go-ipld-format is a set of interfaces that a type needs to implement in order to be a part of the ipld merkle-forest.
## Table of Contents
......
package node
package format
import (
"context"
......@@ -7,7 +7,7 @@ import (
cid "github.com/ipfs/go-cid"
)
type Node interface {
type Resolver interface {
// Resolve resolves a path through this node, stopping at any link boundary
// and returning the object found as well as the remaining path to traverse
Resolve(path []string) (interface{}, []string, error)
......@@ -15,6 +15,10 @@ type Node interface {
// Tree lists all paths within the object under 'path', and up to the given depth.
// To list the entire object (similar to `find .`) pass "" and -1
Tree(path string, depth int) []string
}
type Node interface {
Resolver
// ResolveLink is a helper function that calls resolve and asserts the
// output is a link
......
{
"author": "whyrusleeping",
"bugs": {
"url": "https://github.com/ipfs/go-ipld-node"
"url": "https://github.com/ipfs/go-ipld-format"
},
"gx": {
"dvcsimport": "github.com/ipfs/go-ipld-node"
"dvcsimport": "github.com/ipfs/go-ipld-format"
},
"gxDependencies": [
{
......@@ -17,7 +17,7 @@
"gxVersion": "0.10.0",
"language": "go",
"license": "",
"name": "go-ipld-node",
"name": "go-ipld-format",
"releaseCmd": "git commit -a -m \"gx publish $VERSION\"",
"version": "0.4.5"
}
......
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