Documentation ¶
Overview ¶
Package dshelp provides utilities for parsing and creating datastore keys used by go-ipfs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryFromDsKey ¶
BinaryFromDsKey returns the byte slice corresponding to the given Key.
func DsKeyToCidV1 ¶
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).
func DsKeyToMultihash ¶
DsKeyToMultihash converts a dsKey to the corresponding Multihash.
func MultihashToDsKey ¶
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.
func NewKeyFromBinary ¶
func NewKeyFromBinary(rawKey []byte) datastore.Key
NewKeyFromBinary creates a new key from a byte slice.
Types ¶
This section is empty.