cidsets

package
v1.7.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2021 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCIDSet

func NewCIDSet(ds datastore.Batching) *cidSet

Types

type CIDSetManager

type CIDSetManager struct {
	// contains filtered or unexported fields
}

CIDSetManager keeps track of several CID sets, by SetID

func NewCIDSetManager

func NewCIDSetManager(ds datastore.Datastore) *CIDSetManager

func (*CIDSetManager) DeleteSet

func (mgr *CIDSetManager) DeleteSet(sid SetID) error

DeleteSet deletes a CID set

func (*CIDSetManager) InsertSetCID

func (mgr *CIDSetManager) InsertSetCID(sid SetID, c cid.Cid) (exists bool, err error)

InsertSetCID inserts a CID into a CID set. Returns true if the set already contained the CID.

func (*CIDSetManager) SetLen added in v1.6.1

func (mgr *CIDSetManager) SetLen(sid SetID) (int, error)

SetLen gets the number of CIDs in the set

func (*CIDSetManager) SetToArray added in v1.6.1

func (mgr *CIDSetManager) SetToArray(sid SetID) ([]cid.Cid, error)

SetToArray gets the set as an array of CIDs

type SetID

type SetID string

SetID is a unique ID for a CID set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL