Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMetadataTo ¶
func AddMetadataTo(n *core.IpfsNode, skey string, m *ft.Metadata) (string, error)
Types ¶
type Adder ¶ added in v0.4.0
type Adder struct {
Out chan<- interface{}
Progress bool
Hidden bool
Pin bool
Trickle bool
RawLeaves bool
Silent bool
Wrap bool
Name string
NoCopy bool
Chunker string
CidBuilder cid.Builder
// contains filtered or unexported fields
}
Adder holds the switches passed to the `add` command.
func NewAdder ¶ added in v0.4.0
func NewAdder(ctx context.Context, p pin.Pinner, bs bstore.GCLocker, ds ipld.DAGService) (*Adder, error)
NewAdder Returns a new Adder used for a file add operation.
func (*Adder) AddAllAndPin ¶ added in v0.4.18
func (adder *Adder) AddAllAndPin(file files.Node) (ipld.Node, error)
AddAllAndPin adds the given request's files and pin them.
func (*Adder) Finalize ¶ added in v0.4.0
func (adder *Adder) Finalize() (ipld.Node, error)
Finalize flushes the mfs root directory and returns the mfs root node.
func (*Adder) PinRoot ¶ added in v0.4.0
func (adder *Adder) PinRoot() error
Recursively pins the root node of Adder and writes the pin state to the backing datastore.
func (*Adder) RootNode ¶ added in v0.4.0
func (adder *Adder) RootNode() (ipld.Node, error)
RootNode returns the root node of the Added.
func (*Adder) SetMfsRoot ¶ added in v0.4.3
func (adder *Adder) SetMfsRoot(r *mfs.Root)
SetMfsRoot sets `r` as the root for Adder.
Click to show internal directories.
Click to hide internal directories.