Documentation
¶
Index ¶
- Constants
- func ArrayEqual(expected ExpectedArrayValue, actual *atree.Array) (bool, error)
- func CompareTypeInfo(a, b atree.TypeInfo) bool
- func CompareValue(storage atree.SlabStorage, value atree.Value, storable atree.Storable) (bool, error)
- func DecodeStorable(dec *cbor.StreamDecoder, id atree.SlabID, inlinedExtraData []atree.ExtraData) (atree.Storable, error)
- func DecodeTypeInfo(dec *cbor.StreamDecoder) (atree.TypeInfo, error)
- func GetHashInput(value atree.Value, buffer []byte) ([]byte, error)
- func MapEqual(expected ExpectedMapValue, actual *atree.OrderedMap) (bool, error)
- func ValueEqual(expected atree.Value, actual atree.Value) (bool, error)
- type CompositeTypeInfo
- type ExpectedArrayValue
- type ExpectedMapValue
- type ExpectedWrapperValue
- type HashableMap
- type HashableValue
- type InMemBaseStorage
- func (s *InMemBaseStorage) BytesRetrieved() int
- func (s *InMemBaseStorage) BytesStored() int
- func (s *InMemBaseStorage) GenerateSlabID(address atree.Address) (atree.SlabID, error)
- func (s *InMemBaseStorage) Remove(id atree.SlabID) error
- func (s *InMemBaseStorage) ResetReporter()
- func (s *InMemBaseStorage) Retrieve(id atree.SlabID) ([]byte, bool, error)
- func (s *InMemBaseStorage) SegmentCounts() int
- func (s *InMemBaseStorage) SegmentsReturned() int
- func (s *InMemBaseStorage) SegmentsTouched() int
- func (s *InMemBaseStorage) SegmentsUpdated() int
- func (s *InMemBaseStorage) Size() int
- func (s *InMemBaseStorage) Store(id atree.SlabID, data []byte) error
- type MutableStorable
- type MutableValue
- type SimpleTypeInfo
- type SomeStorable
- func (s SomeStorable) ByteSize() uint32
- func (s SomeStorable) ChildStorables() []atree.Storable
- func (s SomeStorable) Encode(e *atree.Encoder) error
- func (s SomeStorable) HasPointer() bool
- func (s SomeStorable) StoredValue(storage atree.SlabStorage) (atree.Value, error)
- func (s SomeStorable) String() string
- func (s SomeStorable) UnwrapAtreeStorable() atree.Storable
- func (s SomeStorable) WrapAtreeStorable(storable atree.Storable) atree.Storable
- type SomeValue
- type StringValue
- func (v StringValue) ByteSize() uint32
- func (v StringValue) ChildStorables() []atree.Storable
- func (v StringValue) Copy() atree.Storable
- func (v StringValue) Encode(enc *atree.Encoder) error
- func (v StringValue) Equal(other atree.Storable) bool
- func (v StringValue) HashInput(scratch []byte) ([]byte, error)
- func (v StringValue) ID() string
- func (v StringValue) Less(other atree.Storable) bool
- func (v StringValue) Storable(storage atree.SlabStorage, address atree.Address, maxInlineSize uint64) (atree.Storable, error)
- func (v StringValue) StoredValue(_ atree.SlabStorage) (atree.Value, error)
- func (v StringValue) String() string
- type Uint16Value
- func (v Uint16Value) ByteSize() uint32
- func (v Uint16Value) ChildStorables() []atree.Storable
- func (v Uint16Value) Encode(enc *atree.Encoder) error
- func (v Uint16Value) HashInput(scratch []byte) ([]byte, error)
- func (v Uint16Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
- func (v Uint16Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
- func (v Uint16Value) String() string
- type Uint32Value
- func (v Uint32Value) ByteSize() uint32
- func (v Uint32Value) ChildStorables() []atree.Storable
- func (v Uint32Value) Encode(enc *atree.Encoder) error
- func (v Uint32Value) HashInput(scratch []byte) ([]byte, error)
- func (v Uint32Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
- func (v Uint32Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
- func (v Uint32Value) String() string
- type Uint64Value
- func (v Uint64Value) ByteSize() uint32
- func (v Uint64Value) ChildStorables() []atree.Storable
- func (v Uint64Value) Encode(enc *atree.Encoder) error
- func (v Uint64Value) HashInput(scratch []byte) ([]byte, error)
- func (v Uint64Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
- func (v Uint64Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
- func (v Uint64Value) String() string
- type Uint8Value
- func (v Uint8Value) ByteSize() uint32
- func (v Uint8Value) ChildStorables() []atree.Storable
- func (v Uint8Value) Encode(enc *atree.Encoder) error
- func (v Uint8Value) HashInput(scratch []byte) ([]byte, error)
- func (v Uint8Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
- func (v Uint8Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
- func (v Uint8Value) String() string
Constants ¶
View Source
const (
CBORTagSomeValue = 165
)
View Source
const CompositeTypeInfoTagNum = 246
Variables ¶
This section is empty.
Functions ¶
func ArrayEqual ¶
func ArrayEqual(expected ExpectedArrayValue, actual *atree.Array) (bool, error)
func CompareTypeInfo ¶
func CompareValue ¶
func CompareValue(storage atree.SlabStorage, value atree.Value, storable atree.Storable) (bool, error)
CompareValue is used to set elements in OrderedMap.
func DecodeStorable ¶
func DecodeTypeInfo ¶
func MapEqual ¶
func MapEqual(expected ExpectedMapValue, actual *atree.OrderedMap) (bool, error)
Types ¶
type CompositeTypeInfo ¶
type CompositeTypeInfo struct {
// contains filtered or unexported fields
}
func NewCompositeTypeInfo ¶
func NewCompositeTypeInfo(value uint64) CompositeTypeInfo
func (CompositeTypeInfo) Copy ¶
func (i CompositeTypeInfo) Copy() atree.TypeInfo
func (CompositeTypeInfo) Encode ¶
func (i CompositeTypeInfo) Encode(enc *cbor.StreamEncoder) error
func (CompositeTypeInfo) Identifier ¶
func (i CompositeTypeInfo) Identifier() string
func (CompositeTypeInfo) IsComposite ¶
func (i CompositeTypeInfo) IsComposite() bool
type ExpectedArrayValue ¶
type ExpectedMapValue ¶
type ExpectedWrapperValue ¶
func NewExpectedWrapperValue ¶
func NewExpectedWrapperValue(value atree.Value) ExpectedWrapperValue
type HashableMap ¶
type HashableMap struct {
// contains filtered or unexported fields
}
func NewHashableMap ¶
func NewHashableMap(m *atree.OrderedMap) *HashableMap
type HashableValue ¶
type InMemBaseStorage ¶
type InMemBaseStorage struct {
// contains filtered or unexported fields
}
func NewInMemBaseStorage ¶
func NewInMemBaseStorage() *InMemBaseStorage
func NewInMemBaseStorageFromMap ¶
func NewInMemBaseStorageFromMap(segments map[atree.SlabID][]byte) *InMemBaseStorage
func (*InMemBaseStorage) BytesRetrieved ¶
func (s *InMemBaseStorage) BytesRetrieved() int
func (*InMemBaseStorage) BytesStored ¶
func (s *InMemBaseStorage) BytesStored() int
func (*InMemBaseStorage) GenerateSlabID ¶
func (*InMemBaseStorage) ResetReporter ¶
func (s *InMemBaseStorage) ResetReporter()
func (*InMemBaseStorage) SegmentCounts ¶
func (s *InMemBaseStorage) SegmentCounts() int
func (*InMemBaseStorage) SegmentsReturned ¶
func (s *InMemBaseStorage) SegmentsReturned() int
func (*InMemBaseStorage) SegmentsTouched ¶
func (s *InMemBaseStorage) SegmentsTouched() int
func (*InMemBaseStorage) SegmentsUpdated ¶
func (s *InMemBaseStorage) SegmentsUpdated() int
func (*InMemBaseStorage) Size ¶
func (s *InMemBaseStorage) Size() int
type MutableStorable ¶
type MutableStorable struct {
// contains filtered or unexported fields
}
func (*MutableStorable) ByteSize ¶
func (s *MutableStorable) ByteSize() uint32
func (*MutableStorable) ChildStorables ¶
func (*MutableStorable) ChildStorables() []atree.Storable
func (*MutableStorable) StoredValue ¶
func (s *MutableStorable) StoredValue(atree.SlabStorage) (atree.Value, error)
type MutableValue ¶
type MutableValue struct {
// contains filtered or unexported fields
}
func NewMutableValue ¶
func NewMutableValue(storableSize uint32) *MutableValue
func (*MutableValue) Storable ¶
func (v *MutableValue) Storable(atree.SlabStorage, atree.Address, uint64) (atree.Storable, error)
func (*MutableValue) UpdateStorableSize ¶
func (v *MutableValue) UpdateStorableSize(n uint32)
type SimpleTypeInfo ¶
type SimpleTypeInfo struct {
// contains filtered or unexported fields
}
func NewSimpleTypeInfo ¶
func NewSimpleTypeInfo(value uint64) SimpleTypeInfo
func (SimpleTypeInfo) Copy ¶
func (i SimpleTypeInfo) Copy() atree.TypeInfo
func (SimpleTypeInfo) Encode ¶
func (i SimpleTypeInfo) Encode(enc *cbor.StreamEncoder) error
func (SimpleTypeInfo) Identifier ¶
func (i SimpleTypeInfo) Identifier() string
func (SimpleTypeInfo) IsComposite ¶
func (i SimpleTypeInfo) IsComposite() bool
func (SimpleTypeInfo) Value ¶
func (i SimpleTypeInfo) Value() uint64
type SomeStorable ¶
func (SomeStorable) ByteSize ¶
func (s SomeStorable) ByteSize() uint32
func (SomeStorable) ChildStorables ¶
func (s SomeStorable) ChildStorables() []atree.Storable
func (SomeStorable) HasPointer ¶
func (s SomeStorable) HasPointer() bool
func (SomeStorable) StoredValue ¶
func (s SomeStorable) StoredValue(storage atree.SlabStorage) (atree.Value, error)
func (SomeStorable) String ¶
func (s SomeStorable) String() string
func (SomeStorable) UnwrapAtreeStorable ¶
func (s SomeStorable) UnwrapAtreeStorable() atree.Storable
func (SomeStorable) WrapAtreeStorable ¶
func (s SomeStorable) WrapAtreeStorable(storable atree.Storable) atree.Storable
type StringValue ¶
type StringValue struct {
// contains filtered or unexported fields
}
func NewStringValue ¶
func NewStringValue(s string) StringValue
func (StringValue) ByteSize ¶
func (v StringValue) ByteSize() uint32
func (StringValue) ChildStorables ¶
func (v StringValue) ChildStorables() []atree.Storable
func (StringValue) Copy ¶
func (v StringValue) Copy() atree.Storable
func (StringValue) ID ¶
func (v StringValue) ID() string
func (StringValue) Storable ¶
func (v StringValue) Storable(storage atree.SlabStorage, address atree.Address, maxInlineSize uint64) (atree.Storable, error)
func (StringValue) StoredValue ¶
func (v StringValue) StoredValue(_ atree.SlabStorage) (atree.Value, error)
func (StringValue) String ¶
func (v StringValue) String() string
type Uint16Value ¶
type Uint16Value uint16
func (Uint16Value) ByteSize ¶
func (v Uint16Value) ByteSize() uint32
func (Uint16Value) ChildStorables ¶
func (v Uint16Value) ChildStorables() []atree.Storable
func (Uint16Value) Storable ¶
func (v Uint16Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
func (Uint16Value) StoredValue ¶
func (v Uint16Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
func (Uint16Value) String ¶
func (v Uint16Value) String() string
type Uint32Value ¶
type Uint32Value uint32
func (Uint32Value) ByteSize ¶
func (v Uint32Value) ByteSize() uint32
func (Uint32Value) ChildStorables ¶
func (v Uint32Value) ChildStorables() []atree.Storable
func (Uint32Value) Encode ¶
func (v Uint32Value) Encode(enc *atree.Encoder) error
Encode encodes UInt32Value as
cbor.Tag{
Number: cborTagUInt32Value,
Content: uint32(v),
}
func (Uint32Value) Storable ¶
func (v Uint32Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
func (Uint32Value) StoredValue ¶
func (v Uint32Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
func (Uint32Value) String ¶
func (v Uint32Value) String() string
type Uint64Value ¶
type Uint64Value uint64
func NewUint64ValueFromInteger ¶
func NewUint64ValueFromInteger(i int) Uint64Value
func (Uint64Value) ByteSize ¶
func (v Uint64Value) ByteSize() uint32
func (Uint64Value) ChildStorables ¶
func (v Uint64Value) ChildStorables() []atree.Storable
func (Uint64Value) Encode ¶
func (v Uint64Value) Encode(enc *atree.Encoder) error
Encode encodes UInt64Value as
cbor.Tag{
Number: cborTagUInt64Value,
Content: uint64(v),
}
func (Uint64Value) Storable ¶
func (v Uint64Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
func (Uint64Value) StoredValue ¶
func (v Uint64Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
func (Uint64Value) String ¶
func (v Uint64Value) String() string
type Uint8Value ¶
type Uint8Value uint8
func (Uint8Value) ByteSize ¶
func (v Uint8Value) ByteSize() uint32
func (Uint8Value) ChildStorables ¶
func (v Uint8Value) ChildStorables() []atree.Storable
func (Uint8Value) Encode ¶
func (v Uint8Value) Encode(enc *atree.Encoder) error
Encode encodes UInt8Value as
cbor.Tag{
Number: cborTagUInt8Value,
Content: uint8(v),
}
func (Uint8Value) Storable ¶
func (v Uint8Value) Storable(_ atree.SlabStorage, _ atree.Address, _ uint64) (atree.Storable, error)
func (Uint8Value) StoredValue ¶
func (v Uint8Value) StoredValue(_ atree.SlabStorage) (atree.Value, error)
func (Uint8Value) String ¶
func (v Uint8Value) String() string
Click to show internal directories.
Click to hide internal directories.