Documentation ¶
Overview ¶
Package dshelp provides utilities for parsing and creating datastore keys used by go-ipfs
Index ¶
- func BinaryFromDsKey(k datastore.Key) ([]byte, error)deprecated
- func DsKeyToCidV1(dsKey datastore.Key, codecType uint64) (cid.Cid, error)deprecated
- func DsKeyToMultihash(dsKey datastore.Key) (mh.Multihash, error)deprecated
- func MultihashToDsKey(k mh.Multihash) datastore.Keydeprecated
- func NewKeyFromBinary(rawKey []byte) datastore.Keydeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryFromDsKey
deprecated
func DsKeyToCidV1
deprecated
added in
v0.1.0
DsKeyToCidV1Raw converts the given Key (which should be a raw multihash key) to a Cid V1 of the given type (see https://godoc.org/github.com/ipfs/go-cid#pkg-constants).
Deprecated: use github.com/ipfs/boxo/datastore/dshelp.DsKeyToCidV1
func DsKeyToMultihash
deprecated
added in
v0.1.0
func MultihashToDsKey
deprecated
added in
v0.1.0
MultihashToDsKey creates a Key from the given Multihash. If working with Cids, you can call cid.Hash() to obtain the multihash. Note that different CIDs might represent the same multihash.
Deprecated: use github.com/ipfs/boxo/datastore/dshelp.MultihashToDsKey
func NewKeyFromBinary
deprecated
func NewKeyFromBinary(rawKey []byte) datastore.Key
NewKeyFromBinary creates a new key from a byte slice.
Deprecated: use github.com/ipfs/boxo/datastore/dshelp.NewKeyFromBinary
Types ¶
This section is empty.