Versions in this module Expand all Collapse all v1 v1.0.1 Jun 17, 2021 v1.0.0 Mar 26, 2021 Changes in this version + var ErrNotPinned = fmt.Errorf("not pinned") + func ModeToString(mode Mode) (string, bool) + type Mode int + const Any + const Direct + const Indirect + const Internal + const NotPinned + const Recursive + func StringToMode(s string) (Mode, bool) + type Pinned struct + Key *cid.Cid + Mode Mode + Via *cid.Cid + func (p Pinned) Pinned() bool + func (p Pinned) String() string + type Pinner interface + CheckIfPinned func(cids ...*cid.Cid) ([]Pinned, error) + DirectKeys func() []*cid.Cid + Flush func() error + InternalPins func() []*cid.Cid + IsPinned func(*cid.Cid) (string, bool, error) + IsPinnedWithType func(*cid.Cid, Mode) (string, bool, error) + Pin func(ctx context.Context, node ipld.Node, recursive bool) error + PinWithMode func(*cid.Cid, Mode) + RecursiveKeys func() []*cid.Cid + RemovePinWithMode func(*cid.Cid, Mode) + Unpin func(ctx context.Context, cid *cid.Cid, recursive bool) error + Update func(ctx context.Context, from, to *cid.Cid, unpin bool) error + func LoadPinner(d ds.Datastore, dserv, internal ipld.DAGService) (Pinner, error) + func NewPinner(dstore ds.Datastore, serv, internal ipld.DAGService) Pinner