From 1c08e786a6d4924a8420957d8268c6836c4fbe76 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 30 Sep 2024 22:22:04 -0400 Subject: [PATCH] feat: add DWN resolver field --- api/vault/v1/state.pulsar.go | 122 ++++++++++++++++++++++++++++------- x/vault/types/state.pb.go | 82 ++++++++++++++++++----- 2 files changed, 165 insertions(+), 39 deletions(-) diff --git a/api/vault/v1/state.pulsar.go b/api/vault/v1/state.pulsar.go index 2287907c4..b72016bc9 100644 --- a/api/vault/v1/state.pulsar.go +++ b/api/vault/v1/state.pulsar.go @@ -14,10 +14,11 @@ import ( ) var ( - md_DWN protoreflect.MessageDescriptor - fd_DWN_id protoreflect.FieldDescriptor - fd_DWN_alias protoreflect.FieldDescriptor - fd_DWN_cid protoreflect.FieldDescriptor + md_DWN protoreflect.MessageDescriptor + fd_DWN_id protoreflect.FieldDescriptor + fd_DWN_alias protoreflect.FieldDescriptor + fd_DWN_cid protoreflect.FieldDescriptor + fd_DWN_resolver protoreflect.FieldDescriptor ) func init() { @@ -26,6 +27,7 @@ func init() { fd_DWN_id = md_DWN.Fields().ByName("id") fd_DWN_alias = md_DWN.Fields().ByName("alias") fd_DWN_cid = md_DWN.Fields().ByName("cid") + fd_DWN_resolver = md_DWN.Fields().ByName("resolver") } var _ protoreflect.Message = (*fastReflection_DWN)(nil) @@ -111,6 +113,12 @@ func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoref return } } + if x.Resolver != "" { + value := protoreflect.ValueOfString(x.Resolver) + if !f(fd_DWN_resolver, value) { + return + } + } } // Has reports whether a field is populated. @@ -132,6 +140,8 @@ func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool { return x.Alias != "" case "vault.v1.DWN.cid": return x.Cid != "" + case "vault.v1.DWN.resolver": + return x.Resolver != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -154,6 +164,8 @@ func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) { x.Alias = "" case "vault.v1.DWN.cid": x.Cid = "" + case "vault.v1.DWN.resolver": + x.Resolver = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -179,6 +191,9 @@ func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protor case "vault.v1.DWN.cid": value := x.Cid return protoreflect.ValueOfString(value) + case "vault.v1.DWN.resolver": + value := x.Resolver + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -205,6 +220,8 @@ func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoref x.Alias = value.Interface().(string) case "vault.v1.DWN.cid": x.Cid = value.Interface().(string) + case "vault.v1.DWN.resolver": + x.Resolver = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -231,6 +248,8 @@ func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protorefle panic(fmt.Errorf("field alias of message vault.v1.DWN is not mutable")) case "vault.v1.DWN.cid": panic(fmt.Errorf("field cid of message vault.v1.DWN is not mutable")) + case "vault.v1.DWN.resolver": + panic(fmt.Errorf("field resolver of message vault.v1.DWN is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -250,6 +269,8 @@ func (x *fastReflection_DWN) NewField(fd protoreflect.FieldDescriptor) protorefl return protoreflect.ValueOfString("") case "vault.v1.DWN.cid": return protoreflect.ValueOfString("") + case "vault.v1.DWN.resolver": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) @@ -330,6 +351,10 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Resolver) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -359,6 +384,13 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Resolver) > 0 { + i -= len(x.Resolver) + copy(dAtA[i:], x.Resolver) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resolver))) + i-- + dAtA[i] = 0x22 + } if len(x.Cid) > 0 { i -= len(x.Cid) copy(dAtA[i:], x.Cid) @@ -510,6 +542,38 @@ func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { } x.Cid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Resolver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -563,9 +627,10 @@ type DWN struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` - Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Resolver string `protobuf:"bytes,4,opt,name=resolver,proto3" json:"resolver,omitempty"` } func (x *DWN) Reset() { @@ -609,29 +674,38 @@ func (x *DWN) GetCid() string { return "" } +func (x *DWN) GetResolver() string { + if x != nil { + return x.Resolver + } + return "" +} + var File_vault_v1_state_proto protoreflect.FileDescriptor var file_vault_v1_state_proto_rawDesc = []byte{ 0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, - 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x03, 0x44, 0x57, 0x4e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22, - 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, - 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, - 0x18, 0x01, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, - 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x03, 0x44, 0x57, + 0x4e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22, 0x0a, 0x06, 0x0a, + 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x10, 0x01, + 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, 0x18, 0x01, 0x42, + 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, + 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, + 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, + 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/x/vault/types/state.pb.go b/x/vault/types/state.pb.go index 7828ac7f4..0b38ab9b0 100644 --- a/x/vault/types/state.pb.go +++ b/x/vault/types/state.pb.go @@ -24,9 +24,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type DWN struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` - Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` + Resolver string `protobuf:"bytes,4,opt,name=resolver,proto3" json:"resolver,omitempty"` } func (m *DWN) Reset() { *m = DWN{} } @@ -83,6 +84,13 @@ func (m *DWN) GetCid() string { return "" } +func (m *DWN) GetResolver() string { + if m != nil { + return m.Resolver + } + return "" +} + func init() { proto.RegisterType((*DWN)(nil), "vault.v1.DWN") } @@ -90,21 +98,22 @@ func init() { func init() { proto.RegisterFile("vault/v1/state.proto", fileDescriptor_2ad3e71ba384142e) } var fileDescriptor_2ad3e71ba384142e = []byte{ - // 221 bytes of a gzipped FileDescriptorProto + // 240 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x4b, 0x2c, 0xcd, 0x29, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x8b, 0xea, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, - 0xe7, 0x17, 0xe5, 0x82, 0x14, 0xe5, 0x17, 0xe5, 0x42, 0x94, 0x28, 0xa5, 0x73, 0x31, 0xbb, 0x84, - 0xfb, 0x09, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0x31, 0x65, - 0xa6, 0x08, 0x89, 0x70, 0xb1, 0x26, 0xe6, 0x64, 0x26, 0x16, 0x4b, 0x30, 0x29, 0x30, 0x6a, 0x70, - 0x06, 0x41, 0x38, 0x42, 0x02, 0x5c, 0xcc, 0xc9, 0x99, 0x29, 0x12, 0xcc, 0x60, 0x31, 0x10, 0xd3, - 0x4a, 0xe3, 0xd3, 0xbc, 0xcb, 0x7d, 0xcc, 0x4a, 0x5c, 0x6c, 0x20, 0xfd, 0x02, 0x8c, 0x42, 0xdc, - 0x50, 0x7d, 0x02, 0x8c, 0x12, 0x8c, 0x42, 0x9c, 0x60, 0xe5, 0x02, 0x4c, 0x12, 0x8c, 0x12, 0x8c, - 0x4e, 0x76, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, - 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x92, 0x9e, 0x59, - 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9f, 0x57, 0x9c, 0x9f, 0x57, 0xa4, 0x0f, - 0x26, 0x2a, 0xf4, 0x21, 0x9e, 0x2a, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xbb, 0xd7, 0x18, - 0x10, 0x00, 0x00, 0xff, 0xff, 0xf5, 0xfb, 0x2a, 0xb2, 0xea, 0x00, 0x00, 0x00, + 0xe7, 0x17, 0xe5, 0x82, 0x14, 0xe5, 0x17, 0xe5, 0x42, 0x94, 0x28, 0x35, 0x33, 0x72, 0x31, 0xbb, + 0x84, 0xfb, 0x09, 0xf1, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0x31, + 0x65, 0xa6, 0x08, 0x89, 0x70, 0xb1, 0x26, 0xe6, 0x64, 0x26, 0x16, 0x4b, 0x30, 0x29, 0x30, 0x6a, + 0x70, 0x06, 0x41, 0x38, 0x42, 0x02, 0x5c, 0xcc, 0xc9, 0x99, 0x29, 0x12, 0xcc, 0x60, 0x31, 0x10, + 0x53, 0x48, 0x8a, 0x8b, 0xa3, 0x28, 0xb5, 0x38, 0x3f, 0xa7, 0x2c, 0xb5, 0x48, 0x82, 0x05, 0x2c, + 0x0c, 0xe7, 0x5b, 0x69, 0x7c, 0x9a, 0x77, 0xb9, 0x8f, 0x59, 0x89, 0x8b, 0x0d, 0x64, 0xb6, 0x00, + 0xa3, 0x10, 0x37, 0xd4, 0x4c, 0x01, 0x46, 0x09, 0x46, 0x21, 0x4e, 0xb0, 0x51, 0x02, 0x4c, 0x12, + 0x8c, 0x12, 0x8c, 0x4e, 0x76, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, + 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, + 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9f, 0x57, 0x9c, 0x9f, + 0x57, 0xa4, 0x0f, 0x26, 0x2a, 0xf4, 0x21, 0x3e, 0x2e, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, + 0x7b, 0xc6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xfe, 0x9e, 0x9c, 0x07, 0x01, 0x00, 0x00, } func (m *DWN) Marshal() (dAtA []byte, err error) { @@ -127,6 +136,13 @@ func (m *DWN) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Resolver) > 0 { + i -= len(m.Resolver) + copy(dAtA[i:], m.Resolver) + i = encodeVarintState(dAtA, i, uint64(len(m.Resolver))) + i-- + dAtA[i] = 0x22 + } if len(m.Cid) > 0 { i -= len(m.Cid) copy(dAtA[i:], m.Cid) @@ -177,6 +193,10 @@ func (m *DWN) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } + l = len(m.Resolver) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } return n } @@ -298,6 +318,38 @@ func (m *DWN) Unmarshal(dAtA []byte) error { } m.Cid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resolver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + 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 ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resolver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:])