Documentation
¶
Index ¶
- Constants
- Variables
- type Cid
- func (c *Cid) Bytes() []byte
- func (c *Cid) Equals(o *Cid) bool
- func (c *Cid) Hash() mh.Multihash
- func (c *Cid) KeyString() string
- func (c *Cid) Loggable() map[string]interface{}
- func (c *Cid) MarshalJSON() ([]byte, error)
- func (c *Cid) Prefix() Prefix
- func (c *Cid) String() string
- func (c *Cid) Type() uint64
- func (c *Cid) UnmarshalJSON(b []byte) error
- type Prefix
- type Set
Constants ¶
View Source
const ( Protobuf = 0x70 CBOR = 0x71 Raw = 0x72 JSON = 0x73 EthereumBlock = 0x90 EthereumTx = 0x91 BitcoinBlock = 0xb0 BitcoinTx = 0xb1 ZcashBlock = 0xc0 ZcashTx = 0xc1 )
View Source
const UnsupportedVersionString = "<unsupported cid version>"
Variables ¶
View Source
var ( ErrVarintBuffSmall = errors.New("reading varint: buffer to small") ErrVarintTooBig = errors.New("reading varint: varint bigger than 64bits" + " and not supported") )
Functions ¶
This section is empty.
Types ¶
type Cid ¶
type Cid struct {
// contains filtered or unexported fields
}
func (*Cid) MarshalJSON ¶
func (*Cid) UnmarshalJSON ¶
type Prefix ¶
Prefix represents all the metadata of a cid, minus any actual content information
func PrefixFromBytes ¶
Click to show internal directories.
Click to hide internal directories.