From 9bbda716aad0df9b451148b2bdef76ae1fcf29e6 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Thu, 9 May 2024 11:31:56 +0200 Subject: [PATCH] feat: bump vtprotobuf (#225) * build: bump protobuf version * feat: regenerate modelpb * build: add vtprotobuf dep * build: bump linters --- Makefile | 4 +- go.mod | 1 + go.sum | 2 + model/modelpb/agent.pb.go | 4 +- model/modelpb/agent_vtproto.pb.go | 153 ++------- model/modelpb/apmevent.pb.go | 4 +- model/modelpb/apmevent_vtproto.pb.go | 397 ++++++++++++------------ model/modelpb/child_vtproto.pb.go | 200 ------------ model/modelpb/client.pb.go | 4 +- model/modelpb/client_vtproto.pb.go | 35 ++- model/modelpb/cloud.pb.go | 4 +- model/modelpb/cloud_vtproto.pb.go | 175 +++++------ model/modelpb/code.pb.go | 4 +- model/modelpb/code_vtproto.pb.go | 19 +- model/modelpb/container.pb.go | 4 +- model/modelpb/container_vtproto.pb.go | 59 ++-- model/modelpb/datastream.pb.go | 4 +- model/modelpb/datastream_vtproto.pb.go | 39 +-- model/modelpb/destination.pb.go | 4 +- model/modelpb/destination_vtproto.pb.go | 25 +- model/modelpb/device.pb.go | 4 +- model/modelpb/device_vtproto.pb.go | 65 ++-- model/modelpb/error.pb.go | 4 +- model/modelpb/error_vtproto.pb.go | 233 +++++++------- model/modelpb/event.pb.go | 4 +- model/modelpb/event_vtproto.pb.go | 97 +++--- model/modelpb/experience.pb.go | 4 +- model/modelpb/experience_vtproto.pb.go | 31 +- model/modelpb/faas.pb.go | 4 +- model/modelpb/faas_vtproto.pb.go | 71 ++--- model/modelpb/headers.pb.go | 4 +- model/modelpb/headers_vtproto.pb.go | 29 +- model/modelpb/host.pb.go | 4 +- model/modelpb/host_vtproto.pb.go | 79 ++--- model/modelpb/http.pb.go | 4 +- model/modelpb/http_vtproto.pb.go | 208 ++++++------- model/modelpb/ip.pb.go | 4 +- model/modelpb/ip_vtproto.pb.go | 19 +- model/modelpb/keyvalue.pb.go | 4 +- model/modelpb/keyvalue_vtproto.pb.go | 78 ++--- model/modelpb/kubernetes.pb.go | 4 +- model/modelpb/kubernetes_vtproto.pb.go | 49 +-- model/modelpb/labels.pb.go | 4 +- model/modelpb/labels_vtproto.pb.go | 49 +-- model/modelpb/log.pb.go | 4 +- model/modelpb/log_vtproto.pb.go | 87 +++--- model/modelpb/message.pb.go | 4 +- model/modelpb/message_vtproto.pb.go | 55 ++-- model/modelpb/metricset.pb.go | 4 +- model/modelpb/metricset_vtproto.pb.go | 161 +++++----- model/modelpb/network.pb.go | 4 +- model/modelpb/network_vtproto.pb.go | 101 +++--- model/modelpb/observer.pb.go | 4 +- model/modelpb/observer_vtproto.pb.go | 49 +-- model/modelpb/os.pb.go | 4 +- model/modelpb/os_vtproto.pb.go | 59 ++-- model/modelpb/parent_vtproto.pb.go | 193 ------------ model/modelpb/process.pb.go | 4 +- model/modelpb/process_vtproto.pb.go | 93 +++--- model/modelpb/service.pb.go | 4 +- model/modelpb/service_vtproto.pb.go | 255 +++++++-------- model/modelpb/session.pb.go | 4 +- model/modelpb/session_vtproto.pb.go | 25 +- model/modelpb/source.pb.go | 4 +- model/modelpb/source_vtproto.pb.go | 61 ++-- model/modelpb/span.pb.go | 4 +- model/modelpb/span_vtproto.pb.go | 293 ++++++++--------- model/modelpb/stacktrace.pb.go | 4 +- model/modelpb/stacktrace_vtproto.pb.go | 197 ++++++------ model/modelpb/trace.pb.go | 4 +- model/modelpb/trace_vtproto.pb.go | 19 +- model/modelpb/transaction.pb.go | 4 +- model/modelpb/transaction_vtproto.pb.go | 275 ++++++++-------- model/modelpb/url.pb.go | 4 +- model/modelpb/url_vtproto.pb.go | 85 ++--- model/modelpb/user.pb.go | 4 +- model/modelpb/user_vtproto.pb.go | 49 +-- model/modelpb/useragent.pb.go | 4 +- model/modelpb/useragent_vtproto.pb.go | 29 +- tools/install-protobuf.sh | 6 +- 80 files changed, 1919 insertions(+), 2438 deletions(-) delete mode 100644 model/modelpb/child_vtproto.pb.go delete mode 100644 model/modelpb/parent_vtproto.pb.go diff --git a/Makefile b/Makefile index a3986ff5..c70f22e6 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ test: go test -v -race ./... fmt: - go run golang.org/x/tools/cmd/goimports@v0.3.0 -w . + go run golang.org/x/tools/cmd/goimports@v0.18.0 -w . protolint: docker run --volume "$(PWD):/workspace" --workdir /workspace bufbuild/buf lint model/proto @@ -20,7 +20,7 @@ generate_code: generate: generate_code update-licenses fieldalignment: - go run golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@v0.4.0 -test=false $(shell go list ./... | grep -v modeldecoder/generator | grep -v test | grep -v model/modelpb) + go run golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@v0.18.0 -test=false $(shell go list ./... | grep -v modeldecoder/generator | grep -v test | grep -v model/modelpb) update-licenses: go run github.com/elastic/go-licenser@v0.4.1 -ext .go . diff --git a/go.mod b/go.mod index e4c0bee2..c5642367 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.98.0 github.com/pkg/errors v0.9.1 + github.com/planetscale/vtprotobuf v0.6.0 github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonschema v1.2.0 go.elastic.co/apm/v2 v2.6.0 diff --git a/go.sum b/go.sum index 5282233a..c2af210c 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= +github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/model/modelpb/agent.pb.go b/model/modelpb/agent.pb.go index 5781d2ed..b332db6e 100644 --- a/model/modelpb/agent.pb.go +++ b/model/modelpb/agent.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: agent.proto package modelpb diff --git a/model/modelpb/agent_vtproto.pb.go b/model/modelpb/agent_vtproto.pb.go index 8c694310..c974156a 100644 --- a/model/modelpb/agent_vtproto.pb.go +++ b/model/modelpb/agent_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: agent.proto package modelpb @@ -24,9 +24,9 @@ package modelpb import ( fmt "fmt" io "io" - bits "math/bits" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -91,46 +91,34 @@ func (m *Agent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ActivationMethod) > 0 { i -= len(m.ActivationMethod) copy(dAtA[i:], m.ActivationMethod) - i = encodeVarint(dAtA, i, uint64(len(m.ActivationMethod))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ActivationMethod))) i-- dAtA[i] = 0x22 } if len(m.EphemeralId) > 0 { i -= len(m.EphemeralId) copy(dAtA[i:], m.EphemeralId) - i = encodeVarint(dAtA, i, uint64(len(m.EphemeralId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EphemeralId))) i-- dAtA[i] = 0x1a } if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - var vtprotoPool_Agent = sync.Pool{ New: func() interface{} { return &Agent{} @@ -159,30 +147,24 @@ func (m *Agent) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.EphemeralId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ActivationMethod) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *Agent) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -191,7 +173,7 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -219,7 +201,7 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -233,11 +215,11 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -251,7 +233,7 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -265,11 +247,11 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -283,7 +265,7 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -297,11 +279,11 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -315,7 +297,7 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -329,11 +311,11 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -342,12 +324,12 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -362,88 +344,3 @@ func (m *Agent) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/model/modelpb/apmevent.pb.go b/model/modelpb/apmevent.pb.go index cc337bef..673f70ef 100644 --- a/model/modelpb/apmevent.pb.go +++ b/model/modelpb/apmevent.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: apmevent.proto package modelpb diff --git a/model/modelpb/apmevent_vtproto.pb.go b/model/modelpb/apmevent_vtproto.pb.go index ebb2bd01..5f6a6942 100644 --- a/model/modelpb/apmevent_vtproto.pb.go +++ b/model/modelpb/apmevent_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: apmevent.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -139,7 +140,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2 i-- @@ -151,7 +152,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2 i-- @@ -163,7 +164,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2 i-- @@ -175,7 +176,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -187,7 +188,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -197,7 +198,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.ChildIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ChildIds[iNdEx]) copy(dAtA[i:], m.ChildIds[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.ChildIds[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ChildIds[iNdEx]))) i-- dAtA[i] = 0x1 i-- @@ -210,7 +211,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -222,7 +223,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -234,7 +235,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -246,7 +247,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -258,7 +259,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -270,7 +271,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -279,7 +280,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x1 i-- @@ -288,7 +289,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ParentId) > 0 { i -= len(m.ParentId) copy(dAtA[i:], m.ParentId) - i = encodeVarint(dAtA, i, uint64(len(m.ParentId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentId))) i-- dAtA[i] = 0x1 i-- @@ -300,7 +301,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -312,7 +313,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -324,7 +325,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -336,7 +337,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -348,7 +349,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1 i-- @@ -360,7 +361,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x7a } @@ -370,7 +371,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x72 } @@ -380,7 +381,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } @@ -390,7 +391,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x62 } @@ -400,7 +401,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x5a } @@ -410,7 +411,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x52 } @@ -420,7 +421,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x4a } @@ -430,7 +431,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x42 } @@ -440,7 +441,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } @@ -450,7 +451,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -460,7 +461,7 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -473,15 +474,15 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 } @@ -495,15 +496,15 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a } @@ -514,12 +515,12 @@ func (m *APMEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x8 } @@ -583,11 +584,11 @@ func (m *APMEvent) SizeVT() (n int) { var l int _ = l if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } if m.Span != nil { l = m.Span.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.NumericLabels) > 0 { for k, v := range m.NumericLabels { @@ -597,9 +598,9 @@ func (m *APMEvent) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if len(m.Labels) > 0 { @@ -610,132 +611,132 @@ func (m *APMEvent) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if m.Transaction != nil { l = m.Transaction.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Metricset != nil { l = m.Metricset.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Error != nil { l = m.Error.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Cloud != nil { l = m.Cloud.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Service != nil { l = m.Service.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Faas != nil { l = m.Faas.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Network != nil { l = m.Network.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Container != nil { l = m.Container.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.User != nil { l = m.User.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Device != nil { l = m.Device.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Kubernetes != nil { l = m.Kubernetes.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Observer != nil { l = m.Observer.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DataStream != nil { l = m.DataStream.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Agent != nil { l = m.Agent.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Http != nil { l = m.Http.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.UserAgent != nil { l = m.UserAgent.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ParentId) if l > 0 { - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Message) if l > 0 { - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Trace != nil { l = m.Trace.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Host != nil { l = m.Host.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Url != nil { l = m.Url.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Log != nil { l = m.Log.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Source != nil { l = m.Source.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Client != nil { l = m.Client.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ChildIds) > 0 { for _, s := range m.ChildIds { l = len(s) - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Destination != nil { l = m.Destination.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Session != nil { l = m.Session.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Process != nil { l = m.Process.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Event != nil { l = m.Event.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Code != nil { l = m.Code.SizeVT() - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -749,7 +750,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -777,7 +778,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -796,7 +797,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -809,11 +810,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -832,7 +833,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -845,11 +846,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -864,7 +865,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -881,7 +882,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -895,11 +896,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -910,7 +911,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -923,11 +924,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -939,12 +940,12 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -961,7 +962,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -974,11 +975,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -993,7 +994,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1010,7 +1011,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1024,11 +1025,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -1039,7 +1040,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1052,11 +1053,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -1068,12 +1069,12 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -1090,7 +1091,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1103,11 +1104,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1126,7 +1127,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1139,11 +1140,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1162,7 +1163,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1175,11 +1176,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1198,7 +1199,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1211,11 +1212,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1234,7 +1235,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1247,11 +1248,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1270,7 +1271,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1283,11 +1284,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1306,7 +1307,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1319,11 +1320,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1342,7 +1343,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1355,11 +1356,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1378,7 +1379,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1391,11 +1392,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1414,7 +1415,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1427,11 +1428,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1450,7 +1451,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1463,11 +1464,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1486,7 +1487,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1499,11 +1500,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1522,7 +1523,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1535,11 +1536,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1558,7 +1559,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1571,11 +1572,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1594,7 +1595,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1607,11 +1608,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1630,7 +1631,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1643,11 +1644,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1666,7 +1667,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1680,11 +1681,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1698,7 +1699,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1712,11 +1713,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1730,7 +1731,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1743,11 +1744,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1766,7 +1767,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1779,11 +1780,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1802,7 +1803,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1815,11 +1816,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1838,7 +1839,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1851,11 +1852,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1874,7 +1875,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1887,11 +1888,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1910,7 +1911,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1923,11 +1924,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1946,7 +1947,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1960,11 +1961,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1978,7 +1979,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1991,11 +1992,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2014,7 +2015,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2027,11 +2028,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2050,7 +2051,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2063,11 +2064,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2086,7 +2087,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2099,11 +2100,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2122,7 +2123,7 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2135,11 +2136,11 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2153,12 +2154,12 @@ func (m *APMEvent) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/child_vtproto.pb.go b/model/modelpb/child_vtproto.pb.go deleted file mode 100644 index 1ae72346..00000000 --- a/model/modelpb/child_vtproto.pb.go +++ /dev/null @@ -1,200 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 -// source: child.proto - -package modelpb - -import ( - fmt "fmt" - io "io" - - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *Child) CloneVT() *Child { - if m == nil { - return (*Child)(nil) - } - r := &Child{} - if rhs := m.Id; rhs != nil { - tmpContainer := make([]string, len(rhs)) - copy(tmpContainer, rhs) - r.Id = tmpContainer - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Child) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Child) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Child) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Child) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Id) > 0 { - for iNdEx := len(m.Id) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Id[iNdEx]) - copy(dAtA[i:], m.Id[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Id[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Child) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Id) > 0 { - for _, s := range m.Id { - l = len(s) - n += 1 + l + sov(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *Child) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Child: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Child: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = append(m.Id, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/model/modelpb/client.pb.go b/model/modelpb/client.pb.go index cd9acf18..25ed8c9c 100644 --- a/model/modelpb/client.pb.go +++ b/model/modelpb/client.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: client.proto package modelpb diff --git a/model/modelpb/client_vtproto.pb.go b/model/modelpb/client_vtproto.pb.go index e38c5709..6f41ddc9 100644 --- a/model/modelpb/client_vtproto.pb.go +++ b/model/modelpb/client_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: client.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -87,14 +88,14 @@ func (m *Client) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x18 } if len(m.Domain) > 0 { i -= len(m.Domain) copy(dAtA[i:], m.Domain) - i = encodeVarint(dAtA, i, uint64(len(m.Domain))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) i-- dAtA[i] = 0x12 } @@ -104,7 +105,7 @@ func (m *Client) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -140,14 +141,14 @@ func (m *Client) SizeVT() (n int) { _ = l if m.Ip != nil { l = m.Ip.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Domain) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -161,7 +162,7 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -189,7 +190,7 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -202,11 +203,11 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -225,7 +226,7 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -239,11 +240,11 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -257,7 +258,7 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -271,12 +272,12 @@ func (m *Client) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/cloud.pb.go b/model/modelpb/cloud.pb.go index 5b0d08ae..d3e568b6 100644 --- a/model/modelpb/cloud.pb.go +++ b/model/modelpb/cloud.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: cloud.proto package modelpb diff --git a/model/modelpb/cloud_vtproto.pb.go b/model/modelpb/cloud_vtproto.pb.go index 550f8b7c..90d90ae4 100644 --- a/model/modelpb/cloud_vtproto.pb.go +++ b/model/modelpb/cloud_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: cloud.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -118,77 +119,77 @@ func (m *Cloud) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ServiceName) > 0 { i -= len(m.ServiceName) copy(dAtA[i:], m.ServiceName) - i = encodeVarint(dAtA, i, uint64(len(m.ServiceName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServiceName))) i-- dAtA[i] = 0x62 } if len(m.Region) > 0 { i -= len(m.Region) copy(dAtA[i:], m.Region) - i = encodeVarint(dAtA, i, uint64(len(m.Region))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Region))) i-- dAtA[i] = 0x5a } if len(m.Provider) > 0 { i -= len(m.Provider) copy(dAtA[i:], m.Provider) - i = encodeVarint(dAtA, i, uint64(len(m.Provider))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Provider))) i-- dAtA[i] = 0x52 } if len(m.ProjectName) > 0 { i -= len(m.ProjectName) copy(dAtA[i:], m.ProjectName) - i = encodeVarint(dAtA, i, uint64(len(m.ProjectName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProjectName))) i-- dAtA[i] = 0x4a } if len(m.ProjectId) > 0 { i -= len(m.ProjectId) copy(dAtA[i:], m.ProjectId) - i = encodeVarint(dAtA, i, uint64(len(m.ProjectId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProjectId))) i-- dAtA[i] = 0x42 } if len(m.MachineType) > 0 { i -= len(m.MachineType) copy(dAtA[i:], m.MachineType) - i = encodeVarint(dAtA, i, uint64(len(m.MachineType))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MachineType))) i-- dAtA[i] = 0x3a } if len(m.InstanceName) > 0 { i -= len(m.InstanceName) copy(dAtA[i:], m.InstanceName) - i = encodeVarint(dAtA, i, uint64(len(m.InstanceName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InstanceName))) i-- dAtA[i] = 0x32 } if len(m.InstanceId) > 0 { i -= len(m.InstanceId) copy(dAtA[i:], m.InstanceId) - i = encodeVarint(dAtA, i, uint64(len(m.InstanceId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InstanceId))) i-- dAtA[i] = 0x2a } if len(m.AvailabilityZone) > 0 { i -= len(m.AvailabilityZone) copy(dAtA[i:], m.AvailabilityZone) - i = encodeVarint(dAtA, i, uint64(len(m.AvailabilityZone))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AvailabilityZone))) i-- dAtA[i] = 0x22 } if len(m.AccountName) > 0 { i -= len(m.AccountName) copy(dAtA[i:], m.AccountName) - i = encodeVarint(dAtA, i, uint64(len(m.AccountName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountName))) i-- dAtA[i] = 0x1a } if len(m.AccountId) > 0 { i -= len(m.AccountId) copy(dAtA[i:], m.AccountId) - i = encodeVarint(dAtA, i, uint64(len(m.AccountId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountId))) i-- dAtA[i] = 0x12 } @@ -198,7 +199,7 @@ func (m *Cloud) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -238,28 +239,28 @@ func (m *CloudOrigin) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ServiceName) > 0 { i -= len(m.ServiceName) copy(dAtA[i:], m.ServiceName) - i = encodeVarint(dAtA, i, uint64(len(m.ServiceName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServiceName))) i-- dAtA[i] = 0x22 } if len(m.Region) > 0 { i -= len(m.Region) copy(dAtA[i:], m.Region) - i = encodeVarint(dAtA, i, uint64(len(m.Region))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Region))) i-- dAtA[i] = 0x1a } if len(m.Provider) > 0 { i -= len(m.Provider) copy(dAtA[i:], m.Provider) - i = encodeVarint(dAtA, i, uint64(len(m.Provider))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Provider))) i-- dAtA[i] = 0x12 } if len(m.AccountId) > 0 { i -= len(m.AccountId) copy(dAtA[i:], m.AccountId) - i = encodeVarint(dAtA, i, uint64(len(m.AccountId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AccountId))) i-- dAtA[i] = 0xa } @@ -316,51 +317,51 @@ func (m *Cloud) SizeVT() (n int) { _ = l if m.Origin != nil { l = m.Origin.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.AccountId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.AccountName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.AvailabilityZone) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.InstanceId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.InstanceName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.MachineType) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ProjectId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ProjectName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Provider) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Region) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ServiceName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -374,19 +375,19 @@ func (m *CloudOrigin) SizeVT() (n int) { _ = l l = len(m.AccountId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Provider) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Region) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ServiceName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -400,7 +401,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -428,7 +429,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -441,11 +442,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -464,7 +465,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -478,11 +479,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -496,7 +497,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -510,11 +511,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -528,7 +529,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -542,11 +543,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -560,7 +561,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -574,11 +575,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -592,7 +593,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -606,11 +607,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -624,7 +625,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -638,11 +639,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -656,7 +657,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -670,11 +671,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -688,7 +689,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -702,11 +703,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -720,7 +721,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -734,11 +735,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -752,7 +753,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -766,11 +767,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -784,7 +785,7 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -798,11 +799,11 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -811,12 +812,12 @@ func (m *Cloud) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -839,7 +840,7 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -867,7 +868,7 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -881,11 +882,11 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -899,7 +900,7 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -913,11 +914,11 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -931,7 +932,7 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -945,11 +946,11 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -963,7 +964,7 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -977,11 +978,11 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -990,12 +991,12 @@ func (m *CloudOrigin) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/code.pb.go b/model/modelpb/code.pb.go index 68217697..b593e20a 100644 --- a/model/modelpb/code.pb.go +++ b/model/modelpb/code.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: code.proto package modelpb diff --git a/model/modelpb/code_vtproto.pb.go b/model/modelpb/code_vtproto.pb.go index 5e30a657..de9a794d 100644 --- a/model/modelpb/code_vtproto.pb.go +++ b/model/modelpb/code_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: code.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -87,7 +88,7 @@ func (m *Code) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Stacktrace) > 0 { i -= len(m.Stacktrace) copy(dAtA[i:], m.Stacktrace) - i = encodeVarint(dAtA, i, uint64(len(m.Stacktrace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Stacktrace))) i-- dAtA[i] = 0xa } @@ -122,7 +123,7 @@ func (m *Code) SizeVT() (n int) { _ = l l = len(m.Stacktrace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -136,7 +137,7 @@ func (m *Code) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -164,7 +165,7 @@ func (m *Code) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -178,11 +179,11 @@ func (m *Code) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -191,12 +192,12 @@ func (m *Code) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/container.pb.go b/model/modelpb/container.pb.go index 290384aa..8e3cef8a 100644 --- a/model/modelpb/container.pb.go +++ b/model/modelpb/container.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: container.proto package modelpb diff --git a/model/modelpb/container_vtproto.pb.go b/model/modelpb/container_vtproto.pb.go index ba4d3504..5c94df17 100644 --- a/model/modelpb/container_vtproto.pb.go +++ b/model/modelpb/container_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: container.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -91,35 +92,35 @@ func (m *Container) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ImageTag) > 0 { i -= len(m.ImageTag) copy(dAtA[i:], m.ImageTag) - i = encodeVarint(dAtA, i, uint64(len(m.ImageTag))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ImageTag))) i-- dAtA[i] = 0x2a } if len(m.ImageName) > 0 { i -= len(m.ImageName) copy(dAtA[i:], m.ImageName) - i = encodeVarint(dAtA, i, uint64(len(m.ImageName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ImageName))) i-- dAtA[i] = 0x22 } if len(m.Runtime) > 0 { i -= len(m.Runtime) copy(dAtA[i:], m.Runtime) - i = encodeVarint(dAtA, i, uint64(len(m.Runtime))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Runtime))) i-- dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -154,23 +155,23 @@ func (m *Container) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Runtime) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ImageName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ImageTag) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -184,7 +185,7 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -212,7 +213,7 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -226,11 +227,11 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -244,7 +245,7 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -258,11 +259,11 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -276,7 +277,7 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -290,11 +291,11 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -308,7 +309,7 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -322,11 +323,11 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -340,7 +341,7 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -354,11 +355,11 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -367,12 +368,12 @@ func (m *Container) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/datastream.pb.go b/model/modelpb/datastream.pb.go index 6b9b9bc8..ef7775eb 100644 --- a/model/modelpb/datastream.pb.go +++ b/model/modelpb/datastream.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: datastream.proto package modelpb diff --git a/model/modelpb/datastream_vtproto.pb.go b/model/modelpb/datastream_vtproto.pb.go index 626857bd..f1bf9d61 100644 --- a/model/modelpb/datastream_vtproto.pb.go +++ b/model/modelpb/datastream_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: datastream.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -89,21 +90,21 @@ func (m *DataStream) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0x1a } if len(m.Dataset) > 0 { i -= len(m.Dataset) copy(dAtA[i:], m.Dataset) - i = encodeVarint(dAtA, i, uint64(len(m.Dataset))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Dataset))) i-- dAtA[i] = 0x12 } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0xa } @@ -138,15 +139,15 @@ func (m *DataStream) SizeVT() (n int) { _ = l l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Dataset) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -160,7 +161,7 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -188,7 +189,7 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -202,11 +203,11 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -220,7 +221,7 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -234,11 +235,11 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -252,7 +253,7 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -266,11 +267,11 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -279,12 +280,12 @@ func (m *DataStream) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/destination.pb.go b/model/modelpb/destination.pb.go index d711878f..da471629 100644 --- a/model/modelpb/destination.pb.go +++ b/model/modelpb/destination.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: destination.proto package modelpb diff --git a/model/modelpb/destination_vtproto.pb.go b/model/modelpb/destination_vtproto.pb.go index 1912ecf8..5e49ba34 100644 --- a/model/modelpb/destination_vtproto.pb.go +++ b/model/modelpb/destination_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: destination.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -86,14 +87,14 @@ func (m *Destination) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x10 } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) - i = encodeVarint(dAtA, i, uint64(len(m.Address))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } @@ -128,10 +129,10 @@ func (m *Destination) SizeVT() (n int) { _ = l l = len(m.Address) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -145,7 +146,7 @@ func (m *Destination) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -173,7 +174,7 @@ func (m *Destination) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -187,11 +188,11 @@ func (m *Destination) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -205,7 +206,7 @@ func (m *Destination) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -219,12 +220,12 @@ func (m *Destination) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/device.pb.go b/model/modelpb/device.pb.go index 2ca9bf80..d73cb14d 100644 --- a/model/modelpb/device.pb.go +++ b/model/modelpb/device.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: device.proto package modelpb diff --git a/model/modelpb/device_vtproto.pb.go b/model/modelpb/device_vtproto.pb.go index 2ef9138d..63938c00 100644 --- a/model/modelpb/device_vtproto.pb.go +++ b/model/modelpb/device_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: device.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -107,7 +108,7 @@ func (m *Device) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Manufacturer) > 0 { i -= len(m.Manufacturer) copy(dAtA[i:], m.Manufacturer) - i = encodeVarint(dAtA, i, uint64(len(m.Manufacturer))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Manufacturer))) i-- dAtA[i] = 0x1a } @@ -117,14 +118,14 @@ func (m *Device) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -164,14 +165,14 @@ func (m *DeviceModel) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Identifier) > 0 { i -= len(m.Identifier) copy(dAtA[i:], m.Identifier) - i = encodeVarint(dAtA, i, uint64(len(m.Identifier))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Identifier))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -228,15 +229,15 @@ func (m *Device) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Model != nil { l = m.Model.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Manufacturer) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -250,11 +251,11 @@ func (m *DeviceModel) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Identifier) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -268,7 +269,7 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -296,7 +297,7 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -310,11 +311,11 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -328,7 +329,7 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -341,11 +342,11 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -364,7 +365,7 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -378,11 +379,11 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -391,12 +392,12 @@ func (m *Device) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -419,7 +420,7 @@ func (m *DeviceModel) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -447,7 +448,7 @@ func (m *DeviceModel) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -461,11 +462,11 @@ func (m *DeviceModel) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -479,7 +480,7 @@ func (m *DeviceModel) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -493,11 +494,11 @@ func (m *DeviceModel) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -506,12 +507,12 @@ func (m *DeviceModel) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/error.pb.go b/model/modelpb/error.pb.go index a31cbbc6..6153fa64 100644 --- a/model/modelpb/error.pb.go +++ b/model/modelpb/error.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: error.proto package modelpb diff --git a/model/modelpb/error_vtproto.pb.go b/model/modelpb/error_vtproto.pb.go index a26be3f4..cfb99227 100644 --- a/model/modelpb/error_vtproto.pb.go +++ b/model/modelpb/error_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: error.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -173,42 +174,42 @@ func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x4a } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x42 } if len(m.StackTrace) > 0 { i -= len(m.StackTrace) copy(dAtA[i:], m.StackTrace) - i = encodeVarint(dAtA, i, uint64(len(m.StackTrace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StackTrace))) i-- dAtA[i] = 0x3a } if len(m.Culprit) > 0 { i -= len(m.Culprit) copy(dAtA[i:], m.Culprit) - i = encodeVarint(dAtA, i, uint64(len(m.Culprit))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Culprit))) i-- dAtA[i] = 0x32 } if len(m.GroupingKey) > 0 { i -= len(m.GroupingKey) copy(dAtA[i:], m.GroupingKey) - i = encodeVarint(dAtA, i, uint64(len(m.GroupingKey))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GroupingKey))) i-- dAtA[i] = 0x2a } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x22 } @@ -218,7 +219,7 @@ func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -228,7 +229,7 @@ func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -239,7 +240,7 @@ func (m *Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -284,7 +285,7 @@ func (m *Exception) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x42 } @@ -302,7 +303,7 @@ func (m *Exception) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x32 } @@ -313,7 +314,7 @@ func (m *Exception) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -325,7 +326,7 @@ func (m *Exception) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -333,21 +334,21 @@ func (m *Exception) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Code) > 0 { i -= len(m.Code) copy(dAtA[i:], m.Code) - i = encodeVarint(dAtA, i, uint64(len(m.Code))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Code))) i-- dAtA[i] = 0x1a } if len(m.Module) > 0 { i -= len(m.Module) copy(dAtA[i:], m.Module) - i = encodeVarint(dAtA, i, uint64(len(m.Module))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Module))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } @@ -391,7 +392,7 @@ func (m *ErrorLog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -399,28 +400,28 @@ func (m *ErrorLog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.LoggerName) > 0 { i -= len(m.LoggerName) copy(dAtA[i:], m.LoggerName) - i = encodeVarint(dAtA, i, uint64(len(m.LoggerName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LoggerName))) i-- dAtA[i] = 0x22 } if len(m.ParamMessage) > 0 { i -= len(m.ParamMessage) copy(dAtA[i:], m.ParamMessage) - i = encodeVarint(dAtA, i, uint64(len(m.ParamMessage))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParamMessage))) i-- dAtA[i] = 0x1a } if len(m.Level) > 0 { i -= len(m.Level) copy(dAtA[i:], m.Level) - i = encodeVarint(dAtA, i, uint64(len(m.Level))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Level))) i-- dAtA[i] = 0x12 } if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0xa } @@ -525,40 +526,40 @@ func (m *Error) SizeVT() (n int) { if len(m.Custom) > 0 { for _, e := range m.Custom { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Exception != nil { l = m.Exception.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Log != nil { l = m.Log.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.GroupingKey) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Culprit) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.StackTrace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Message) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -572,31 +573,31 @@ func (m *Exception) SizeVT() (n int) { _ = l l = len(m.Message) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Module) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Code) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Attributes) > 0 { for _, e := range m.Attributes { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Stacktrace) > 0 { for _, e := range m.Stacktrace { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Handled != nil { n += 2 @@ -604,7 +605,7 @@ func (m *Exception) SizeVT() (n int) { if len(m.Cause) > 0 { for _, e := range m.Cause { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -619,24 +620,24 @@ func (m *ErrorLog) SizeVT() (n int) { _ = l l = len(m.Message) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Level) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ParamMessage) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.LoggerName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Stacktrace) > 0 { for _, e := range m.Stacktrace { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -651,7 +652,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -679,7 +680,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -692,11 +693,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -720,7 +721,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -733,11 +734,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -756,7 +757,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -769,11 +770,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -792,7 +793,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -806,11 +807,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -824,7 +825,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -838,11 +839,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -856,7 +857,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -870,11 +871,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -888,7 +889,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -902,11 +903,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -920,7 +921,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -934,11 +935,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -952,7 +953,7 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -966,11 +967,11 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -979,12 +980,12 @@ func (m *Error) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1007,7 +1008,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1035,7 +1036,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1049,11 +1050,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1067,7 +1068,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1081,11 +1082,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1099,7 +1100,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1113,11 +1114,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1131,7 +1132,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1144,11 +1145,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1172,7 +1173,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1185,11 +1186,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1213,7 +1214,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1227,11 +1228,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1245,7 +1246,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1266,7 +1267,7 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1279,11 +1280,11 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1302,12 +1303,12 @@ func (m *Exception) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1330,7 +1331,7 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1358,7 +1359,7 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1372,11 +1373,11 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1390,7 +1391,7 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1404,11 +1405,11 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1422,7 +1423,7 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1436,11 +1437,11 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1454,7 +1455,7 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1468,11 +1469,11 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1486,7 +1487,7 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1499,11 +1500,11 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1522,12 +1523,12 @@ func (m *ErrorLog) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/event.pb.go b/model/modelpb/event.pb.go index a8fc0095..733be6d5 100644 --- a/model/modelpb/event.pb.go +++ b/model/modelpb/event.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: event.proto package modelpb diff --git a/model/modelpb/event_vtproto.pb.go b/model/modelpb/event_vtproto.pb.go index b51c8889..f14c39a6 100644 --- a/model/modelpb/event_vtproto.pb.go +++ b/model/modelpb/event_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: event.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -94,17 +95,17 @@ func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Received != 0 { - i = encodeVarint(dAtA, i, uint64(m.Received)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Received)) i-- dAtA[i] = 0x50 } if m.Severity != 0 { - i = encodeVarint(dAtA, i, uint64(m.Severity)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Severity)) i-- dAtA[i] = 0x48 } if m.Duration != 0 { - i = encodeVarint(dAtA, i, uint64(m.Duration)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Duration)) i-- dAtA[i] = 0x40 } @@ -114,49 +115,49 @@ func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x32 } if len(m.Category) > 0 { i -= len(m.Category) copy(dAtA[i:], m.Category) - i = encodeVarint(dAtA, i, uint64(len(m.Category))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Category))) i-- dAtA[i] = 0x2a } if len(m.Kind) > 0 { i -= len(m.Kind) copy(dAtA[i:], m.Kind) - i = encodeVarint(dAtA, i, uint64(len(m.Kind))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Kind))) i-- dAtA[i] = 0x22 } if len(m.Dataset) > 0 { i -= len(m.Dataset) copy(dAtA[i:], m.Dataset) - i = encodeVarint(dAtA, i, uint64(len(m.Dataset))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Dataset))) i-- dAtA[i] = 0x1a } if len(m.Action) > 0 { i -= len(m.Action) copy(dAtA[i:], m.Action) - i = encodeVarint(dAtA, i, uint64(len(m.Action))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Action))) i-- dAtA[i] = 0x12 } if len(m.Outcome) > 0 { i -= len(m.Outcome) copy(dAtA[i:], m.Outcome) - i = encodeVarint(dAtA, i, uint64(len(m.Outcome))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Outcome))) i-- dAtA[i] = 0xa } @@ -192,40 +193,40 @@ func (m *Event) SizeVT() (n int) { _ = l l = len(m.Outcome) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Action) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Dataset) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Kind) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Category) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.SuccessCount != nil { l = m.SuccessCount.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Duration != 0 { - n += 1 + sov(uint64(m.Duration)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Duration)) } if m.Severity != 0 { - n += 1 + sov(uint64(m.Severity)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Severity)) } if m.Received != 0 { - n += 1 + sov(uint64(m.Received)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Received)) } n += len(m.unknownFields) return n @@ -239,7 +240,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -267,7 +268,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -281,11 +282,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -299,7 +300,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -313,11 +314,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -331,7 +332,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -345,11 +346,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -363,7 +364,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -377,11 +378,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -395,7 +396,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -409,11 +410,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -427,7 +428,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -441,11 +442,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -459,7 +460,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -472,11 +473,11 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -495,7 +496,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { m.Duration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -514,7 +515,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { m.Severity = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -533,7 +534,7 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { m.Received = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -547,12 +548,12 @@ func (m *Event) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/experience.pb.go b/model/modelpb/experience.pb.go index a4b91bff..1920c7bd 100644 --- a/model/modelpb/experience.pb.go +++ b/model/modelpb/experience.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: experience.proto package modelpb diff --git a/model/modelpb/experience_vtproto.pb.go b/model/modelpb/experience_vtproto.pb.go index f94683b6..3f3660bc 100644 --- a/model/modelpb/experience_vtproto.pb.go +++ b/model/modelpb/experience_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: experience.proto package modelpb @@ -28,6 +28,7 @@ import ( math "math" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -114,7 +115,7 @@ func (m *UserExperience) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -182,7 +183,7 @@ func (m *LongtaskMetrics) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x11 } if m.Count != 0 { - i = encodeVarint(dAtA, i, uint64(m.Count)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) i-- dAtA[i] = 0x8 } @@ -248,7 +249,7 @@ func (m *UserExperience) SizeVT() (n int) { } if m.LongTask != nil { l = m.LongTask.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -261,7 +262,7 @@ func (m *LongtaskMetrics) SizeVT() (n int) { var l int _ = l if m.Count != 0 { - n += 1 + sov(uint64(m.Count)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) } if m.Sum != 0 { n += 9 @@ -281,7 +282,7 @@ func (m *UserExperience) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -342,7 +343,7 @@ func (m *UserExperience) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -355,11 +356,11 @@ func (m *UserExperience) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -373,12 +374,12 @@ func (m *UserExperience) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -401,7 +402,7 @@ func (m *LongtaskMetrics) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -429,7 +430,7 @@ func (m *LongtaskMetrics) UnmarshalVT(dAtA []byte) error { m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -465,12 +466,12 @@ func (m *LongtaskMetrics) UnmarshalVT(dAtA []byte) error { m.Max = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/faas.pb.go b/model/modelpb/faas.pb.go index 63a12c17..3f023e97 100644 --- a/model/modelpb/faas.pb.go +++ b/model/modelpb/faas.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: faas.proto package modelpb diff --git a/model/modelpb/faas_vtproto.pb.go b/model/modelpb/faas_vtproto.pb.go index 6a182ab5..83844631 100644 --- a/model/modelpb/faas_vtproto.pb.go +++ b/model/modelpb/faas_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: faas.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -96,35 +97,35 @@ func (m *Faas) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x3a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x32 } if len(m.TriggerRequestId) > 0 { i -= len(m.TriggerRequestId) copy(dAtA[i:], m.TriggerRequestId) - i = encodeVarint(dAtA, i, uint64(len(m.TriggerRequestId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TriggerRequestId))) i-- dAtA[i] = 0x2a } if len(m.TriggerType) > 0 { i -= len(m.TriggerType) copy(dAtA[i:], m.TriggerType) - i = encodeVarint(dAtA, i, uint64(len(m.TriggerType))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TriggerType))) i-- dAtA[i] = 0x22 } if len(m.Execution) > 0 { i -= len(m.Execution) copy(dAtA[i:], m.Execution) - i = encodeVarint(dAtA, i, uint64(len(m.Execution))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Execution))) i-- dAtA[i] = 0x1a } @@ -141,7 +142,7 @@ func (m *Faas) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -176,30 +177,30 @@ func (m *Faas) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ColdStart != nil { n += 2 } l = len(m.Execution) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.TriggerType) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.TriggerRequestId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -213,7 +214,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -241,7 +242,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -255,11 +256,11 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -273,7 +274,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -294,7 +295,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -308,11 +309,11 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -326,7 +327,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -340,11 +341,11 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -358,7 +359,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -372,11 +373,11 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -390,7 +391,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -404,11 +405,11 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -422,7 +423,7 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -436,11 +437,11 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -449,12 +450,12 @@ func (m *Faas) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/headers.pb.go b/model/modelpb/headers.pb.go index 648a5f9a..e93b6482 100644 --- a/model/modelpb/headers.pb.go +++ b/model/modelpb/headers.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: headers.proto package modelpb diff --git a/model/modelpb/headers_vtproto.pb.go b/model/modelpb/headers_vtproto.pb.go index c5ef29e2..2fe2d699 100644 --- a/model/modelpb/headers_vtproto.pb.go +++ b/model/modelpb/headers_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: headers.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -93,7 +94,7 @@ func (m *HTTPHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Value[iNdEx]) copy(dAtA[i:], m.Value[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Value[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -101,7 +102,7 @@ func (m *HTTPHeader) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Key) > 0 { i -= len(m.Key) copy(dAtA[i:], m.Key) - i = encodeVarint(dAtA, i, uint64(len(m.Key))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) i-- dAtA[i] = 0xa } @@ -138,12 +139,12 @@ func (m *HTTPHeader) SizeVT() (n int) { _ = l l = len(m.Key) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Value) > 0 { for _, s := range m.Value { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -158,7 +159,7 @@ func (m *HTTPHeader) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -186,7 +187,7 @@ func (m *HTTPHeader) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -200,11 +201,11 @@ func (m *HTTPHeader) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -218,7 +219,7 @@ func (m *HTTPHeader) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -232,11 +233,11 @@ func (m *HTTPHeader) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -245,12 +246,12 @@ func (m *HTTPHeader) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/host.pb.go b/model/modelpb/host.pb.go index 610d69b7..b7d2d7fc 100644 --- a/model/modelpb/host.pb.go +++ b/model/modelpb/host.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: host.proto package modelpb diff --git a/model/modelpb/host_vtproto.pb.go b/model/modelpb/host_vtproto.pb.go index fc2294ba..7b3715ee 100644 --- a/model/modelpb/host_vtproto.pb.go +++ b/model/modelpb/host_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: host.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -103,7 +104,7 @@ func (m *Host) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } @@ -111,35 +112,35 @@ func (m *Host) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x32 } if len(m.Architecture) > 0 { i -= len(m.Architecture) copy(dAtA[i:], m.Architecture) - i = encodeVarint(dAtA, i, uint64(len(m.Architecture))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Architecture))) i-- dAtA[i] = 0x2a } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x22 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x1a } if len(m.Hostname) > 0 { i -= len(m.Hostname) copy(dAtA[i:], m.Hostname) - i = encodeVarint(dAtA, i, uint64(len(m.Hostname))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname))) i-- dAtA[i] = 0x12 } @@ -149,7 +150,7 @@ func (m *Host) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -190,32 +191,32 @@ func (m *Host) SizeVT() (n int) { _ = l if m.Os != nil { l = m.Os.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Hostname) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Architecture) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Ip) > 0 { for _, e := range m.Ip { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -230,7 +231,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -258,7 +259,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -271,11 +272,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -294,7 +295,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -308,11 +309,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -326,7 +327,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -340,11 +341,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -358,7 +359,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -372,11 +373,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -390,7 +391,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -404,11 +405,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -422,7 +423,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -436,11 +437,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -454,7 +455,7 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -467,11 +468,11 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -490,12 +491,12 @@ func (m *Host) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/http.pb.go b/model/modelpb/http.pb.go index 483e351f..634126fd 100644 --- a/model/modelpb/http.pb.go +++ b/model/modelpb/http.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: http.proto package modelpb diff --git a/model/modelpb/http_vtproto.pb.go b/model/modelpb/http_vtproto.pb.go index e03601bc..a232d49f 100644 --- a/model/modelpb/http_vtproto.pb.go +++ b/model/modelpb/http_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: http.proto package modelpb @@ -26,6 +26,8 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" @@ -62,16 +64,10 @@ func (m *HTTPRequest) CloneVT() *HTTPRequest { return (*HTTPRequest)(nil) } r := HTTPRequestFromVTPool() + r.Body = (*structpb.Value)((*structpb1.Value)(m.Body).CloneVT()) r.Id = m.Id r.Method = m.Method r.Referrer = m.Referrer - if rhs := m.Body; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *structpb.Value }); ok { - r.Body = vtpb.CloneVT() - } else { - r.Body = proto.Clone(rhs).(*structpb.Value) - } - } if rhs := m.Headers; rhs != nil { tmpContainer := make([]*HTTPHeader, len(rhs)) for k, v := range rhs { @@ -181,7 +177,7 @@ func (m *HTTP) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x1a } @@ -191,7 +187,7 @@ func (m *HTTP) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -201,7 +197,7 @@ func (m *HTTP) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -241,21 +237,21 @@ func (m *HTTPRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Referrer) > 0 { i -= len(m.Referrer) copy(dAtA[i:], m.Referrer) - i = encodeVarint(dAtA, i, uint64(len(m.Referrer))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Referrer))) i-- dAtA[i] = 0x3a } if len(m.Method) > 0 { i -= len(m.Method) copy(dAtA[i:], m.Method) - i = encodeVarint(dAtA, i, uint64(len(m.Method))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Method))) i-- dAtA[i] = 0x32 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x2a } @@ -266,7 +262,7 @@ func (m *HTTPRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -278,7 +274,7 @@ func (m *HTTPRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -290,30 +286,18 @@ func (m *HTTPRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } } if m.Body != nil { - if vtmsg, ok := interface{}(m.Body).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Body) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*structpb1.Value)(m.Body).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -351,22 +335,22 @@ func (m *HTTPResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.StatusCode != 0 { - i = encodeVarint(dAtA, i, uint64(m.StatusCode)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.StatusCode)) i-- dAtA[i] = 0x38 } if m.DecodedBodySize != nil { - i = encodeVarint(dAtA, i, uint64(*m.DecodedBodySize)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.DecodedBodySize)) i-- dAtA[i] = 0x30 } if m.EncodedBodySize != nil { - i = encodeVarint(dAtA, i, uint64(*m.EncodedBodySize)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.EncodedBodySize)) i-- dAtA[i] = 0x28 } if m.TransferSize != nil { - i = encodeVarint(dAtA, i, uint64(*m.TransferSize)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.TransferSize)) i-- dAtA[i] = 0x20 } @@ -397,7 +381,7 @@ func (m *HTTPResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -497,15 +481,15 @@ func (m *HTTP) SizeVT() (n int) { _ = l if m.Request != nil { l = m.Request.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Response != nil { l = m.Response.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -518,44 +502,38 @@ func (m *HTTPRequest) SizeVT() (n int) { var l int _ = l if m.Body != nil { - if size, ok := interface{}(m.Body).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.Body) - } - n += 1 + l + sov(uint64(l)) + l = (*structpb1.Value)(m.Body).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Headers) > 0 { for _, e := range m.Headers { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Env) > 0 { for _, e := range m.Env { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Cookies) > 0 { for _, e := range m.Cookies { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Method) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Referrer) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -570,7 +548,7 @@ func (m *HTTPResponse) SizeVT() (n int) { if len(m.Headers) > 0 { for _, e := range m.Headers { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Finished != nil { @@ -580,16 +558,16 @@ func (m *HTTPResponse) SizeVT() (n int) { n += 2 } if m.TransferSize != nil { - n += 1 + sov(uint64(*m.TransferSize)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.TransferSize)) } if m.EncodedBodySize != nil { - n += 1 + sov(uint64(*m.EncodedBodySize)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.EncodedBodySize)) } if m.DecodedBodySize != nil { - n += 1 + sov(uint64(*m.DecodedBodySize)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.DecodedBodySize)) } if m.StatusCode != 0 { - n += 1 + sov(uint64(m.StatusCode)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.StatusCode)) } n += len(m.unknownFields) return n @@ -603,7 +581,7 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -631,7 +609,7 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -644,11 +622,11 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -667,7 +645,7 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -680,11 +658,11 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -703,7 +681,7 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -717,11 +695,11 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -730,12 +708,12 @@ func (m *HTTP) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -758,7 +736,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -786,7 +764,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -799,11 +777,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -811,16 +789,8 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { if m.Body == nil { m.Body = &structpb.Value{} } - if unmarshal, ok := interface{}(m.Body).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Body); err != nil { - return err - } + if err := (*structpb1.Value)(m.Body).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 2: @@ -830,7 +800,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -843,11 +813,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -871,7 +841,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -884,11 +854,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -912,7 +882,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -925,11 +895,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -953,7 +923,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -967,11 +937,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -985,7 +955,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -999,11 +969,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1017,7 +987,7 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1031,11 +1001,11 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1044,12 +1014,12 @@ func (m *HTTPRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1072,7 +1042,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1100,7 +1070,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1113,11 +1083,11 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1141,7 +1111,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1162,7 +1132,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1183,7 +1153,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1203,7 +1173,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1223,7 +1193,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1243,7 +1213,7 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { m.StatusCode = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1257,12 +1227,12 @@ func (m *HTTPResponse) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/ip.pb.go b/model/modelpb/ip.pb.go index df07501c..6ce142fb 100644 --- a/model/modelpb/ip.pb.go +++ b/model/modelpb/ip.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: ip.proto package modelpb diff --git a/model/modelpb/ip_vtproto.pb.go b/model/modelpb/ip_vtproto.pb.go index 366c3462..deaba918 100644 --- a/model/modelpb/ip_vtproto.pb.go +++ b/model/modelpb/ip_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: ip.proto package modelpb @@ -27,6 +27,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -93,7 +94,7 @@ func (m *IP) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.V6) > 0 { i -= len(m.V6) copy(dAtA[i:], m.V6) - i = encodeVarint(dAtA, i, uint64(len(m.V6))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.V6))) i-- dAtA[i] = 0x12 } @@ -139,7 +140,7 @@ func (m *IP) SizeVT() (n int) { } l = len(m.V6) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -153,7 +154,7 @@ func (m *IP) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -191,7 +192,7 @@ func (m *IP) UnmarshalVT(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -204,11 +205,11 @@ func (m *IP) UnmarshalVT(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -220,12 +221,12 @@ func (m *IP) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/keyvalue.pb.go b/model/modelpb/keyvalue.pb.go index a7839146..bf64e7a7 100644 --- a/model/modelpb/keyvalue.pb.go +++ b/model/modelpb/keyvalue.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: keyvalue.proto package modelpb diff --git a/model/modelpb/keyvalue_vtproto.pb.go b/model/modelpb/keyvalue_vtproto.pb.go index 6f553941..112b08ad 100644 --- a/model/modelpb/keyvalue_vtproto.pb.go +++ b/model/modelpb/keyvalue_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: keyvalue.proto package modelpb @@ -26,6 +26,8 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" @@ -44,13 +46,7 @@ func (m *KeyValue) CloneVT() *KeyValue { } r := KeyValueFromVTPool() r.Key = m.Key - if rhs := m.Value; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *structpb.Value }); ok { - r.Value = vtpb.CloneVT() - } else { - r.Value = proto.Clone(rhs).(*structpb.Value) - } - } + r.Value = (*structpb.Value)((*structpb1.Value)(m.Value).CloneVT()) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -93,31 +89,19 @@ func (m *KeyValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Value != nil { - if vtmsg, ok := interface{}(m.Value).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Value) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*structpb1.Value)(m.Value).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.Key) > 0 { i -= len(m.Key) copy(dAtA[i:], m.Key) - i = encodeVarint(dAtA, i, uint64(len(m.Key))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key))) i-- dAtA[i] = 0xa } @@ -152,17 +136,11 @@ func (m *KeyValue) SizeVT() (n int) { _ = l l = len(m.Key) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Value != nil { - if size, ok := interface{}(m.Value).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.Value) - } - n += 1 + l + sov(uint64(l)) + l = (*structpb1.Value)(m.Value).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -176,7 +154,7 @@ func (m *KeyValue) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -204,7 +182,7 @@ func (m *KeyValue) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -218,11 +196,11 @@ func (m *KeyValue) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -236,7 +214,7 @@ func (m *KeyValue) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -249,11 +227,11 @@ func (m *KeyValue) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -261,26 +239,18 @@ func (m *KeyValue) UnmarshalVT(dAtA []byte) error { if m.Value == nil { m.Value = &structpb.Value{} } - if unmarshal, ok := interface{}(m.Value).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Value); err != nil { - return err - } + if err := (*structpb1.Value)(m.Value).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/kubernetes.pb.go b/model/modelpb/kubernetes.pb.go index a6ae96ce..c63b8dcf 100644 --- a/model/modelpb/kubernetes.pb.go +++ b/model/modelpb/kubernetes.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: kubernetes.proto package modelpb diff --git a/model/modelpb/kubernetes_vtproto.pb.go b/model/modelpb/kubernetes_vtproto.pb.go index c818d3c9..0a3d590b 100644 --- a/model/modelpb/kubernetes_vtproto.pb.go +++ b/model/modelpb/kubernetes_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: kubernetes.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -90,28 +91,28 @@ func (m *Kubernetes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.PodUid) > 0 { i -= len(m.PodUid) copy(dAtA[i:], m.PodUid) - i = encodeVarint(dAtA, i, uint64(len(m.PodUid))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PodUid))) i-- dAtA[i] = 0x22 } if len(m.PodName) > 0 { i -= len(m.PodName) copy(dAtA[i:], m.PodName) - i = encodeVarint(dAtA, i, uint64(len(m.PodName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PodName))) i-- dAtA[i] = 0x1a } if len(m.NodeName) > 0 { i -= len(m.NodeName) copy(dAtA[i:], m.NodeName) - i = encodeVarint(dAtA, i, uint64(len(m.NodeName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.NodeName))) i-- dAtA[i] = 0x12 } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0xa } @@ -146,19 +147,19 @@ func (m *Kubernetes) SizeVT() (n int) { _ = l l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.NodeName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.PodName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.PodUid) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -172,7 +173,7 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -200,7 +201,7 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -214,11 +215,11 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -232,7 +233,7 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -246,11 +247,11 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -264,7 +265,7 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -278,11 +279,11 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -296,7 +297,7 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -310,11 +311,11 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -323,12 +324,12 @@ func (m *Kubernetes) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/labels.pb.go b/model/modelpb/labels.pb.go index 55ffddb6..77ec7c1a 100644 --- a/model/modelpb/labels.pb.go +++ b/model/modelpb/labels.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: labels.proto package modelpb diff --git a/model/modelpb/labels_vtproto.pb.go b/model/modelpb/labels_vtproto.pb.go index b0b10f5a..15f95d53 100644 --- a/model/modelpb/labels_vtproto.pb.go +++ b/model/modelpb/labels_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: labels.proto package modelpb @@ -28,6 +28,7 @@ import ( math "math" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -129,7 +130,7 @@ func (m *LabelValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Values[iNdEx]) copy(dAtA[i:], m.Values[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Values[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Values[iNdEx]))) i-- dAtA[i] = 0x12 } @@ -137,7 +138,7 @@ func (m *LabelValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Value) > 0 { i -= len(m.Value) copy(dAtA[i:], m.Value) - i = encodeVarint(dAtA, i, uint64(len(m.Value))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value))) i-- dAtA[i] = 0xa } @@ -196,7 +197,7 @@ func (m *NumericLabelValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) } - i = encodeVarint(dAtA, i, uint64(len(m.Values)*8)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Values)*8)) i-- dAtA[i] = 0xa } @@ -256,12 +257,12 @@ func (m *LabelValue) SizeVT() (n int) { _ = l l = len(m.Value) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Values) > 0 { for _, s := range m.Values { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Global { @@ -278,7 +279,7 @@ func (m *NumericLabelValue) SizeVT() (n int) { var l int _ = l if len(m.Values) > 0 { - n += 1 + sov(uint64(len(m.Values)*8)) + len(m.Values)*8 + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Values)*8)) + len(m.Values)*8 } if m.Value != 0 { n += 9 @@ -298,7 +299,7 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -326,7 +327,7 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -340,11 +341,11 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -358,7 +359,7 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -372,11 +373,11 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -390,7 +391,7 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -405,12 +406,12 @@ func (m *LabelValue) UnmarshalVT(dAtA []byte) error { m.Global = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -433,7 +434,7 @@ func (m *NumericLabelValue) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -468,7 +469,7 @@ func (m *NumericLabelValue) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -481,11 +482,11 @@ func (m *NumericLabelValue) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -526,7 +527,7 @@ func (m *NumericLabelValue) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -541,12 +542,12 @@ func (m *NumericLabelValue) UnmarshalVT(dAtA []byte) error { m.Global = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/log.pb.go b/model/modelpb/log.pb.go index eae73d3c..1bb35a7a 100644 --- a/model/modelpb/log.pb.go +++ b/model/modelpb/log.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: log.proto package modelpb diff --git a/model/modelpb/log_vtproto.pb.go b/model/modelpb/log_vtproto.pb.go index 6f32e723..2f4328ac 100644 --- a/model/modelpb/log_vtproto.pb.go +++ b/model/modelpb/log_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: log.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -128,21 +129,21 @@ func (m *Log) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } if len(m.Logger) > 0 { i -= len(m.Logger) copy(dAtA[i:], m.Logger) - i = encodeVarint(dAtA, i, uint64(len(m.Logger))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Logger))) i-- dAtA[i] = 0x12 } if len(m.Level) > 0 { i -= len(m.Level) copy(dAtA[i:], m.Level) - i = encodeVarint(dAtA, i, uint64(len(m.Level))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Level))) i-- dAtA[i] = 0xa } @@ -185,14 +186,14 @@ func (m *LogOrigin) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.FunctionName) > 0 { i -= len(m.FunctionName) copy(dAtA[i:], m.FunctionName) - i = encodeVarint(dAtA, i, uint64(len(m.FunctionName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.FunctionName))) i-- dAtA[i] = 0xa } @@ -230,14 +231,14 @@ func (m *LogOriginFile) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Line != 0 { - i = encodeVarint(dAtA, i, uint64(m.Line)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Line)) i-- dAtA[i] = 0x10 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -316,15 +317,15 @@ func (m *Log) SizeVT() (n int) { _ = l l = len(m.Level) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Logger) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Origin != nil { l = m.Origin.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -338,11 +339,11 @@ func (m *LogOrigin) SizeVT() (n int) { _ = l l = len(m.FunctionName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.File != nil { l = m.File.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -356,10 +357,10 @@ func (m *LogOriginFile) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Line != 0 { - n += 1 + sov(uint64(m.Line)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Line)) } n += len(m.unknownFields) return n @@ -373,7 +374,7 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -401,7 +402,7 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -415,11 +416,11 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -433,7 +434,7 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -447,11 +448,11 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -465,7 +466,7 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -478,11 +479,11 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -496,12 +497,12 @@ func (m *Log) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -524,7 +525,7 @@ func (m *LogOrigin) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -552,7 +553,7 @@ func (m *LogOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -566,11 +567,11 @@ func (m *LogOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -584,7 +585,7 @@ func (m *LogOrigin) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -597,11 +598,11 @@ func (m *LogOrigin) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -615,12 +616,12 @@ func (m *LogOrigin) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -643,7 +644,7 @@ func (m *LogOriginFile) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -671,7 +672,7 @@ func (m *LogOriginFile) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -685,11 +686,11 @@ func (m *LogOriginFile) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -703,7 +704,7 @@ func (m *LogOriginFile) UnmarshalVT(dAtA []byte) error { m.Line = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -717,12 +718,12 @@ func (m *LogOriginFile) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/message.pb.go b/model/modelpb/message.pb.go index e87b98b6..4404ba45 100644 --- a/model/modelpb/message.pb.go +++ b/model/modelpb/message.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: message.proto package modelpb diff --git a/model/modelpb/message_vtproto.pb.go b/model/modelpb/message_vtproto.pb.go index ee27aa76..cc9551af 100644 --- a/model/modelpb/message_vtproto.pb.go +++ b/model/modelpb/message_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: message.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -100,19 +101,19 @@ func (m *Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.RoutingKey) > 0 { i -= len(m.RoutingKey) copy(dAtA[i:], m.RoutingKey) - i = encodeVarint(dAtA, i, uint64(len(m.RoutingKey))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RoutingKey))) i-- dAtA[i] = 0x2a } if len(m.QueueName) > 0 { i -= len(m.QueueName) copy(dAtA[i:], m.QueueName) - i = encodeVarint(dAtA, i, uint64(len(m.QueueName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.QueueName))) i-- dAtA[i] = 0x22 } if m.AgeMillis != nil { - i = encodeVarint(dAtA, i, uint64(*m.AgeMillis)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.AgeMillis)) i-- dAtA[i] = 0x18 } @@ -123,7 +124,7 @@ func (m *Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -131,7 +132,7 @@ func (m *Message) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Body) > 0 { i -= len(m.Body) copy(dAtA[i:], m.Body) - i = encodeVarint(dAtA, i, uint64(len(m.Body))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Body))) i-- dAtA[i] = 0xa } @@ -171,24 +172,24 @@ func (m *Message) SizeVT() (n int) { _ = l l = len(m.Body) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Headers) > 0 { for _, e := range m.Headers { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.AgeMillis != nil { - n += 1 + sov(uint64(*m.AgeMillis)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.AgeMillis)) } l = len(m.QueueName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.RoutingKey) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -202,7 +203,7 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -230,7 +231,7 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -244,11 +245,11 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -262,7 +263,7 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -275,11 +276,11 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -303,7 +304,7 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -323,7 +324,7 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -337,11 +338,11 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -355,7 +356,7 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -369,11 +370,11 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -382,12 +383,12 @@ func (m *Message) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/metricset.pb.go b/model/modelpb/metricset.pb.go index 1a2cd4f4..ed258ee3 100644 --- a/model/modelpb/metricset.pb.go +++ b/model/modelpb/metricset.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: metricset.proto package modelpb diff --git a/model/modelpb/metricset_vtproto.pb.go b/model/modelpb/metricset_vtproto.pb.go index d0baf628..cc092748 100644 --- a/model/modelpb/metricset_vtproto.pb.go +++ b/model/modelpb/metricset_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: metricset.proto package modelpb @@ -28,6 +28,7 @@ import ( math "math" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -180,7 +181,7 @@ func (m *Metricset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.DocCount != 0 { - i = encodeVarint(dAtA, i, uint64(m.DocCount)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DocCount)) i-- dAtA[i] = 0x20 } @@ -191,7 +192,7 @@ func (m *Metricset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -199,14 +200,14 @@ func (m *Metricset) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Interval) > 0 { i -= len(m.Interval) copy(dAtA[i:], m.Interval) - i = encodeVarint(dAtA, i, uint64(len(m.Interval))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Interval))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -255,7 +256,7 @@ func (m *MetricsetSample) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -265,26 +266,26 @@ func (m *MetricsetSample) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if len(m.Unit) > 0 { i -= len(m.Unit) copy(dAtA[i:], m.Unit) - i = encodeVarint(dAtA, i, uint64(len(m.Unit))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Unit))) i-- dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if m.Type != 0 { - i = encodeVarint(dAtA, i, uint64(m.Type)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x8 } @@ -324,7 +325,7 @@ func (m *Histogram) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Counts) > 0 { var pksize2 int for _, num := range m.Counts { - pksize2 += sov(uint64(num)) + pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i @@ -337,7 +338,7 @@ func (m *Histogram) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[j1] = uint8(num) j1++ } - i = encodeVarint(dAtA, i, uint64(pksize2)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x12 } @@ -347,7 +348,7 @@ func (m *Histogram) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= 8 binary.LittleEndian.PutUint64(dAtA[i:], uint64(f3)) } - i = encodeVarint(dAtA, i, uint64(len(m.Values)*8)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Values)*8)) i-- dAtA[i] = 0xa } @@ -391,7 +392,7 @@ func (m *SummaryMetric) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x11 } if m.Count != 0 { - i = encodeVarint(dAtA, i, uint64(m.Count)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) i-- dAtA[i] = 0x8 } @@ -429,12 +430,12 @@ func (m *AggregatedDuration) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Sum != 0 { - i = encodeVarint(dAtA, i, uint64(m.Sum)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Sum)) i-- dAtA[i] = 0x10 } if m.Count != 0 { - i = encodeVarint(dAtA, i, uint64(m.Count)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) i-- dAtA[i] = 0x8 } @@ -564,20 +565,20 @@ func (m *Metricset) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Interval) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Samples) > 0 { for _, e := range m.Samples { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.DocCount != 0 { - n += 1 + sov(uint64(m.DocCount)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.DocCount)) } n += len(m.unknownFields) return n @@ -590,23 +591,23 @@ func (m *MetricsetSample) SizeVT() (n int) { var l int _ = l if m.Type != 0 { - n += 1 + sov(uint64(m.Type)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Unit) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Histogram != nil { l = m.Histogram.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Summary != nil { l = m.Summary.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Value != 0 { n += 9 @@ -622,14 +623,14 @@ func (m *Histogram) SizeVT() (n int) { var l int _ = l if len(m.Values) > 0 { - n += 1 + sov(uint64(len(m.Values)*8)) + len(m.Values)*8 + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Values)*8)) + len(m.Values)*8 } if len(m.Counts) > 0 { l = 0 for _, e := range m.Counts { - l += sov(uint64(e)) + l += protohelpers.SizeOfVarint(uint64(e)) } - n += 1 + sov(uint64(l)) + l + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n @@ -642,7 +643,7 @@ func (m *SummaryMetric) SizeVT() (n int) { var l int _ = l if m.Count != 0 { - n += 1 + sov(uint64(m.Count)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) } if m.Sum != 0 { n += 9 @@ -658,10 +659,10 @@ func (m *AggregatedDuration) SizeVT() (n int) { var l int _ = l if m.Count != 0 { - n += 1 + sov(uint64(m.Count)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) } if m.Sum != 0 { - n += 1 + sov(uint64(m.Sum)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Sum)) } n += len(m.unknownFields) return n @@ -675,7 +676,7 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -703,7 +704,7 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -717,11 +718,11 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -735,7 +736,7 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -749,11 +750,11 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -767,7 +768,7 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -780,11 +781,11 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -808,7 +809,7 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { m.DocCount = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -822,12 +823,12 @@ func (m *Metricset) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -850,7 +851,7 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -878,7 +879,7 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -897,7 +898,7 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -911,11 +912,11 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -929,7 +930,7 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -943,11 +944,11 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -961,7 +962,7 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -974,11 +975,11 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -997,7 +998,7 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1010,11 +1011,11 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1039,12 +1040,12 @@ func (m *MetricsetSample) UnmarshalVT(dAtA []byte) error { m.Value = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1067,7 +1068,7 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1102,7 +1103,7 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1115,11 +1116,11 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1147,7 +1148,7 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1164,7 +1165,7 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1177,11 +1178,11 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1201,7 +1202,7 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1220,12 +1221,12 @@ func (m *Histogram) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1248,7 +1249,7 @@ func (m *SummaryMetric) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1276,7 +1277,7 @@ func (m *SummaryMetric) UnmarshalVT(dAtA []byte) error { m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1301,12 +1302,12 @@ func (m *SummaryMetric) UnmarshalVT(dAtA []byte) error { m.Sum = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1329,7 +1330,7 @@ func (m *AggregatedDuration) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1357,7 +1358,7 @@ func (m *AggregatedDuration) UnmarshalVT(dAtA []byte) error { m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1376,7 +1377,7 @@ func (m *AggregatedDuration) UnmarshalVT(dAtA []byte) error { m.Sum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1390,12 +1391,12 @@ func (m *AggregatedDuration) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/network.pb.go b/model/modelpb/network.pb.go index 243348a2..d618b503 100644 --- a/model/modelpb/network.pb.go +++ b/model/modelpb/network.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: network.proto package modelpb diff --git a/model/modelpb/network_vtproto.pb.go b/model/modelpb/network_vtproto.pb.go index 3776c58f..5f756a62 100644 --- a/model/modelpb/network_vtproto.pb.go +++ b/model/modelpb/network_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: network.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -129,7 +130,7 @@ func (m *Network) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -139,7 +140,7 @@ func (m *Network) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -179,14 +180,14 @@ func (m *NetworkConnection) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Subtype) > 0 { i -= len(m.Subtype) copy(dAtA[i:], m.Subtype) - i = encodeVarint(dAtA, i, uint64(len(m.Subtype))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Subtype))) i-- dAtA[i] = 0x12 } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0xa } @@ -226,28 +227,28 @@ func (m *NetworkCarrier) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Icc) > 0 { i -= len(m.Icc) copy(dAtA[i:], m.Icc) - i = encodeVarint(dAtA, i, uint64(len(m.Icc))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Icc))) i-- dAtA[i] = 0x22 } if len(m.Mnc) > 0 { i -= len(m.Mnc) copy(dAtA[i:], m.Mnc) - i = encodeVarint(dAtA, i, uint64(len(m.Mnc))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Mnc))) i-- dAtA[i] = 0x1a } if len(m.Mcc) > 0 { i -= len(m.Mcc) copy(dAtA[i:], m.Mcc) - i = encodeVarint(dAtA, i, uint64(len(m.Mcc))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Mcc))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -326,11 +327,11 @@ func (m *Network) SizeVT() (n int) { _ = l if m.Connection != nil { l = m.Connection.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Carrier != nil { l = m.Carrier.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -344,11 +345,11 @@ func (m *NetworkConnection) SizeVT() (n int) { _ = l l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Subtype) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -362,19 +363,19 @@ func (m *NetworkCarrier) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Mcc) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Mnc) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Icc) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -388,7 +389,7 @@ func (m *Network) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -416,7 +417,7 @@ func (m *Network) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -429,11 +430,11 @@ func (m *Network) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -452,7 +453,7 @@ func (m *Network) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -465,11 +466,11 @@ func (m *Network) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -483,12 +484,12 @@ func (m *Network) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -511,7 +512,7 @@ func (m *NetworkConnection) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -539,7 +540,7 @@ func (m *NetworkConnection) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -553,11 +554,11 @@ func (m *NetworkConnection) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -571,7 +572,7 @@ func (m *NetworkConnection) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -585,11 +586,11 @@ func (m *NetworkConnection) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -598,12 +599,12 @@ func (m *NetworkConnection) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -626,7 +627,7 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -654,7 +655,7 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -668,11 +669,11 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -686,7 +687,7 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -700,11 +701,11 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -718,7 +719,7 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -732,11 +733,11 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -750,7 +751,7 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -764,11 +765,11 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -777,12 +778,12 @@ func (m *NetworkCarrier) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/observer.pb.go b/model/modelpb/observer.pb.go index 1871de1c..5f0bb1dd 100644 --- a/model/modelpb/observer.pb.go +++ b/model/modelpb/observer.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: observer.proto package modelpb diff --git a/model/modelpb/observer_vtproto.pb.go b/model/modelpb/observer_vtproto.pb.go index dfc47e72..3d28cf58 100644 --- a/model/modelpb/observer_vtproto.pb.go +++ b/model/modelpb/observer_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: observer.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -90,28 +91,28 @@ func (m *Observer) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x22 } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if len(m.Hostname) > 0 { i -= len(m.Hostname) copy(dAtA[i:], m.Hostname) - i = encodeVarint(dAtA, i, uint64(len(m.Hostname))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname))) i-- dAtA[i] = 0xa } @@ -146,19 +147,19 @@ func (m *Observer) SizeVT() (n int) { _ = l l = len(m.Hostname) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -172,7 +173,7 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -200,7 +201,7 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -214,11 +215,11 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -232,7 +233,7 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -246,11 +247,11 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -264,7 +265,7 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -278,11 +279,11 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -296,7 +297,7 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -310,11 +311,11 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -323,12 +324,12 @@ func (m *Observer) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/os.pb.go b/model/modelpb/os.pb.go index 0df5b1dd..3560aa2b 100644 --- a/model/modelpb/os.pb.go +++ b/model/modelpb/os.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: os.proto package modelpb diff --git a/model/modelpb/os_vtproto.pb.go b/model/modelpb/os_vtproto.pb.go index 9a42d42d..e4001dd6 100644 --- a/model/modelpb/os_vtproto.pb.go +++ b/model/modelpb/os_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: os.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -91,35 +92,35 @@ func (m *OS) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x2a } if len(m.Full) > 0 { i -= len(m.Full) copy(dAtA[i:], m.Full) - i = encodeVarint(dAtA, i, uint64(len(m.Full))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Full))) i-- dAtA[i] = 0x22 } if len(m.Platform) > 0 { i -= len(m.Platform) copy(dAtA[i:], m.Platform) - i = encodeVarint(dAtA, i, uint64(len(m.Platform))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Platform))) i-- dAtA[i] = 0x1a } if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -154,23 +155,23 @@ func (m *OS) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Platform) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Full) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -184,7 +185,7 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -212,7 +213,7 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -226,11 +227,11 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -244,7 +245,7 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -258,11 +259,11 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -276,7 +277,7 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -290,11 +291,11 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -308,7 +309,7 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -322,11 +323,11 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -340,7 +341,7 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -354,11 +355,11 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -367,12 +368,12 @@ func (m *OS) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/parent_vtproto.pb.go b/model/modelpb/parent_vtproto.pb.go deleted file mode 100644 index 4126f54f..00000000 --- a/model/modelpb/parent_vtproto.pb.go +++ /dev/null @@ -1,193 +0,0 @@ -// Licensed to Elasticsearch B.V. under one or more contributor -// license agreements. See the NOTICE file distributed with -// this work for additional information regarding copyright -// ownership. Elasticsearch B.V. licenses this file to you under -// the Apache License, Version 2.0 (the "License"); you may -// not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.4.0 -// source: parent.proto - -package modelpb - -import ( - fmt "fmt" - io "io" - - proto "google.golang.org/protobuf/proto" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *Parent) CloneVT() *Parent { - if m == nil { - return (*Parent)(nil) - } - r := &Parent{ - Id: m.Id, - } - if len(m.unknownFields) > 0 { - r.unknownFields = make([]byte, len(m.unknownFields)) - copy(r.unknownFields, m.unknownFields) - } - return r -} - -func (m *Parent) CloneMessageVT() proto.Message { - return m.CloneVT() -} - -func (m *Parent) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Parent) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Parent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Parent) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *Parent) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Parent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Parent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/model/modelpb/process.pb.go b/model/modelpb/process.pb.go index f64ea050..4ed001dc 100644 --- a/model/modelpb/process.pb.go +++ b/model/modelpb/process.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: process.proto package modelpb diff --git a/model/modelpb/process_vtproto.pb.go b/model/modelpb/process_vtproto.pb.go index 05b24290..7b9b6442 100644 --- a/model/modelpb/process_vtproto.pb.go +++ b/model/modelpb/process_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: process.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -113,7 +114,7 @@ func (m *Process) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Pid != 0 { - i = encodeVarint(dAtA, i, uint64(m.Pid)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Pid)) i-- dAtA[i] = 0x38 } @@ -121,7 +122,7 @@ func (m *Process) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Argv) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Argv[iNdEx]) copy(dAtA[i:], m.Argv[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Argv[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Argv[iNdEx]))) i-- dAtA[i] = 0x32 } @@ -129,21 +130,21 @@ func (m *Process) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Executable) > 0 { i -= len(m.Executable) copy(dAtA[i:], m.Executable) - i = encodeVarint(dAtA, i, uint64(len(m.Executable))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Executable))) i-- dAtA[i] = 0x2a } if len(m.CommandLine) > 0 { i -= len(m.CommandLine) copy(dAtA[i:], m.CommandLine) - i = encodeVarint(dAtA, i, uint64(len(m.CommandLine))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CommandLine))) i-- dAtA[i] = 0x22 } if len(m.Title) > 0 { i -= len(m.Title) copy(dAtA[i:], m.Title) - i = encodeVarint(dAtA, i, uint64(len(m.Title))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Title))) i-- dAtA[i] = 0x1a } @@ -153,12 +154,12 @@ func (m *Process) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if m.Ppid != 0 { - i = encodeVarint(dAtA, i, uint64(m.Ppid)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Ppid)) i-- dAtA[i] = 0x8 } @@ -196,14 +197,14 @@ func (m *ProcessThread) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Id != 0 { - i = encodeVarint(dAtA, i, uint64(m.Id)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Id)) i-- dAtA[i] = 0x10 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -261,32 +262,32 @@ func (m *Process) SizeVT() (n int) { var l int _ = l if m.Ppid != 0 { - n += 1 + sov(uint64(m.Ppid)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Ppid)) } if m.Thread != nil { l = m.Thread.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Title) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.CommandLine) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Executable) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Argv) > 0 { for _, s := range m.Argv { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Pid != 0 { - n += 1 + sov(uint64(m.Pid)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Pid)) } n += len(m.unknownFields) return n @@ -300,10 +301,10 @@ func (m *ProcessThread) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Id != 0 { - n += 1 + sov(uint64(m.Id)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Id)) } n += len(m.unknownFields) return n @@ -317,7 +318,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -345,7 +346,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { m.Ppid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -364,7 +365,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -377,11 +378,11 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -400,7 +401,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -414,11 +415,11 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -432,7 +433,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -446,11 +447,11 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -464,7 +465,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -478,11 +479,11 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -496,7 +497,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -510,11 +511,11 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -528,7 +529,7 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { m.Pid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -542,12 +543,12 @@ func (m *Process) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -570,7 +571,7 @@ func (m *ProcessThread) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -598,7 +599,7 @@ func (m *ProcessThread) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -612,11 +613,11 @@ func (m *ProcessThread) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -630,7 +631,7 @@ func (m *ProcessThread) UnmarshalVT(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -644,12 +645,12 @@ func (m *ProcessThread) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/service.pb.go b/model/modelpb/service.pb.go index 5b994993..5fba7e5a 100644 --- a/model/modelpb/service.pb.go +++ b/model/modelpb/service.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: service.proto package modelpb diff --git a/model/modelpb/service_vtproto.pb.go b/model/modelpb/service_vtproto.pb.go index 479af2fd..f35369f3 100644 --- a/model/modelpb/service_vtproto.pb.go +++ b/model/modelpb/service_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: service.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -206,28 +207,28 @@ func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x4a } if len(m.Environment) > 0 { i -= len(m.Environment) copy(dAtA[i:], m.Environment) - i = encodeVarint(dAtA, i, uint64(len(m.Environment))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Environment))) i-- dAtA[i] = 0x42 } if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x3a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x32 } @@ -237,7 +238,7 @@ func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -247,7 +248,7 @@ func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -257,7 +258,7 @@ func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -267,7 +268,7 @@ func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -277,7 +278,7 @@ func (m *Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -317,21 +318,21 @@ func (m *ServiceOrigin) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -371,14 +372,14 @@ func (m *ServiceTarget) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -418,14 +419,14 @@ func (m *Language) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -465,14 +466,14 @@ func (m *Runtime) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -512,14 +513,14 @@ func (m *Framework) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Version) > 0 { i -= len(m.Version) copy(dAtA[i:], m.Version) - i = encodeVarint(dAtA, i, uint64(len(m.Version))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -559,7 +560,7 @@ func (m *ServiceNode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -726,39 +727,39 @@ func (m *Service) SizeVT() (n int) { _ = l if m.Origin != nil { l = m.Origin.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Target != nil { l = m.Target.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Language != nil { l = m.Language.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Runtime != nil { l = m.Runtime.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Framework != nil { l = m.Framework.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Environment) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Node != nil { l = m.Node.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -772,15 +773,15 @@ func (m *ServiceOrigin) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -794,11 +795,11 @@ func (m *ServiceTarget) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -812,11 +813,11 @@ func (m *Language) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -830,11 +831,11 @@ func (m *Runtime) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -848,11 +849,11 @@ func (m *Framework) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Version) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -866,7 +867,7 @@ func (m *ServiceNode) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -880,7 +881,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -908,7 +909,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -921,11 +922,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -944,7 +945,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -957,11 +958,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -980,7 +981,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -993,11 +994,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1016,7 +1017,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1029,11 +1030,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1052,7 +1053,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1065,11 +1066,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1088,7 +1089,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1102,11 +1103,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1120,7 +1121,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1134,11 +1135,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1152,7 +1153,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1166,11 +1167,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1184,7 +1185,7 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1197,11 +1198,11 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1215,12 +1216,12 @@ func (m *Service) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1243,7 +1244,7 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1271,7 +1272,7 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1285,11 +1286,11 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1303,7 +1304,7 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1317,11 +1318,11 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1335,7 +1336,7 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1349,11 +1350,11 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1362,12 +1363,12 @@ func (m *ServiceOrigin) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1390,7 +1391,7 @@ func (m *ServiceTarget) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1418,7 +1419,7 @@ func (m *ServiceTarget) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1432,11 +1433,11 @@ func (m *ServiceTarget) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1450,7 +1451,7 @@ func (m *ServiceTarget) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1464,11 +1465,11 @@ func (m *ServiceTarget) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1477,12 +1478,12 @@ func (m *ServiceTarget) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1505,7 +1506,7 @@ func (m *Language) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1533,7 +1534,7 @@ func (m *Language) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1547,11 +1548,11 @@ func (m *Language) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1565,7 +1566,7 @@ func (m *Language) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1579,11 +1580,11 @@ func (m *Language) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1592,12 +1593,12 @@ func (m *Language) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1620,7 +1621,7 @@ func (m *Runtime) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1648,7 +1649,7 @@ func (m *Runtime) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1662,11 +1663,11 @@ func (m *Runtime) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1680,7 +1681,7 @@ func (m *Runtime) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1694,11 +1695,11 @@ func (m *Runtime) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1707,12 +1708,12 @@ func (m *Runtime) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1735,7 +1736,7 @@ func (m *Framework) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1763,7 +1764,7 @@ func (m *Framework) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1777,11 +1778,11 @@ func (m *Framework) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1795,7 +1796,7 @@ func (m *Framework) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1809,11 +1810,11 @@ func (m *Framework) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1822,12 +1823,12 @@ func (m *Framework) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1850,7 +1851,7 @@ func (m *ServiceNode) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1878,7 +1879,7 @@ func (m *ServiceNode) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1892,11 +1893,11 @@ func (m *ServiceNode) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1905,12 +1906,12 @@ func (m *ServiceNode) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/session.pb.go b/model/modelpb/session.pb.go index 3580dd79..e10c4c0b 100644 --- a/model/modelpb/session.pb.go +++ b/model/modelpb/session.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: session.proto package modelpb diff --git a/model/modelpb/session_vtproto.pb.go b/model/modelpb/session_vtproto.pb.go index aa95ec0a..b1334318 100644 --- a/model/modelpb/session_vtproto.pb.go +++ b/model/modelpb/session_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: session.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -86,14 +87,14 @@ func (m *Session) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Sequence != 0 { - i = encodeVarint(dAtA, i, uint64(m.Sequence)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Sequence)) i-- dAtA[i] = 0x10 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -128,10 +129,10 @@ func (m *Session) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Sequence != 0 { - n += 1 + sov(uint64(m.Sequence)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Sequence)) } n += len(m.unknownFields) return n @@ -145,7 +146,7 @@ func (m *Session) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -173,7 +174,7 @@ func (m *Session) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -187,11 +188,11 @@ func (m *Session) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -205,7 +206,7 @@ func (m *Session) UnmarshalVT(dAtA []byte) error { m.Sequence = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -219,12 +220,12 @@ func (m *Session) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/source.pb.go b/model/modelpb/source.pb.go index 01f19677..f4ffea5e 100644 --- a/model/modelpb/source.pb.go +++ b/model/modelpb/source.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: source.proto package modelpb diff --git a/model/modelpb/source_vtproto.pb.go b/model/modelpb/source_vtproto.pb.go index 78367730..c4812c3c 100644 --- a/model/modelpb/source_vtproto.pb.go +++ b/model/modelpb/source_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: source.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -105,14 +106,14 @@ func (m *Source) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x20 } if len(m.Domain) > 0 { i -= len(m.Domain) copy(dAtA[i:], m.Domain) - i = encodeVarint(dAtA, i, uint64(len(m.Domain))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) i-- dAtA[i] = 0x1a } @@ -122,7 +123,7 @@ func (m *Source) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -132,7 +133,7 @@ func (m *Source) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -175,7 +176,7 @@ func (m *NAT) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -234,18 +235,18 @@ func (m *Source) SizeVT() (n int) { _ = l if m.Ip != nil { l = m.Ip.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Nat != nil { l = m.Nat.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Domain) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -259,7 +260,7 @@ func (m *NAT) SizeVT() (n int) { _ = l if m.Ip != nil { l = m.Ip.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -273,7 +274,7 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -301,7 +302,7 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -314,11 +315,11 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -337,7 +338,7 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -350,11 +351,11 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -373,7 +374,7 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -387,11 +388,11 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -405,7 +406,7 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -419,12 +420,12 @@ func (m *Source) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -447,7 +448,7 @@ func (m *NAT) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -475,7 +476,7 @@ func (m *NAT) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -488,11 +489,11 @@ func (m *NAT) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -506,12 +507,12 @@ func (m *NAT) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/span.pb.go b/model/modelpb/span.pb.go index e27e8e08..4d32cda6 100644 --- a/model/modelpb/span.pb.go +++ b/model/modelpb/span.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: span.proto package modelpb diff --git a/model/modelpb/span_vtproto.pb.go b/model/modelpb/span_vtproto.pb.go index ed1af4c7..df512e2b 100644 --- a/model/modelpb/span_vtproto.pb.go +++ b/model/modelpb/span_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: span.proto package modelpb @@ -28,6 +28,7 @@ import ( math "math" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -209,7 +210,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x72 } @@ -220,7 +221,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x6a } @@ -232,7 +233,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x62 } @@ -240,42 +241,42 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x5a } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x52 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x4a } if len(m.Subtype) > 0 { i -= len(m.Subtype) copy(dAtA[i:], m.Subtype) - i = encodeVarint(dAtA, i, uint64(len(m.Subtype))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Subtype))) i-- dAtA[i] = 0x42 } if len(m.Action) > 0 { i -= len(m.Action) copy(dAtA[i:], m.Action) - i = encodeVarint(dAtA, i, uint64(len(m.Action))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Action))) i-- dAtA[i] = 0x3a } if len(m.Kind) > 0 { i -= len(m.Kind) copy(dAtA[i:], m.Kind) - i = encodeVarint(dAtA, i, uint64(len(m.Kind))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Kind))) i-- dAtA[i] = 0x32 } @@ -295,7 +296,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -305,7 +306,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -315,7 +316,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -325,7 +326,7 @@ func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -365,40 +366,40 @@ func (m *DB) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Link) > 0 { i -= len(m.Link) copy(dAtA[i:], m.Link) - i = encodeVarint(dAtA, i, uint64(len(m.Link))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Link))) i-- dAtA[i] = 0x32 } if len(m.UserName) > 0 { i -= len(m.UserName) copy(dAtA[i:], m.UserName) - i = encodeVarint(dAtA, i, uint64(len(m.UserName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UserName))) i-- dAtA[i] = 0x2a } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x22 } if len(m.Statement) > 0 { i -= len(m.Statement) copy(dAtA[i:], m.Statement) - i = encodeVarint(dAtA, i, uint64(len(m.Statement))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Statement))) i-- dAtA[i] = 0x1a } if len(m.Instance) > 0 { i -= len(m.Instance) copy(dAtA[i:], m.Instance) - i = encodeVarint(dAtA, i, uint64(len(m.Instance))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Instance))) i-- dAtA[i] = 0x12 } if m.RowsAffected != nil { - i = encodeVarint(dAtA, i, uint64(*m.RowsAffected)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.RowsAffected)) i-- dAtA[i] = 0x8 } @@ -441,28 +442,28 @@ func (m *DestinationService) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if len(m.Resource) > 0 { i -= len(m.Resource) copy(dAtA[i:], m.Resource) - i = encodeVarint(dAtA, i, uint64(len(m.Resource))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Resource))) i-- dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0xa } @@ -506,12 +507,12 @@ func (m *Composite) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x19 } if m.Count != 0 { - i = encodeVarint(dAtA, i, uint64(m.Count)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Count)) i-- dAtA[i] = 0x10 } if m.CompressionStrategy != 0 { - i = encodeVarint(dAtA, i, uint64(m.CompressionStrategy)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CompressionStrategy)) i-- dAtA[i] = 0x8 } @@ -551,14 +552,14 @@ func (m *SpanLink) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.SpanId) > 0 { i -= len(m.SpanId) copy(dAtA[i:], m.SpanId) - i = encodeVarint(dAtA, i, uint64(len(m.SpanId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpanId))) i-- dAtA[i] = 0x12 } if len(m.TraceId) > 0 { i -= len(m.TraceId) copy(dAtA[i:], m.TraceId) - i = encodeVarint(dAtA, i, uint64(len(m.TraceId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TraceId))) i-- dAtA[i] = 0xa } @@ -693,62 +694,62 @@ func (m *Span) SizeVT() (n int) { _ = l if m.Message != nil { l = m.Message.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Composite != nil { l = m.Composite.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DestinationService != nil { l = m.DestinationService.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Db != nil { l = m.Db.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Sync != nil { n += 2 } l = len(m.Kind) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Action) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Subtype) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Stacktrace) > 0 { for _, e := range m.Stacktrace { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Links) > 0 { for _, e := range m.Links { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.SelfTime != nil { l = m.SelfTime.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.RepresentativeCount != 0 { n += 9 @@ -764,27 +765,27 @@ func (m *DB) SizeVT() (n int) { var l int _ = l if m.RowsAffected != nil { - n += 1 + sov(uint64(*m.RowsAffected)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.RowsAffected)) } l = len(m.Instance) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Statement) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.UserName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Link) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -798,19 +799,19 @@ func (m *DestinationService) SizeVT() (n int) { _ = l l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Resource) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.ResponseTime != nil { l = m.ResponseTime.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -823,10 +824,10 @@ func (m *Composite) SizeVT() (n int) { var l int _ = l if m.CompressionStrategy != 0 { - n += 1 + sov(uint64(m.CompressionStrategy)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.CompressionStrategy)) } if m.Count != 0 { - n += 1 + sov(uint64(m.Count)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Count)) } if m.Sum != 0 { n += 9 @@ -843,11 +844,11 @@ func (m *SpanLink) SizeVT() (n int) { _ = l l = len(m.TraceId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.SpanId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -861,7 +862,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -889,7 +890,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -902,11 +903,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -925,7 +926,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -938,11 +939,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -961,7 +962,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -974,11 +975,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -997,7 +998,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1010,11 +1011,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1033,7 +1034,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1054,7 +1055,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1068,11 +1069,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1086,7 +1087,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1100,11 +1101,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1118,7 +1119,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1132,11 +1133,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1150,7 +1151,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1164,11 +1165,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1182,7 +1183,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1196,11 +1197,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1214,7 +1215,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1228,11 +1229,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1246,7 +1247,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1259,11 +1260,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1287,7 +1288,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1300,11 +1301,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1328,7 +1329,7 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1341,11 +1342,11 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1370,12 +1371,12 @@ func (m *Span) UnmarshalVT(dAtA []byte) error { m.RepresentativeCount = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1398,7 +1399,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1426,7 +1427,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1446,7 +1447,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1460,11 +1461,11 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1478,7 +1479,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1492,11 +1493,11 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1510,7 +1511,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1524,11 +1525,11 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1542,7 +1543,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1556,11 +1557,11 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1574,7 +1575,7 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1588,11 +1589,11 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1601,12 +1602,12 @@ func (m *DB) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1629,7 +1630,7 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1657,7 +1658,7 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1671,11 +1672,11 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1689,7 +1690,7 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1703,11 +1704,11 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1721,7 +1722,7 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1735,11 +1736,11 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1753,7 +1754,7 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1766,11 +1767,11 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1784,12 +1785,12 @@ func (m *DestinationService) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1812,7 +1813,7 @@ func (m *Composite) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1840,7 +1841,7 @@ func (m *Composite) UnmarshalVT(dAtA []byte) error { m.CompressionStrategy = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1859,7 +1860,7 @@ func (m *Composite) UnmarshalVT(dAtA []byte) error { m.Count = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1884,12 +1885,12 @@ func (m *Composite) UnmarshalVT(dAtA []byte) error { m.Sum = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1912,7 +1913,7 @@ func (m *SpanLink) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1940,7 +1941,7 @@ func (m *SpanLink) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1954,11 +1955,11 @@ func (m *SpanLink) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1972,7 +1973,7 @@ func (m *SpanLink) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1986,11 +1987,11 @@ func (m *SpanLink) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1999,12 +2000,12 @@ func (m *SpanLink) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/stacktrace.pb.go b/model/modelpb/stacktrace.pb.go index aa1387ef..96feb8a3 100644 --- a/model/modelpb/stacktrace.pb.go +++ b/model/modelpb/stacktrace.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: stacktrace.proto package modelpb diff --git a/model/modelpb/stacktrace_vtproto.pb.go b/model/modelpb/stacktrace_vtproto.pb.go index cc68f834..9c828536 100644 --- a/model/modelpb/stacktrace_vtproto.pb.go +++ b/model/modelpb/stacktrace_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: stacktrace.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -184,7 +185,7 @@ func (m *StacktraceFrame) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.PostContext) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.PostContext[iNdEx]) copy(dAtA[i:], m.PostContext[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.PostContext[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PostContext[iNdEx]))) i-- dAtA[i] = 0x6a } @@ -193,7 +194,7 @@ func (m *StacktraceFrame) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.PreContext) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.PreContext[iNdEx]) copy(dAtA[i:], m.PreContext[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.PreContext[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PreContext[iNdEx]))) i-- dAtA[i] = 0x62 } @@ -204,66 +205,66 @@ func (m *StacktraceFrame) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x5a } if len(m.SourcemapError) > 0 { i -= len(m.SourcemapError) copy(dAtA[i:], m.SourcemapError) - i = encodeVarint(dAtA, i, uint64(len(m.SourcemapError))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SourcemapError))) i-- dAtA[i] = 0x52 } if len(m.AbsPath) > 0 { i -= len(m.AbsPath) copy(dAtA[i:], m.AbsPath) - i = encodeVarint(dAtA, i, uint64(len(m.AbsPath))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AbsPath))) i-- dAtA[i] = 0x4a } if len(m.Function) > 0 { i -= len(m.Function) copy(dAtA[i:], m.Function) - i = encodeVarint(dAtA, i, uint64(len(m.Function))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Function))) i-- dAtA[i] = 0x42 } if len(m.Module) > 0 { i -= len(m.Module) copy(dAtA[i:], m.Module) - i = encodeVarint(dAtA, i, uint64(len(m.Module))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Module))) i-- dAtA[i] = 0x3a } if len(m.ContextLine) > 0 { i -= len(m.ContextLine) copy(dAtA[i:], m.ContextLine) - i = encodeVarint(dAtA, i, uint64(len(m.ContextLine))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContextLine))) i-- dAtA[i] = 0x32 } if len(m.Classname) > 0 { i -= len(m.Classname) copy(dAtA[i:], m.Classname) - i = encodeVarint(dAtA, i, uint64(len(m.Classname))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Classname))) i-- dAtA[i] = 0x2a } if len(m.Filename) > 0 { i -= len(m.Filename) copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Filename))) i-- dAtA[i] = 0x22 } if m.Colno != nil { - i = encodeVarint(dAtA, i, uint64(*m.Colno)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Colno)) i-- dAtA[i] = 0x18 } if m.Lineno != nil { - i = encodeVarint(dAtA, i, uint64(*m.Lineno)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Lineno)) i-- dAtA[i] = 0x10 } @@ -274,7 +275,7 @@ func (m *StacktraceFrame) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -325,38 +326,38 @@ func (m *Original) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Function) > 0 { i -= len(m.Function) copy(dAtA[i:], m.Function) - i = encodeVarint(dAtA, i, uint64(len(m.Function))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Function))) i-- dAtA[i] = 0x32 } if m.Colno != nil { - i = encodeVarint(dAtA, i, uint64(*m.Colno)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Colno)) i-- dAtA[i] = 0x28 } if m.Lineno != nil { - i = encodeVarint(dAtA, i, uint64(*m.Lineno)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Lineno)) i-- dAtA[i] = 0x20 } if len(m.Classname) > 0 { i -= len(m.Classname) copy(dAtA[i:], m.Classname) - i = encodeVarint(dAtA, i, uint64(len(m.Classname))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Classname))) i-- dAtA[i] = 0x1a } if len(m.Filename) > 0 { i -= len(m.Filename) copy(dAtA[i:], m.Filename) - i = encodeVarint(dAtA, i, uint64(len(m.Filename))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Filename))) i-- dAtA[i] = 0x12 } if len(m.AbsPath) > 0 { i -= len(m.AbsPath) copy(dAtA[i:], m.AbsPath) - i = encodeVarint(dAtA, i, uint64(len(m.AbsPath))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AbsPath))) i-- dAtA[i] = 0xa } @@ -423,57 +424,57 @@ func (m *StacktraceFrame) SizeVT() (n int) { if len(m.Vars) > 0 { for _, e := range m.Vars { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Lineno != nil { - n += 1 + sov(uint64(*m.Lineno)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Lineno)) } if m.Colno != nil { - n += 1 + sov(uint64(*m.Colno)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Colno)) } l = len(m.Filename) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Classname) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ContextLine) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Module) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Function) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.AbsPath) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.SourcemapError) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Original != nil { l = m.Original.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.PreContext) > 0 { for _, s := range m.PreContext { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.PostContext) > 0 { for _, s := range m.PostContext { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.LibraryFrame { @@ -497,25 +498,25 @@ func (m *Original) SizeVT() (n int) { _ = l l = len(m.AbsPath) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Filename) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Classname) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Lineno != nil { - n += 1 + sov(uint64(*m.Lineno)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Lineno)) } if m.Colno != nil { - n += 1 + sov(uint64(*m.Colno)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Colno)) } l = len(m.Function) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.LibraryFrame { n += 2 @@ -532,7 +533,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -560,7 +561,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -573,11 +574,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -601,7 +602,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -621,7 +622,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -641,7 +642,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -655,11 +656,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -673,7 +674,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -687,11 +688,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -705,7 +706,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -719,11 +720,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -737,7 +738,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -751,11 +752,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -769,7 +770,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -783,11 +784,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -801,7 +802,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -815,11 +816,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -833,7 +834,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -847,11 +848,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -865,7 +866,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -878,11 +879,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -901,7 +902,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -915,11 +916,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -933,7 +934,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -947,11 +948,11 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -965,7 +966,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -985,7 +986,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1005,7 +1006,7 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1020,12 +1021,12 @@ func (m *StacktraceFrame) UnmarshalVT(dAtA []byte) error { m.ExcludeFromGrouping = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1048,7 +1049,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1076,7 +1077,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1090,11 +1091,11 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1108,7 +1109,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1122,11 +1123,11 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1140,7 +1141,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1154,11 +1155,11 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1172,7 +1173,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1192,7 +1193,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1212,7 +1213,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1226,11 +1227,11 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1244,7 +1245,7 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1259,12 +1260,12 @@ func (m *Original) UnmarshalVT(dAtA []byte) error { m.LibraryFrame = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/trace.pb.go b/model/modelpb/trace.pb.go index 2171ca14..0b6bb9eb 100644 --- a/model/modelpb/trace.pb.go +++ b/model/modelpb/trace.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: trace.proto package modelpb diff --git a/model/modelpb/trace_vtproto.pb.go b/model/modelpb/trace_vtproto.pb.go index f532a87f..c761fd2e 100644 --- a/model/modelpb/trace_vtproto.pb.go +++ b/model/modelpb/trace_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: trace.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -87,7 +88,7 @@ func (m *Trace) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -122,7 +123,7 @@ func (m *Trace) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -136,7 +137,7 @@ func (m *Trace) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -164,7 +165,7 @@ func (m *Trace) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -178,11 +179,11 @@ func (m *Trace) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -191,12 +192,12 @@ func (m *Trace) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/transaction.pb.go b/model/modelpb/transaction.pb.go index 5b38ef02..3aaa140e 100644 --- a/model/modelpb/transaction.pb.go +++ b/model/modelpb/transaction.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: transaction.proto package modelpb diff --git a/model/modelpb/transaction_vtproto.pb.go b/model/modelpb/transaction_vtproto.pb.go index c2cafefe..3d3508c7 100644 --- a/model/modelpb/transaction_vtproto.pb.go +++ b/model/modelpb/transaction_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: transaction.proto package modelpb @@ -28,6 +28,7 @@ import ( math "math" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -195,7 +196,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.ProfilerStackTraceIds) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ProfilerStackTraceIds[iNdEx]) copy(dAtA[i:], m.ProfilerStackTraceIds[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.ProfilerStackTraceIds[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProfilerStackTraceIds[iNdEx]))) i-- dAtA[i] = 0x1 i-- @@ -234,7 +235,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x62 } @@ -245,7 +246,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x5a } @@ -256,35 +257,35 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x52 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x4a } if len(m.Result) > 0 { i -= len(m.Result) copy(dAtA[i:], m.Result) - i = encodeVarint(dAtA, i, uint64(len(m.Result))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Result))) i-- dAtA[i] = 0x42 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x3a } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0x32 } @@ -294,7 +295,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -307,15 +308,15 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 } @@ -327,7 +328,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -338,7 +339,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -348,7 +349,7 @@ func (m *Transaction) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -386,12 +387,12 @@ func (m *SpanCount) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Started != nil { - i = encodeVarint(dAtA, i, uint64(*m.Started)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Started)) i-- dAtA[i] = 0x10 } if m.Dropped != nil { - i = encodeVarint(dAtA, i, uint64(*m.Dropped)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(*m.Dropped)) i-- dAtA[i] = 0x8 } @@ -438,10 +439,10 @@ func (m *TransactionMark) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x11 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -485,35 +486,35 @@ func (m *DroppedSpanStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } if len(m.Outcome) > 0 { i -= len(m.Outcome) copy(dAtA[i:], m.Outcome) - i = encodeVarint(dAtA, i, uint64(len(m.Outcome))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Outcome))) i-- dAtA[i] = 0x22 } if len(m.ServiceTargetName) > 0 { i -= len(m.ServiceTargetName) copy(dAtA[i:], m.ServiceTargetName) - i = encodeVarint(dAtA, i, uint64(len(m.ServiceTargetName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServiceTargetName))) i-- dAtA[i] = 0x1a } if len(m.ServiceTargetType) > 0 { i -= len(m.ServiceTargetType) copy(dAtA[i:], m.ServiceTargetType) - i = encodeVarint(dAtA, i, uint64(len(m.ServiceTargetType))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServiceTargetType))) i-- dAtA[i] = 0x12 } if len(m.DestinationServiceResource) > 0 { i -= len(m.DestinationServiceResource) copy(dAtA[i:], m.DestinationServiceResource) - i = encodeVarint(dAtA, i, uint64(len(m.DestinationServiceResource))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DestinationServiceResource))) i-- dAtA[i] = 0xa } @@ -629,16 +630,16 @@ func (m *Transaction) SizeVT() (n int) { _ = l if m.SpanCount != nil { l = m.SpanCount.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.UserExperience != nil { l = m.UserExperience.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Custom) > 0 { for _, e := range m.Custom { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Marks) > 0 { @@ -649,44 +650,44 @@ func (m *Transaction) SizeVT() (n int) { if v != nil { l = v.SizeVT() } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + l += 1 + protohelpers.SizeOfVarint(uint64(l)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } if m.Message != nil { l = m.Message.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Result) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.DurationHistogram != nil { l = m.DurationHistogram.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.DroppedSpansStats) > 0 { for _, e := range m.DroppedSpansStats { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.DurationSummary != nil { l = m.DurationSummary.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.RepresentativeCount != 0 { n += 9 @@ -700,7 +701,7 @@ func (m *Transaction) SizeVT() (n int) { if len(m.ProfilerStackTraceIds) > 0 { for _, s := range m.ProfilerStackTraceIds { l = len(s) - n += 2 + l + sov(uint64(l)) + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -714,10 +715,10 @@ func (m *SpanCount) SizeVT() (n int) { var l int _ = l if m.Dropped != nil { - n += 1 + sov(uint64(*m.Dropped)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Dropped)) } if m.Started != nil { - n += 1 + sov(uint64(*m.Started)) + n += 1 + protohelpers.SizeOfVarint(uint64(*m.Started)) } n += len(m.unknownFields) return n @@ -733,8 +734,8 @@ func (m *TransactionMark) SizeVT() (n int) { for k, v := range m.Measurements { _ = k _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -749,23 +750,23 @@ func (m *DroppedSpanStats) SizeVT() (n int) { _ = l l = len(m.DestinationServiceResource) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ServiceTargetType) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ServiceTargetName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Outcome) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Duration != nil { l = m.Duration.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -779,7 +780,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -807,7 +808,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -820,11 +821,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -843,7 +844,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -856,11 +857,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -879,7 +880,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -892,11 +893,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -920,7 +921,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -933,11 +934,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -952,7 +953,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -969,7 +970,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -983,11 +984,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -998,7 +999,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1011,11 +1012,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -1027,12 +1028,12 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -1049,7 +1050,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1062,11 +1063,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1085,7 +1086,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1099,11 +1100,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1117,7 +1118,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1131,11 +1132,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1149,7 +1150,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1163,11 +1164,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1181,7 +1182,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1195,11 +1196,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1213,7 +1214,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1226,11 +1227,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1249,7 +1250,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1262,11 +1263,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1290,7 +1291,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1303,11 +1304,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1337,7 +1338,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1357,7 +1358,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1377,7 +1378,7 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1391,11 +1392,11 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1404,12 +1405,12 @@ func (m *Transaction) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1432,7 +1433,7 @@ func (m *SpanCount) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1460,7 +1461,7 @@ func (m *SpanCount) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1480,7 +1481,7 @@ func (m *SpanCount) UnmarshalVT(dAtA []byte) error { var v uint32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1495,12 +1496,12 @@ func (m *SpanCount) UnmarshalVT(dAtA []byte) error { m.Started = &v default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1523,7 +1524,7 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1551,7 +1552,7 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1564,11 +1565,11 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1583,7 +1584,7 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1600,7 +1601,7 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1614,11 +1615,11 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -1635,12 +1636,12 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { mapvalue = math.Float64frombits(mapvaluetemp) } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -1652,12 +1653,12 @@ func (m *TransactionMark) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1680,7 +1681,7 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1708,7 +1709,7 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1722,11 +1723,11 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1740,7 +1741,7 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1754,11 +1755,11 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1772,7 +1773,7 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1786,11 +1787,11 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1804,7 +1805,7 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1818,11 +1819,11 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1836,7 +1837,7 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1849,11 +1850,11 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1867,12 +1868,12 @@ func (m *DroppedSpanStats) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/url.pb.go b/model/modelpb/url.pb.go index 0812afce..e3703daf 100644 --- a/model/modelpb/url.pb.go +++ b/model/modelpb/url.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: url.proto package modelpb diff --git a/model/modelpb/url_vtproto.pb.go b/model/modelpb/url_vtproto.pb.go index a1b6c4e1..4a0836eb 100644 --- a/model/modelpb/url_vtproto.pb.go +++ b/model/modelpb/url_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: url.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -92,56 +93,56 @@ func (m *URL) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x40 } if len(m.Fragment) > 0 { i -= len(m.Fragment) copy(dAtA[i:], m.Fragment) - i = encodeVarint(dAtA, i, uint64(len(m.Fragment))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Fragment))) i-- dAtA[i] = 0x3a } if len(m.Query) > 0 { i -= len(m.Query) copy(dAtA[i:], m.Query) - i = encodeVarint(dAtA, i, uint64(len(m.Query))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Query))) i-- dAtA[i] = 0x32 } if len(m.Path) > 0 { i -= len(m.Path) copy(dAtA[i:], m.Path) - i = encodeVarint(dAtA, i, uint64(len(m.Path))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path))) i-- dAtA[i] = 0x2a } if len(m.Domain) > 0 { i -= len(m.Domain) copy(dAtA[i:], m.Domain) - i = encodeVarint(dAtA, i, uint64(len(m.Domain))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) i-- dAtA[i] = 0x22 } if len(m.Full) > 0 { i -= len(m.Full) copy(dAtA[i:], m.Full) - i = encodeVarint(dAtA, i, uint64(len(m.Full))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Full))) i-- dAtA[i] = 0x1a } if len(m.Scheme) > 0 { i -= len(m.Scheme) copy(dAtA[i:], m.Scheme) - i = encodeVarint(dAtA, i, uint64(len(m.Scheme))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Scheme))) i-- dAtA[i] = 0x12 } if len(m.Original) > 0 { i -= len(m.Original) copy(dAtA[i:], m.Original) - i = encodeVarint(dAtA, i, uint64(len(m.Original))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Original))) i-- dAtA[i] = 0xa } @@ -176,34 +177,34 @@ func (m *URL) SizeVT() (n int) { _ = l l = len(m.Original) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Scheme) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Full) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Domain) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Path) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Query) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Fragment) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -217,7 +218,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -245,7 +246,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -259,11 +260,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -277,7 +278,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -291,11 +292,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -309,7 +310,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -323,11 +324,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -341,7 +342,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -355,11 +356,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -373,7 +374,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -387,11 +388,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -405,7 +406,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -419,11 +420,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -437,7 +438,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -451,11 +452,11 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -469,7 +470,7 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -483,12 +484,12 @@ func (m *URL) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/user.pb.go b/model/modelpb/user.pb.go index 7f792495..d36c2ecc 100644 --- a/model/modelpb/user.pb.go +++ b/model/modelpb/user.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: user.proto package modelpb diff --git a/model/modelpb/user_vtproto.pb.go b/model/modelpb/user_vtproto.pb.go index f898f0a4..d6f884ae 100644 --- a/model/modelpb/user_vtproto.pb.go +++ b/model/modelpb/user_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: user.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -90,28 +91,28 @@ func (m *User) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x22 } if len(m.Email) > 0 { i -= len(m.Email) copy(dAtA[i:], m.Email) - i = encodeVarint(dAtA, i, uint64(len(m.Email))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Email))) i-- dAtA[i] = 0x1a } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x12 } if len(m.Domain) > 0 { i -= len(m.Domain) copy(dAtA[i:], m.Domain) - i = encodeVarint(dAtA, i, uint64(len(m.Domain))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) i-- dAtA[i] = 0xa } @@ -146,19 +147,19 @@ func (m *User) SizeVT() (n int) { _ = l l = len(m.Domain) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Email) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -172,7 +173,7 @@ func (m *User) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -200,7 +201,7 @@ func (m *User) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -214,11 +215,11 @@ func (m *User) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -232,7 +233,7 @@ func (m *User) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -246,11 +247,11 @@ func (m *User) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -264,7 +265,7 @@ func (m *User) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -278,11 +279,11 @@ func (m *User) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -296,7 +297,7 @@ func (m *User) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -310,11 +311,11 @@ func (m *User) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -323,12 +324,12 @@ func (m *User) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/model/modelpb/useragent.pb.go b/model/modelpb/useragent.pb.go index 8c006379..34217c21 100644 --- a/model/modelpb/useragent.pb.go +++ b/model/modelpb/useragent.pb.go @@ -17,8 +17,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.32.0 +// protoc v4.25.2 // source: useragent.proto package modelpb diff --git a/model/modelpb/useragent_vtproto.pb.go b/model/modelpb/useragent_vtproto.pb.go index c7ff62eb..499c4e4a 100644 --- a/model/modelpb/useragent_vtproto.pb.go +++ b/model/modelpb/useragent_vtproto.pb.go @@ -16,7 +16,7 @@ // under the License. // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.5.1-0.20230920154146-d6fc6ac3381e +// protoc-gen-go-vtproto version: v0.6.0 // source: useragent.proto package modelpb @@ -26,6 +26,7 @@ import ( io "io" sync "sync" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -88,14 +89,14 @@ func (m *UserAgent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if len(m.Original) > 0 { i -= len(m.Original) copy(dAtA[i:], m.Original) - i = encodeVarint(dAtA, i, uint64(len(m.Original))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Original))) i-- dAtA[i] = 0xa } @@ -130,11 +131,11 @@ func (m *UserAgent) SizeVT() (n int) { _ = l l = len(m.Original) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -148,7 +149,7 @@ func (m *UserAgent) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -176,7 +177,7 @@ func (m *UserAgent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -190,11 +191,11 @@ func (m *UserAgent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -208,7 +209,7 @@ func (m *UserAgent) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -222,11 +223,11 @@ func (m *UserAgent) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -235,12 +236,12 @@ func (m *UserAgent) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF diff --git a/tools/install-protobuf.sh b/tools/install-protobuf.sh index 148db1b1..bdbbab3c 100755 --- a/tools/install-protobuf.sh +++ b/tools/install-protobuf.sh @@ -1,9 +1,9 @@ #!/bin/sh PLATFORM=$(go env GOOS) -PROTOBUF_VERSION="24.3" -PROTOC_GO_VERSION="v1.31.0" -VTPROTOBUF_VERSION="d6fc6ac3381e9eb6a88b9b4495f848df370b49ff" +PROTOBUF_VERSION="25.2" +PROTOC_GO_VERSION="v1.32.0" +VTPROTOBUF_VERSION="v0.6.0" if [ "${PLATFORM}" = "darwin" ]; then