mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
648 lines
17 KiB
Go
648 lines
17 KiB
Go
// The MIT License
|
|
//
|
|
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
|
|
//
|
|
// Copyright (c) 2020 Uber Technologies, Inc.
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
// in the Software without restriction, including without limitation the rights
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
// furnished to do so, subject to the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be included in
|
|
// all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
// THE SOFTWARE.
|
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: temporal/server/api/taskqueue/v1/message.proto
|
|
|
|
package taskqueue
|
|
|
|
import (
|
|
fmt "fmt"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
reflect "reflect"
|
|
strings "strings"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
types "github.com/gogo/protobuf/types"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// TaskVersionDirective controls how matching should direct a task.
|
|
type TaskVersionDirective struct {
|
|
// Default (if value is not present) is "unversioned":
|
|
// Use the unversioned task queue, even if the task queue has versioning data.
|
|
//
|
|
// Types that are valid to be assigned to Value:
|
|
//
|
|
// *TaskVersionDirective_UseDefault
|
|
// *TaskVersionDirective_BuildId
|
|
Value isTaskVersionDirective_Value `protobuf_oneof:"value"`
|
|
}
|
|
|
|
func (m *TaskVersionDirective) Reset() { *m = TaskVersionDirective{} }
|
|
func (*TaskVersionDirective) ProtoMessage() {}
|
|
func (*TaskVersionDirective) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_4e9b64ab0f85f299, []int{0}
|
|
}
|
|
func (m *TaskVersionDirective) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *TaskVersionDirective) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_TaskVersionDirective.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *TaskVersionDirective) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TaskVersionDirective.Merge(m, src)
|
|
}
|
|
func (m *TaskVersionDirective) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *TaskVersionDirective) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TaskVersionDirective.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TaskVersionDirective proto.InternalMessageInfo
|
|
|
|
type isTaskVersionDirective_Value interface {
|
|
isTaskVersionDirective_Value()
|
|
Equal(interface{}) bool
|
|
MarshalTo([]byte) (int, error)
|
|
Size() int
|
|
}
|
|
|
|
type TaskVersionDirective_UseDefault struct {
|
|
UseDefault *types.Empty `protobuf:"bytes,1,opt,name=use_default,json=useDefault,proto3,oneof" json:"use_default,omitempty"`
|
|
}
|
|
type TaskVersionDirective_BuildId struct {
|
|
BuildId string `protobuf:"bytes,2,opt,name=build_id,json=buildId,proto3,oneof" json:"build_id,omitempty"`
|
|
}
|
|
|
|
func (*TaskVersionDirective_UseDefault) isTaskVersionDirective_Value() {}
|
|
func (*TaskVersionDirective_BuildId) isTaskVersionDirective_Value() {}
|
|
|
|
func (m *TaskVersionDirective) GetValue() isTaskVersionDirective_Value {
|
|
if m != nil {
|
|
return m.Value
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TaskVersionDirective) GetUseDefault() *types.Empty {
|
|
if x, ok := m.GetValue().(*TaskVersionDirective_UseDefault); ok {
|
|
return x.UseDefault
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TaskVersionDirective) GetBuildId() string {
|
|
if x, ok := m.GetValue().(*TaskVersionDirective_BuildId); ok {
|
|
return x.BuildId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
func (*TaskVersionDirective) XXX_OneofWrappers() []interface{} {
|
|
return []interface{}{
|
|
(*TaskVersionDirective_UseDefault)(nil),
|
|
(*TaskVersionDirective_BuildId)(nil),
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*TaskVersionDirective)(nil), "temporal.server.api.taskqueue.v1.TaskVersionDirective")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("temporal/server/api/taskqueue/v1/message.proto", fileDescriptor_4e9b64ab0f85f299)
|
|
}
|
|
|
|
var fileDescriptor_4e9b64ab0f85f299 = []byte{
|
|
// 284 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0xbf, 0x4a, 0x3b, 0x41,
|
|
0x10, 0x07, 0xf0, 0xdd, 0x1f, 0xfc, 0x8c, 0x6e, 0xba, 0x20, 0x12, 0x0c, 0x0c, 0xc1, 0x2a, 0xd5,
|
|
0xae, 0xd1, 0x4a, 0xec, 0x42, 0x84, 0xd8, 0x06, 0xb1, 0xb0, 0x09, 0x1b, 0x6f, 0xee, 0x58, 0x72,
|
|
0xe7, 0x9e, 0xfb, 0xe7, 0xc4, 0xce, 0x47, 0xf0, 0x31, 0x7c, 0x14, 0xcb, 0x2b, 0x53, 0x7a, 0x7b,
|
|
0x8d, 0x65, 0x1e, 0x41, 0xbc, 0x23, 0xd7, 0x59, 0xce, 0xf0, 0x99, 0x2f, 0xc3, 0x97, 0x71, 0x87,
|
|
0x59, 0xae, 0x8d, 0x4c, 0x85, 0x45, 0x53, 0xa0, 0x11, 0x32, 0x57, 0xc2, 0x49, 0xbb, 0x79, 0xf6,
|
|
0xe8, 0x51, 0x14, 0x53, 0x91, 0xa1, 0xb5, 0x32, 0x41, 0x9e, 0x1b, 0xed, 0xf4, 0x60, 0xbc, 0xf7,
|
|
0xbc, 0xf5, 0x5c, 0xe6, 0x8a, 0x77, 0x9e, 0x17, 0xd3, 0xd3, 0x51, 0xa2, 0x75, 0x92, 0xa2, 0x68,
|
|
0xfc, 0xda, 0xc7, 0x02, 0xb3, 0xdc, 0xbd, 0xb6, 0xe7, 0x67, 0x2f, 0xec, 0xf8, 0x4e, 0xda, 0xcd,
|
|
0x3d, 0x1a, 0xab, 0xf4, 0xd3, 0x5c, 0x19, 0x7c, 0x74, 0xaa, 0xc0, 0xc1, 0x15, 0xeb, 0x7b, 0x8b,
|
|
0xab, 0x08, 0x63, 0xe9, 0x53, 0x37, 0xa4, 0x63, 0x3a, 0xe9, 0x5f, 0x9c, 0xf0, 0x36, 0x8a, 0xef,
|
|
0xa3, 0xf8, 0xcd, 0x6f, 0xd4, 0x82, 0x2c, 0x99, 0xb7, 0x38, 0x6f, 0xed, 0x60, 0xc4, 0x0e, 0xd7,
|
|
0x5e, 0xa5, 0xd1, 0x4a, 0x45, 0xc3, 0x7f, 0x63, 0x3a, 0x39, 0x5a, 0x90, 0x65, 0xaf, 0xd9, 0xdc,
|
|
0x46, 0xb3, 0x1e, 0xfb, 0x5f, 0xc8, 0xd4, 0xe3, 0x2c, 0x2e, 0x2b, 0x20, 0xdb, 0x0a, 0xc8, 0xae,
|
|
0x02, 0xfa, 0x16, 0x80, 0x7e, 0x04, 0xa0, 0x9f, 0x01, 0x68, 0x19, 0x80, 0x7e, 0x05, 0xa0, 0xdf,
|
|
0x01, 0xc8, 0x2e, 0x00, 0x7d, 0xaf, 0x81, 0x94, 0x35, 0x90, 0x6d, 0x0d, 0xe4, 0xe1, 0x3c, 0xd1,
|
|
0x5d, 0x41, 0x5c, 0xe9, 0xbf, 0x3a, 0xba, 0xee, 0x86, 0xf5, 0x41, 0xf3, 0xeb, 0xe5, 0x4f, 0x00,
|
|
0x00, 0x00, 0xff, 0xff, 0x3e, 0x46, 0x19, 0xb3, 0x58, 0x01, 0x00, 0x00,
|
|
}
|
|
|
|
func (this *TaskVersionDirective) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TaskVersionDirective)
|
|
if !ok {
|
|
that2, ok := that.(TaskVersionDirective)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if that1.Value == nil {
|
|
if this.Value != nil {
|
|
return false
|
|
}
|
|
} else if this.Value == nil {
|
|
return false
|
|
} else if !this.Value.Equal(that1.Value) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TaskVersionDirective_UseDefault) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TaskVersionDirective_UseDefault)
|
|
if !ok {
|
|
that2, ok := that.(TaskVersionDirective_UseDefault)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if !this.UseDefault.Equal(that1.UseDefault) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TaskVersionDirective_BuildId) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*TaskVersionDirective_BuildId)
|
|
if !ok {
|
|
that2, ok := that.(TaskVersionDirective_BuildId)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.BuildId != that1.BuildId {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *TaskVersionDirective) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := make([]string, 0, 6)
|
|
s = append(s, "&taskqueue.TaskVersionDirective{")
|
|
if this.Value != nil {
|
|
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
|
|
}
|
|
s = append(s, "}")
|
|
return strings.Join(s, "")
|
|
}
|
|
func (this *TaskVersionDirective_UseDefault) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&taskqueue.TaskVersionDirective_UseDefault{` +
|
|
`UseDefault:` + fmt.Sprintf("%#v", this.UseDefault) + `}`}, ", ")
|
|
return s
|
|
}
|
|
func (this *TaskVersionDirective_BuildId) GoString() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&taskqueue.TaskVersionDirective_BuildId{` +
|
|
`BuildId:` + fmt.Sprintf("%#v", this.BuildId) + `}`}, ", ")
|
|
return s
|
|
}
|
|
func valueToGoStringMessage(v interface{}, typ string) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
|
}
|
|
func (m *TaskVersionDirective) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *TaskVersionDirective) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TaskVersionDirective) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.Value != nil {
|
|
{
|
|
size := m.Value.Size()
|
|
i -= size
|
|
if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *TaskVersionDirective_UseDefault) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TaskVersionDirective_UseDefault) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.UseDefault != nil {
|
|
{
|
|
size, err := m.UseDefault.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintMessage(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *TaskVersionDirective_BuildId) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *TaskVersionDirective_BuildId) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
i -= len(m.BuildId)
|
|
copy(dAtA[i:], m.BuildId)
|
|
i = encodeVarintMessage(dAtA, i, uint64(len(m.BuildId)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func encodeVarintMessage(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovMessage(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *TaskVersionDirective) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Value != nil {
|
|
n += m.Value.Size()
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *TaskVersionDirective_UseDefault) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.UseDefault != nil {
|
|
l = m.UseDefault.Size()
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *TaskVersionDirective_BuildId) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
l = len(m.BuildId)
|
|
n += 1 + l + sovMessage(uint64(l))
|
|
return n
|
|
}
|
|
|
|
func sovMessage(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozMessage(x uint64) (n int) {
|
|
return sovMessage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (this *TaskVersionDirective) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&TaskVersionDirective{`,
|
|
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TaskVersionDirective_UseDefault) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&TaskVersionDirective_UseDefault{`,
|
|
`UseDefault:` + strings.Replace(fmt.Sprintf("%v", this.UseDefault), "Empty", "types.Empty", 1) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func (this *TaskVersionDirective_BuildId) String() string {
|
|
if this == nil {
|
|
return "nil"
|
|
}
|
|
s := strings.Join([]string{`&TaskVersionDirective_BuildId{`,
|
|
`BuildId:` + fmt.Sprintf("%v", this.BuildId) + `,`,
|
|
`}`,
|
|
}, "")
|
|
return s
|
|
}
|
|
func valueToStringMessage(v interface{}) string {
|
|
rv := reflect.ValueOf(v)
|
|
if rv.IsNil() {
|
|
return "nil"
|
|
}
|
|
pv := reflect.Indirect(rv).Interface()
|
|
return fmt.Sprintf("*%v", pv)
|
|
}
|
|
func (m *TaskVersionDirective) Unmarshal(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 ErrIntOverflowMessage
|
|
}
|
|
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: TaskVersionDirective: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: TaskVersionDirective: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field UseDefault", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := &types.Empty{}
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
m.Value = &TaskVersionDirective_UseDefault{v}
|
|
iNdEx = postIndex
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field BuildId", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowMessage
|
|
}
|
|
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 ErrInvalidLengthMessage
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Value = &TaskVersionDirective_BuildId{string(dAtA[iNdEx:postIndex])}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipMessage(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthMessage
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipMessage(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, ErrIntOverflowMessage
|
|
}
|
|
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, ErrIntOverflowMessage
|
|
}
|
|
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, ErrIntOverflowMessage
|
|
}
|
|
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, ErrInvalidLengthMessage
|
|
}
|
|
iNdEx += length
|
|
case 3:
|
|
depth++
|
|
case 4:
|
|
if depth == 0 {
|
|
return 0, ErrUnexpectedEndOfGroupMessage
|
|
}
|
|
depth--
|
|
case 5:
|
|
iNdEx += 4
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthMessage
|
|
}
|
|
if depth == 0 {
|
|
return iNdEx, nil
|
|
}
|
|
}
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow")
|
|
ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
|
|
)
|