dshelp

package module
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: MIT Imports: 3 Imported by: 0

README

go-ipfs-ds-help

standard-readme compliant GoDoc Build Status

go-ipfs-ds-help provides utilities for parsing and creating datastore keys used by go-ipfs.

Table of Contents

Install

go-ipfs-ds-help works like a regular Go module:

> go get github.com/ipfs/go-ipfs-ds-help

Usage

import "github.com/ipfs/go-ipfs-ds-help"

Check the GoDoc documentation

This module uses Gx to manage dependencies. You can use make all to build it with the gx dependencies.

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Protocol Labs, Inc.

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

func BinaryFromDsKey(k datastore.Key) ([]byte, error)

BinaryFromDsKey returns the byte slice corresponding to the given Key.

func CidToDsKey

func CidToDsKey(k *cid.Cid) datastore.Key

CidToDsKey creates a Key from the given Cid.

func DsKeyToCid

func DsKeyToCid(dsKey datastore.Key) (*cid.Cid, error)

DsKeyToCid converts the given Key to its corresponding Cid.

func NewKeyFromBinary

func NewKeyFromBinary(rawKey []byte) datastore.Key

NewKeyFromBinary creates a new key from a byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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