github.com/matrixorigin/matrixone@v1.2.0/pkg/pb/status/status.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: status.proto 3 4 package status 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 time "time" 12 13 _ "github.com/gogo/protobuf/gogoproto" 14 proto "github.com/gogo/protobuf/proto" 15 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 16 _ "google.golang.org/protobuf/types/known/timestamppb" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 var _ = time.Kitchen 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 30 31 type SessionField int32 32 33 const ( 34 SessionField_NODE_ID SessionField = 0 35 SessionField_CONN_ID SessionField = 1 36 SessionField_SESSION_ID SessionField = 2 37 SessionField_ACCOUNT SessionField = 3 38 SessionField_USER SessionField = 4 39 SessionField_HOST SessionField = 5 40 SessionField_DB SessionField = 6 41 SessionField_SESSION_START SessionField = 7 42 SessionField_COMMAND SessionField = 8 43 SessionField_INFO SessionField = 9 44 SessionField_TXN_ID SessionField = 10 45 SessionField_STATEMENT_ID SessionField = 11 46 SessionField_STATEMENT_TYPE SessionField = 12 47 SessionField_QUERY_TYPE SessionField = 13 48 SessionField_SQL_SOURCE_TYPE SessionField = 14 49 SessionField_QUERY_START SessionField = 15 50 SessionField_CLIENT_HOST SessionField = 16 51 SessionField_ROLE SessionField = 17 52 SessionField_PROXY_HOST SessionField = 18 53 ) 54 55 var SessionField_name = map[int32]string{ 56 0: "NODE_ID", 57 1: "CONN_ID", 58 2: "SESSION_ID", 59 3: "ACCOUNT", 60 4: "USER", 61 5: "HOST", 62 6: "DB", 63 7: "SESSION_START", 64 8: "COMMAND", 65 9: "INFO", 66 10: "TXN_ID", 67 11: "STATEMENT_ID", 68 12: "STATEMENT_TYPE", 69 13: "QUERY_TYPE", 70 14: "SQL_SOURCE_TYPE", 71 15: "QUERY_START", 72 16: "CLIENT_HOST", 73 17: "ROLE", 74 18: "PROXY_HOST", 75 } 76 77 var SessionField_value = map[string]int32{ 78 "NODE_ID": 0, 79 "CONN_ID": 1, 80 "SESSION_ID": 2, 81 "ACCOUNT": 3, 82 "USER": 4, 83 "HOST": 5, 84 "DB": 6, 85 "SESSION_START": 7, 86 "COMMAND": 8, 87 "INFO": 9, 88 "TXN_ID": 10, 89 "STATEMENT_ID": 11, 90 "STATEMENT_TYPE": 12, 91 "QUERY_TYPE": 13, 92 "SQL_SOURCE_TYPE": 14, 93 "QUERY_START": 15, 94 "CLIENT_HOST": 16, 95 "ROLE": 17, 96 "PROXY_HOST": 18, 97 } 98 99 func (x SessionField) String() string { 100 return proto.EnumName(SessionField_name, int32(x)) 101 } 102 103 func (SessionField) EnumDescriptor() ([]byte, []int) { 104 return fileDescriptor_dfe4fce6682daf5b, []int{0} 105 } 106 107 // Session is the information of a session. 108 type Session struct { 109 // NodeID is the ID of CN node/service. 110 NodeID string `protobuf:"bytes,1,opt,name=NodeID,proto3" json:"NodeID,omitempty"` 111 // ConnID is the connection ID of backend server. 112 ConnID uint32 `protobuf:"varint,2,opt,name=ConnID,proto3" json:"ConnID,omitempty"` 113 // SessionID is the session ID. 114 SessionID string `protobuf:"bytes,3,opt,name=SessionID,proto3" json:"SessionID,omitempty"` 115 // Account is the tenant name. 116 Account string `protobuf:"bytes,4,opt,name=Account,proto3" json:"Account,omitempty"` 117 // User is the username. 118 User string `protobuf:"bytes,5,opt,name=User,proto3" json:"User,omitempty"` 119 // Host is the host name/address and port. 120 Host string `protobuf:"bytes,6,opt,name=Host,proto3" json:"Host,omitempty"` 121 // DB is the database name. 122 DB string `protobuf:"bytes,7,opt,name=DB,proto3" json:"DB,omitempty"` 123 // SessionStart is the start time of this session. 124 SessionStart time.Time `protobuf:"bytes,8,opt,name=SessionStart,proto3,stdtime" json:"SessionStart"` 125 // Command is the command type. 126 Command string `protobuf:"bytes,9,opt,name=Command,proto3" json:"Command,omitempty"` 127 // Info is the current SQL statement. 128 Info string `protobuf:"bytes,10,opt,name=Info,proto3" json:"Info,omitempty"` 129 // TxnID is the current transaction ID of the session. 130 TxnID string `protobuf:"bytes,11,opt,name=TxnID,proto3" json:"TxnID,omitempty"` 131 // StatementID is the last statement ID of the session. 132 StatementID string `protobuf:"bytes,12,opt,name=StatementID,proto3" json:"StatementID,omitempty"` 133 // StatementType is the type of the statement: Insert, Update, Delete, Execute, Select. 134 StatementType string `protobuf:"bytes,13,opt,name=StatementType,proto3" json:"StatementType,omitempty"` 135 // QueryType is the type of the query: DDL, DML, DQL ... 136 QueryType string `protobuf:"bytes,14,opt,name=QueryType,proto3" json:"QueryType,omitempty"` 137 // SQLSourceType is the SQL source type: internal_sql, cloud_nonuser_sql, external_sql, cloud_user_sql. 138 SQLSourceType string `protobuf:"bytes,15,opt,name=SQLSourceType,proto3" json:"SQLSourceType,omitempty"` 139 // QueryStart is the start time of query. 140 QueryStart time.Time `protobuf:"bytes,16,opt,name=QueryStart,proto3,stdtime" json:"QueryStart"` 141 // ClientHost is the ip:port of client. 142 ClientHost string `protobuf:"bytes,17,opt,name=ClientHost,proto3" json:"ClientHost,omitempty"` 143 // Role of the user 144 Role string `protobuf:"bytes,18,opt,name=Role,proto3" json:"Role,omitempty"` 145 // FromProxy denotes whether the session is dispatched from proxy 146 FromProxy bool `protobuf:"varint,19,opt,name=FromProxy,proto3" json:"FromProxy,omitempty"` 147 // ProxyHost is the host address of proxy connection. 148 ProxyHost string `protobuf:"bytes,20,opt,name=ProxyHost,proto3" json:"ProxyHost,omitempty"` 149 XXX_NoUnkeyedLiteral struct{} `json:"-"` 150 XXX_unrecognized []byte `json:"-"` 151 XXX_sizecache int32 `json:"-"` 152 } 153 154 func (m *Session) Reset() { *m = Session{} } 155 func (m *Session) String() string { return proto.CompactTextString(m) } 156 func (*Session) ProtoMessage() {} 157 func (*Session) Descriptor() ([]byte, []int) { 158 return fileDescriptor_dfe4fce6682daf5b, []int{0} 159 } 160 func (m *Session) XXX_Unmarshal(b []byte) error { 161 return m.Unmarshal(b) 162 } 163 func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 164 if deterministic { 165 return xxx_messageInfo_Session.Marshal(b, m, deterministic) 166 } else { 167 b = b[:cap(b)] 168 n, err := m.MarshalToSizedBuffer(b) 169 if err != nil { 170 return nil, err 171 } 172 return b[:n], nil 173 } 174 } 175 func (m *Session) XXX_Merge(src proto.Message) { 176 xxx_messageInfo_Session.Merge(m, src) 177 } 178 func (m *Session) XXX_Size() int { 179 return m.Size() 180 } 181 func (m *Session) XXX_DiscardUnknown() { 182 xxx_messageInfo_Session.DiscardUnknown(m) 183 } 184 185 var xxx_messageInfo_Session proto.InternalMessageInfo 186 187 func (m *Session) GetNodeID() string { 188 if m != nil { 189 return m.NodeID 190 } 191 return "" 192 } 193 194 func (m *Session) GetConnID() uint32 { 195 if m != nil { 196 return m.ConnID 197 } 198 return 0 199 } 200 201 func (m *Session) GetSessionID() string { 202 if m != nil { 203 return m.SessionID 204 } 205 return "" 206 } 207 208 func (m *Session) GetAccount() string { 209 if m != nil { 210 return m.Account 211 } 212 return "" 213 } 214 215 func (m *Session) GetUser() string { 216 if m != nil { 217 return m.User 218 } 219 return "" 220 } 221 222 func (m *Session) GetHost() string { 223 if m != nil { 224 return m.Host 225 } 226 return "" 227 } 228 229 func (m *Session) GetDB() string { 230 if m != nil { 231 return m.DB 232 } 233 return "" 234 } 235 236 func (m *Session) GetSessionStart() time.Time { 237 if m != nil { 238 return m.SessionStart 239 } 240 return time.Time{} 241 } 242 243 func (m *Session) GetCommand() string { 244 if m != nil { 245 return m.Command 246 } 247 return "" 248 } 249 250 func (m *Session) GetInfo() string { 251 if m != nil { 252 return m.Info 253 } 254 return "" 255 } 256 257 func (m *Session) GetTxnID() string { 258 if m != nil { 259 return m.TxnID 260 } 261 return "" 262 } 263 264 func (m *Session) GetStatementID() string { 265 if m != nil { 266 return m.StatementID 267 } 268 return "" 269 } 270 271 func (m *Session) GetStatementType() string { 272 if m != nil { 273 return m.StatementType 274 } 275 return "" 276 } 277 278 func (m *Session) GetQueryType() string { 279 if m != nil { 280 return m.QueryType 281 } 282 return "" 283 } 284 285 func (m *Session) GetSQLSourceType() string { 286 if m != nil { 287 return m.SQLSourceType 288 } 289 return "" 290 } 291 292 func (m *Session) GetQueryStart() time.Time { 293 if m != nil { 294 return m.QueryStart 295 } 296 return time.Time{} 297 } 298 299 func (m *Session) GetClientHost() string { 300 if m != nil { 301 return m.ClientHost 302 } 303 return "" 304 } 305 306 func (m *Session) GetRole() string { 307 if m != nil { 308 return m.Role 309 } 310 return "" 311 } 312 313 func (m *Session) GetFromProxy() bool { 314 if m != nil { 315 return m.FromProxy 316 } 317 return false 318 } 319 320 func (m *Session) GetProxyHost() string { 321 if m != nil { 322 return m.ProxyHost 323 } 324 return "" 325 } 326 327 func init() { 328 proto.RegisterEnum("status.SessionField", SessionField_name, SessionField_value) 329 proto.RegisterType((*Session)(nil), "status.Session") 330 } 331 332 func init() { proto.RegisterFile("status.proto", fileDescriptor_dfe4fce6682daf5b) } 333 334 var fileDescriptor_dfe4fce6682daf5b = []byte{ 335 // 633 bytes of a gzipped FileDescriptorProto 336 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcb, 0x4e, 0xdb, 0x4c, 337 0x14, 0xc7, 0x71, 0x08, 0xb9, 0x9c, 0xdc, 0xcc, 0x01, 0x7d, 0x1a, 0xa1, 0x4f, 0x21, 0xaa, 0xba, 338 0x88, 0x2a, 0x35, 0x91, 0xda, 0x75, 0x17, 0x89, 0x6d, 0x84, 0xa5, 0x60, 0x13, 0x8f, 0x23, 0x41, 339 0x37, 0x28, 0x09, 0x83, 0x6b, 0x35, 0xf6, 0x44, 0xf6, 0x44, 0x82, 0xb7, 0xe8, 0x13, 0xf4, 0x79, 340 0x58, 0xf6, 0x09, 0xda, 0x8a, 0xb7, 0xe8, 0xae, 0x9a, 0x99, 0xdc, 0x58, 0x76, 0x77, 0xfe, 0xbf, 341 0x73, 0xf1, 0xff, 0x9c, 0x81, 0x40, 0x3d, 0x17, 0x53, 0xb1, 0xca, 0x7b, 0xcb, 0x8c, 0x0b, 0x8e, 342 0x25, 0xad, 0xce, 0xde, 0x47, 0xb1, 0xf8, 0xb2, 0x9a, 0xf5, 0xe6, 0x3c, 0xe9, 0x47, 0x3c, 0xe2, 343 0x7d, 0x95, 0x9e, 0xad, 0x1e, 0x94, 0x52, 0x42, 0x45, 0xba, 0xed, 0xec, 0x3c, 0xe2, 0x3c, 0x5a, 344 0xb0, 0x5d, 0x95, 0x88, 0x13, 0x96, 0x8b, 0x69, 0xb2, 0xd4, 0x05, 0x6f, 0xfe, 0x14, 0xa1, 0x4c, 345 0x59, 0x9e, 0xc7, 0x3c, 0xc5, 0xff, 0xa0, 0xe4, 0xf1, 0x7b, 0xe6, 0xda, 0xc4, 0xe8, 0x18, 0xdd, 346 0x6a, 0xb0, 0x56, 0x92, 0x5b, 0x3c, 0x4d, 0x5d, 0x9b, 0x14, 0x3a, 0x46, 0xb7, 0x11, 0xac, 0x15, 347 0xfe, 0x0f, 0xd5, 0x75, 0xab, 0x6b, 0x93, 0x43, 0xd5, 0xb2, 0x03, 0x48, 0xa0, 0x3c, 0x98, 0xcf, 348 0xf9, 0x2a, 0x15, 0xa4, 0xa8, 0x72, 0x1b, 0x89, 0x08, 0xc5, 0x49, 0xce, 0x32, 0x72, 0xa4, 0xb0, 349 0x8a, 0x25, 0xbb, 0xe4, 0xb9, 0x20, 0x25, 0xcd, 0x64, 0x8c, 0x4d, 0x28, 0xd8, 0x43, 0x52, 0x56, 350 0xa4, 0x60, 0x0f, 0xf1, 0x12, 0xea, 0xeb, 0xf1, 0x54, 0x4c, 0x33, 0x41, 0x2a, 0x1d, 0xa3, 0x5b, 351 0xfb, 0x70, 0xd6, 0xd3, 0x3b, 0xf6, 0x36, 0x3b, 0xf6, 0xc2, 0xcd, 0x8e, 0xc3, 0xca, 0xf3, 0xcf, 352 0xf3, 0x83, 0x6f, 0xbf, 0xce, 0x8d, 0xe0, 0x55, 0xa7, 0xf4, 0x66, 0xf1, 0x24, 0x99, 0xa6, 0xf7, 353 0xa4, 0xaa, 0xbd, 0xad, 0xa5, 0xf4, 0xe1, 0xa6, 0x0f, 0x9c, 0x80, 0xf6, 0x21, 0x63, 0x3c, 0x85, 354 0xa3, 0xf0, 0x51, 0xee, 0x58, 0x53, 0x50, 0x0b, 0xec, 0x40, 0x8d, 0x8a, 0xa9, 0x60, 0x09, 0x4b, 355 0x85, 0x6b, 0x93, 0xba, 0xca, 0xed, 0x23, 0x7c, 0x0b, 0x8d, 0xad, 0x0c, 0x9f, 0x96, 0x8c, 0x34, 356 0x54, 0xcd, 0x6b, 0x28, 0xaf, 0x38, 0x5e, 0xb1, 0xec, 0x49, 0x55, 0x34, 0xf5, 0x15, 0xb7, 0x40, 357 0xcd, 0x18, 0x8f, 0x28, 0x5f, 0x65, 0x73, 0xa6, 0x2a, 0x5a, 0xeb, 0x19, 0xfb, 0x10, 0x6d, 0x00, 358 0xd5, 0xa2, 0xef, 0x62, 0xfe, 0xc3, 0x5d, 0xf6, 0xfa, 0xb0, 0x0d, 0x60, 0x2d, 0x62, 0x96, 0x0a, 359 0xf5, 0x12, 0xc7, 0xea, 0x43, 0x7b, 0x44, 0xde, 0x26, 0xe0, 0x0b, 0x46, 0x50, 0xdf, 0x46, 0xc6, 360 0xd2, 0xfd, 0x45, 0xc6, 0x93, 0xeb, 0x8c, 0x3f, 0x3e, 0x91, 0x93, 0x8e, 0xd1, 0xad, 0x04, 0x3b, 361 0x20, 0xb3, 0x2a, 0x50, 0x03, 0x4f, 0xf5, 0x6e, 0x5b, 0xf0, 0xee, 0x7b, 0x61, 0xfb, 0xa0, 0x17, 362 0x31, 0x5b, 0xdc, 0x63, 0x0d, 0xca, 0x9e, 0x6f, 0x3b, 0x77, 0xae, 0x6d, 0x1e, 0x48, 0x61, 0xf9, 363 0x9e, 0x27, 0x85, 0x81, 0x4d, 0x00, 0xea, 0x50, 0xea, 0xfa, 0x4a, 0x17, 0x64, 0x72, 0x60, 0x59, 364 0xfe, 0xc4, 0x0b, 0xcd, 0x43, 0xac, 0x40, 0x71, 0x42, 0x9d, 0xc0, 0x2c, 0xca, 0xe8, 0xd2, 0xa7, 365 0xa1, 0x79, 0x84, 0x25, 0xf9, 0xb7, 0x63, 0x96, 0xf0, 0x18, 0x1a, 0x9b, 0x46, 0x1a, 0x0e, 0x82, 366 0xd0, 0x2c, 0xeb, 0xc1, 0x57, 0x57, 0x03, 0xcf, 0x36, 0x2b, 0xb2, 0xc3, 0xf5, 0x2e, 0x7c, 0xb3, 367 0x8a, 0x00, 0xa5, 0xf0, 0x46, 0x8d, 0x07, 0x34, 0xa1, 0x4e, 0xc3, 0x41, 0xe8, 0x5c, 0x39, 0x5e, 368 0x28, 0x49, 0x0d, 0x11, 0x9a, 0x3b, 0x12, 0xde, 0x5e, 0x3b, 0x66, 0x5d, 0x9a, 0x1a, 0x4f, 0x9c, 369 0xe0, 0x56, 0xeb, 0x06, 0x9e, 0x40, 0x8b, 0x8e, 0x47, 0x77, 0xd4, 0x9f, 0x04, 0x96, 0xa3, 0x61, 370 0x13, 0x5b, 0x50, 0xd3, 0x45, 0xfa, 0xf3, 0x2d, 0x09, 0xac, 0x91, 0x2b, 0xc7, 0x28, 0xab, 0xa6, 371 0xb4, 0x10, 0xf8, 0x23, 0xc7, 0x3c, 0x96, 0x03, 0xaf, 0x03, 0xff, 0xe6, 0x56, 0x67, 0x70, 0xf8, 372 0xe9, 0xf9, 0xa5, 0x6d, 0xfc, 0x78, 0x69, 0x1b, 0xbf, 0x5f, 0xda, 0xc6, 0xe7, 0xfe, 0xde, 0xbf, 373 0x7e, 0x32, 0x15, 0x59, 0xfc, 0xc8, 0xb3, 0x38, 0x8a, 0xd3, 0x8d, 0x48, 0x59, 0x7f, 0xf9, 0x35, 374 0xea, 0x2f, 0x67, 0x7d, 0xfd, 0x5b, 0x31, 0x2b, 0xa9, 0x97, 0xff, 0xf8, 0x37, 0x00, 0x00, 0xff, 375 0xff, 0x41, 0x1b, 0x87, 0x8c, 0x4a, 0x04, 0x00, 0x00, 376 } 377 378 func (m *Session) Marshal() (dAtA []byte, err error) { 379 size := m.Size() 380 dAtA = make([]byte, size) 381 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 382 if err != nil { 383 return nil, err 384 } 385 return dAtA[:n], nil 386 } 387 388 func (m *Session) MarshalTo(dAtA []byte) (int, error) { 389 size := m.Size() 390 return m.MarshalToSizedBuffer(dAtA[:size]) 391 } 392 393 func (m *Session) MarshalToSizedBuffer(dAtA []byte) (int, error) { 394 i := len(dAtA) 395 _ = i 396 var l int 397 _ = l 398 if m.XXX_unrecognized != nil { 399 i -= len(m.XXX_unrecognized) 400 copy(dAtA[i:], m.XXX_unrecognized) 401 } 402 if len(m.ProxyHost) > 0 { 403 i -= len(m.ProxyHost) 404 copy(dAtA[i:], m.ProxyHost) 405 i = encodeVarintStatus(dAtA, i, uint64(len(m.ProxyHost))) 406 i-- 407 dAtA[i] = 0x1 408 i-- 409 dAtA[i] = 0xa2 410 } 411 if m.FromProxy { 412 i-- 413 if m.FromProxy { 414 dAtA[i] = 1 415 } else { 416 dAtA[i] = 0 417 } 418 i-- 419 dAtA[i] = 0x1 420 i-- 421 dAtA[i] = 0x98 422 } 423 if len(m.Role) > 0 { 424 i -= len(m.Role) 425 copy(dAtA[i:], m.Role) 426 i = encodeVarintStatus(dAtA, i, uint64(len(m.Role))) 427 i-- 428 dAtA[i] = 0x1 429 i-- 430 dAtA[i] = 0x92 431 } 432 if len(m.ClientHost) > 0 { 433 i -= len(m.ClientHost) 434 copy(dAtA[i:], m.ClientHost) 435 i = encodeVarintStatus(dAtA, i, uint64(len(m.ClientHost))) 436 i-- 437 dAtA[i] = 0x1 438 i-- 439 dAtA[i] = 0x8a 440 } 441 n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.QueryStart, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.QueryStart):]) 442 if err1 != nil { 443 return 0, err1 444 } 445 i -= n1 446 i = encodeVarintStatus(dAtA, i, uint64(n1)) 447 i-- 448 dAtA[i] = 0x1 449 i-- 450 dAtA[i] = 0x82 451 if len(m.SQLSourceType) > 0 { 452 i -= len(m.SQLSourceType) 453 copy(dAtA[i:], m.SQLSourceType) 454 i = encodeVarintStatus(dAtA, i, uint64(len(m.SQLSourceType))) 455 i-- 456 dAtA[i] = 0x7a 457 } 458 if len(m.QueryType) > 0 { 459 i -= len(m.QueryType) 460 copy(dAtA[i:], m.QueryType) 461 i = encodeVarintStatus(dAtA, i, uint64(len(m.QueryType))) 462 i-- 463 dAtA[i] = 0x72 464 } 465 if len(m.StatementType) > 0 { 466 i -= len(m.StatementType) 467 copy(dAtA[i:], m.StatementType) 468 i = encodeVarintStatus(dAtA, i, uint64(len(m.StatementType))) 469 i-- 470 dAtA[i] = 0x6a 471 } 472 if len(m.StatementID) > 0 { 473 i -= len(m.StatementID) 474 copy(dAtA[i:], m.StatementID) 475 i = encodeVarintStatus(dAtA, i, uint64(len(m.StatementID))) 476 i-- 477 dAtA[i] = 0x62 478 } 479 if len(m.TxnID) > 0 { 480 i -= len(m.TxnID) 481 copy(dAtA[i:], m.TxnID) 482 i = encodeVarintStatus(dAtA, i, uint64(len(m.TxnID))) 483 i-- 484 dAtA[i] = 0x5a 485 } 486 if len(m.Info) > 0 { 487 i -= len(m.Info) 488 copy(dAtA[i:], m.Info) 489 i = encodeVarintStatus(dAtA, i, uint64(len(m.Info))) 490 i-- 491 dAtA[i] = 0x52 492 } 493 if len(m.Command) > 0 { 494 i -= len(m.Command) 495 copy(dAtA[i:], m.Command) 496 i = encodeVarintStatus(dAtA, i, uint64(len(m.Command))) 497 i-- 498 dAtA[i] = 0x4a 499 } 500 n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SessionStart, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SessionStart):]) 501 if err2 != nil { 502 return 0, err2 503 } 504 i -= n2 505 i = encodeVarintStatus(dAtA, i, uint64(n2)) 506 i-- 507 dAtA[i] = 0x42 508 if len(m.DB) > 0 { 509 i -= len(m.DB) 510 copy(dAtA[i:], m.DB) 511 i = encodeVarintStatus(dAtA, i, uint64(len(m.DB))) 512 i-- 513 dAtA[i] = 0x3a 514 } 515 if len(m.Host) > 0 { 516 i -= len(m.Host) 517 copy(dAtA[i:], m.Host) 518 i = encodeVarintStatus(dAtA, i, uint64(len(m.Host))) 519 i-- 520 dAtA[i] = 0x32 521 } 522 if len(m.User) > 0 { 523 i -= len(m.User) 524 copy(dAtA[i:], m.User) 525 i = encodeVarintStatus(dAtA, i, uint64(len(m.User))) 526 i-- 527 dAtA[i] = 0x2a 528 } 529 if len(m.Account) > 0 { 530 i -= len(m.Account) 531 copy(dAtA[i:], m.Account) 532 i = encodeVarintStatus(dAtA, i, uint64(len(m.Account))) 533 i-- 534 dAtA[i] = 0x22 535 } 536 if len(m.SessionID) > 0 { 537 i -= len(m.SessionID) 538 copy(dAtA[i:], m.SessionID) 539 i = encodeVarintStatus(dAtA, i, uint64(len(m.SessionID))) 540 i-- 541 dAtA[i] = 0x1a 542 } 543 if m.ConnID != 0 { 544 i = encodeVarintStatus(dAtA, i, uint64(m.ConnID)) 545 i-- 546 dAtA[i] = 0x10 547 } 548 if len(m.NodeID) > 0 { 549 i -= len(m.NodeID) 550 copy(dAtA[i:], m.NodeID) 551 i = encodeVarintStatus(dAtA, i, uint64(len(m.NodeID))) 552 i-- 553 dAtA[i] = 0xa 554 } 555 return len(dAtA) - i, nil 556 } 557 558 func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { 559 offset -= sovStatus(v) 560 base := offset 561 for v >= 1<<7 { 562 dAtA[offset] = uint8(v&0x7f | 0x80) 563 v >>= 7 564 offset++ 565 } 566 dAtA[offset] = uint8(v) 567 return base 568 } 569 func (m *Session) Size() (n int) { 570 if m == nil { 571 return 0 572 } 573 var l int 574 _ = l 575 l = len(m.NodeID) 576 if l > 0 { 577 n += 1 + l + sovStatus(uint64(l)) 578 } 579 if m.ConnID != 0 { 580 n += 1 + sovStatus(uint64(m.ConnID)) 581 } 582 l = len(m.SessionID) 583 if l > 0 { 584 n += 1 + l + sovStatus(uint64(l)) 585 } 586 l = len(m.Account) 587 if l > 0 { 588 n += 1 + l + sovStatus(uint64(l)) 589 } 590 l = len(m.User) 591 if l > 0 { 592 n += 1 + l + sovStatus(uint64(l)) 593 } 594 l = len(m.Host) 595 if l > 0 { 596 n += 1 + l + sovStatus(uint64(l)) 597 } 598 l = len(m.DB) 599 if l > 0 { 600 n += 1 + l + sovStatus(uint64(l)) 601 } 602 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SessionStart) 603 n += 1 + l + sovStatus(uint64(l)) 604 l = len(m.Command) 605 if l > 0 { 606 n += 1 + l + sovStatus(uint64(l)) 607 } 608 l = len(m.Info) 609 if l > 0 { 610 n += 1 + l + sovStatus(uint64(l)) 611 } 612 l = len(m.TxnID) 613 if l > 0 { 614 n += 1 + l + sovStatus(uint64(l)) 615 } 616 l = len(m.StatementID) 617 if l > 0 { 618 n += 1 + l + sovStatus(uint64(l)) 619 } 620 l = len(m.StatementType) 621 if l > 0 { 622 n += 1 + l + sovStatus(uint64(l)) 623 } 624 l = len(m.QueryType) 625 if l > 0 { 626 n += 1 + l + sovStatus(uint64(l)) 627 } 628 l = len(m.SQLSourceType) 629 if l > 0 { 630 n += 1 + l + sovStatus(uint64(l)) 631 } 632 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.QueryStart) 633 n += 2 + l + sovStatus(uint64(l)) 634 l = len(m.ClientHost) 635 if l > 0 { 636 n += 2 + l + sovStatus(uint64(l)) 637 } 638 l = len(m.Role) 639 if l > 0 { 640 n += 2 + l + sovStatus(uint64(l)) 641 } 642 if m.FromProxy { 643 n += 3 644 } 645 l = len(m.ProxyHost) 646 if l > 0 { 647 n += 2 + l + sovStatus(uint64(l)) 648 } 649 if m.XXX_unrecognized != nil { 650 n += len(m.XXX_unrecognized) 651 } 652 return n 653 } 654 655 func sovStatus(x uint64) (n int) { 656 return (math_bits.Len64(x|1) + 6) / 7 657 } 658 func sozStatus(x uint64) (n int) { 659 return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 660 } 661 func (m *Session) Unmarshal(dAtA []byte) error { 662 l := len(dAtA) 663 iNdEx := 0 664 for iNdEx < l { 665 preIndex := iNdEx 666 var wire uint64 667 for shift := uint(0); ; shift += 7 { 668 if shift >= 64 { 669 return ErrIntOverflowStatus 670 } 671 if iNdEx >= l { 672 return io.ErrUnexpectedEOF 673 } 674 b := dAtA[iNdEx] 675 iNdEx++ 676 wire |= uint64(b&0x7F) << shift 677 if b < 0x80 { 678 break 679 } 680 } 681 fieldNum := int32(wire >> 3) 682 wireType := int(wire & 0x7) 683 if wireType == 4 { 684 return fmt.Errorf("proto: Session: wiretype end group for non-group") 685 } 686 if fieldNum <= 0 { 687 return fmt.Errorf("proto: Session: illegal tag %d (wire type %d)", fieldNum, wire) 688 } 689 switch fieldNum { 690 case 1: 691 if wireType != 2 { 692 return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType) 693 } 694 var stringLen uint64 695 for shift := uint(0); ; shift += 7 { 696 if shift >= 64 { 697 return ErrIntOverflowStatus 698 } 699 if iNdEx >= l { 700 return io.ErrUnexpectedEOF 701 } 702 b := dAtA[iNdEx] 703 iNdEx++ 704 stringLen |= uint64(b&0x7F) << shift 705 if b < 0x80 { 706 break 707 } 708 } 709 intStringLen := int(stringLen) 710 if intStringLen < 0 { 711 return ErrInvalidLengthStatus 712 } 713 postIndex := iNdEx + intStringLen 714 if postIndex < 0 { 715 return ErrInvalidLengthStatus 716 } 717 if postIndex > l { 718 return io.ErrUnexpectedEOF 719 } 720 m.NodeID = string(dAtA[iNdEx:postIndex]) 721 iNdEx = postIndex 722 case 2: 723 if wireType != 0 { 724 return fmt.Errorf("proto: wrong wireType = %d for field ConnID", wireType) 725 } 726 m.ConnID = 0 727 for shift := uint(0); ; shift += 7 { 728 if shift >= 64 { 729 return ErrIntOverflowStatus 730 } 731 if iNdEx >= l { 732 return io.ErrUnexpectedEOF 733 } 734 b := dAtA[iNdEx] 735 iNdEx++ 736 m.ConnID |= uint32(b&0x7F) << shift 737 if b < 0x80 { 738 break 739 } 740 } 741 case 3: 742 if wireType != 2 { 743 return fmt.Errorf("proto: wrong wireType = %d for field SessionID", wireType) 744 } 745 var stringLen uint64 746 for shift := uint(0); ; shift += 7 { 747 if shift >= 64 { 748 return ErrIntOverflowStatus 749 } 750 if iNdEx >= l { 751 return io.ErrUnexpectedEOF 752 } 753 b := dAtA[iNdEx] 754 iNdEx++ 755 stringLen |= uint64(b&0x7F) << shift 756 if b < 0x80 { 757 break 758 } 759 } 760 intStringLen := int(stringLen) 761 if intStringLen < 0 { 762 return ErrInvalidLengthStatus 763 } 764 postIndex := iNdEx + intStringLen 765 if postIndex < 0 { 766 return ErrInvalidLengthStatus 767 } 768 if postIndex > l { 769 return io.ErrUnexpectedEOF 770 } 771 m.SessionID = string(dAtA[iNdEx:postIndex]) 772 iNdEx = postIndex 773 case 4: 774 if wireType != 2 { 775 return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) 776 } 777 var stringLen uint64 778 for shift := uint(0); ; shift += 7 { 779 if shift >= 64 { 780 return ErrIntOverflowStatus 781 } 782 if iNdEx >= l { 783 return io.ErrUnexpectedEOF 784 } 785 b := dAtA[iNdEx] 786 iNdEx++ 787 stringLen |= uint64(b&0x7F) << shift 788 if b < 0x80 { 789 break 790 } 791 } 792 intStringLen := int(stringLen) 793 if intStringLen < 0 { 794 return ErrInvalidLengthStatus 795 } 796 postIndex := iNdEx + intStringLen 797 if postIndex < 0 { 798 return ErrInvalidLengthStatus 799 } 800 if postIndex > l { 801 return io.ErrUnexpectedEOF 802 } 803 m.Account = string(dAtA[iNdEx:postIndex]) 804 iNdEx = postIndex 805 case 5: 806 if wireType != 2 { 807 return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) 808 } 809 var stringLen uint64 810 for shift := uint(0); ; shift += 7 { 811 if shift >= 64 { 812 return ErrIntOverflowStatus 813 } 814 if iNdEx >= l { 815 return io.ErrUnexpectedEOF 816 } 817 b := dAtA[iNdEx] 818 iNdEx++ 819 stringLen |= uint64(b&0x7F) << shift 820 if b < 0x80 { 821 break 822 } 823 } 824 intStringLen := int(stringLen) 825 if intStringLen < 0 { 826 return ErrInvalidLengthStatus 827 } 828 postIndex := iNdEx + intStringLen 829 if postIndex < 0 { 830 return ErrInvalidLengthStatus 831 } 832 if postIndex > l { 833 return io.ErrUnexpectedEOF 834 } 835 m.User = string(dAtA[iNdEx:postIndex]) 836 iNdEx = postIndex 837 case 6: 838 if wireType != 2 { 839 return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) 840 } 841 var stringLen uint64 842 for shift := uint(0); ; shift += 7 { 843 if shift >= 64 { 844 return ErrIntOverflowStatus 845 } 846 if iNdEx >= l { 847 return io.ErrUnexpectedEOF 848 } 849 b := dAtA[iNdEx] 850 iNdEx++ 851 stringLen |= uint64(b&0x7F) << shift 852 if b < 0x80 { 853 break 854 } 855 } 856 intStringLen := int(stringLen) 857 if intStringLen < 0 { 858 return ErrInvalidLengthStatus 859 } 860 postIndex := iNdEx + intStringLen 861 if postIndex < 0 { 862 return ErrInvalidLengthStatus 863 } 864 if postIndex > l { 865 return io.ErrUnexpectedEOF 866 } 867 m.Host = string(dAtA[iNdEx:postIndex]) 868 iNdEx = postIndex 869 case 7: 870 if wireType != 2 { 871 return fmt.Errorf("proto: wrong wireType = %d for field DB", wireType) 872 } 873 var stringLen uint64 874 for shift := uint(0); ; shift += 7 { 875 if shift >= 64 { 876 return ErrIntOverflowStatus 877 } 878 if iNdEx >= l { 879 return io.ErrUnexpectedEOF 880 } 881 b := dAtA[iNdEx] 882 iNdEx++ 883 stringLen |= uint64(b&0x7F) << shift 884 if b < 0x80 { 885 break 886 } 887 } 888 intStringLen := int(stringLen) 889 if intStringLen < 0 { 890 return ErrInvalidLengthStatus 891 } 892 postIndex := iNdEx + intStringLen 893 if postIndex < 0 { 894 return ErrInvalidLengthStatus 895 } 896 if postIndex > l { 897 return io.ErrUnexpectedEOF 898 } 899 m.DB = string(dAtA[iNdEx:postIndex]) 900 iNdEx = postIndex 901 case 8: 902 if wireType != 2 { 903 return fmt.Errorf("proto: wrong wireType = %d for field SessionStart", wireType) 904 } 905 var msglen int 906 for shift := uint(0); ; shift += 7 { 907 if shift >= 64 { 908 return ErrIntOverflowStatus 909 } 910 if iNdEx >= l { 911 return io.ErrUnexpectedEOF 912 } 913 b := dAtA[iNdEx] 914 iNdEx++ 915 msglen |= int(b&0x7F) << shift 916 if b < 0x80 { 917 break 918 } 919 } 920 if msglen < 0 { 921 return ErrInvalidLengthStatus 922 } 923 postIndex := iNdEx + msglen 924 if postIndex < 0 { 925 return ErrInvalidLengthStatus 926 } 927 if postIndex > l { 928 return io.ErrUnexpectedEOF 929 } 930 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SessionStart, dAtA[iNdEx:postIndex]); err != nil { 931 return err 932 } 933 iNdEx = postIndex 934 case 9: 935 if wireType != 2 { 936 return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) 937 } 938 var stringLen uint64 939 for shift := uint(0); ; shift += 7 { 940 if shift >= 64 { 941 return ErrIntOverflowStatus 942 } 943 if iNdEx >= l { 944 return io.ErrUnexpectedEOF 945 } 946 b := dAtA[iNdEx] 947 iNdEx++ 948 stringLen |= uint64(b&0x7F) << shift 949 if b < 0x80 { 950 break 951 } 952 } 953 intStringLen := int(stringLen) 954 if intStringLen < 0 { 955 return ErrInvalidLengthStatus 956 } 957 postIndex := iNdEx + intStringLen 958 if postIndex < 0 { 959 return ErrInvalidLengthStatus 960 } 961 if postIndex > l { 962 return io.ErrUnexpectedEOF 963 } 964 m.Command = string(dAtA[iNdEx:postIndex]) 965 iNdEx = postIndex 966 case 10: 967 if wireType != 2 { 968 return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) 969 } 970 var stringLen uint64 971 for shift := uint(0); ; shift += 7 { 972 if shift >= 64 { 973 return ErrIntOverflowStatus 974 } 975 if iNdEx >= l { 976 return io.ErrUnexpectedEOF 977 } 978 b := dAtA[iNdEx] 979 iNdEx++ 980 stringLen |= uint64(b&0x7F) << shift 981 if b < 0x80 { 982 break 983 } 984 } 985 intStringLen := int(stringLen) 986 if intStringLen < 0 { 987 return ErrInvalidLengthStatus 988 } 989 postIndex := iNdEx + intStringLen 990 if postIndex < 0 { 991 return ErrInvalidLengthStatus 992 } 993 if postIndex > l { 994 return io.ErrUnexpectedEOF 995 } 996 m.Info = string(dAtA[iNdEx:postIndex]) 997 iNdEx = postIndex 998 case 11: 999 if wireType != 2 { 1000 return fmt.Errorf("proto: wrong wireType = %d for field TxnID", wireType) 1001 } 1002 var stringLen uint64 1003 for shift := uint(0); ; shift += 7 { 1004 if shift >= 64 { 1005 return ErrIntOverflowStatus 1006 } 1007 if iNdEx >= l { 1008 return io.ErrUnexpectedEOF 1009 } 1010 b := dAtA[iNdEx] 1011 iNdEx++ 1012 stringLen |= uint64(b&0x7F) << shift 1013 if b < 0x80 { 1014 break 1015 } 1016 } 1017 intStringLen := int(stringLen) 1018 if intStringLen < 0 { 1019 return ErrInvalidLengthStatus 1020 } 1021 postIndex := iNdEx + intStringLen 1022 if postIndex < 0 { 1023 return ErrInvalidLengthStatus 1024 } 1025 if postIndex > l { 1026 return io.ErrUnexpectedEOF 1027 } 1028 m.TxnID = string(dAtA[iNdEx:postIndex]) 1029 iNdEx = postIndex 1030 case 12: 1031 if wireType != 2 { 1032 return fmt.Errorf("proto: wrong wireType = %d for field StatementID", wireType) 1033 } 1034 var stringLen uint64 1035 for shift := uint(0); ; shift += 7 { 1036 if shift >= 64 { 1037 return ErrIntOverflowStatus 1038 } 1039 if iNdEx >= l { 1040 return io.ErrUnexpectedEOF 1041 } 1042 b := dAtA[iNdEx] 1043 iNdEx++ 1044 stringLen |= uint64(b&0x7F) << shift 1045 if b < 0x80 { 1046 break 1047 } 1048 } 1049 intStringLen := int(stringLen) 1050 if intStringLen < 0 { 1051 return ErrInvalidLengthStatus 1052 } 1053 postIndex := iNdEx + intStringLen 1054 if postIndex < 0 { 1055 return ErrInvalidLengthStatus 1056 } 1057 if postIndex > l { 1058 return io.ErrUnexpectedEOF 1059 } 1060 m.StatementID = string(dAtA[iNdEx:postIndex]) 1061 iNdEx = postIndex 1062 case 13: 1063 if wireType != 2 { 1064 return fmt.Errorf("proto: wrong wireType = %d for field StatementType", wireType) 1065 } 1066 var stringLen uint64 1067 for shift := uint(0); ; shift += 7 { 1068 if shift >= 64 { 1069 return ErrIntOverflowStatus 1070 } 1071 if iNdEx >= l { 1072 return io.ErrUnexpectedEOF 1073 } 1074 b := dAtA[iNdEx] 1075 iNdEx++ 1076 stringLen |= uint64(b&0x7F) << shift 1077 if b < 0x80 { 1078 break 1079 } 1080 } 1081 intStringLen := int(stringLen) 1082 if intStringLen < 0 { 1083 return ErrInvalidLengthStatus 1084 } 1085 postIndex := iNdEx + intStringLen 1086 if postIndex < 0 { 1087 return ErrInvalidLengthStatus 1088 } 1089 if postIndex > l { 1090 return io.ErrUnexpectedEOF 1091 } 1092 m.StatementType = string(dAtA[iNdEx:postIndex]) 1093 iNdEx = postIndex 1094 case 14: 1095 if wireType != 2 { 1096 return fmt.Errorf("proto: wrong wireType = %d for field QueryType", wireType) 1097 } 1098 var stringLen uint64 1099 for shift := uint(0); ; shift += 7 { 1100 if shift >= 64 { 1101 return ErrIntOverflowStatus 1102 } 1103 if iNdEx >= l { 1104 return io.ErrUnexpectedEOF 1105 } 1106 b := dAtA[iNdEx] 1107 iNdEx++ 1108 stringLen |= uint64(b&0x7F) << shift 1109 if b < 0x80 { 1110 break 1111 } 1112 } 1113 intStringLen := int(stringLen) 1114 if intStringLen < 0 { 1115 return ErrInvalidLengthStatus 1116 } 1117 postIndex := iNdEx + intStringLen 1118 if postIndex < 0 { 1119 return ErrInvalidLengthStatus 1120 } 1121 if postIndex > l { 1122 return io.ErrUnexpectedEOF 1123 } 1124 m.QueryType = string(dAtA[iNdEx:postIndex]) 1125 iNdEx = postIndex 1126 case 15: 1127 if wireType != 2 { 1128 return fmt.Errorf("proto: wrong wireType = %d for field SQLSourceType", wireType) 1129 } 1130 var stringLen uint64 1131 for shift := uint(0); ; shift += 7 { 1132 if shift >= 64 { 1133 return ErrIntOverflowStatus 1134 } 1135 if iNdEx >= l { 1136 return io.ErrUnexpectedEOF 1137 } 1138 b := dAtA[iNdEx] 1139 iNdEx++ 1140 stringLen |= uint64(b&0x7F) << shift 1141 if b < 0x80 { 1142 break 1143 } 1144 } 1145 intStringLen := int(stringLen) 1146 if intStringLen < 0 { 1147 return ErrInvalidLengthStatus 1148 } 1149 postIndex := iNdEx + intStringLen 1150 if postIndex < 0 { 1151 return ErrInvalidLengthStatus 1152 } 1153 if postIndex > l { 1154 return io.ErrUnexpectedEOF 1155 } 1156 m.SQLSourceType = string(dAtA[iNdEx:postIndex]) 1157 iNdEx = postIndex 1158 case 16: 1159 if wireType != 2 { 1160 return fmt.Errorf("proto: wrong wireType = %d for field QueryStart", wireType) 1161 } 1162 var msglen int 1163 for shift := uint(0); ; shift += 7 { 1164 if shift >= 64 { 1165 return ErrIntOverflowStatus 1166 } 1167 if iNdEx >= l { 1168 return io.ErrUnexpectedEOF 1169 } 1170 b := dAtA[iNdEx] 1171 iNdEx++ 1172 msglen |= int(b&0x7F) << shift 1173 if b < 0x80 { 1174 break 1175 } 1176 } 1177 if msglen < 0 { 1178 return ErrInvalidLengthStatus 1179 } 1180 postIndex := iNdEx + msglen 1181 if postIndex < 0 { 1182 return ErrInvalidLengthStatus 1183 } 1184 if postIndex > l { 1185 return io.ErrUnexpectedEOF 1186 } 1187 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.QueryStart, dAtA[iNdEx:postIndex]); err != nil { 1188 return err 1189 } 1190 iNdEx = postIndex 1191 case 17: 1192 if wireType != 2 { 1193 return fmt.Errorf("proto: wrong wireType = %d for field ClientHost", wireType) 1194 } 1195 var stringLen uint64 1196 for shift := uint(0); ; shift += 7 { 1197 if shift >= 64 { 1198 return ErrIntOverflowStatus 1199 } 1200 if iNdEx >= l { 1201 return io.ErrUnexpectedEOF 1202 } 1203 b := dAtA[iNdEx] 1204 iNdEx++ 1205 stringLen |= uint64(b&0x7F) << shift 1206 if b < 0x80 { 1207 break 1208 } 1209 } 1210 intStringLen := int(stringLen) 1211 if intStringLen < 0 { 1212 return ErrInvalidLengthStatus 1213 } 1214 postIndex := iNdEx + intStringLen 1215 if postIndex < 0 { 1216 return ErrInvalidLengthStatus 1217 } 1218 if postIndex > l { 1219 return io.ErrUnexpectedEOF 1220 } 1221 m.ClientHost = string(dAtA[iNdEx:postIndex]) 1222 iNdEx = postIndex 1223 case 18: 1224 if wireType != 2 { 1225 return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) 1226 } 1227 var stringLen uint64 1228 for shift := uint(0); ; shift += 7 { 1229 if shift >= 64 { 1230 return ErrIntOverflowStatus 1231 } 1232 if iNdEx >= l { 1233 return io.ErrUnexpectedEOF 1234 } 1235 b := dAtA[iNdEx] 1236 iNdEx++ 1237 stringLen |= uint64(b&0x7F) << shift 1238 if b < 0x80 { 1239 break 1240 } 1241 } 1242 intStringLen := int(stringLen) 1243 if intStringLen < 0 { 1244 return ErrInvalidLengthStatus 1245 } 1246 postIndex := iNdEx + intStringLen 1247 if postIndex < 0 { 1248 return ErrInvalidLengthStatus 1249 } 1250 if postIndex > l { 1251 return io.ErrUnexpectedEOF 1252 } 1253 m.Role = string(dAtA[iNdEx:postIndex]) 1254 iNdEx = postIndex 1255 case 19: 1256 if wireType != 0 { 1257 return fmt.Errorf("proto: wrong wireType = %d for field FromProxy", wireType) 1258 } 1259 var v int 1260 for shift := uint(0); ; shift += 7 { 1261 if shift >= 64 { 1262 return ErrIntOverflowStatus 1263 } 1264 if iNdEx >= l { 1265 return io.ErrUnexpectedEOF 1266 } 1267 b := dAtA[iNdEx] 1268 iNdEx++ 1269 v |= int(b&0x7F) << shift 1270 if b < 0x80 { 1271 break 1272 } 1273 } 1274 m.FromProxy = bool(v != 0) 1275 case 20: 1276 if wireType != 2 { 1277 return fmt.Errorf("proto: wrong wireType = %d for field ProxyHost", wireType) 1278 } 1279 var stringLen uint64 1280 for shift := uint(0); ; shift += 7 { 1281 if shift >= 64 { 1282 return ErrIntOverflowStatus 1283 } 1284 if iNdEx >= l { 1285 return io.ErrUnexpectedEOF 1286 } 1287 b := dAtA[iNdEx] 1288 iNdEx++ 1289 stringLen |= uint64(b&0x7F) << shift 1290 if b < 0x80 { 1291 break 1292 } 1293 } 1294 intStringLen := int(stringLen) 1295 if intStringLen < 0 { 1296 return ErrInvalidLengthStatus 1297 } 1298 postIndex := iNdEx + intStringLen 1299 if postIndex < 0 { 1300 return ErrInvalidLengthStatus 1301 } 1302 if postIndex > l { 1303 return io.ErrUnexpectedEOF 1304 } 1305 m.ProxyHost = string(dAtA[iNdEx:postIndex]) 1306 iNdEx = postIndex 1307 default: 1308 iNdEx = preIndex 1309 skippy, err := skipStatus(dAtA[iNdEx:]) 1310 if err != nil { 1311 return err 1312 } 1313 if (skippy < 0) || (iNdEx+skippy) < 0 { 1314 return ErrInvalidLengthStatus 1315 } 1316 if (iNdEx + skippy) > l { 1317 return io.ErrUnexpectedEOF 1318 } 1319 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1320 iNdEx += skippy 1321 } 1322 } 1323 1324 if iNdEx > l { 1325 return io.ErrUnexpectedEOF 1326 } 1327 return nil 1328 } 1329 func skipStatus(dAtA []byte) (n int, err error) { 1330 l := len(dAtA) 1331 iNdEx := 0 1332 depth := 0 1333 for iNdEx < l { 1334 var wire uint64 1335 for shift := uint(0); ; shift += 7 { 1336 if shift >= 64 { 1337 return 0, ErrIntOverflowStatus 1338 } 1339 if iNdEx >= l { 1340 return 0, io.ErrUnexpectedEOF 1341 } 1342 b := dAtA[iNdEx] 1343 iNdEx++ 1344 wire |= (uint64(b) & 0x7F) << shift 1345 if b < 0x80 { 1346 break 1347 } 1348 } 1349 wireType := int(wire & 0x7) 1350 switch wireType { 1351 case 0: 1352 for shift := uint(0); ; shift += 7 { 1353 if shift >= 64 { 1354 return 0, ErrIntOverflowStatus 1355 } 1356 if iNdEx >= l { 1357 return 0, io.ErrUnexpectedEOF 1358 } 1359 iNdEx++ 1360 if dAtA[iNdEx-1] < 0x80 { 1361 break 1362 } 1363 } 1364 case 1: 1365 iNdEx += 8 1366 case 2: 1367 var length int 1368 for shift := uint(0); ; shift += 7 { 1369 if shift >= 64 { 1370 return 0, ErrIntOverflowStatus 1371 } 1372 if iNdEx >= l { 1373 return 0, io.ErrUnexpectedEOF 1374 } 1375 b := dAtA[iNdEx] 1376 iNdEx++ 1377 length |= (int(b) & 0x7F) << shift 1378 if b < 0x80 { 1379 break 1380 } 1381 } 1382 if length < 0 { 1383 return 0, ErrInvalidLengthStatus 1384 } 1385 iNdEx += length 1386 case 3: 1387 depth++ 1388 case 4: 1389 if depth == 0 { 1390 return 0, ErrUnexpectedEndOfGroupStatus 1391 } 1392 depth-- 1393 case 5: 1394 iNdEx += 4 1395 default: 1396 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1397 } 1398 if iNdEx < 0 { 1399 return 0, ErrInvalidLengthStatus 1400 } 1401 if depth == 0 { 1402 return iNdEx, nil 1403 } 1404 } 1405 return 0, io.ErrUnexpectedEOF 1406 } 1407 1408 var ( 1409 ErrInvalidLengthStatus = fmt.Errorf("proto: negative length found during unmarshaling") 1410 ErrIntOverflowStatus = fmt.Errorf("proto: integer overflow") 1411 ErrUnexpectedEndOfGroupStatus = fmt.Errorf("proto: unexpected end of group") 1412 )