v0.4.4 Latest Latest

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

Go to latest
Published: Oct 10, 2016 License: MIT Imports: 6 Imported by: 0




This section is empty.


This section is empty.


func B58KeyEncode

func B58KeyEncode(k Key) string

B58KeyEncode returns Key in a b58 encoded string


type Key

type Key string

Key is a string representation of multihash for use with maps.

func B58KeyDecode

func B58KeyDecode(s string) Key

B58KeyDecode returns Key from a b58 encoded string

func KeyFromDsKey

func KeyFromDsKey(dsk ds.Key) (Key, error)

KeyFromDsKey returns a Datastore key

func (Key) B58String

func (k Key) B58String() string

B58String returns Key in a b58 encoded string

func (Key) DsKey

func (k Key) DsKey() ds.Key

DsKey returns a Datastore key

func (*Key) Loggable

func (k *Key) Loggable() map[string]interface{}

func (*Key) MarshalJSON

func (k *Key) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON-encoded Key (string)

func (Key) String

func (k Key) String() string

String is utililty function for printing out keys as strings (Pretty).

func (Key) ToMultihash

func (k Key) ToMultihash() mh.Multihash

func (*Key) UnmarshalJSON

func (k *Key) UnmarshalJSON(mk []byte) error

UnmarshalJSON returns a JSON-encoded Key (string)

type KeySet

type KeySet interface {
	Has(Key) bool
	Keys() []Key

func NewKeySet

func NewKeySet() KeySet

type KeySlice

type KeySlice []Key

KeySlice is used for sorting Keys

func (KeySlice) Len

func (es KeySlice) Len() int

func (KeySlice) Less

func (es KeySlice) Less(i, j int) bool

func (KeySlice) Swap

func (es KeySlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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