Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make UnixFSHAMTShard implement the ADL interface #11

Merged
merged 2 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions directory/basicdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

var _ ipld.Node = UnixFSBasicDir(nil)
var _ schema.TypedNode = UnixFSBasicDir(nil)
var _ ipld.ADL = UnixFSBasicDir(nil)

type UnixFSBasicDir = *_UnixFSBasicDir

Expand Down
5 changes: 5 additions & 0 deletions hamt/shardeddir.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (

var _ ipld.Node = UnixFSHAMTShard(nil)
var _ schema.TypedNode = UnixFSHAMTShard(nil)
var _ ipld.ADL = UnixFSHAMTShard(nil)

// UnixFSHAMTShared is an IPLD Prime Node that provides a read interface
// to a UnixFS HAMT
Expand Down Expand Up @@ -53,6 +54,10 @@ func NewUnixFSHAMTShard(ctx context.Context, substrate dagpb.PBNode, data data.U
}, nil
}

func (n UnixFSHAMTShard) Substrate() ipld.Node {
return n._substrate
}

func (n UnixFSHAMTShard) Kind() ipld.Kind {
return n._substrate.Kind()
}
Expand Down
1 change: 1 addition & 0 deletions pathpbnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

var _ ipld.Node = PathedPBNode(nil)
var _ schema.TypedNode = PathedPBNode(nil)
var _ ipld.ADL = PathedPBNode(nil)

type PathedPBNode = *_PathedPBNode

Expand Down