Versions in this module Expand all Collapse all v1 v1.11.13-rc.2 Dec 4, 2024 v1.0.0 Dec 4, 2024 Changes in this version + var ErrCantPackVersion = errors.New("couldn't pack codec version") + var ErrCantUnpackVersion = errors.New("couldn't unpack codec version") + var ErrDoesNotImplementInterface = errors.New("does not implement interface") + var ErrDuplicateType = errors.New("duplicate type registration") + var ErrDuplicatedVersion = errors.New("duplicated codec version") + var ErrExtraSpace = errors.New("trailing buffer space") + var ErrMarshalNil = errors.New("can't marshal nil pointer or interface") + var ErrMarshalZeroLength = errors.New("can't marshal zero length value") + var ErrMaxSliceLenExceeded = errors.New("max slice length exceeded") + var ErrUnexportedField = errors.New("unexported field") + var ErrUnknownVersion = errors.New("unknown codec version") + var ErrUnmarshalNil = errors.New("can't unmarshal nil") + var ErrUnmarshalTooBig = errors.New("byte array exceeds maximum length") + var ErrUnmarshalZeroLength = errors.New("can't unmarshal zero length value") + var ErrUnsupportedType = errors.New("unsupported type") + var MultipleTagsTests = []func(c GeneralCodec, t testing.TB) + var Tests = []func(c GeneralCodec, t testing.TB) + func FuzzStructUnmarshal(codec GeneralCodec, f *testing.F) + func TestArray(codec GeneralCodec, t testing.TB) + func TestArrayOfInterface(codec GeneralCodec, t testing.TB) + func TestBigArray(codec GeneralCodec, t testing.TB) + func TestBool(codec GeneralCodec, t testing.TB) + func TestCanMarshalLargeSlices(codec GeneralCodec, t testing.TB) + func TestEmptySliceSerialization(codec GeneralCodec, t testing.TB) + func TestExtraSpace(codec GeneralCodec, t testing.TB) + func TestInterface(codec GeneralCodec, t testing.TB) + func TestMap(codec GeneralCodec, t testing.TB) + func TestMapWithEmptySerialization(codec GeneralCodec, t testing.TB) + func TestMapWithEmptySerializationError(codec GeneralCodec, t testing.TB) + func TestMaxSizeSlice(codec GeneralCodec, t testing.TB) + func TestMultipleTags(codec GeneralCodec, t testing.TB) + func TestNegativeNumbers(codec GeneralCodec, t testing.TB) + func TestNilSlice(codec GeneralCodec, t testing.TB) + func TestNilSliceSerialization(codec GeneralCodec, t testing.TB) + func TestPointerToInterface(codec GeneralCodec, t testing.TB) + func TestPointerToStruct(codec GeneralCodec, t testing.TB) + func TestRegisterStructTwice(codec GeneralCodec, t testing.TB) + func TestSerializeOfNoSerializeField(codec GeneralCodec, t testing.TB) + func TestSerializeUnexportedField(codec GeneralCodec, t testing.TB) + func TestSlice(codec GeneralCodec, t testing.TB) + func TestSliceLengthOverflow(codec GeneralCodec, t testing.TB) + func TestSliceOfInterface(codec GeneralCodec, t testing.TB) + func TestSliceOfStruct(codec GeneralCodec, t testing.TB) + func TestSliceTooLarge(codec GeneralCodec, t testing.TB) + func TestSliceWithEmptySerialization(codec GeneralCodec, t testing.TB) + func TestSliceWithEmptySerializationError(codec GeneralCodec, t testing.TB) + func TestString(codec GeneralCodec, t testing.TB) + func TestStruct(codec GeneralCodec, t testing.TB) + func TestTooLargeUnmarshal(codec GeneralCodec, t testing.TB) + func TestUInt32(codec GeneralCodec, t testing.TB) + func TestUIntPtr(codec GeneralCodec, t testing.TB) + func TestUnmarshalInvalidInterface(codec GeneralCodec, t testing.TB) + type Codec interface + MarshalInto func(interface{}, *wrappers.Packer) error + Size func(value interface{}) (int, error) + Unmarshal func([]byte, interface{}) error + type Foo interface + Foo func() int + type GeneralCodec interface + type Manager interface + Marshal func(version uint16, source interface{}) (destination []byte, err error) + RegisterCodec func(version uint16, codec Codec) error + Size func(version uint16, value interface{}) (int, error) + Unmarshal func(source []byte, destination interface{}) (version uint16, err error) + func NewDefaultManager() Manager + func NewManager(maxSize int) Manager + type MockManager struct + func NewMockManager(ctrl *gomock.Controller) *MockManager + func (m *MockManager) EXPECT() *MockManagerMockRecorder + func (m *MockManager) Marshal(arg0 uint16, arg1 any) ([]byte, error) + func (m *MockManager) RegisterCodec(arg0 uint16, arg1 Codec) error + func (m *MockManager) Size(arg0 uint16, arg1 any) (int, error) + func (m *MockManager) Unmarshal(arg0 []byte, arg1 any) (uint16, error) + type MockManagerMockRecorder struct + func (mr *MockManagerMockRecorder) Marshal(arg0, arg1 any) *gomock.Call + func (mr *MockManagerMockRecorder) RegisterCodec(arg0, arg1 any) *gomock.Call + func (mr *MockManagerMockRecorder) Size(arg0, arg1 any) *gomock.Call + func (mr *MockManagerMockRecorder) Unmarshal(arg0, arg1 any) *gomock.Call + type MultipleVersionsStruct struct + BothTags string + EitherTags1 string + EitherTags2 string + NoTags string + SingleTag1 string + SingleTag2 string + type MyInnerStruct struct + Str string + func (*MyInnerStruct) Foo() int + type MyInnerStruct2 struct + Bool bool + func (*MyInnerStruct2) Foo() int + type MyInnerStruct3 struct + F Foo + M1 MyInnerStruct + Str string + type Registry interface + RegisterType func(interface{}) error