Versions in this module Expand all Collapse all v1 v1.11.11 Aug 6, 2024 Changes in this version + const VersionSize + 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") + type Codec interface + MarshalInto func(interface{}, *wrappers.Packer) error + Size func(value interface{}) (int, error) + Unmarshal func([]byte, interface{}) error + 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 Registry interface + RegisterType func(interface{}) error