Documentation
¶
Index ¶
- Constants
- Variables
- type Decoder
- type KV
- type Meta
- func (m *Meta) Add(key, value []byte) error
- func (m *Meta) AddCid(key []byte, value cid.Cid) error
- func (m *Meta) AddString(key []byte, value string) error
- func (m *Meta) AddUint64(key []byte, value uint64) error
- func (m *Meta) Bytes() []byte
- func (m *Meta) Count(key []byte) int
- func (m Meta) Get(key []byte) ([]byte, bool)
- func (m Meta) GetAll(key []byte) [][]byte
- func (m Meta) GetCid(key []byte) (cid.Cid, bool)
- func (m Meta) GetString(key []byte) (string, bool)
- func (m Meta) GetUint64(key []byte) (uint64, bool)
- func (m Meta) HasDuplicateKeys() bool
- func (m Meta) MarshalBinary() ([]byte, error)
- func (m Meta) ReadFirst(key []byte, valueDst []byte) int
- func (m *Meta) Remove(key []byte)
- func (m *Meta) Replace(key, value []byte) error
- func (m *Meta) UnmarshalBinary(b []byte) error
- func (m *Meta) UnmarshalWithDecoder(decoder Decoder) error
Constants ¶
View Source
const ( MaxNumKVs = 255 MaxKeySize = 255 MaxValueSize = 255 )
Variables ¶
View Source
var ( MetadataKey_Epoch = []byte("epoch") MetadataKey_RootCid = []byte("rootCid") MetadataKey_Network = []byte("network") )
View Source
var MetadataKey_Kind = []byte{'k', 'i', 'n', 'd'}
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct {
KeyVals []KV
}
func (Meta) HasDuplicateKeys ¶
HasDuplicateKeys returns true if there are duplicate keys.
func (Meta) MarshalBinary ¶
func (Meta) ReadFirst ¶
ReadFirst copies the first value for the given key into the given value. It returns the number of bytes copied.
func (*Meta) UnmarshalBinary ¶
func (*Meta) UnmarshalWithDecoder ¶
Click to show internal directories.
Click to hide internal directories.