Documentation ¶
Index ¶
- type DAG
- func (dag *DAG) Cat(ctx context.Context, c cid.Cid) (uio.DagReader, error)
- func (dag *DAG) GetFileSize(ctx context.Context, c cid.Cid) (uint64, error)
- func (dag *DAG) GetNode(ctx context.Context, ref string) (interface{}, error)
- func (dag *DAG) ImportData(ctx context.Context, data io.Reader) (ipld.Node, error)
- func (dag *DAG) RecursiveGet(ctx context.Context, c cid.Cid) ([]ipld.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAG ¶
type DAG struct {
// contains filtered or unexported fields
}
DAG is a service for accessing the merkledag
func (*DAG) Cat ¶
Cat returns an iostream with a piece of data stored on the merkeldag with the given cid.
TODO: this goes back to 'how is data stored and referenced' For now, lets just do things the ipfs way. https://github.com/filecoin-project/specs/issues/136
func (*DAG) GetFileSize ¶
GetFileSize returns the file size for a given Cid
func (*DAG) ImportData ¶
ImportData adds data from an io stream to the merkledag and returns the Cid of the given data
Click to show internal directories.
Click to hide internal directories.