Documentation ¶
Index ¶
- func Add(n *core.IpfsNode, r io.Reader) (string, error)
- func AddMetadataTo(n *core.IpfsNode, skey string, m *ft.Metadata) (string, error)
- func AddR(n *core.IpfsNode, root string) (key string, err error)
- func AddWrapped(n *core.IpfsNode, r io.Reader, filename string) (string, *dag.Node, error)
- func Cat(ctx context.Context, n *core.IpfsNode, pstr string) (*uio.DagReader, error)
- func Metadata(n *core.IpfsNode, skey string) (*ft.Metadata, error)
- func NewDirNode() *dag.Node
- func NewMemoryDagService() dag.DAGService
- type AddedObject
- type Adder
- type Link
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add builds a merkledag from the a reader, pinning all objects to the local datastore. Returns a key representing the root node.
func AddMetadataTo ¶
func AddWrapped ¶
AddWrapped adds data from a reader, and wraps it with a directory object to preserve the filename. Returns the path of the added file ("<dir hash>/filename"), the DAG node of the directory, and and error if any.
func NewMemoryDagService ¶ added in v0.4.0
func NewMemoryDagService() dag.DAGService
Types ¶
type AddedObject ¶ added in v0.4.0
type Adder ¶ added in v0.4.0
type Adder struct { Out chan interface{} Progress bool Hidden bool Pin bool Trickle bool Silent bool Wrap bool Chunker string // contains filtered or unexported fields }
Internal structure for holding the switches passed to the `add` call
func NewAdder ¶ added in v0.4.0
func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCBlockstore, ds dag.DAGService) (*Adder, error)
func (*Adder) SetMfsRoot ¶ added in v0.4.3
Click to show internal directories.
Click to hide internal directories.