Versions in this module Expand all Collapse all v0 v0.1.1 Jun 10, 2020 Changes in this version + const DefaultDurationCount + const DefaultDurationUnit + var ErrNotPinned = fmt.Errorf("not pinned or pinned indirectly") + func ExpiresAt(dur time.Duration) uint64 + func ExpiresAtWithUnitAndCount(durationUnit time.Duration, durationCount int64) (uint64, error) + func LoadMap(d ds.Datastore, k ds.Key) (*cid.Map, error) + 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(ctx context.Context, cids ...cid.Cid) ([]Pinned, error) + DirectKeys func(ctx context.Context) ([]cid.Cid, error) + DirectMap func(ctx context.Context) (*cid.Map, error) + Flush func(ctx context.Context) error + HasExpiration func(ctx context.Context, cid cid.Cid) (bool, error) + InternalPins func(ctx context.Context) ([]cid.Cid, error) + IsExpiredPin func(ctx context.Context, c cid.Cid) bool + IsPinned func(ctx context.Context, c cid.Cid) (string, bool, error) + IsPinnedWithType func(ctx context.Context, c cid.Cid, mode Mode) (string, bool, error) + Pin func(ctx context.Context, node ipld.Node, recursive bool, expir uint64) error + PinWithMode func(cid.Cid, uint64, Mode) + RecursiveKeys func(ctx context.Context) ([]cid.Cid, error) + RecursiveMap func(ctx context.Context) (*cid.Map, error) + 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