Documentation
¶
Index ¶
- Constants
- func AESPad(input []byte) []byte
- func Base58Decode(b string) []byte
- func Base58Encode(b []byte) string
- func Close(f *os.File)
- func DecodeUvarint64(buf []byte) (uint64, int, error)
- func DecodeVarchar(buf []byte) ([]byte, int, error)
- func DecodeVarint64(buf []byte) (int64, int, error)
- func ECDSACalculateY(curve elliptic.Curve, x *big.Int) *big.Int
- func ECDSAGenerateKey() *ecdsa.PrivateKey
- func ECDSAGetPrivateKey(priv_bytes []byte) *ecdsa.PrivateKey
- func ECDSAGetPublicKey(pub_bytes []byte) *ecdsa.PublicKey
- func ECDSASign(priv_key *ecdsa.PrivateKey, hash []byte) (r, s *big.Int, err error)
- func ECDSAVerify(pub_key *ecdsa.PublicKey, hash []byte, r, s *big.Int) bool
- func EncodeUvarint64(data uint64) []byte
- func EncodeVarchar(data []byte) []byte
- func EncodeVarint64(data int64) []byte
- func LCExistPrivKey(cls int, id string) bool
- func LCExistPubKey(cls int, id string) bool
- func LCGetEtcDir(cls int) string
- func LCLoadPrivKey(cls int, id string, secret []byte) (*ecdsa.PrivateKey, error)
- func LCLoadPrivKeyPrompt(cls int, id string) (*ecdsa.PrivateKey, error)
- func LCLoadPubKey(cls int, id string) (*ecdsa.PublicKey, error)
- func LCSaveKeyPair(cls int, id string, pub_key, priv_key *big.Int, secret []byte) error
- func LCSaveKeyPairPrompt(cls int, id string, pub_key, priv_key *big.Int) error
- func LCSetLoggerFileTmp() error
- func LCSetLoggerStdout() error
- func Open(filename string) *os.File
- func PromptPassphrase(repeat bool) ([]byte, error)
- func PromptText(prompt string) string
- func RandInt16() int16
- func RandInt16Range(min, max int16) int16
- func RandInt32() int32
- func RandInt32Range(min, max int32) int32
- func RandInt64() int64
- func RandInt64Range(min, max int64) int64
- func RandInt8() int8
- func RandInt8Range(min, max int8) int8
- func RandUint16() uint16
- func RandUint16Range(min, max uint16) uint16
- func RandUint32() uint32
- func RandUint32Range(min, max uint32) uint32
- func RandUint64() uint64
- func RandUint64Range(min, max uint64) uint64
- func RandUint8() uint8
- func RandUint8Range(min, max uint8) uint8
- func SumMD5(data []byte) []byte
- func SumSHA256(data []byte) []byte
- func SumSHA256d(data []byte) []byte
- func Sync(f *os.File)
- func Ternary(statement bool, a, b interface{}) interface{}
- func Write(f *os.File, size int)
- type EmptyKey
- func (k *EmptyKey) Buf() []byte
- func (k *EmptyKey) Compare(c collection.IComparable) int
- func (k *EmptyKey) Copy() IEncodable
- func (k *EmptyKey) CopyConstruct() (IEncodable, error)
- func (k *EmptyKey) Decode(IContext) (int, error)
- func (k *EmptyKey) Encode(IContext) error
- func (k *EmptyKey) Equal(o collection.IObject) bool
- func (k *EmptyKey) EstBufSize() int
- func (k *EmptyKey) HashUint32(f func([]byte) uint32) uint32
- func (k *EmptyKey) IsDecoded() bool
- func (k *EmptyKey) IsEmpty() bool
- func (k *EmptyKey) IsEncoded() bool
- func (k *EmptyKey) Key() [][]byte
- func (k *EmptyKey) Print(w io.Writer, indent int)
- func (k *EmptyKey) SubKeyAt(idx int) []byte
- func (k *EmptyKey) ToString() string
- type ICompressEncoder
- type IConsensusID
- type IConsensusTime
- type IContext
- type IEncodable
- type IKey
- type ILookupEncoder
- type IRecord
- type IScheme
- type ITrie
- type ITrieIterator
- type ITrieNode
- type IValue
- type Key
- func (k *Key) Add(subKey []byte) *Key
- func (k *Key) Buf() []byte
- func (k *Key) Compare(c collection.IComparable) int
- func (k *Key) Copy() IEncodable
- func (k *Key) CopyConstruct() (IEncodable, error)
- func (k *Key) Decode(IContext) (int, error)
- func (k *Key) Encode(IContext) error
- func (k *Key) Equal(o collection.IObject) bool
- func (k *Key) EstBufSize() int
- func (k *Key) HashUint32(f func([]byte) uint32) uint32
- func (k *Key) IsDecoded() bool
- func (k *Key) IsEmpty() bool
- func (k *Key) IsEncoded() bool
- func (k *Key) Key() [][]byte
- func (k *Key) Print(w io.Writer, indent int)
- func (k *Key) SubKeyAt(idx int) []byte
- func (k *Key) ToString() string
- type LedgerTime
- func (t *LedgerTime) Buf() []byte
- func (t *LedgerTime) EQ(ict IConsensusTime) (bool, error)
- func (t *LedgerTime) GE(ict IConsensusTime) (bool, error)
- func (t *LedgerTime) GT(ict IConsensusTime) (bool, error)
- func (t *LedgerTime) LE(ict IConsensusTime) (bool, error)
- func (t *LedgerTime) LT(ict IConsensusTime) (bool, error)
- func (t *LedgerTime) NE(ict IConsensusTime) (bool, error)
- type MPHTable
- type MappedConsensusID
- type MappedKey
- func (k *MappedKey) Buf() []byte
- func (k *MappedKey) Compare(c collection.IComparable) int
- func (k *MappedKey) Copy() IEncodable
- func (k *MappedKey) CopyConstruct() (IEncodable, error)
- func (k *MappedKey) Decode(IContext) (int, error)
- func (k *MappedKey) Encode(IContext) error
- func (k *MappedKey) Equal(o collection.IObject) bool
- func (k *MappedKey) EstBufSize() int
- func (k *MappedKey) HashUint32(f func([]byte) uint32) uint32
- func (k *MappedKey) IsDecoded() bool
- func (k *MappedKey) IsEmpty() bool
- func (k *MappedKey) IsEncoded() bool
- func (k *MappedKey) Key() [][]byte
- func (k *MappedKey) Print(w io.Writer, indent int)
- func (k *MappedKey) SubKeyAt(idx int) []byte
- func (k *MappedKey) ToString() string
- type MappedRecord
- func (r *MappedRecord) Buf() []byte
- func (r *MappedRecord) Copy() IEncodable
- func (r *MappedRecord) CopyConstruct() (IEncodable, error)
- func (r *MappedRecord) Decode(IContext) (length int, err error)
- func (r *MappedRecord) Encode(IContext) error
- func (r *MappedRecord) EstBufSize() int
- func (r *MappedRecord) IsDecoded() bool
- func (r *MappedRecord) IsEncoded() bool
- func (r *MappedRecord) Key() IKey
- func (r *MappedRecord) RecordMagic() byte
- func (r *MappedRecord) Scheme() IValue
- func (r *MappedRecord) Signature() (*big.Int, *big.Int)
- func (r *MappedRecord) Timestamp() *time.Time
- func (r *MappedRecord) Value() IValue
- type MappedScheme
- func (s *MappedScheme) BucketAt(idx int) []byte
- func (s *MappedScheme) Buckets() [][]byte
- func (s *MappedScheme) Buf() []byte
- func (s *MappedScheme) Copy() IEncodable
- func (s *MappedScheme) CopyConstruct() (IEncodable, error)
- func (s *MappedScheme) Decode(IContext) (int, error)
- func (s *MappedScheme) Domain() []byte
- func (s *MappedScheme) DomainName() string
- func (s *MappedScheme) Encode(IContext) error
- func (s *MappedScheme) EstBufSize() int
- func (s *MappedScheme) IsDecoded() bool
- func (s *MappedScheme) IsEncoded() bool
- func (s *MappedScheme) SchemeMagic() byte
- func (s *MappedScheme) Tablet() []byte
- func (s *MappedScheme) TabletName() string
- type MappedTrie
- func (t *MappedTrie) Buf() []byte
- func (t *MappedTrie) Copy() IEncodable
- func (t *MappedTrie) CopyConstruct() (IEncodable, error)
- func (t *MappedTrie) Decode(IContext) (int, error)
- func (t *MappedTrie) Encode(IContext) error
- func (t *MappedTrie) EstBufSize() int
- func (t *MappedTrie) Get(k IKey) IValue
- func (t *MappedTrie) IsDecoded() bool
- func (t *MappedTrie) IsEncoded() bool
- func (t *MappedTrie) Iterator() ITrieIterator
- func (t *MappedTrie) KeyIterator(k IKey) ITrieIterator
- func (t *MappedTrie) Print(w io.Writer, indent int)
- func (t *MappedTrie) RangeIterator(start, end IKey) ITrieIterator
- func (t *MappedTrie) Set(IKey, IValue) IValue
- func (t *MappedTrie) ToString() string
- type MappedTrieNode
- func (tn *MappedTrieNode) Buf() []byte
- func (tn *MappedTrieNode) ChildSize() int
- func (tn *MappedTrieNode) Children() *collection.SortedMap
- func (tn *MappedTrieNode) Copy() IEncodable
- func (tn *MappedTrieNode) CopyConstruct() (IEncodable, error)
- func (tn *MappedTrieNode) Decode(IContext) (int, error)
- func (tn *MappedTrieNode) Encode(IContext) error
- func (tn *MappedTrieNode) EstBufSize() int
- func (tn *MappedTrieNode) FullKey() IKey
- func (tn *MappedTrieNode) GetChild(nodeKey []byte) ITrieNode
- func (tn *MappedTrieNode) IsDecoded() bool
- func (tn *MappedTrieNode) IsEncoded() bool
- func (tn *MappedTrieNode) NodeKey() []byte
- func (tn *MappedTrieNode) Offset() uint32
- func (tn *MappedTrieNode) Parent() ITrieNode
- func (tn *MappedTrieNode) Print(w io.Writer, indent int)
- func (tn *MappedTrieNode) PutChild(nodeKey []byte, n ITrieNode) error
- func (tn *MappedTrieNode) RemoveChild(nodeKey []byte) error
- func (tn *MappedTrieNode) SetOffset(uint32) error
- func (tn *MappedTrieNode) SetValue(IValue) error
- func (tn *MappedTrieNode) ToString() string
- func (tn *MappedTrieNode) Value() IValue
- type Primitive
- func (d *Primitive) Buf() []byte
- func (d *Primitive) CompressEncoder() ICompressEncoder
- func (d *Primitive) Copy() IEncodable
- func (d *Primitive) CopyConstruct() (IEncodable, error)
- func (d *Primitive) Decode(IContext) (int, error)
- func (d *Primitive) Encode(IContext) error
- func (d *Primitive) EstBufSize() int
- func (d *Primitive) IsDecoded() bool
- func (d *Primitive) IsEncoded() bool
- func (d *Primitive) IsNil() bool
- func (d *Primitive) IsPrimitive() bool
- func (d *Primitive) IsRecordList() bool
- func (d *Primitive) IsValueArray() bool
- func (d *Primitive) LookupEncoder() ILookupEncoder
- func (d *Primitive) RecordAt(idx uint16) (IRecord, error)
- func (d *Primitive) Size() uint16
- func (d *Primitive) Value() []byte
- func (d *Primitive) ValueAt(idx uint16) (IValue, error)
- func (d *Primitive) ValueMagic() byte
- type RaftTime
- func (t *RaftTime) Buf() []byte
- func (t *RaftTime) EQ(ict IConsensusTime) (bool, error)
- func (t *RaftTime) GE(ict IConsensusTime) (bool, error)
- func (t *RaftTime) GT(ict IConsensusTime) (bool, error)
- func (t *RaftTime) LE(ict IConsensusTime) (bool, error)
- func (t *RaftTime) LT(ict IConsensusTime) (bool, error)
- func (t *RaftTime) NE(ict IConsensusTime) (bool, error)
- type Record
- func (r *Record) Buf() []byte
- func (r *Record) Copy() IEncodable
- func (r *Record) CopyConstruct() (IEncodable, error)
- func (r *Record) Decode(IContext) (int, error)
- func (r *Record) Encode(IContext) error
- func (r *Record) EstBufSize() int
- func (r *Record) IsDecoded() bool
- func (r *Record) IsEncoded() bool
- func (r *Record) Key() IKey
- func (r *Record) RecordMagic() byte
- func (r *Record) Scheme() IValue
- func (r *Record) SetK(key []byte) *Record
- func (r *Record) SetKey(key IKey) *Record
- func (r *Record) SetS(scheme []byte) *Record
- func (r *Record) SetScheme(scheme IValue) *Record
- func (r *Record) SetSignature(R, S *big.Int) *Record
- func (r *Record) SetTimestamp(t *time.Time) *Record
- func (r *Record) SetV(value []byte) *Record
- func (r *Record) SetValue(value IValue) *Record
- func (r *Record) Signature() (*big.Int, *big.Int)
- func (r *Record) Timestamp() *time.Time
- func (r *Record) Value() IValue
- type RecordList
- func (d *RecordList) Append(record IRecord) *RecordList
- func (d *RecordList) Buf() []byte
- func (d *RecordList) CompressEncoder() ICompressEncoder
- func (d *RecordList) Copy() IEncodable
- func (d *RecordList) CopyConstruct() (IEncodable, error)
- func (d *RecordList) Decode(IContext) (int, error)
- func (d *RecordList) DeleteAt(idx uint16) *RecordList
- func (d *RecordList) Encode(IContext) error
- func (d *RecordList) EstBufSize() int
- func (d *RecordList) IsDecoded() bool
- func (d *RecordList) IsEncoded() bool
- func (d *RecordList) IsNil() bool
- func (d *RecordList) IsPrimitive() bool
- func (d *RecordList) IsRecordList() bool
- func (d *RecordList) IsValueArray() bool
- func (d *RecordList) LookupEncoder() ILookupEncoder
- func (d *RecordList) RecordAt(idx uint16) (IRecord, error)
- func (d *RecordList) Size() uint16
- func (d *RecordList) Value() []byte
- func (d *RecordList) ValueAt(idx uint16) (IValue, error)
- func (d *RecordList) ValueMagic() byte
- type Scheme
- func (s *Scheme) BucketAt(idx int) []byte
- func (s *Scheme) Buckets() [][]byte
- func (s *Scheme) Buf() []byte
- func (s *Scheme) Copy() IEncodable
- func (s *Scheme) CopyConstruct() (IEncodable, error)
- func (s *Scheme) Decode(IContext) (int, error)
- func (s *Scheme) Domain() []byte
- func (s *Scheme) DomainName() string
- func (s *Scheme) Encode(IContext) error
- func (s *Scheme) EstBufSize() int
- func (s *Scheme) IsDecoded() bool
- func (s *Scheme) IsEncoded() bool
- func (s *Scheme) SchemeMagic() byte
- func (s *Scheme) Tablet() []byte
- func (s *Scheme) TabletName() string
- type SimpleMappedValue
- func (d *SimpleMappedValue) Buf() []byte
- func (d *SimpleMappedValue) CompressEncoder() ICompressEncoder
- func (d *SimpleMappedValue) Copy() IEncodable
- func (d *SimpleMappedValue) CopyConstruct() (IEncodable, error)
- func (d *SimpleMappedValue) Decode(IContext) (int, error)
- func (d *SimpleMappedValue) Encode(IContext) error
- func (d *SimpleMappedValue) EstBufSize() int
- func (d *SimpleMappedValue) IsDecoded() bool
- func (d *SimpleMappedValue) IsEncoded() bool
- func (d *SimpleMappedValue) IsNil() bool
- func (d *SimpleMappedValue) IsPrimitive() bool
- func (d *SimpleMappedValue) IsRecordList() bool
- func (d *SimpleMappedValue) IsValueArray() bool
- func (d *SimpleMappedValue) LookupEncoder() ILookupEncoder
- func (d *SimpleMappedValue) RecordAt(i uint16) (IRecord, error)
- func (d *SimpleMappedValue) Size() uint16
- func (d *SimpleMappedValue) Value() []byte
- func (d *SimpleMappedValue) ValueAt(i uint16) (IValue, error)
- func (d *SimpleMappedValue) ValueMagic() byte
- type StandardMappedValue
- func (d *StandardMappedValue) Buf() []byte
- func (d *StandardMappedValue) CompressEncoder() ICompressEncoder
- func (d *StandardMappedValue) Copy() IEncodable
- func (d *StandardMappedValue) CopyConstruct() (IEncodable, error)
- func (d *StandardMappedValue) Decode(IContext) (int, error)
- func (d *StandardMappedValue) Encode(IContext) error
- func (d *StandardMappedValue) EstBufSize() int
- func (d *StandardMappedValue) IsDecoded() bool
- func (d *StandardMappedValue) IsEncoded() bool
- func (d *StandardMappedValue) IsNil() bool
- func (d *StandardMappedValue) IsPrimitive() bool
- func (d *StandardMappedValue) IsRecordList() bool
- func (d *StandardMappedValue) IsValueArray() bool
- func (d *StandardMappedValue) LookupEncoder() ILookupEncoder
- func (d *StandardMappedValue) RecordAt(idx uint16) (IRecord, error)
- func (d *StandardMappedValue) Size() uint16
- func (d *StandardMappedValue) Value() []byte
- func (d *StandardMappedValue) ValueAt(idx uint16) (IValue, error)
- func (d *StandardMappedValue) ValueMagic() byte
- type Trie
- func (t *Trie) Buf() []byte
- func (t *Trie) Copy() IEncodable
- func (t *Trie) CopyConstruct() (IEncodable, error)
- func (t *Trie) Decode(IContext) (int, error)
- func (t *Trie) Encode(ctx IContext) error
- func (t *Trie) EstBufSize() int
- func (t *Trie) Get(k IKey) IValue
- func (t *Trie) IsDecoded() bool
- func (t *Trie) IsEncoded() bool
- func (t *Trie) Iterator() ITrieIterator
- func (t *Trie) KeyIterator(k IKey) ITrieIterator
- func (t *Trie) Print(w io.Writer, indent int)
- func (t *Trie) RangeIterator(start, end IKey) ITrieIterator
- func (t *Trie) Set(k IKey, d IValue) IValue
- func (t *Trie) ToString() string
- type TrieKeyIterator
- type TrieNode
- func (tn *TrieNode) Buf() []byte
- func (tn *TrieNode) ChildSize() int
- func (tn *TrieNode) Children() *collection.SortedMap
- func (tn *TrieNode) Copy() IEncodable
- func (tn *TrieNode) CopyConstruct() (IEncodable, error)
- func (tn *TrieNode) Decode(IContext) (int, error)
- func (tn *TrieNode) Encode(IContext) error
- func (tn *TrieNode) EstBufSize() int
- func (tn *TrieNode) FullKey() IKey
- func (tn *TrieNode) GetChild(nodeKey []byte) ITrieNode
- func (tn *TrieNode) IsDecoded() bool
- func (tn *TrieNode) IsEncoded() bool
- func (tn *TrieNode) NodeKey() []byte
- func (tn *TrieNode) Offset() uint32
- func (tn *TrieNode) Parent() ITrieNode
- func (tn *TrieNode) Print(w io.Writer, indent int)
- func (tn *TrieNode) PutChild(nodeKey []byte, n ITrieNode) error
- func (tn *TrieNode) RemoveChild(nodeKey []byte) error
- func (tn *TrieNode) SetOffset(offset uint32) error
- func (tn *TrieNode) SetValue(data IValue) error
- func (tn *TrieNode) ToString() string
- func (tn *TrieNode) Value() IValue
- type TrieRangeIterator
- type ValueArray
- func (d *ValueArray) Append(data IValue) *ValueArray
- func (d *ValueArray) Buf() []byte
- func (d *ValueArray) CompressEncoder() ICompressEncoder
- func (d *ValueArray) Copy() IEncodable
- func (d *ValueArray) CopyConstruct() (IEncodable, error)
- func (d *ValueArray) Decode(IContext) (int, error)
- func (d *ValueArray) DeleteAt(idx uint16) *ValueArray
- func (d *ValueArray) Encode(IContext) error
- func (d *ValueArray) EstBufSize() int
- func (d *ValueArray) IsDecoded() bool
- func (d *ValueArray) IsEncoded() bool
- func (d *ValueArray) IsNil() bool
- func (d *ValueArray) IsPrimitive() bool
- func (d *ValueArray) IsRecordList() bool
- func (d *ValueArray) IsValueArray() bool
- func (d *ValueArray) LookupEncoder() ILookupEncoder
- func (d *ValueArray) RecordAt(idx uint16) (IRecord, error)
- func (d *ValueArray) Size() uint16
- func (d *ValueArray) Value() []byte
- func (d *ValueArray) ValueAt(idx uint16) (IValue, error)
- func (d *ValueArray) ValueMagic() byte
Constants ¶
View Source
const ( CONSENSUS_TIME_LEDGER = 0x01 CONSENSUS_TIME_RAFT = 0x02 )
View Source
const ( // Each EPOCH is 30 seconds POODLE_EPOCH_MILLIS = 30 * 1000 DEFAULT_DRIFT_MILLIS_LOW = 300 DEFAULT_DRIFT_MILLIS_HIGH = 500 DEFAULT_ETC_DIR = "/etc/poodle" DEFAULT_LIB_DIR = "/var/lib/poodle" DEFAULT_LOG_DIR = "/var/log/poodle" DEFAULT_SECRET = "poodle" DEFAULT_PUDP_PORT = 31415 DEFAULT_QUIC_PORT = 31416 MAX_KEY_LENGTH = 4 * 1024 // Maximum 4 KB Key Length MAX_VALUE_LENGTH = 56 * 1024 // Maximum 56 KB Value Length MAX_SCHEME_LENGTH = 1 * 1024 // Maximum 1 KB Scheme Length MAX_ATTR_GROUPS = 256 // maximum 256 Attribute Groups per Key MAX_DATA_LENGTH = 64*1024 - 1 // Maximum 64 KB - 1 Data Length MAX_PACKET_LENGTH = 64*1024 - 1 // Maximum 64 KB - 1 Packet Length CLS_NODE = 1 CLS_CLUSTER = 2 CLS_UNIVERSE = 3 CLS_SERVICE = 4 CLS_FEDERATION = 5 TRIE_NODE_TYPE_KEY = byte(0x01) // trie node type key TRIE_NODE_TYPE_ATTR_GROUP = byte(0x02) // trie node type attr group )
Variables ¶
This section is empty.
Functions ¶
func Base58Decode ¶
Decode Base58 format to byte array, return nil if failed
func ECDSAGenerateKey ¶
func ECDSAGenerateKey() *ecdsa.PrivateKey
func ECDSAGetPrivateKey ¶
func ECDSAGetPrivateKey(priv_bytes []byte) *ecdsa.PrivateKey
func ECDSAGetPublicKey ¶
func EncodeUvarint64 ¶
func EncodeVarchar ¶
func EncodeVarint64 ¶
func LCExistPrivKey ¶
func LCExistPubKey ¶
func LCGetEtcDir ¶
func LCLoadPrivKey ¶
ECDSA priv key for node
func LCLoadPrivKeyPrompt ¶
func LCLoadPrivKeyPrompt(cls int, id string) (*ecdsa.PrivateKey, error)
ECDSA priv key for node
func LCLoadPubKey ¶
ECDSA pub key (X) for node
func LCSaveKeyPair ¶
ECDSA pub / priv keys for node
func LCSaveKeyPairPrompt ¶
ECDSA pub / priv keys for node
func LCSetLoggerFileTmp ¶
func LCSetLoggerFileTmp() error
func LCSetLoggerStdout ¶
func LCSetLoggerStdout() error
func PromptPassphrase ¶
func PromptText ¶
func RandInt16Range ¶
func RandInt32Range ¶
func RandInt64Range ¶
func RandInt8Range ¶
func RandUint16 ¶
func RandUint16() uint16
func RandUint16Range ¶
func RandUint32 ¶
func RandUint32() uint32
func RandUint32Range ¶
func RandUint64 ¶
func RandUint64() uint64
func RandUint64Range ¶
func RandUint8Range ¶
func SumSHA256d ¶
Types ¶
type EmptyKey ¶
type EmptyKey struct { }
func NewEmptyKey ¶
func NewEmptyKey() *EmptyKey
func (*EmptyKey) Compare ¶
func (k *EmptyKey) Compare(c collection.IComparable) int
func (*EmptyKey) Copy ¶
func (k *EmptyKey) Copy() IEncodable
func (*EmptyKey) CopyConstruct ¶
func (k *EmptyKey) CopyConstruct() (IEncodable, error)
func (*EmptyKey) EstBufSize ¶
type ICompressEncoder ¶
type IConsensusID ¶
type IConsensusID interface { ConsensusMagic() byte Buf() []byte Copy() IConsensusID }
type IConsensusTime ¶
type IConsensusTime interface { Buf() []byte GT(ict IConsensusTime) (bool, error) GE(ict IConsensusTime) (bool, error) EQ(ict IConsensusTime) (bool, error) NE(ict IConsensusTime) (bool, error) LT(ict IConsensusTime) (bool, error) LE(ict IConsensusTime) (bool, error) }
func NewConsensusTime ¶
func NewConsensusTime(buf []byte) (IConsensusTime, error)
type IEncodable ¶
type IEncodable interface { // whether Data is encoded - always return true for Mapped Data // - return true for Constructed Data if encoded buf cache exists // - return false for Constructed Data if no encoded buf cache IsEncoded() bool // encode Data - for Constructed Data only, return error for Mapped Data // - if successful, encoded buf is kept as part of Data object // - bool param indicate whether to encode with parent Record context // - byte return value is parent bits, return 0xff if this is self-encoded as Data Encode(ctx IContext) error // whether Data is decoded - always return true for Constructed Data // - return true for Mapped Data if data is decoded // - return false for Mapped Data if data is not decoded IsDecoded() bool // decode Data - for Mapped Data only, return error for Constructed Data // - if successful, individual data array, record list, or primitive data are decoded and kept as part of Data object // - parent param is data encode from parent: 0x00 is no length; 0x01 is 1 byte length; 0x02 is 2 byte length; 0x03 is custom encoding // - use 0xff if no parent Decode(ctx IContext) (int, error) // copy // - for mapped object, copy the underlying mapped byte array (read only) // - for constructed object, make a copy of the constructed object (modifiable) Copy() IEncodable // make a constructed (modifiable) copy of the object CopyConstruct() (IEncodable, error) // return encoded buf (byte array) Buf() []byte // estimated buf size EstBufSize() int }
type IKey ¶
type IKey interface { //////////////////////////////////////// // embeded interfaces collection.IComparable collection.IHashable collection.IPrintable IEncodable //////////////////////////////////////// // accessor to elements IsEmpty() bool // whether Key is nil Key() [][]byte SubKeyAt(idx int) []byte }
type ILookupEncoder ¶
type IRecord ¶
type IRecord interface { //////////////////////////////////////// // embeded interfaces //collection.IPrintable IEncodable //////////////////////////////////////// // accessor to elements Key() IKey // key content Value() IValue // value content Scheme() IValue // scheme content Timestamp() *time.Time // 8 bytes unix nano timestamp Signature() (*big.Int, *big.Int) // optional 2 * 32 bytes signature //////////////////////////////////////// // encoding, decoding, and buf RecordMagic() byte // 1 byte Record Magic - return 0xff if not encoded }
type IScheme ¶
type IScheme interface { //////////////////////////////////////// // embeded interfaces //collection.IPrintable IEncodable //////////////////////////////////////// // accessor to elements Domain() []byte // get Domain DomainName() string // get Domain name Tablet() []byte // get tablet TabletName() string // get tablet name Buckets() [][]byte // get buckets BucketAt(idx int) []byte // get bucket at idx //////////////////////////////////////// // magic SchemeMagic() byte // scheme magic byte }
type ITrie ¶
type ITrie interface { //////////////////////////////////////// // embedded interfaces IEncodable collection.IPrintable //////////////////////////////////////// // accessor to elements Get(IKey) IValue // get Put(IKey, IValue) IValue // put Remove(IKey) IValue // remove Entries() int // total size // Iterators Iterator() ITrieIterator // this is same as nil key that iterates all keys KeyIterator(key IKey) ITrieIterator // nil key param returns iterator for all keys, otherwise return iterator for specified key and children RangeIterator(start, end IKey) ITrieIterator // return iterator for keys within given range, start inclusive, end not inclusive }
type ITrieIterator ¶
type ITrieNode ¶
type ITrieNode interface { //////////////////////////////////////// // embedded interfaces IEncodable collection.IPrintable //////////////////////////////////////// // accessor to elements - parent, children, and keys FullKey() IKey // return full key NodeKey() []byte // trie node key is a sub key of IKey Parent() ITrieNode // link to parent Children() *collection.SortedMap // a list of children ChildSize() int // child size GetChild(nodeKey []byte) ITrieNode // get child by specified child key PutChild(nodeKey []byte, n ITrieNode) error // add child (automatically sort) RemoveChild(nodeKey []byte) error // remote child //////////////////////////////////////// // data Value() IValue // get associated data SetValue(IValue) error // set associated data //////////////////////////////////////// // offset Offset() uint32 // get offset when this TrieNode is encoded SetOffset(uint32) error // set offset when this TrieNode is encoded to }
type IValue ¶
type IValue interface { //////////////////////////////////////// // embeded interfaces //collection.IPrintable IEncodable //////////////////////////////////////// // accessor to elements IsNil() bool // whether Value is nil IsPrimitive() bool // whether this is Primitive Value IsValueArray() bool // whether this is Value Array IsRecordList() bool // whether this is Record List Size() uint16 // size of the Value Array or Record List ValueAt(i uint16) (IValue, error) // get i-th Value Element - for Value Array only RecordAt(i uint16) (IRecord, error) // get i-th Record Element - for Record List only LookupEncoder() ILookupEncoder // get Lookup Encoder CompressEncoder() ICompressEncoder // get Compress Encoder Value() []byte // get Value Content - for Primitive Value only //////////////////////////////////////// // encoding, decoding, and buf ValueMagic() byte // 1 byte Value Magic - return 0xff if not encoded }
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func NewSimpleKey ¶
func NewStringKey ¶
func (*Key) Compare ¶
func (k *Key) Compare(c collection.IComparable) int
func (*Key) Copy ¶
func (k *Key) Copy() IEncodable
func (*Key) CopyConstruct ¶
func (k *Key) CopyConstruct() (IEncodable, error)
func (*Key) EstBufSize ¶
type LedgerTime ¶
type LedgerTime struct {
// contains filtered or unexported fields
}
func NewLedgerTime ¶
func NewLedgerTime(t uint32) *LedgerTime
func (*LedgerTime) Buf ¶
func (t *LedgerTime) Buf() []byte
func (*LedgerTime) EQ ¶
func (t *LedgerTime) EQ(ict IConsensusTime) (bool, error)
func (*LedgerTime) GE ¶
func (t *LedgerTime) GE(ict IConsensusTime) (bool, error)
func (*LedgerTime) GT ¶
func (t *LedgerTime) GT(ict IConsensusTime) (bool, error)
func (*LedgerTime) LE ¶
func (t *LedgerTime) LE(ict IConsensusTime) (bool, error)
func (*LedgerTime) LT ¶
func (t *LedgerTime) LT(ict IConsensusTime) (bool, error)
func (*LedgerTime) NE ¶
func (t *LedgerTime) NE(ict IConsensusTime) (bool, error)
type MPHTable ¶
type MPHTable struct {
// contains filtered or unexported fields
}
A Table is an immutable hash table that provides constant-time lookups of key indices using a minimal perfect hash.
func MPHBuild ¶
Build builds a Table from keys using the "Hash, displace, and compress" algorithm described in http://cmph.sourceforge.net/papers/esa09.pdf.
func NewMPHTable ¶
parse MPHTable from []byte (deserialize)
type MappedConsensusID ¶
type MappedConsensusID struct {
// contains filtered or unexported fields
}
func NewMappedConsensusID ¶
func NewMappedConsensusID(buf []byte) (*MappedConsensusID, error)
func (*MappedConsensusID) Buf ¶
func (c *MappedConsensusID) Buf() []byte
func (*MappedConsensusID) ConsensusMagic ¶
func (c *MappedConsensusID) ConsensusMagic() byte
func (*MappedConsensusID) Copy ¶
func (c *MappedConsensusID) Copy() IConsensusID
type MappedKey ¶
type MappedKey struct {
// contains filtered or unexported fields
}
func (*MappedKey) Compare ¶
func (k *MappedKey) Compare(c collection.IComparable) int
func (*MappedKey) Copy ¶
func (k *MappedKey) Copy() IEncodable
func (*MappedKey) CopyConstruct ¶
func (k *MappedKey) CopyConstruct() (IEncodable, error)
func (*MappedKey) EstBufSize ¶
type MappedRecord ¶
type MappedRecord struct {
// contains filtered or unexported fields
}
func NewMappedRecord ¶
func NewMappedRecord(buf []byte) (*MappedRecord, int, error)
func (*MappedRecord) Buf ¶
func (r *MappedRecord) Buf() []byte
func (*MappedRecord) Copy ¶
func (r *MappedRecord) Copy() IEncodable
func (*MappedRecord) CopyConstruct ¶
func (r *MappedRecord) CopyConstruct() (IEncodable, error)
func (*MappedRecord) Encode ¶
func (r *MappedRecord) Encode(IContext) error
func (*MappedRecord) EstBufSize ¶
func (r *MappedRecord) EstBufSize() int
func (*MappedRecord) IsDecoded ¶
func (r *MappedRecord) IsDecoded() bool
func (*MappedRecord) IsEncoded ¶
func (r *MappedRecord) IsEncoded() bool
func (*MappedRecord) Key ¶
func (r *MappedRecord) Key() IKey
func (*MappedRecord) RecordMagic ¶
func (r *MappedRecord) RecordMagic() byte
func (*MappedRecord) Scheme ¶
func (r *MappedRecord) Scheme() IValue
func (*MappedRecord) Timestamp ¶
func (r *MappedRecord) Timestamp() *time.Time
func (*MappedRecord) Value ¶
func (r *MappedRecord) Value() IValue
type MappedScheme ¶
type MappedScheme struct {
// contains filtered or unexported fields
}
func NewMappedSchemd ¶
func NewMappedSchemd(buf []byte) *MappedScheme
func (*MappedScheme) BucketAt ¶
func (s *MappedScheme) BucketAt(idx int) []byte
func (*MappedScheme) Buckets ¶
func (s *MappedScheme) Buckets() [][]byte
func (*MappedScheme) Buf ¶
func (s *MappedScheme) Buf() []byte
func (*MappedScheme) Copy ¶
func (s *MappedScheme) Copy() IEncodable
func (*MappedScheme) CopyConstruct ¶
func (s *MappedScheme) CopyConstruct() (IEncodable, error)
func (*MappedScheme) Domain ¶
func (s *MappedScheme) Domain() []byte
func (*MappedScheme) DomainName ¶
func (s *MappedScheme) DomainName() string
func (*MappedScheme) Encode ¶
func (s *MappedScheme) Encode(IContext) error
func (*MappedScheme) EstBufSize ¶
func (s *MappedScheme) EstBufSize() int
func (*MappedScheme) IsDecoded ¶
func (s *MappedScheme) IsDecoded() bool
func (*MappedScheme) IsEncoded ¶
func (s *MappedScheme) IsEncoded() bool
func (*MappedScheme) SchemeMagic ¶
func (s *MappedScheme) SchemeMagic() byte
func (*MappedScheme) Tablet ¶
func (s *MappedScheme) Tablet() []byte
func (*MappedScheme) TabletName ¶
func (s *MappedScheme) TabletName() string
type MappedTrie ¶
type MappedTrie struct {
// contains filtered or unexported fields
}
func NewMappedTrie ¶
func NewMappedTrie(buf []byte) (*MappedTrie, int, error)
func (*MappedTrie) Buf ¶
func (t *MappedTrie) Buf() []byte
func (*MappedTrie) Copy ¶
func (t *MappedTrie) Copy() IEncodable
func (*MappedTrie) CopyConstruct ¶
func (t *MappedTrie) CopyConstruct() (IEncodable, error)
func (*MappedTrie) Encode ¶
func (t *MappedTrie) Encode(IContext) error
func (*MappedTrie) EstBufSize ¶
func (t *MappedTrie) EstBufSize() int
func (*MappedTrie) Get ¶
func (t *MappedTrie) Get(k IKey) IValue
func (*MappedTrie) IsDecoded ¶
func (t *MappedTrie) IsDecoded() bool
func (*MappedTrie) IsEncoded ¶
func (t *MappedTrie) IsEncoded() bool
func (*MappedTrie) Iterator ¶
func (t *MappedTrie) Iterator() ITrieIterator
func (*MappedTrie) KeyIterator ¶
func (t *MappedTrie) KeyIterator(k IKey) ITrieIterator
func (*MappedTrie) RangeIterator ¶
func (t *MappedTrie) RangeIterator(start, end IKey) ITrieIterator
func (*MappedTrie) ToString ¶
func (t *MappedTrie) ToString() string
type MappedTrieNode ¶
type MappedTrieNode struct {
// contains filtered or unexported fields
}
func NewMappedTrieNode ¶
func (*MappedTrieNode) Buf ¶
func (tn *MappedTrieNode) Buf() []byte
func (*MappedTrieNode) ChildSize ¶
func (tn *MappedTrieNode) ChildSize() int
func (*MappedTrieNode) Children ¶
func (tn *MappedTrieNode) Children() *collection.SortedMap
func (*MappedTrieNode) Copy ¶
func (tn *MappedTrieNode) Copy() IEncodable
func (*MappedTrieNode) CopyConstruct ¶
func (tn *MappedTrieNode) CopyConstruct() (IEncodable, error)
func (*MappedTrieNode) Encode ¶
func (tn *MappedTrieNode) Encode(IContext) error
func (*MappedTrieNode) EstBufSize ¶
func (tn *MappedTrieNode) EstBufSize() int
func (*MappedTrieNode) FullKey ¶
func (tn *MappedTrieNode) FullKey() IKey
func (*MappedTrieNode) GetChild ¶
func (tn *MappedTrieNode) GetChild(nodeKey []byte) ITrieNode
func (*MappedTrieNode) IsDecoded ¶
func (tn *MappedTrieNode) IsDecoded() bool
func (*MappedTrieNode) IsEncoded ¶
func (tn *MappedTrieNode) IsEncoded() bool
func (*MappedTrieNode) NodeKey ¶
func (tn *MappedTrieNode) NodeKey() []byte
func (*MappedTrieNode) Offset ¶
func (tn *MappedTrieNode) Offset() uint32
func (*MappedTrieNode) Parent ¶
func (tn *MappedTrieNode) Parent() ITrieNode
func (*MappedTrieNode) PutChild ¶
func (tn *MappedTrieNode) PutChild(nodeKey []byte, n ITrieNode) error
func (*MappedTrieNode) RemoveChild ¶
func (tn *MappedTrieNode) RemoveChild(nodeKey []byte) error
func (*MappedTrieNode) SetOffset ¶
func (tn *MappedTrieNode) SetOffset(uint32) error
func (*MappedTrieNode) SetValue ¶
func (tn *MappedTrieNode) SetValue(IValue) error
func (*MappedTrieNode) ToString ¶
func (tn *MappedTrieNode) ToString() string
func (*MappedTrieNode) Value ¶
func (tn *MappedTrieNode) Value() IValue
type Primitive ¶
type Primitive struct {
// contains filtered or unexported fields
}
func NewPrimitive ¶
func (*Primitive) CompressEncoder ¶
func (d *Primitive) CompressEncoder() ICompressEncoder
func (*Primitive) Copy ¶
func (d *Primitive) Copy() IEncodable
func (*Primitive) CopyConstruct ¶
func (d *Primitive) CopyConstruct() (IEncodable, error)
func (*Primitive) EstBufSize ¶
func (*Primitive) IsPrimitive ¶
func (*Primitive) IsRecordList ¶
func (*Primitive) IsValueArray ¶
func (*Primitive) LookupEncoder ¶
func (d *Primitive) LookupEncoder() ILookupEncoder
func (*Primitive) ValueMagic ¶
type RaftTime ¶
type RaftTime struct {
// contains filtered or unexported fields
}
func NewRaftTime ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
func (*Record) Copy ¶
func (r *Record) Copy() IEncodable
func (*Record) CopyConstruct ¶
func (r *Record) CopyConstruct() (IEncodable, error)
func (*Record) EstBufSize ¶
func (*Record) RecordMagic ¶
type RecordList ¶
type RecordList struct {
// contains filtered or unexported fields
}
func NewRecordList ¶
func NewRecordList() *RecordList
func (*RecordList) Append ¶
func (d *RecordList) Append(record IRecord) *RecordList
func (*RecordList) Buf ¶
func (d *RecordList) Buf() []byte
func (*RecordList) CompressEncoder ¶
func (d *RecordList) CompressEncoder() ICompressEncoder
func (*RecordList) Copy ¶
func (d *RecordList) Copy() IEncodable
func (*RecordList) CopyConstruct ¶
func (d *RecordList) CopyConstruct() (IEncodable, error)
func (*RecordList) DeleteAt ¶
func (d *RecordList) DeleteAt(idx uint16) *RecordList
func (*RecordList) Encode ¶
func (d *RecordList) Encode(IContext) error
func (*RecordList) EstBufSize ¶
func (d *RecordList) EstBufSize() int
func (*RecordList) IsDecoded ¶
func (d *RecordList) IsDecoded() bool
func (*RecordList) IsEncoded ¶
func (d *RecordList) IsEncoded() bool
func (*RecordList) IsNil ¶
func (d *RecordList) IsNil() bool
func (*RecordList) IsPrimitive ¶
func (d *RecordList) IsPrimitive() bool
func (*RecordList) IsRecordList ¶
func (d *RecordList) IsRecordList() bool
func (*RecordList) IsValueArray ¶
func (d *RecordList) IsValueArray() bool
func (*RecordList) LookupEncoder ¶
func (d *RecordList) LookupEncoder() ILookupEncoder
func (*RecordList) Size ¶
func (d *RecordList) Size() uint16
func (*RecordList) Value ¶
func (d *RecordList) Value() []byte
func (*RecordList) ValueMagic ¶
func (d *RecordList) ValueMagic() byte
type Scheme ¶
type Scheme struct {
// contains filtered or unexported fields
}
func (*Scheme) Copy ¶
func (s *Scheme) Copy() IEncodable
func (*Scheme) CopyConstruct ¶
func (s *Scheme) CopyConstruct() (IEncodable, error)
func (*Scheme) DomainName ¶
func (*Scheme) EstBufSize ¶
func (*Scheme) SchemeMagic ¶
func (*Scheme) TabletName ¶
type SimpleMappedValue ¶
type SimpleMappedValue struct {
// contains filtered or unexported fields
}
func NewSimpleMappedValue ¶
func NewSimpleMappedValue(buf []byte) (*SimpleMappedValue, int, error)
func (*SimpleMappedValue) Buf ¶
func (d *SimpleMappedValue) Buf() []byte
func (*SimpleMappedValue) CompressEncoder ¶
func (d *SimpleMappedValue) CompressEncoder() ICompressEncoder
func (*SimpleMappedValue) Copy ¶
func (d *SimpleMappedValue) Copy() IEncodable
func (*SimpleMappedValue) CopyConstruct ¶
func (d *SimpleMappedValue) CopyConstruct() (IEncodable, error)
func (*SimpleMappedValue) Encode ¶
func (d *SimpleMappedValue) Encode(IContext) error
func (*SimpleMappedValue) EstBufSize ¶
func (d *SimpleMappedValue) EstBufSize() int
func (*SimpleMappedValue) IsDecoded ¶
func (d *SimpleMappedValue) IsDecoded() bool
func (*SimpleMappedValue) IsEncoded ¶
func (d *SimpleMappedValue) IsEncoded() bool
func (*SimpleMappedValue) IsNil ¶
func (d *SimpleMappedValue) IsNil() bool
func (*SimpleMappedValue) IsPrimitive ¶
func (d *SimpleMappedValue) IsPrimitive() bool
func (*SimpleMappedValue) IsRecordList ¶
func (d *SimpleMappedValue) IsRecordList() bool
func (*SimpleMappedValue) IsValueArray ¶
func (d *SimpleMappedValue) IsValueArray() bool
func (*SimpleMappedValue) LookupEncoder ¶
func (d *SimpleMappedValue) LookupEncoder() ILookupEncoder
func (*SimpleMappedValue) RecordAt ¶
func (d *SimpleMappedValue) RecordAt(i uint16) (IRecord, error)
func (*SimpleMappedValue) Size ¶
func (d *SimpleMappedValue) Size() uint16
func (*SimpleMappedValue) Value ¶
func (d *SimpleMappedValue) Value() []byte
func (*SimpleMappedValue) ValueMagic ¶
func (d *SimpleMappedValue) ValueMagic() byte
type StandardMappedValue ¶
type StandardMappedValue struct {
// contains filtered or unexported fields
}
func NewStandardMappedValue ¶
func NewStandardMappedValue(buf []byte) (*StandardMappedValue, int, error)
func (*StandardMappedValue) Buf ¶
func (d *StandardMappedValue) Buf() []byte
func (*StandardMappedValue) CompressEncoder ¶
func (d *StandardMappedValue) CompressEncoder() ICompressEncoder
func (*StandardMappedValue) Copy ¶
func (d *StandardMappedValue) Copy() IEncodable
func (*StandardMappedValue) CopyConstruct ¶
func (d *StandardMappedValue) CopyConstruct() (IEncodable, error)
func (*StandardMappedValue) Encode ¶
func (d *StandardMappedValue) Encode(IContext) error
func (*StandardMappedValue) EstBufSize ¶
func (d *StandardMappedValue) EstBufSize() int
func (*StandardMappedValue) IsDecoded ¶
func (d *StandardMappedValue) IsDecoded() bool
func (*StandardMappedValue) IsEncoded ¶
func (d *StandardMappedValue) IsEncoded() bool
func (*StandardMappedValue) IsNil ¶
func (d *StandardMappedValue) IsNil() bool
func (*StandardMappedValue) IsPrimitive ¶
func (d *StandardMappedValue) IsPrimitive() bool
func (*StandardMappedValue) IsRecordList ¶
func (d *StandardMappedValue) IsRecordList() bool
func (*StandardMappedValue) IsValueArray ¶
func (d *StandardMappedValue) IsValueArray() bool
func (*StandardMappedValue) LookupEncoder ¶
func (d *StandardMappedValue) LookupEncoder() ILookupEncoder
func (*StandardMappedValue) RecordAt ¶
func (d *StandardMappedValue) RecordAt(idx uint16) (IRecord, error)
func (*StandardMappedValue) Size ¶
func (d *StandardMappedValue) Size() uint16
func (*StandardMappedValue) Value ¶
func (d *StandardMappedValue) Value() []byte
func (*StandardMappedValue) ValueAt ¶
func (d *StandardMappedValue) ValueAt(idx uint16) (IValue, error)
func (*StandardMappedValue) ValueMagic ¶
func (d *StandardMappedValue) ValueMagic() byte
type Trie ¶
type Trie struct {
// contains filtered or unexported fields
}
func (*Trie) Copy ¶
func (t *Trie) Copy() IEncodable
func (*Trie) CopyConstruct ¶
func (t *Trie) CopyConstruct() (IEncodable, error)
func (*Trie) EstBufSize ¶
func (*Trie) Iterator ¶
func (t *Trie) Iterator() ITrieIterator
func (*Trie) KeyIterator ¶
func (t *Trie) KeyIterator(k IKey) ITrieIterator
func (*Trie) RangeIterator ¶
func (t *Trie) RangeIterator(start, end IKey) ITrieIterator
type TrieKeyIterator ¶
type TrieKeyIterator struct {
// contains filtered or unexported fields
}
func NewTrieKeyIterator ¶
func NewTrieKeyIterator(root, curr ITrieNode) *TrieKeyIterator
func (*TrieKeyIterator) HasNext ¶
func (i *TrieKeyIterator) HasNext() bool
func (*TrieKeyIterator) Next ¶
func (i *TrieKeyIterator) Next() (IKey, IValue)
func (*TrieKeyIterator) Peek ¶
func (i *TrieKeyIterator) Peek() (IKey, IValue)
type TrieNode ¶
type TrieNode struct {
// contains filtered or unexported fields
}
func (*TrieNode) Children ¶
func (tn *TrieNode) Children() *collection.SortedMap
func (*TrieNode) Copy ¶
func (tn *TrieNode) Copy() IEncodable
func (*TrieNode) CopyConstruct ¶
func (tn *TrieNode) CopyConstruct() (IEncodable, error)
func (*TrieNode) EstBufSize ¶
func (*TrieNode) FullKey ¶
////////////////////////////////////// accessor to elements - parent, children, and keys
func (*TrieNode) RemoveChild ¶
type TrieRangeIterator ¶
type TrieRangeIterator struct {
// contains filtered or unexported fields
}
func NewTrieRangeIterator ¶
func NewTrieRangeIterator(root ITrieNode, start, end IKey) *TrieRangeIterator
func (*TrieRangeIterator) HasNext ¶
func (i *TrieRangeIterator) HasNext() bool
func (*TrieRangeIterator) Next ¶
func (i *TrieRangeIterator) Next() (IKey, IValue)
func (*TrieRangeIterator) Peek ¶
func (i *TrieRangeIterator) Peek() (IKey, IValue)
type ValueArray ¶
type ValueArray struct {
// contains filtered or unexported fields
}
func NewValueArray ¶
func NewValueArray() *ValueArray
func (*ValueArray) Append ¶
func (d *ValueArray) Append(data IValue) *ValueArray
func (*ValueArray) Buf ¶
func (d *ValueArray) Buf() []byte
func (*ValueArray) CompressEncoder ¶
func (d *ValueArray) CompressEncoder() ICompressEncoder
func (*ValueArray) Copy ¶
func (d *ValueArray) Copy() IEncodable
func (*ValueArray) CopyConstruct ¶
func (d *ValueArray) CopyConstruct() (IEncodable, error)
func (*ValueArray) DeleteAt ¶
func (d *ValueArray) DeleteAt(idx uint16) *ValueArray
func (*ValueArray) Encode ¶
func (d *ValueArray) Encode(IContext) error
func (*ValueArray) EstBufSize ¶
func (d *ValueArray) EstBufSize() int
func (*ValueArray) IsDecoded ¶
func (d *ValueArray) IsDecoded() bool
func (*ValueArray) IsEncoded ¶
func (d *ValueArray) IsEncoded() bool
func (*ValueArray) IsNil ¶
func (d *ValueArray) IsNil() bool
func (*ValueArray) IsPrimitive ¶
func (d *ValueArray) IsPrimitive() bool
func (*ValueArray) IsRecordList ¶
func (d *ValueArray) IsRecordList() bool
func (*ValueArray) IsValueArray ¶
func (d *ValueArray) IsValueArray() bool
func (*ValueArray) LookupEncoder ¶
func (d *ValueArray) LookupEncoder() ILookupEncoder
func (*ValueArray) Size ¶
func (d *ValueArray) Size() uint16
func (*ValueArray) Value ¶
func (d *ValueArray) Value() []byte
func (*ValueArray) ValueMagic ¶
func (d *ValueArray) ValueMagic() byte
Click to show internal directories.
Click to hide internal directories.