go-cidutil: github.com/ipfs/go-cidutil/cidenc Index | Files

package cidenc

import "github.com/ipfs/go-cidutil/cidenc"

Index

Package Files

encoder.go

type Encoder Uses

type Encoder struct {
    Base    mbase.Encoder // The multibase to use
    Upgrade bool          // If true upgrade CIDv0 to CIDv1 when encoding
}

Encoder is a basic Encoder that will encode CIDs using a specified base and optionally upgrade a CIDv0 to CIDv1

func Default Uses

func Default() Encoder

Default return a new default encoder

func (Encoder) Encode Uses

func (enc Encoder) Encode(c cid.Cid) string

Encode encodes the cid using the parameters of the Encoder

func (Encoder) Recode Uses

func (enc Encoder) Recode(v string) (string, error)

Recode reencodes the cid string to match the parameters of the encoder

Package cidenc imports 2 packages (graph) and is imported by 19 packages. Updated 2019-06-13. Refresh now. Tools for package owners.