-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also, fix up its docs. Phew, those had old and badly misleading links.
- Loading branch information
Showing
3 changed files
with
27 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package ipld | ||
|
||
import ( | ||
"github.com/ipld/go-ipld-prime/datamodel" | ||
"github.com/ipld/go-ipld-prime/adl" | ||
) | ||
|
||
type ADL = datamodel.ADL | ||
type ADL = adl.ADL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package adl | ||
|
||
import ( | ||
"github.com/ipld/go-ipld-prime/datamodel" | ||
) | ||
|
||
// ADL is an interface denoting an Advanced Data Layout, | ||
// which is something that supports all the datamodel.Node operations, | ||
// but may be doing so using some custom internal logic. | ||
// | ||
// For more details, see the docs at | ||
// https://ipld.io/docs/advanced-data-layouts/ . | ||
// | ||
// This interface doesn't specify much new behavior, but it does include | ||
// the requirement of a way to tell an examiner about your "substrate", | ||
// since this concept does seem to be present in all ADLs. | ||
type ADL interface { | ||
datamodel.Node | ||
|
||
// Substrate returns the underlying Data Model node, which can be used | ||
// to encode an ADL's raw layout. | ||
// | ||
// Note that the substrate of an ADL can contain other ADLs! | ||
Substrate() datamodel.Node | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters