From 189ae4c411649975156aa8c26ab409b7e1680e74 Mon Sep 17 00:00:00 2001 From: Weiyu Xue Date: Wed, 11 Dec 2019 14:50:03 -0800 Subject: [PATCH] remove ip2location in status proto --- protos/status/status.pb.go | 584 +++---------------------------------- protos/status/status.proto | 11 - 2 files changed, 38 insertions(+), 557 deletions(-) diff --git a/protos/status/status.pb.go b/protos/status/status.pb.go index 94bb30a..61a67c6 100644 --- a/protos/status/status.pb.go +++ b/protos/status/status.pb.go @@ -5,7 +5,6 @@ package status import ( context "context" - encoding_binary "encoding/binary" fmt "fmt" types "github.com/gogo/protobuf/types" golang_proto "github.com/golang/protobuf/proto" @@ -266,113 +265,6 @@ func (m *NodeError) GetTimeCreated() time.Time { func (*NodeError) XXX_MessageName() string { return "status.NodeError" } - -type Ip2Location struct { - Ipv4 string `protobuf:"bytes,1,opt,name=ipv4,proto3" json:"ipv4,omitempty" pg:"ipv4"` - CountryShort string `protobuf:"bytes,2,opt,name=country_short,json=countryShort,proto3" json:"country_short,omitempty" pg:"country_short"` - CountryLong string `protobuf:"bytes,3,opt,name=country_long,json=countryLong,proto3" json:"country_long,omitempty" pg:"country_long"` - Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region,omitempty" pg:"region"` - City string `protobuf:"bytes,5,opt,name=city,proto3" json:"city,omitempty" pg:"city"` - Latitude float32 `protobuf:"fixed32,6,opt,name=latitude,proto3" json:"latitude,omitempty" pg:"latitude"` - Longitude float32 `protobuf:"fixed32,7,opt,name=longitude,proto3" json:"longitude,omitempty" pg:"longitude"` - Zipcode string `protobuf:"bytes,8,opt,name=zipcode,proto3" json:"zipcode,omitempty" pg:"zipcode"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Ip2Location) Reset() { *m = Ip2Location{} } -func (m *Ip2Location) String() string { return proto.CompactTextString(m) } -func (*Ip2Location) ProtoMessage() {} -func (*Ip2Location) Descriptor() ([]byte, []int) { - return fileDescriptor_e9255cc60c5ca429, []int{3} -} -func (m *Ip2Location) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Ip2Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Ip2Location.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 *Ip2Location) XXX_Merge(src proto.Message) { - xxx_messageInfo_Ip2Location.Merge(m, src) -} -func (m *Ip2Location) XXX_Size() int { - return m.Size() -} -func (m *Ip2Location) XXX_DiscardUnknown() { - xxx_messageInfo_Ip2Location.DiscardUnknown(m) -} - -var xxx_messageInfo_Ip2Location proto.InternalMessageInfo - -func (m *Ip2Location) GetIpv4() string { - if m != nil { - return m.Ipv4 - } - return "" -} - -func (m *Ip2Location) GetCountryShort() string { - if m != nil { - return m.CountryShort - } - return "" -} - -func (m *Ip2Location) GetCountryLong() string { - if m != nil { - return m.CountryLong - } - return "" -} - -func (m *Ip2Location) GetRegion() string { - if m != nil { - return m.Region - } - return "" -} - -func (m *Ip2Location) GetCity() string { - if m != nil { - return m.City - } - return "" -} - -func (m *Ip2Location) GetLatitude() float32 { - if m != nil { - return m.Latitude - } - return 0 -} - -func (m *Ip2Location) GetLongitude() float32 { - if m != nil { - return m.Longitude - } - return 0 -} - -func (m *Ip2Location) GetZipcode() string { - if m != nil { - return m.Zipcode - } - return "" -} - -func (*Ip2Location) XXX_MessageName() string { - return "status.Ip2Location" -} func init() { proto.RegisterType((*SignedMetrics)(nil), "status.SignedMetrics") golang_proto.RegisterType((*SignedMetrics)(nil), "status.SignedMetrics") @@ -380,59 +272,50 @@ func init() { golang_proto.RegisterType((*NodeHealth)(nil), "status.NodeHealth") proto.RegisterType((*NodeError)(nil), "status.NodeError") golang_proto.RegisterType((*NodeError)(nil), "status.NodeError") - proto.RegisterType((*Ip2Location)(nil), "status.Ip2Location") - golang_proto.RegisterType((*Ip2Location)(nil), "status.Ip2Location") } func init() { proto.RegisterFile("protos/status/status.proto", fileDescriptor_e9255cc60c5ca429) } func init() { golang_proto.RegisterFile("protos/status/status.proto", fileDescriptor_e9255cc60c5ca429) } var fileDescriptor_e9255cc60c5ca429 = []byte{ - // 706 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0xc6, 0x63, 0xeb, 0x16, 0xb7, 0x45, 0xc2, 0x88, 0x11, 0x15, 0x68, 0x47, 0xb9, 0xec, 0x30, - 0x5a, 0xd4, 0x21, 0x24, 0x86, 0x04, 0x52, 0xa7, 0x09, 0x26, 0xc6, 0x34, 0xa5, 0x30, 0x09, 0x2e, - 0x91, 0x9b, 0xbc, 0xa6, 0xd6, 0x12, 0x3b, 0x72, 0x9c, 0xa2, 0xf2, 0x57, 0xc0, 0x8d, 0x3f, 0x67, - 0x37, 0x76, 0xe4, 0x2f, 0x18, 0x68, 0x3b, 0x71, 0xdd, 0x8d, 0x1b, 0xb2, 0x9d, 0x6c, 0xfc, 0xda, - 0x01, 0x89, 0x0b, 0xa7, 0xe4, 0x7d, 0xef, 0x7d, 0xb6, 0xbf, 0xcf, 0xef, 0x19, 0x37, 0x52, 0x29, - 0x94, 0xc8, 0xba, 0x99, 0xa2, 0x2a, 0x2f, 0x3f, 0x1d, 0x03, 0x92, 0x8a, 0x8d, 0x1a, 0x77, 0x23, - 0xa6, 0xc6, 0xf9, 0xb0, 0x13, 0x88, 0xa4, 0xab, 0xa4, 0xe0, 0x77, 0xf2, 0xac, 0x6b, 0x2a, 0x86, - 0xf9, 0xa8, 0x1b, 0x89, 0x48, 0x98, 0xc0, 0xfc, 0x59, 0x66, 0xe3, 0x7a, 0x24, 0x44, 0x14, 0xc3, - 0x59, 0x15, 0x24, 0xa9, 0x9a, 0x16,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d5, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x13, 0xfb, 0x08, 0xce, 0x05, + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x94, 0xcf, 0x6e, 0x13, 0x3f, + 0x10, 0xc7, 0x7f, 0xee, 0xaf, 0x4d, 0x59, 0x27, 0x41, 0xc2, 0x08, 0x88, 0x02, 0x24, 0x25, 0x5c, + 0x7a, 0x28, 0x1b, 0xd4, 0x4a, 0x48, 0x14, 0x09, 0xa4, 0x54, 0x15, 0x20, 0x44, 0x55, 0xa5, 0x50, + 0x09, 0x2e, 0x96, 0xb3, 0x3b, 0xd9, 0x58, 0xf5, 0xda, 0x2b, 0xdb, 0x5b, 0x94, 0xb7, 0x80, 0x1b, + 0x8f, 0xd3, 0x1b, 0x3d, 0xf2, 0x04, 0x05, 0xb5, 0x6f, 0xd0, 0x1b, 0x37, 0x64, 0x7b, 0x43, 0xf9, + 0xd7, 0x03, 0x12, 0x17, 0x4e, 0xc9, 0x7c, 0x67, 0xbe, 0x63, 0xcf, 0x27, 0xe3, 0xe0, 0x76, 0xa1, + 0x95, 0x55, 0xa6, 0x6f, 0x2c, 0xb3, 0xe5, 0xec, 0x23, 0xf6, 0x22, 0xa9, 0x85, 0xa8, 0x7d, 0x37, + 0xe3, 0x76, 0x52, 0x8e, 0xe2, 0x44, 0xe5, 0x7d, 0xab, 0x95, 0xbc, 0x53, 0x9a, 0xbe, 0xaf, 0x18, + 0x95, 0xe3, 0x7e, 0xa6, 0x32, 0xe5, 0x03, 0xff, 0x2d, 0x38, 0xdb, 0xd7, 0x33, 0xa5, 0x32, 0x01, + 0x67, 0x55, 0x90, 0x17, 0x76, 0x5a, 0x25, 0xbb, 0x3f, 0x27, 0x2d, 0xcf, 0xc1, 0x58, 0x96, 0x17, + 0xa1, 0xa0, 0x37, 0xc6, 0xcd, 0x1d, 0x9e, 0x49, 0x48, 0x9f, 0x83, 0xd5, 0x3c, 0x31, 0xe4, 0x26, + 0xc6, 0x45, 0x39, 0x12, 0x3c, 0xa1, 0x7b, 0x30, 0x6d, 0xa1, 0x25, 0xb4, 0xdc, 0x18, 0x46, 0x41, + 0x79, 0x06, 0x53, 0x72, 0x03, 0x47, 0x86, 0x67, 0x92, 0xd9, 0x52, 0x43, 0x6b, 0x2e, 0x64, 0xbf, + 0x09, 0xa4, 0x85, 0x17, 0x0b, 0x36, 0x15, 0x8a, 0xa5, 0xad, 0xff, 0x7d, 0x6e, 0x16, 0xf6, 0xde, + 0xcd, 0x61, 0xbc, 0xa5, 0x52, 0x78, 0x02, 0x4c, 0xd8, 0x09, 0x79, 0x85, 0xb1, 0x65, 0x23, 0x01, + 0x54, 0xb2, 0x1c, 0xfc, 0x29, 0xd1, 0x60, 0xfd, 0xf4, 0xa8, 0x7b, 0xaf, 0xc8, 0xd6, 0x7b, 0x13, + 0x5f, 0x43, 0x73, 0x25, 0xb9, 0x55, 0x9a, 0xcb, 0x6c, 0x85, 0x09, 0xce, 0xcc, 0xba, 0x5d, 0x49, + 0xb9, 0x49, 0x98, 0x4e, 0x69, 0x29, 0xf7, 0xa4, 0x7a, 0x23, 0x69, 0xa2, 0x44, 0x99, 0x4b, 0xd3, + 0x1b, 0x46, 0xbe, 0xdb, 0x16, 0xcb, 0x81, 0x5c, 0xc3, 0x8b, 0x52, 0xa5, 0x40, 0x79, 0xea, 0xef, + 0x17, 0x0d, 0x6b, 0x2e, 0x7c, 0x9a, 0x92, 0x5b, 0xb8, 0x31, 0xb2, 0x63, 0x43, 0xf7, 0x41, 0x1b, + 0xae, 0xa4, 0xbf, 0x61, 0x34, 0xac, 0x3b, 0x6d, 0x37, 0x48, 0xe4, 0x36, 0x6e, 0x8e, 0x19, 0x17, + 0xa5, 0x06, 0x5a, 0x28, 0x2e, 0x6d, 0x6b, 0xde, 0xd7, 0x34, 0x2a, 0x71, 0xdb, 0x69, 0xe4, 0x31, + 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, 0x32, 0x78, 0x74, 0x78, 0xdc, 0x41, 0x1f, 0x8f, 0x3b, 0xe8, 0xf3, 0x71, + 0x07, 0xbd, 0x3f, 0xe9, 0xa0, 0x83, 0x93, 0x0e, 0x3a, 0x3c, 0xe9, 0x20, 0x7c, 0x91, 0xab, 0xd8, + 0x3d, 0x90, 0xaa, 0xd7, 0xa0, 0x1e, 0x06, 0xde, 0x76, 0xfe, 0x6d, 0xf4, 0xba, 0xfa, 0xd7, 0x1a, + 0xd5, 0x7c, 0xc3, 0xb5, 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x50, 0x88, 0x0f, 0xfd, 0xe2, 0x04, 0x00, 0x00, } @@ -906,87 +789,6 @@ func (m *NodeError) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Ip2Location) 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 *Ip2Location) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Ip2Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Zipcode) > 0 { - i -= len(m.Zipcode) - copy(dAtA[i:], m.Zipcode) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Zipcode))) - i-- - dAtA[i] = 0x42 - } - if m.Longitude != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Longitude)))) - i-- - dAtA[i] = 0x3d - } - if m.Latitude != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Latitude)))) - i-- - dAtA[i] = 0x35 - } - if len(m.City) > 0 { - i -= len(m.City) - copy(dAtA[i:], m.City) - i = encodeVarintStatus(dAtA, i, uint64(len(m.City))) - i-- - dAtA[i] = 0x2a - } - if len(m.Region) > 0 { - i -= len(m.Region) - copy(dAtA[i:], m.Region) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Region))) - i-- - dAtA[i] = 0x22 - } - if len(m.CountryLong) > 0 { - i -= len(m.CountryLong) - copy(dAtA[i:], m.CountryLong) - i = encodeVarintStatus(dAtA, i, uint64(len(m.CountryLong))) - i-- - dAtA[i] = 0x1a - } - if len(m.CountryShort) > 0 { - i -= len(m.CountryShort) - copy(dAtA[i:], m.CountryShort) - i = encodeVarintStatus(dAtA, i, uint64(len(m.CountryShort))) - i-- - dAtA[i] = 0x12 - } - if len(m.Ipv4) > 0 { - i -= len(m.Ipv4) - copy(dAtA[i:], m.Ipv4) - i = encodeVarintStatus(dAtA, i, uint64(len(m.Ipv4))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { offset -= sovStatus(v) base := offset @@ -1082,48 +884,6 @@ func (m *NodeError) Size() (n int) { return n } -func (m *Ip2Location) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Ipv4) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.CountryShort) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.CountryLong) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.Region) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - l = len(m.City) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.Latitude != 0 { - n += 5 - } - if m.Longitude != 0 { - n += 5 - } - l = len(m.Zipcode) - if l > 0 { - n += 1 + l + sovStatus(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - func sovStatus(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1716,274 +1476,6 @@ func (m *NodeError) Unmarshal(dAtA []byte) error { } return nil } -func (m *Ip2Location) 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 ErrIntOverflowStatus - } - 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: Ip2Location: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Ip2Location: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ipv4", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - 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 ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ipv4 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryShort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - 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 ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CountryShort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CountryLong", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - 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 ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CountryLong = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - 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 ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field City", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - 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 ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.City = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Latitude", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Latitude = float32(math.Float32frombits(v)) - case 7: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Longitude", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Longitude = float32(math.Float32frombits(v)) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Zipcode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStatus - } - 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 ErrInvalidLengthStatus - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStatus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Zipcode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStatus(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthStatus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipStatus(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/protos/status/status.proto b/protos/status/status.proto index b07be66..2e7170f 100644 --- a/protos/status/status.proto +++ b/protos/status/status.proto @@ -59,14 +59,3 @@ message NodeError { (gogoproto.stdtime) = true ]; } - -message Ip2Location { - string ipv4 = 1; - string country_short = 2; - string country_long = 3; - string region = 4; - string city = 5; - float latitude = 6; - float longitude = 7; - string zipcode = 8; -}