Documentation ¶
Index ¶
- func GetSerdeType[T any]() reflect.Type
- func GetSerdeTypeName[T any]() string
- func GetSerdeTypeWithoutPtr[T any]() reflect.Type
- func IsTypePtr[T any]() bool
- type ArraySerde
- func (s *ArraySerde[T]) Deserialize(data []byte) (T, error)
- func (s *ArraySerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *ArraySerde) IsStub() bool
- func (s *ArraySerde[T]) Serialize(value T, b []byte) ([]byte, error)
- func (s *ArraySerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type BaseType
- type BoolSerde
- func (s *BoolSerde) Deserialize(data []byte) (bool, error)
- func (s *BoolSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *BoolSerde) IsStub() bool
- func (s *BoolSerde) Serialize(value bool, b []byte) ([]byte, error)
- func (s *BoolSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type BytesSerde
- func (s *BytesSerde) Deserialize(data []byte) ([]byte, error)
- func (s *BytesSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *BytesSerde) IsStub() bool
- func (s *BytesSerde) Serialize(value []byte, b []byte) ([]byte, error)
- func (s *BytesSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type FixedSizeTypeArraySerde
- func (s *FixedSizeTypeArraySerde[T]) Deserialize(data []byte) ([]T, error)
- func (s *FixedSizeTypeArraySerde[T]) DeserializeObj(data []byte) (interface{}, error)
- func (s *FixedSizeTypeArraySerde[T]) IsStub() bool
- func (s *FixedSizeTypeArraySerde[T]) Serialize(value []T, b []byte) ([]byte, error)
- func (s *FixedSizeTypeArraySerde[T]) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Float32Serde
- func (s *Float32Serde) Deserialize(data []byte) (float32, error)
- func (s *Float32Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *Float32Serde) IsStub() bool
- func (s *Float32Serde) Serialize(value float32, b []byte) ([]byte, error)
- func (s *Float32Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Float64Serde
- func (s *Float64Serde) Deserialize(data []byte) (float64, error)
- func (s *Float64Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *Float64Serde) IsStub() bool
- func (s *Float64Serde) Serialize(value float64, b []byte) ([]byte, error)
- func (s *Float64Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Int16Serde
- func (s *Int16Serde) Deserialize(data []byte) (int16, error)
- func (s *Int16Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *Int16Serde) IsStub() bool
- func (s *Int16Serde) Serialize(value int16, b []byte) ([]byte, error)
- func (s *Int16Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Int32Serde
- func (s *Int32Serde) Deserialize(data []byte) (int32, error)
- func (s *Int32Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *Int32Serde) IsStub() bool
- func (s *Int32Serde) Serialize(value int32, b []byte) ([]byte, error)
- func (s *Int32Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Int64Serde
- func (s *Int64Serde) Deserialize(data []byte) (int64, error)
- func (s *Int64Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *Int64Serde) IsStub() bool
- func (s *Int64Serde) Serialize(value int64, b []byte) ([]byte, error)
- func (s *Int64Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Int8Serde
- func (s *Int8Serde) Deserialize(data []byte) (int8, error)
- func (s *Int8Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *Int8Serde) IsStub() bool
- func (s *Int8Serde) Serialize(value int8, b []byte) ([]byte, error)
- func (s *Int8Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type IntArraySerde
- func (s *IntArraySerde) Deserialize(data []byte) ([]int, error)
- func (s *IntArraySerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *IntArraySerde) IsStub() bool
- func (s *IntArraySerde) Serialize(value []int, b []byte) ([]byte, error)
- func (s *IntArraySerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type IntSerde
- func (s *IntSerde) Deserialize(data []byte) (int, error)
- func (s *IntSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *IntSerde) IsStub() bool
- func (s *IntSerde) Serialize(value int, b []byte) ([]byte, error)
- func (s *IntSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type MapSerde
- func (s *MapSerde[T]) Deserialize(data []byte) (T, error)
- func (s *MapSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *MapSerde) IsStub() bool
- func (s *MapSerde[T]) Serialize(value T, b []byte) ([]byte, error)
- func (s *MapSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type RuneSerde
- func (s *RuneSerde) Deserialize(data []byte) (rune, error)
- func (s *RuneSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *RuneSerde) IsStub() bool
- func (s *RuneSerde) Serialize(value rune, b []byte) ([]byte, error)
- func (s *RuneSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type Serde
- type Serializer
- type StreamKeyValueSerde
- type StreamSerde
- type StreamSerializer
- type StringSerde
- func (s *StringSerde) Deserialize(data []byte) (string, error)
- func (s *StringSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *StringSerde) IsStub() bool
- func (s *StringSerde) Serialize(value string, b []byte) ([]byte, error)
- func (s *StringSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type StubSerde
- func (s *StubSerde[T]) Deserialize([]byte) (T, error)
- func (s *StubSerde[T]) DeserializeObj(data []byte) (interface{}, error)
- func (s *StubSerde[T]) IsStub() bool
- func (s *StubSerde[T]) Serialize(T, []byte) ([]byte, error)
- func (s *StubSerde[T]) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type UInt16Serde
- func (s *UInt16Serde) Deserialize(data []byte) (uint16, error)
- func (s *UInt16Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *UInt16Serde) IsStub() bool
- func (s *UInt16Serde) Serialize(value uint16, b []byte) ([]byte, error)
- func (s *UInt16Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type UInt32Serde
- func (s *UInt32Serde) Deserialize(data []byte) (uint32, error)
- func (s *UInt32Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *UInt32Serde) IsStub() bool
- func (s *UInt32Serde) Serialize(value uint32, b []byte) ([]byte, error)
- func (s *UInt32Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type UInt64Serde
- func (s *UInt64Serde) Deserialize(data []byte) (uint64, error)
- func (s *UInt64Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *UInt64Serde) IsStub() bool
- func (s *UInt64Serde) Serialize(value uint64, b []byte) ([]byte, error)
- func (s *UInt64Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type UInt8Serde
- func (s *UInt8Serde) Deserialize(data []byte) (uint8, error)
- func (s *UInt8Serde) DeserializeObj(data []byte) (interface{}, error)
- func (s *UInt8Serde) IsStub() bool
- func (s *UInt8Serde) Serialize(value uint8, b []byte) ([]byte, error)
- func (s *UInt8Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type UIntArraySerde
- func (s *UIntArraySerde) Deserialize(data []byte) ([]uint, error)
- func (s *UIntArraySerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *UIntArraySerde) IsStub() bool
- func (s *UIntArraySerde) Serialize(value []uint, b []byte) ([]byte, error)
- func (s *UIntArraySerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
- type UIntSerde
- func (s *UIntSerde) Deserialize(data []byte) (uint, error)
- func (s *UIntSerde) DeserializeObj(data []byte) (interface{}, error)
- func (s *UIntSerde) IsStub() bool
- func (s *UIntSerde) Serialize(value uint, b []byte) ([]byte, error)
- func (s *UIntSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSerdeType ¶
func GetSerdeTypeName ¶ added in v0.0.144
func GetSerdeTypeWithoutPtr ¶ added in v0.0.144
Types ¶
type ArraySerde ¶
type ArraySerde[T any] struct { // contains filtered or unexported fields }
func MakeTypedArraySerde ¶
func MakeTypedArraySerde[T any](valueSerde Serializer) (*ArraySerde[T], error)
func (*ArraySerde[T]) Deserialize ¶
func (s *ArraySerde[T]) Deserialize(data []byte) (T, error)
func (*ArraySerde) DeserializeObj ¶
func (*ArraySerde[T]) Serialize ¶
func (s *ArraySerde[T]) Serialize(value T, b []byte) ([]byte, error)
func (*ArraySerde) SerializeObj ¶
type BytesSerde ¶ added in v0.0.138
type BytesSerde struct { }
func (*BytesSerde) Deserialize ¶ added in v0.0.138
func (s *BytesSerde) Deserialize(data []byte) ([]byte, error)
func (*BytesSerde) DeserializeObj ¶ added in v0.0.138
func (s *BytesSerde) DeserializeObj(data []byte) (interface{}, error)
func (*BytesSerde) IsStub ¶ added in v0.0.144
func (s *BytesSerde) IsStub() bool
func (*BytesSerde) Serialize ¶ added in v0.0.138
func (s *BytesSerde) Serialize(value []byte, b []byte) ([]byte, error)
func (*BytesSerde) SerializeObj ¶ added in v0.0.138
func (s *BytesSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type FixedSizeTypeArraySerde ¶ added in v0.0.141
type FixedSizeTypeArraySerde[T BaseType] struct { }
func (*FixedSizeTypeArraySerde[T]) Deserialize ¶ added in v0.0.141
func (s *FixedSizeTypeArraySerde[T]) Deserialize(data []byte) ([]T, error)
func (*FixedSizeTypeArraySerde[T]) DeserializeObj ¶ added in v0.0.141
func (s *FixedSizeTypeArraySerde[T]) DeserializeObj(data []byte) (interface{}, error)
func (*FixedSizeTypeArraySerde[T]) IsStub ¶ added in v0.0.144
func (s *FixedSizeTypeArraySerde[T]) IsStub() bool
func (*FixedSizeTypeArraySerde[T]) Serialize ¶ added in v0.0.141
func (s *FixedSizeTypeArraySerde[T]) Serialize(value []T, b []byte) ([]byte, error)
func (*FixedSizeTypeArraySerde[T]) SerializeObj ¶ added in v0.0.141
func (s *FixedSizeTypeArraySerde[T]) SerializeObj(value interface{}, b []byte) ([]byte, error)
type Float32Serde ¶
type Float32Serde struct { }
func (*Float32Serde) Deserialize ¶
func (s *Float32Serde) Deserialize(data []byte) (float32, error)
func (*Float32Serde) DeserializeObj ¶
func (s *Float32Serde) DeserializeObj(data []byte) (interface{}, error)
func (*Float32Serde) IsStub ¶ added in v0.0.144
func (s *Float32Serde) IsStub() bool
func (*Float32Serde) Serialize ¶
func (s *Float32Serde) Serialize(value float32, b []byte) ([]byte, error)
func (*Float32Serde) SerializeObj ¶
func (s *Float32Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type Float64Serde ¶
type Float64Serde struct { }
func (*Float64Serde) Deserialize ¶
func (s *Float64Serde) Deserialize(data []byte) (float64, error)
func (*Float64Serde) DeserializeObj ¶
func (s *Float64Serde) DeserializeObj(data []byte) (interface{}, error)
func (*Float64Serde) IsStub ¶ added in v0.0.144
func (s *Float64Serde) IsStub() bool
func (*Float64Serde) Serialize ¶
func (s *Float64Serde) Serialize(value float64, b []byte) ([]byte, error)
func (*Float64Serde) SerializeObj ¶
func (s *Float64Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type Int16Serde ¶
type Int16Serde struct { }
func (*Int16Serde) Deserialize ¶
func (s *Int16Serde) Deserialize(data []byte) (int16, error)
func (*Int16Serde) DeserializeObj ¶
func (s *Int16Serde) DeserializeObj(data []byte) (interface{}, error)
func (*Int16Serde) IsStub ¶ added in v0.0.144
func (s *Int16Serde) IsStub() bool
func (*Int16Serde) Serialize ¶
func (s *Int16Serde) Serialize(value int16, b []byte) ([]byte, error)
func (*Int16Serde) SerializeObj ¶
func (s *Int16Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type Int32Serde ¶
type Int32Serde struct { }
func (*Int32Serde) Deserialize ¶
func (s *Int32Serde) Deserialize(data []byte) (int32, error)
func (*Int32Serde) DeserializeObj ¶
func (s *Int32Serde) DeserializeObj(data []byte) (interface{}, error)
func (*Int32Serde) IsStub ¶ added in v0.0.144
func (s *Int32Serde) IsStub() bool
func (*Int32Serde) Serialize ¶
func (s *Int32Serde) Serialize(value int32, b []byte) ([]byte, error)
func (*Int32Serde) SerializeObj ¶
func (s *Int32Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type Int64Serde ¶
type Int64Serde struct { }
func (*Int64Serde) Deserialize ¶
func (s *Int64Serde) Deserialize(data []byte) (int64, error)
func (*Int64Serde) DeserializeObj ¶
func (s *Int64Serde) DeserializeObj(data []byte) (interface{}, error)
func (*Int64Serde) IsStub ¶ added in v0.0.144
func (s *Int64Serde) IsStub() bool
func (*Int64Serde) Serialize ¶
func (s *Int64Serde) Serialize(value int64, b []byte) ([]byte, error)
func (*Int64Serde) SerializeObj ¶
func (s *Int64Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type IntArraySerde ¶ added in v0.0.141
type IntArraySerde struct { }
func (*IntArraySerde) Deserialize ¶ added in v0.0.141
func (s *IntArraySerde) Deserialize(data []byte) ([]int, error)
func (*IntArraySerde) DeserializeObj ¶ added in v0.0.141
func (s *IntArraySerde) DeserializeObj(data []byte) (interface{}, error)
func (*IntArraySerde) IsStub ¶ added in v0.0.144
func (s *IntArraySerde) IsStub() bool
func (*IntArraySerde) Serialize ¶ added in v0.0.141
func (s *IntArraySerde) Serialize(value []int, b []byte) ([]byte, error)
func (*IntArraySerde) SerializeObj ¶ added in v0.0.141
func (s *IntArraySerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type MapSerde ¶
type MapSerde[T any] struct { // contains filtered or unexported fields }
func (*MapSerde[T]) Deserialize ¶
func (*MapSerde) DeserializeObj ¶
func (*MapSerde) SerializeObj ¶
type Serde ¶
type Serde[T any] interface { Serializer Serialize(T, []byte) ([]byte, error) Deserialize([]byte) (T, error) }
func MakeTypedMapSerde ¶
func MakeTypedMapSerde[T any](keyArraySerde Serializer, valueArraySerde Serializer) (Serde[T], error)
type Serializer ¶
type Serializer interface { SerializeObj(interface{}, []byte) ([]byte, error) DeserializeObj([]byte) (interface{}, error) IsStub() bool }
func MakeArraySerde ¶
func MakeArraySerde(arrayType reflect.Type, valueSerde Serializer) Serializer
func MakeDefaultSerde ¶
func MakeDefaultSerde(valueType reflect.Type) (Serializer, error)
func MakeMapSerde ¶
func MakeMapSerde(mapType reflect.Type, keyArraySerde Serializer, valueArraySerde Serializer) Serializer
type StreamKeyValueSerde ¶
type StreamKeyValueSerde[T any] interface { StreamSerde[T] SerializeKey(T) ([]byte, error) SerializeValue(T) ([]byte, error) KeySerializer() Serializer DeserializeKeyValue([]byte, []byte) (T, error) }
func MakeStreamKeyValueSerde ¶
func MakeStreamKeyValueSerde[K comparable, V any](serdeKey Serde[K], serdeValue Serde[V]) StreamKeyValueSerde[datastruct.KeyValue[K, V]]
type StreamSerde ¶
type StreamSerde[T any] interface { StreamSerializer ValueSerializer() Serializer Serialize(T) ([]byte, error) Deserialize([]byte) (T, error) }
func MakeStreamSerde ¶
func MakeStreamSerde[T any](serde Serde[T]) StreamSerde[T]
type StreamSerializer ¶
type StreamSerializer interface {
IsKeyValue() bool
}
type StringSerde ¶
type StringSerde struct { }
func (*StringSerde) Deserialize ¶
func (s *StringSerde) Deserialize(data []byte) (string, error)
func (*StringSerde) DeserializeObj ¶
func (s *StringSerde) DeserializeObj(data []byte) (interface{}, error)
func (*StringSerde) IsStub ¶ added in v0.0.144
func (s *StringSerde) IsStub() bool
func (*StringSerde) Serialize ¶
func (s *StringSerde) Serialize(value string, b []byte) ([]byte, error)
func (*StringSerde) SerializeObj ¶
func (s *StringSerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type StubSerde ¶ added in v0.0.138
type StubSerde[T any] struct { }
func MakeStubSerde ¶
func (*StubSerde[T]) Deserialize ¶ added in v0.0.138
func (*StubSerde[T]) DeserializeObj ¶ added in v0.0.138
type UInt16Serde ¶
type UInt16Serde struct { }
func (*UInt16Serde) Deserialize ¶
func (s *UInt16Serde) Deserialize(data []byte) (uint16, error)
func (*UInt16Serde) DeserializeObj ¶
func (s *UInt16Serde) DeserializeObj(data []byte) (interface{}, error)
func (*UInt16Serde) IsStub ¶ added in v0.0.144
func (s *UInt16Serde) IsStub() bool
func (*UInt16Serde) Serialize ¶
func (s *UInt16Serde) Serialize(value uint16, b []byte) ([]byte, error)
func (*UInt16Serde) SerializeObj ¶
func (s *UInt16Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type UInt32Serde ¶
type UInt32Serde struct { }
func (*UInt32Serde) Deserialize ¶
func (s *UInt32Serde) Deserialize(data []byte) (uint32, error)
func (*UInt32Serde) DeserializeObj ¶
func (s *UInt32Serde) DeserializeObj(data []byte) (interface{}, error)
func (*UInt32Serde) IsStub ¶ added in v0.0.144
func (s *UInt32Serde) IsStub() bool
func (*UInt32Serde) Serialize ¶
func (s *UInt32Serde) Serialize(value uint32, b []byte) ([]byte, error)
func (*UInt32Serde) SerializeObj ¶
func (s *UInt32Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type UInt64Serde ¶
type UInt64Serde struct { }
func (*UInt64Serde) Deserialize ¶
func (s *UInt64Serde) Deserialize(data []byte) (uint64, error)
func (*UInt64Serde) DeserializeObj ¶
func (s *UInt64Serde) DeserializeObj(data []byte) (interface{}, error)
func (*UInt64Serde) IsStub ¶ added in v0.0.144
func (s *UInt64Serde) IsStub() bool
func (*UInt64Serde) Serialize ¶
func (s *UInt64Serde) Serialize(value uint64, b []byte) ([]byte, error)
func (*UInt64Serde) SerializeObj ¶
func (s *UInt64Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type UInt8Serde ¶
type UInt8Serde struct { }
func (*UInt8Serde) Deserialize ¶
func (s *UInt8Serde) Deserialize(data []byte) (uint8, error)
func (*UInt8Serde) DeserializeObj ¶
func (s *UInt8Serde) DeserializeObj(data []byte) (interface{}, error)
func (*UInt8Serde) IsStub ¶ added in v0.0.144
func (s *UInt8Serde) IsStub() bool
func (*UInt8Serde) Serialize ¶
func (s *UInt8Serde) Serialize(value uint8, b []byte) ([]byte, error)
func (*UInt8Serde) SerializeObj ¶
func (s *UInt8Serde) SerializeObj(value interface{}, b []byte) ([]byte, error)
type UIntArraySerde ¶ added in v0.0.141
type UIntArraySerde struct { }
func (*UIntArraySerde) Deserialize ¶ added in v0.0.141
func (s *UIntArraySerde) Deserialize(data []byte) ([]uint, error)
func (*UIntArraySerde) DeserializeObj ¶ added in v0.0.141
func (s *UIntArraySerde) DeserializeObj(data []byte) (interface{}, error)
func (*UIntArraySerde) IsStub ¶ added in v0.0.144
func (s *UIntArraySerde) IsStub() bool
func (*UIntArraySerde) Serialize ¶ added in v0.0.141
func (s *UIntArraySerde) Serialize(value []uint, b []byte) ([]byte, error)
func (*UIntArraySerde) SerializeObj ¶ added in v0.0.141
func (s *UIntArraySerde) SerializeObj(value interface{}, b []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.