github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/log/logpb/event.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: util/log/logpb/event.proto 3 4 package logpb 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // CommonEventDetails contains the fields common to all structed events. 27 type CommonEventDetails struct { 28 // The timestamp of the event. Expressed as nanoseconds since 29 // the Unix epoch. 30 Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:",omitempty"` 31 // The type of the event. 32 EventType string `protobuf:"bytes,2,opt,name=event_type,json=eventType,proto3" json:",omitempty" redact:"nonsensitive"` 33 } 34 35 func (m *CommonEventDetails) Reset() { *m = CommonEventDetails{} } 36 func (m *CommonEventDetails) String() string { return proto.CompactTextString(m) } 37 func (*CommonEventDetails) ProtoMessage() {} 38 func (*CommonEventDetails) Descriptor() ([]byte, []int) { 39 return fileDescriptor_b283fe773154b3ca, []int{0} 40 } 41 func (m *CommonEventDetails) XXX_Unmarshal(b []byte) error { 42 return m.Unmarshal(b) 43 } 44 func (m *CommonEventDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 b = b[:cap(b)] 46 n, err := m.MarshalToSizedBuffer(b) 47 if err != nil { 48 return nil, err 49 } 50 return b[:n], nil 51 } 52 func (m *CommonEventDetails) XXX_Merge(src proto.Message) { 53 xxx_messageInfo_CommonEventDetails.Merge(m, src) 54 } 55 func (m *CommonEventDetails) XXX_Size() int { 56 return m.Size() 57 } 58 func (m *CommonEventDetails) XXX_DiscardUnknown() { 59 xxx_messageInfo_CommonEventDetails.DiscardUnknown(m) 60 } 61 62 var xxx_messageInfo_CommonEventDetails proto.InternalMessageInfo 63 64 func init() { 65 proto.RegisterType((*CommonEventDetails)(nil), "cockroach.parser.util.log.CommonEventDetails") 66 } 67 68 func init() { proto.RegisterFile("util/log/logpb/event.proto", fileDescriptor_b283fe773154b3ca) } 69 70 var fileDescriptor_b283fe773154b3ca = []byte{ 71 // 262 bytes of a gzipped FileDescriptorProto 72 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x2d, 0xc9, 0xcc, 73 0xd1, 0xcf, 0xc9, 0x4f, 0x07, 0xe1, 0x82, 0x24, 0xfd, 0xd4, 0xb2, 0xd4, 0xbc, 0x12, 0xbd, 0x82, 74 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0xa1, 0xe4, 0xfc, 0xe4, 0xec, 0xa2, 0xfc, 0xc4, 0xe4, 0x0c, 0x3d, 75 0x90, 0x2a, 0xbd, 0x9c, 0xfc, 0x74, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0xb0, 0xb4, 0x3e, 0x88, 76 0x05, 0x51, 0xa9, 0xd4, 0xc5, 0xc8, 0x25, 0xe4, 0x9c, 0x9f, 0x9b, 0x9b, 0x9f, 0xe7, 0x0a, 0xd2, 77 0xef, 0x92, 0x5a, 0x92, 0x98, 0x99, 0x53, 0x2c, 0xa4, 0xc3, 0xc5, 0x59, 0x92, 0x99, 0x9b, 0x5a, 78 0x5c, 0x92, 0x98, 0x5b, 0x20, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xec, 0xc4, 0xf7, 0xea, 0x9e, 0x3c, 79 0x97, 0x4e, 0x7e, 0x6e, 0x66, 0x49, 0x6a, 0x6e, 0x41, 0x49, 0x65, 0x10, 0x42, 0x81, 0x90, 0x1b, 80 0x17, 0x17, 0xd8, 0xf6, 0xf8, 0x92, 0xca, 0x82, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0x27, 81 0x75, 0x54, 0xe5, 0x9f, 0xee, 0xc9, 0x8b, 0x16, 0xa5, 0xa6, 0x24, 0x26, 0x97, 0x58, 0x29, 0xe5, 82 0xe5, 0xe7, 0x15, 0xa7, 0xe6, 0x15, 0x67, 0x96, 0x64, 0x96, 0xa5, 0x2a, 0x05, 0x71, 0x82, 0xb5, 83 0x86, 0x54, 0x16, 0xa4, 0x3a, 0x85, 0x9e, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 84 0x47, 0x72, 0x8c, 0x37, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 85 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 86 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xc3, 0xfd, 0x98, 0x92, 0x84, 0x60, 0xeb, 0x17, 0x64, 0xa7, 0xeb, 87 0xa3, 0x86, 0x4c, 0x12, 0x1b, 0xd8, 0xab, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0x68, 88 0xd0, 0xcb, 0x32, 0x01, 0x00, 0x00, 89 } 90 91 func (m *CommonEventDetails) Marshal() (dAtA []byte, err error) { 92 size := m.Size() 93 dAtA = make([]byte, size) 94 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 95 if err != nil { 96 return nil, err 97 } 98 return dAtA[:n], nil 99 } 100 101 func (m *CommonEventDetails) MarshalTo(dAtA []byte) (int, error) { 102 size := m.Size() 103 return m.MarshalToSizedBuffer(dAtA[:size]) 104 } 105 106 func (m *CommonEventDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { 107 i := len(dAtA) 108 _ = i 109 var l int 110 _ = l 111 if len(m.EventType) > 0 { 112 i -= len(m.EventType) 113 copy(dAtA[i:], m.EventType) 114 i = encodeVarintEvent(dAtA, i, uint64(len(m.EventType))) 115 i-- 116 dAtA[i] = 0x12 117 } 118 if m.Timestamp != 0 { 119 i = encodeVarintEvent(dAtA, i, uint64(m.Timestamp)) 120 i-- 121 dAtA[i] = 0x8 122 } 123 return len(dAtA) - i, nil 124 } 125 126 func encodeVarintEvent(dAtA []byte, offset int, v uint64) int { 127 offset -= sovEvent(v) 128 base := offset 129 for v >= 1<<7 { 130 dAtA[offset] = uint8(v&0x7f | 0x80) 131 v >>= 7 132 offset++ 133 } 134 dAtA[offset] = uint8(v) 135 return base 136 } 137 func (m *CommonEventDetails) Size() (n int) { 138 if m == nil { 139 return 0 140 } 141 var l int 142 _ = l 143 if m.Timestamp != 0 { 144 n += 1 + sovEvent(uint64(m.Timestamp)) 145 } 146 l = len(m.EventType) 147 if l > 0 { 148 n += 1 + l + sovEvent(uint64(l)) 149 } 150 return n 151 } 152 153 func sovEvent(x uint64) (n int) { 154 return (math_bits.Len64(x|1) + 6) / 7 155 } 156 func sozEvent(x uint64) (n int) { 157 return sovEvent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 158 } 159 func (m *CommonEventDetails) Unmarshal(dAtA []byte) error { 160 l := len(dAtA) 161 iNdEx := 0 162 for iNdEx < l { 163 preIndex := iNdEx 164 var wire uint64 165 for shift := uint(0); ; shift += 7 { 166 if shift >= 64 { 167 return ErrIntOverflowEvent 168 } 169 if iNdEx >= l { 170 return io.ErrUnexpectedEOF 171 } 172 b := dAtA[iNdEx] 173 iNdEx++ 174 wire |= uint64(b&0x7F) << shift 175 if b < 0x80 { 176 break 177 } 178 } 179 fieldNum := int32(wire >> 3) 180 wireType := int(wire & 0x7) 181 if wireType == 4 { 182 return fmt.Errorf("proto: CommonEventDetails: wiretype end group for non-group") 183 } 184 if fieldNum <= 0 { 185 return fmt.Errorf("proto: CommonEventDetails: illegal tag %d (wire type %d)", fieldNum, wire) 186 } 187 switch fieldNum { 188 case 1: 189 if wireType != 0 { 190 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 191 } 192 m.Timestamp = 0 193 for shift := uint(0); ; shift += 7 { 194 if shift >= 64 { 195 return ErrIntOverflowEvent 196 } 197 if iNdEx >= l { 198 return io.ErrUnexpectedEOF 199 } 200 b := dAtA[iNdEx] 201 iNdEx++ 202 m.Timestamp |= int64(b&0x7F) << shift 203 if b < 0x80 { 204 break 205 } 206 } 207 case 2: 208 if wireType != 2 { 209 return fmt.Errorf("proto: wrong wireType = %d for field EventType", wireType) 210 } 211 var stringLen uint64 212 for shift := uint(0); ; shift += 7 { 213 if shift >= 64 { 214 return ErrIntOverflowEvent 215 } 216 if iNdEx >= l { 217 return io.ErrUnexpectedEOF 218 } 219 b := dAtA[iNdEx] 220 iNdEx++ 221 stringLen |= uint64(b&0x7F) << shift 222 if b < 0x80 { 223 break 224 } 225 } 226 intStringLen := int(stringLen) 227 if intStringLen < 0 { 228 return ErrInvalidLengthEvent 229 } 230 postIndex := iNdEx + intStringLen 231 if postIndex < 0 { 232 return ErrInvalidLengthEvent 233 } 234 if postIndex > l { 235 return io.ErrUnexpectedEOF 236 } 237 m.EventType = string(dAtA[iNdEx:postIndex]) 238 iNdEx = postIndex 239 default: 240 iNdEx = preIndex 241 skippy, err := skipEvent(dAtA[iNdEx:]) 242 if err != nil { 243 return err 244 } 245 if (skippy < 0) || (iNdEx+skippy) < 0 { 246 return ErrInvalidLengthEvent 247 } 248 if (iNdEx + skippy) > l { 249 return io.ErrUnexpectedEOF 250 } 251 iNdEx += skippy 252 } 253 } 254 255 if iNdEx > l { 256 return io.ErrUnexpectedEOF 257 } 258 return nil 259 } 260 func skipEvent(dAtA []byte) (n int, err error) { 261 l := len(dAtA) 262 iNdEx := 0 263 depth := 0 264 for iNdEx < l { 265 var wire uint64 266 for shift := uint(0); ; shift += 7 { 267 if shift >= 64 { 268 return 0, ErrIntOverflowEvent 269 } 270 if iNdEx >= l { 271 return 0, io.ErrUnexpectedEOF 272 } 273 b := dAtA[iNdEx] 274 iNdEx++ 275 wire |= (uint64(b) & 0x7F) << shift 276 if b < 0x80 { 277 break 278 } 279 } 280 wireType := int(wire & 0x7) 281 switch wireType { 282 case 0: 283 for shift := uint(0); ; shift += 7 { 284 if shift >= 64 { 285 return 0, ErrIntOverflowEvent 286 } 287 if iNdEx >= l { 288 return 0, io.ErrUnexpectedEOF 289 } 290 iNdEx++ 291 if dAtA[iNdEx-1] < 0x80 { 292 break 293 } 294 } 295 case 1: 296 iNdEx += 8 297 case 2: 298 var length int 299 for shift := uint(0); ; shift += 7 { 300 if shift >= 64 { 301 return 0, ErrIntOverflowEvent 302 } 303 if iNdEx >= l { 304 return 0, io.ErrUnexpectedEOF 305 } 306 b := dAtA[iNdEx] 307 iNdEx++ 308 length |= (int(b) & 0x7F) << shift 309 if b < 0x80 { 310 break 311 } 312 } 313 if length < 0 { 314 return 0, ErrInvalidLengthEvent 315 } 316 iNdEx += length 317 case 3: 318 depth++ 319 case 4: 320 if depth == 0 { 321 return 0, ErrUnexpectedEndOfGroupEvent 322 } 323 depth-- 324 case 5: 325 iNdEx += 4 326 default: 327 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 328 } 329 if iNdEx < 0 { 330 return 0, ErrInvalidLengthEvent 331 } 332 if depth == 0 { 333 return iNdEx, nil 334 } 335 } 336 return 0, io.ErrUnexpectedEOF 337 } 338 339 var ( 340 ErrInvalidLengthEvent = fmt.Errorf("proto: negative length found during unmarshaling") 341 ErrIntOverflowEvent = fmt.Errorf("proto: integer overflow") 342 ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group") 343 ) 344