github.com/argoproj/argo-cd/v2@v2.10.9/pkg/apiclient/account/account.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: server/account/account.proto 3 4 package account 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/gogo/protobuf/proto" 10 _ "google.golang.org/genproto/googleapis/api/annotations" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 io "io" 15 math "math" 16 math_bits "math/bits" 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 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 type UpdatePasswordRequest struct { 31 NewPassword string `protobuf:"bytes,1,opt,name=newPassword,proto3" json:"newPassword,omitempty"` 32 CurrentPassword string `protobuf:"bytes,2,opt,name=currentPassword,proto3" json:"currentPassword,omitempty"` 33 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` 34 XXX_NoUnkeyedLiteral struct{} `json:"-"` 35 XXX_unrecognized []byte `json:"-"` 36 XXX_sizecache int32 `json:"-"` 37 } 38 39 func (m *UpdatePasswordRequest) Reset() { *m = UpdatePasswordRequest{} } 40 func (m *UpdatePasswordRequest) String() string { return proto.CompactTextString(m) } 41 func (*UpdatePasswordRequest) ProtoMessage() {} 42 func (*UpdatePasswordRequest) Descriptor() ([]byte, []int) { 43 return fileDescriptor_56d089a9b5e998c0, []int{0} 44 } 45 func (m *UpdatePasswordRequest) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *UpdatePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_UpdatePasswordRequest.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59 } 60 func (m *UpdatePasswordRequest) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_UpdatePasswordRequest.Merge(m, src) 62 } 63 func (m *UpdatePasswordRequest) XXX_Size() int { 64 return m.Size() 65 } 66 func (m *UpdatePasswordRequest) XXX_DiscardUnknown() { 67 xxx_messageInfo_UpdatePasswordRequest.DiscardUnknown(m) 68 } 69 70 var xxx_messageInfo_UpdatePasswordRequest proto.InternalMessageInfo 71 72 func (m *UpdatePasswordRequest) GetNewPassword() string { 73 if m != nil { 74 return m.NewPassword 75 } 76 return "" 77 } 78 79 func (m *UpdatePasswordRequest) GetCurrentPassword() string { 80 if m != nil { 81 return m.CurrentPassword 82 } 83 return "" 84 } 85 86 func (m *UpdatePasswordRequest) GetName() string { 87 if m != nil { 88 return m.Name 89 } 90 return "" 91 } 92 93 type UpdatePasswordResponse struct { 94 XXX_NoUnkeyedLiteral struct{} `json:"-"` 95 XXX_unrecognized []byte `json:"-"` 96 XXX_sizecache int32 `json:"-"` 97 } 98 99 func (m *UpdatePasswordResponse) Reset() { *m = UpdatePasswordResponse{} } 100 func (m *UpdatePasswordResponse) String() string { return proto.CompactTextString(m) } 101 func (*UpdatePasswordResponse) ProtoMessage() {} 102 func (*UpdatePasswordResponse) Descriptor() ([]byte, []int) { 103 return fileDescriptor_56d089a9b5e998c0, []int{1} 104 } 105 func (m *UpdatePasswordResponse) XXX_Unmarshal(b []byte) error { 106 return m.Unmarshal(b) 107 } 108 func (m *UpdatePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 109 if deterministic { 110 return xxx_messageInfo_UpdatePasswordResponse.Marshal(b, m, deterministic) 111 } else { 112 b = b[:cap(b)] 113 n, err := m.MarshalToSizedBuffer(b) 114 if err != nil { 115 return nil, err 116 } 117 return b[:n], nil 118 } 119 } 120 func (m *UpdatePasswordResponse) XXX_Merge(src proto.Message) { 121 xxx_messageInfo_UpdatePasswordResponse.Merge(m, src) 122 } 123 func (m *UpdatePasswordResponse) XXX_Size() int { 124 return m.Size() 125 } 126 func (m *UpdatePasswordResponse) XXX_DiscardUnknown() { 127 xxx_messageInfo_UpdatePasswordResponse.DiscardUnknown(m) 128 } 129 130 var xxx_messageInfo_UpdatePasswordResponse proto.InternalMessageInfo 131 132 type CanIRequest struct { 133 Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` 134 Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` 135 Subresource string `protobuf:"bytes,3,opt,name=subresource,proto3" json:"subresource,omitempty"` 136 XXX_NoUnkeyedLiteral struct{} `json:"-"` 137 XXX_unrecognized []byte `json:"-"` 138 XXX_sizecache int32 `json:"-"` 139 } 140 141 func (m *CanIRequest) Reset() { *m = CanIRequest{} } 142 func (m *CanIRequest) String() string { return proto.CompactTextString(m) } 143 func (*CanIRequest) ProtoMessage() {} 144 func (*CanIRequest) Descriptor() ([]byte, []int) { 145 return fileDescriptor_56d089a9b5e998c0, []int{2} 146 } 147 func (m *CanIRequest) XXX_Unmarshal(b []byte) error { 148 return m.Unmarshal(b) 149 } 150 func (m *CanIRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 151 if deterministic { 152 return xxx_messageInfo_CanIRequest.Marshal(b, m, deterministic) 153 } else { 154 b = b[:cap(b)] 155 n, err := m.MarshalToSizedBuffer(b) 156 if err != nil { 157 return nil, err 158 } 159 return b[:n], nil 160 } 161 } 162 func (m *CanIRequest) XXX_Merge(src proto.Message) { 163 xxx_messageInfo_CanIRequest.Merge(m, src) 164 } 165 func (m *CanIRequest) XXX_Size() int { 166 return m.Size() 167 } 168 func (m *CanIRequest) XXX_DiscardUnknown() { 169 xxx_messageInfo_CanIRequest.DiscardUnknown(m) 170 } 171 172 var xxx_messageInfo_CanIRequest proto.InternalMessageInfo 173 174 func (m *CanIRequest) GetResource() string { 175 if m != nil { 176 return m.Resource 177 } 178 return "" 179 } 180 181 func (m *CanIRequest) GetAction() string { 182 if m != nil { 183 return m.Action 184 } 185 return "" 186 } 187 188 func (m *CanIRequest) GetSubresource() string { 189 if m != nil { 190 return m.Subresource 191 } 192 return "" 193 } 194 195 type CanIResponse struct { 196 Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` 197 XXX_NoUnkeyedLiteral struct{} `json:"-"` 198 XXX_unrecognized []byte `json:"-"` 199 XXX_sizecache int32 `json:"-"` 200 } 201 202 func (m *CanIResponse) Reset() { *m = CanIResponse{} } 203 func (m *CanIResponse) String() string { return proto.CompactTextString(m) } 204 func (*CanIResponse) ProtoMessage() {} 205 func (*CanIResponse) Descriptor() ([]byte, []int) { 206 return fileDescriptor_56d089a9b5e998c0, []int{3} 207 } 208 func (m *CanIResponse) XXX_Unmarshal(b []byte) error { 209 return m.Unmarshal(b) 210 } 211 func (m *CanIResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 212 if deterministic { 213 return xxx_messageInfo_CanIResponse.Marshal(b, m, deterministic) 214 } else { 215 b = b[:cap(b)] 216 n, err := m.MarshalToSizedBuffer(b) 217 if err != nil { 218 return nil, err 219 } 220 return b[:n], nil 221 } 222 } 223 func (m *CanIResponse) XXX_Merge(src proto.Message) { 224 xxx_messageInfo_CanIResponse.Merge(m, src) 225 } 226 func (m *CanIResponse) XXX_Size() int { 227 return m.Size() 228 } 229 func (m *CanIResponse) XXX_DiscardUnknown() { 230 xxx_messageInfo_CanIResponse.DiscardUnknown(m) 231 } 232 233 var xxx_messageInfo_CanIResponse proto.InternalMessageInfo 234 235 func (m *CanIResponse) GetValue() string { 236 if m != nil { 237 return m.Value 238 } 239 return "" 240 } 241 242 type GetAccountRequest struct { 243 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 244 XXX_NoUnkeyedLiteral struct{} `json:"-"` 245 XXX_unrecognized []byte `json:"-"` 246 XXX_sizecache int32 `json:"-"` 247 } 248 249 func (m *GetAccountRequest) Reset() { *m = GetAccountRequest{} } 250 func (m *GetAccountRequest) String() string { return proto.CompactTextString(m) } 251 func (*GetAccountRequest) ProtoMessage() {} 252 func (*GetAccountRequest) Descriptor() ([]byte, []int) { 253 return fileDescriptor_56d089a9b5e998c0, []int{4} 254 } 255 func (m *GetAccountRequest) XXX_Unmarshal(b []byte) error { 256 return m.Unmarshal(b) 257 } 258 func (m *GetAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 259 if deterministic { 260 return xxx_messageInfo_GetAccountRequest.Marshal(b, m, deterministic) 261 } else { 262 b = b[:cap(b)] 263 n, err := m.MarshalToSizedBuffer(b) 264 if err != nil { 265 return nil, err 266 } 267 return b[:n], nil 268 } 269 } 270 func (m *GetAccountRequest) XXX_Merge(src proto.Message) { 271 xxx_messageInfo_GetAccountRequest.Merge(m, src) 272 } 273 func (m *GetAccountRequest) XXX_Size() int { 274 return m.Size() 275 } 276 func (m *GetAccountRequest) XXX_DiscardUnknown() { 277 xxx_messageInfo_GetAccountRequest.DiscardUnknown(m) 278 } 279 280 var xxx_messageInfo_GetAccountRequest proto.InternalMessageInfo 281 282 func (m *GetAccountRequest) GetName() string { 283 if m != nil { 284 return m.Name 285 } 286 return "" 287 } 288 289 type Account struct { 290 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 291 Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` 292 Capabilities []string `protobuf:"bytes,3,rep,name=capabilities,proto3" json:"capabilities,omitempty"` 293 Tokens []*Token `protobuf:"bytes,4,rep,name=tokens,proto3" json:"tokens,omitempty"` 294 XXX_NoUnkeyedLiteral struct{} `json:"-"` 295 XXX_unrecognized []byte `json:"-"` 296 XXX_sizecache int32 `json:"-"` 297 } 298 299 func (m *Account) Reset() { *m = Account{} } 300 func (m *Account) String() string { return proto.CompactTextString(m) } 301 func (*Account) ProtoMessage() {} 302 func (*Account) Descriptor() ([]byte, []int) { 303 return fileDescriptor_56d089a9b5e998c0, []int{5} 304 } 305 func (m *Account) XXX_Unmarshal(b []byte) error { 306 return m.Unmarshal(b) 307 } 308 func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 309 if deterministic { 310 return xxx_messageInfo_Account.Marshal(b, m, deterministic) 311 } else { 312 b = b[:cap(b)] 313 n, err := m.MarshalToSizedBuffer(b) 314 if err != nil { 315 return nil, err 316 } 317 return b[:n], nil 318 } 319 } 320 func (m *Account) XXX_Merge(src proto.Message) { 321 xxx_messageInfo_Account.Merge(m, src) 322 } 323 func (m *Account) XXX_Size() int { 324 return m.Size() 325 } 326 func (m *Account) XXX_DiscardUnknown() { 327 xxx_messageInfo_Account.DiscardUnknown(m) 328 } 329 330 var xxx_messageInfo_Account proto.InternalMessageInfo 331 332 func (m *Account) GetName() string { 333 if m != nil { 334 return m.Name 335 } 336 return "" 337 } 338 339 func (m *Account) GetEnabled() bool { 340 if m != nil { 341 return m.Enabled 342 } 343 return false 344 } 345 346 func (m *Account) GetCapabilities() []string { 347 if m != nil { 348 return m.Capabilities 349 } 350 return nil 351 } 352 353 func (m *Account) GetTokens() []*Token { 354 if m != nil { 355 return m.Tokens 356 } 357 return nil 358 } 359 360 type AccountsList struct { 361 Items []*Account `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` 362 XXX_NoUnkeyedLiteral struct{} `json:"-"` 363 XXX_unrecognized []byte `json:"-"` 364 XXX_sizecache int32 `json:"-"` 365 } 366 367 func (m *AccountsList) Reset() { *m = AccountsList{} } 368 func (m *AccountsList) String() string { return proto.CompactTextString(m) } 369 func (*AccountsList) ProtoMessage() {} 370 func (*AccountsList) Descriptor() ([]byte, []int) { 371 return fileDescriptor_56d089a9b5e998c0, []int{6} 372 } 373 func (m *AccountsList) XXX_Unmarshal(b []byte) error { 374 return m.Unmarshal(b) 375 } 376 func (m *AccountsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 377 if deterministic { 378 return xxx_messageInfo_AccountsList.Marshal(b, m, deterministic) 379 } else { 380 b = b[:cap(b)] 381 n, err := m.MarshalToSizedBuffer(b) 382 if err != nil { 383 return nil, err 384 } 385 return b[:n], nil 386 } 387 } 388 func (m *AccountsList) XXX_Merge(src proto.Message) { 389 xxx_messageInfo_AccountsList.Merge(m, src) 390 } 391 func (m *AccountsList) XXX_Size() int { 392 return m.Size() 393 } 394 func (m *AccountsList) XXX_DiscardUnknown() { 395 xxx_messageInfo_AccountsList.DiscardUnknown(m) 396 } 397 398 var xxx_messageInfo_AccountsList proto.InternalMessageInfo 399 400 func (m *AccountsList) GetItems() []*Account { 401 if m != nil { 402 return m.Items 403 } 404 return nil 405 } 406 407 type Token struct { 408 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 409 IssuedAt int64 `protobuf:"varint,2,opt,name=issuedAt,proto3" json:"issuedAt,omitempty"` 410 ExpiresAt int64 `protobuf:"varint,3,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` 411 XXX_NoUnkeyedLiteral struct{} `json:"-"` 412 XXX_unrecognized []byte `json:"-"` 413 XXX_sizecache int32 `json:"-"` 414 } 415 416 func (m *Token) Reset() { *m = Token{} } 417 func (m *Token) String() string { return proto.CompactTextString(m) } 418 func (*Token) ProtoMessage() {} 419 func (*Token) Descriptor() ([]byte, []int) { 420 return fileDescriptor_56d089a9b5e998c0, []int{7} 421 } 422 func (m *Token) XXX_Unmarshal(b []byte) error { 423 return m.Unmarshal(b) 424 } 425 func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 426 if deterministic { 427 return xxx_messageInfo_Token.Marshal(b, m, deterministic) 428 } else { 429 b = b[:cap(b)] 430 n, err := m.MarshalToSizedBuffer(b) 431 if err != nil { 432 return nil, err 433 } 434 return b[:n], nil 435 } 436 } 437 func (m *Token) XXX_Merge(src proto.Message) { 438 xxx_messageInfo_Token.Merge(m, src) 439 } 440 func (m *Token) XXX_Size() int { 441 return m.Size() 442 } 443 func (m *Token) XXX_DiscardUnknown() { 444 xxx_messageInfo_Token.DiscardUnknown(m) 445 } 446 447 var xxx_messageInfo_Token proto.InternalMessageInfo 448 449 func (m *Token) GetId() string { 450 if m != nil { 451 return m.Id 452 } 453 return "" 454 } 455 456 func (m *Token) GetIssuedAt() int64 { 457 if m != nil { 458 return m.IssuedAt 459 } 460 return 0 461 } 462 463 func (m *Token) GetExpiresAt() int64 { 464 if m != nil { 465 return m.ExpiresAt 466 } 467 return 0 468 } 469 470 type TokensList struct { 471 Items []*Token `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` 472 XXX_NoUnkeyedLiteral struct{} `json:"-"` 473 XXX_unrecognized []byte `json:"-"` 474 XXX_sizecache int32 `json:"-"` 475 } 476 477 func (m *TokensList) Reset() { *m = TokensList{} } 478 func (m *TokensList) String() string { return proto.CompactTextString(m) } 479 func (*TokensList) ProtoMessage() {} 480 func (*TokensList) Descriptor() ([]byte, []int) { 481 return fileDescriptor_56d089a9b5e998c0, []int{8} 482 } 483 func (m *TokensList) XXX_Unmarshal(b []byte) error { 484 return m.Unmarshal(b) 485 } 486 func (m *TokensList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 487 if deterministic { 488 return xxx_messageInfo_TokensList.Marshal(b, m, deterministic) 489 } else { 490 b = b[:cap(b)] 491 n, err := m.MarshalToSizedBuffer(b) 492 if err != nil { 493 return nil, err 494 } 495 return b[:n], nil 496 } 497 } 498 func (m *TokensList) XXX_Merge(src proto.Message) { 499 xxx_messageInfo_TokensList.Merge(m, src) 500 } 501 func (m *TokensList) XXX_Size() int { 502 return m.Size() 503 } 504 func (m *TokensList) XXX_DiscardUnknown() { 505 xxx_messageInfo_TokensList.DiscardUnknown(m) 506 } 507 508 var xxx_messageInfo_TokensList proto.InternalMessageInfo 509 510 func (m *TokensList) GetItems() []*Token { 511 if m != nil { 512 return m.Items 513 } 514 return nil 515 } 516 517 type CreateTokenRequest struct { 518 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 519 // expiresIn represents a duration in seconds 520 ExpiresIn int64 `protobuf:"varint,2,opt,name=expiresIn,proto3" json:"expiresIn,omitempty"` 521 Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` 522 XXX_NoUnkeyedLiteral struct{} `json:"-"` 523 XXX_unrecognized []byte `json:"-"` 524 XXX_sizecache int32 `json:"-"` 525 } 526 527 func (m *CreateTokenRequest) Reset() { *m = CreateTokenRequest{} } 528 func (m *CreateTokenRequest) String() string { return proto.CompactTextString(m) } 529 func (*CreateTokenRequest) ProtoMessage() {} 530 func (*CreateTokenRequest) Descriptor() ([]byte, []int) { 531 return fileDescriptor_56d089a9b5e998c0, []int{9} 532 } 533 func (m *CreateTokenRequest) XXX_Unmarshal(b []byte) error { 534 return m.Unmarshal(b) 535 } 536 func (m *CreateTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 537 if deterministic { 538 return xxx_messageInfo_CreateTokenRequest.Marshal(b, m, deterministic) 539 } else { 540 b = b[:cap(b)] 541 n, err := m.MarshalToSizedBuffer(b) 542 if err != nil { 543 return nil, err 544 } 545 return b[:n], nil 546 } 547 } 548 func (m *CreateTokenRequest) XXX_Merge(src proto.Message) { 549 xxx_messageInfo_CreateTokenRequest.Merge(m, src) 550 } 551 func (m *CreateTokenRequest) XXX_Size() int { 552 return m.Size() 553 } 554 func (m *CreateTokenRequest) XXX_DiscardUnknown() { 555 xxx_messageInfo_CreateTokenRequest.DiscardUnknown(m) 556 } 557 558 var xxx_messageInfo_CreateTokenRequest proto.InternalMessageInfo 559 560 func (m *CreateTokenRequest) GetName() string { 561 if m != nil { 562 return m.Name 563 } 564 return "" 565 } 566 567 func (m *CreateTokenRequest) GetExpiresIn() int64 { 568 if m != nil { 569 return m.ExpiresIn 570 } 571 return 0 572 } 573 574 func (m *CreateTokenRequest) GetId() string { 575 if m != nil { 576 return m.Id 577 } 578 return "" 579 } 580 581 type CreateTokenResponse struct { 582 Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` 583 XXX_NoUnkeyedLiteral struct{} `json:"-"` 584 XXX_unrecognized []byte `json:"-"` 585 XXX_sizecache int32 `json:"-"` 586 } 587 588 func (m *CreateTokenResponse) Reset() { *m = CreateTokenResponse{} } 589 func (m *CreateTokenResponse) String() string { return proto.CompactTextString(m) } 590 func (*CreateTokenResponse) ProtoMessage() {} 591 func (*CreateTokenResponse) Descriptor() ([]byte, []int) { 592 return fileDescriptor_56d089a9b5e998c0, []int{10} 593 } 594 func (m *CreateTokenResponse) XXX_Unmarshal(b []byte) error { 595 return m.Unmarshal(b) 596 } 597 func (m *CreateTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 598 if deterministic { 599 return xxx_messageInfo_CreateTokenResponse.Marshal(b, m, deterministic) 600 } else { 601 b = b[:cap(b)] 602 n, err := m.MarshalToSizedBuffer(b) 603 if err != nil { 604 return nil, err 605 } 606 return b[:n], nil 607 } 608 } 609 func (m *CreateTokenResponse) XXX_Merge(src proto.Message) { 610 xxx_messageInfo_CreateTokenResponse.Merge(m, src) 611 } 612 func (m *CreateTokenResponse) XXX_Size() int { 613 return m.Size() 614 } 615 func (m *CreateTokenResponse) XXX_DiscardUnknown() { 616 xxx_messageInfo_CreateTokenResponse.DiscardUnknown(m) 617 } 618 619 var xxx_messageInfo_CreateTokenResponse proto.InternalMessageInfo 620 621 func (m *CreateTokenResponse) GetToken() string { 622 if m != nil { 623 return m.Token 624 } 625 return "" 626 } 627 628 type DeleteTokenRequest struct { 629 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 630 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` 631 XXX_NoUnkeyedLiteral struct{} `json:"-"` 632 XXX_unrecognized []byte `json:"-"` 633 XXX_sizecache int32 `json:"-"` 634 } 635 636 func (m *DeleteTokenRequest) Reset() { *m = DeleteTokenRequest{} } 637 func (m *DeleteTokenRequest) String() string { return proto.CompactTextString(m) } 638 func (*DeleteTokenRequest) ProtoMessage() {} 639 func (*DeleteTokenRequest) Descriptor() ([]byte, []int) { 640 return fileDescriptor_56d089a9b5e998c0, []int{11} 641 } 642 func (m *DeleteTokenRequest) XXX_Unmarshal(b []byte) error { 643 return m.Unmarshal(b) 644 } 645 func (m *DeleteTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 646 if deterministic { 647 return xxx_messageInfo_DeleteTokenRequest.Marshal(b, m, deterministic) 648 } else { 649 b = b[:cap(b)] 650 n, err := m.MarshalToSizedBuffer(b) 651 if err != nil { 652 return nil, err 653 } 654 return b[:n], nil 655 } 656 } 657 func (m *DeleteTokenRequest) XXX_Merge(src proto.Message) { 658 xxx_messageInfo_DeleteTokenRequest.Merge(m, src) 659 } 660 func (m *DeleteTokenRequest) XXX_Size() int { 661 return m.Size() 662 } 663 func (m *DeleteTokenRequest) XXX_DiscardUnknown() { 664 xxx_messageInfo_DeleteTokenRequest.DiscardUnknown(m) 665 } 666 667 var xxx_messageInfo_DeleteTokenRequest proto.InternalMessageInfo 668 669 func (m *DeleteTokenRequest) GetName() string { 670 if m != nil { 671 return m.Name 672 } 673 return "" 674 } 675 676 func (m *DeleteTokenRequest) GetId() string { 677 if m != nil { 678 return m.Id 679 } 680 return "" 681 } 682 683 type ListAccountRequest struct { 684 XXX_NoUnkeyedLiteral struct{} `json:"-"` 685 XXX_unrecognized []byte `json:"-"` 686 XXX_sizecache int32 `json:"-"` 687 } 688 689 func (m *ListAccountRequest) Reset() { *m = ListAccountRequest{} } 690 func (m *ListAccountRequest) String() string { return proto.CompactTextString(m) } 691 func (*ListAccountRequest) ProtoMessage() {} 692 func (*ListAccountRequest) Descriptor() ([]byte, []int) { 693 return fileDescriptor_56d089a9b5e998c0, []int{12} 694 } 695 func (m *ListAccountRequest) XXX_Unmarshal(b []byte) error { 696 return m.Unmarshal(b) 697 } 698 func (m *ListAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 699 if deterministic { 700 return xxx_messageInfo_ListAccountRequest.Marshal(b, m, deterministic) 701 } else { 702 b = b[:cap(b)] 703 n, err := m.MarshalToSizedBuffer(b) 704 if err != nil { 705 return nil, err 706 } 707 return b[:n], nil 708 } 709 } 710 func (m *ListAccountRequest) XXX_Merge(src proto.Message) { 711 xxx_messageInfo_ListAccountRequest.Merge(m, src) 712 } 713 func (m *ListAccountRequest) XXX_Size() int { 714 return m.Size() 715 } 716 func (m *ListAccountRequest) XXX_DiscardUnknown() { 717 xxx_messageInfo_ListAccountRequest.DiscardUnknown(m) 718 } 719 720 var xxx_messageInfo_ListAccountRequest proto.InternalMessageInfo 721 722 type EmptyResponse struct { 723 XXX_NoUnkeyedLiteral struct{} `json:"-"` 724 XXX_unrecognized []byte `json:"-"` 725 XXX_sizecache int32 `json:"-"` 726 } 727 728 func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } 729 func (m *EmptyResponse) String() string { return proto.CompactTextString(m) } 730 func (*EmptyResponse) ProtoMessage() {} 731 func (*EmptyResponse) Descriptor() ([]byte, []int) { 732 return fileDescriptor_56d089a9b5e998c0, []int{13} 733 } 734 func (m *EmptyResponse) XXX_Unmarshal(b []byte) error { 735 return m.Unmarshal(b) 736 } 737 func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 738 if deterministic { 739 return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic) 740 } else { 741 b = b[:cap(b)] 742 n, err := m.MarshalToSizedBuffer(b) 743 if err != nil { 744 return nil, err 745 } 746 return b[:n], nil 747 } 748 } 749 func (m *EmptyResponse) XXX_Merge(src proto.Message) { 750 xxx_messageInfo_EmptyResponse.Merge(m, src) 751 } 752 func (m *EmptyResponse) XXX_Size() int { 753 return m.Size() 754 } 755 func (m *EmptyResponse) XXX_DiscardUnknown() { 756 xxx_messageInfo_EmptyResponse.DiscardUnknown(m) 757 } 758 759 var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo 760 761 func init() { 762 proto.RegisterType((*UpdatePasswordRequest)(nil), "account.UpdatePasswordRequest") 763 proto.RegisterType((*UpdatePasswordResponse)(nil), "account.UpdatePasswordResponse") 764 proto.RegisterType((*CanIRequest)(nil), "account.CanIRequest") 765 proto.RegisterType((*CanIResponse)(nil), "account.CanIResponse") 766 proto.RegisterType((*GetAccountRequest)(nil), "account.GetAccountRequest") 767 proto.RegisterType((*Account)(nil), "account.Account") 768 proto.RegisterType((*AccountsList)(nil), "account.AccountsList") 769 proto.RegisterType((*Token)(nil), "account.Token") 770 proto.RegisterType((*TokensList)(nil), "account.TokensList") 771 proto.RegisterType((*CreateTokenRequest)(nil), "account.CreateTokenRequest") 772 proto.RegisterType((*CreateTokenResponse)(nil), "account.CreateTokenResponse") 773 proto.RegisterType((*DeleteTokenRequest)(nil), "account.DeleteTokenRequest") 774 proto.RegisterType((*ListAccountRequest)(nil), "account.ListAccountRequest") 775 proto.RegisterType((*EmptyResponse)(nil), "account.EmptyResponse") 776 } 777 778 func init() { proto.RegisterFile("server/account/account.proto", fileDescriptor_56d089a9b5e998c0) } 779 780 var fileDescriptor_56d089a9b5e998c0 = []byte{ 781 // 738 bytes of a gzipped FileDescriptorProto 782 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, 783 0x14, 0x96, 0x93, 0xa6, 0x3f, 0x27, 0xb9, 0xe9, 0xed, 0xdc, 0x36, 0xd7, 0xf2, 0xcd, 0x0d, 0xe9, 784 0xb4, 0x6a, 0x43, 0x50, 0x6b, 0x11, 0x10, 0x42, 0x15, 0x2c, 0xda, 0x82, 0x50, 0x25, 0x16, 0x10, 785 0x7e, 0x16, 0x65, 0x35, 0x71, 0x46, 0x61, 0x68, 0x62, 0xbb, 0x9e, 0x71, 0x02, 0x8a, 0xb2, 0x81, 786 0x47, 0x60, 0xcb, 0x03, 0xb1, 0x44, 0xe2, 0x05, 0x50, 0xc5, 0x83, 0x20, 0x8f, 0x67, 0x1c, 0xc7, 787 0x49, 0x11, 0x2b, 0xfb, 0xfc, 0xcc, 0xf9, 0xbe, 0xf3, 0xcd, 0x39, 0x36, 0x54, 0x39, 0x0d, 0x86, 788 0x34, 0xb0, 0x89, 0xe3, 0x78, 0xa1, 0x2b, 0xf4, 0xf3, 0xd0, 0x0f, 0x3c, 0xe1, 0xa1, 0x15, 0x65, 789 0x5a, 0xd5, 0x9e, 0xe7, 0xf5, 0xfa, 0xd4, 0x26, 0x3e, 0xb3, 0x89, 0xeb, 0x7a, 0x82, 0x08, 0xe6, 790 0xb9, 0x3c, 0x4e, 0xc3, 0x23, 0xd8, 0x7a, 0xe5, 0x77, 0x89, 0xa0, 0xcf, 0x08, 0xe7, 0x23, 0x2f, 791 0xe8, 0xb6, 0xe9, 0x65, 0x48, 0xb9, 0x40, 0x75, 0x28, 0xba, 0x74, 0xa4, 0xbd, 0xa6, 0x51, 0x37, 792 0x1a, 0x6b, 0xed, 0xb4, 0x0b, 0x35, 0x60, 0xdd, 0x09, 0x83, 0x80, 0xba, 0x22, 0xc9, 0xca, 0xc9, 793 0xac, 0xac, 0x1b, 0x21, 0x58, 0x72, 0xc9, 0x80, 0x9a, 0x79, 0x19, 0x96, 0xef, 0xd8, 0x84, 0x4a, 794 0x16, 0x98, 0xfb, 0x9e, 0xcb, 0x29, 0x76, 0xa0, 0x78, 0x4a, 0xdc, 0x33, 0x4d, 0xc4, 0x82, 0xd5, 795 0x80, 0x72, 0x2f, 0x0c, 0x1c, 0xaa, 0x58, 0x24, 0x36, 0xaa, 0xc0, 0x32, 0x71, 0xa2, 0x76, 0x14, 796 0xb2, 0xb2, 0x22, 0xf2, 0x3c, 0xec, 0x24, 0xc7, 0x62, 0xdc, 0xb4, 0x0b, 0xef, 0x42, 0x29, 0x06, 797 0x89, 0x41, 0xd1, 0x26, 0x14, 0x86, 0xa4, 0x1f, 0x6a, 0x88, 0xd8, 0xc0, 0xfb, 0xb0, 0xf1, 0x84, 798 0x8a, 0xe3, 0x58, 0x49, 0x4d, 0x48, 0x77, 0x63, 0xa4, 0xba, 0xf9, 0x64, 0xc0, 0x8a, 0x4a, 0x5b, 799 0x14, 0x47, 0x26, 0xac, 0x50, 0x97, 0x74, 0xfa, 0x34, 0xd6, 0x68, 0xb5, 0xad, 0x4d, 0x84, 0xa1, 800 0xe4, 0x10, 0x9f, 0x74, 0x58, 0x9f, 0x09, 0x46, 0xb9, 0x99, 0xaf, 0xe7, 0x1b, 0x6b, 0xed, 0x19, 801 0x1f, 0xda, 0x83, 0x65, 0xe1, 0x5d, 0x50, 0x97, 0x9b, 0x4b, 0xf5, 0x7c, 0xa3, 0xd8, 0x2a, 0x1f, 802 0xea, 0xbb, 0x7e, 0x19, 0xb9, 0xdb, 0x2a, 0x8a, 0xef, 0x41, 0x49, 0x91, 0xe0, 0x4f, 0x19, 0x17, 803 0x68, 0x0f, 0x0a, 0x4c, 0xd0, 0x01, 0x37, 0x0d, 0x79, 0xec, 0xef, 0xe4, 0x98, 0xee, 0x28, 0x0e, 804 0xe3, 0xe7, 0x50, 0x90, 0x85, 0x50, 0x19, 0x72, 0x4c, 0xdf, 0x75, 0x8e, 0x75, 0x23, 0xed, 0x19, 805 0xe7, 0x21, 0xed, 0x1e, 0x0b, 0xc9, 0x3b, 0xdf, 0x4e, 0x6c, 0x54, 0x85, 0x35, 0xfa, 0xde, 0x67, 806 0x01, 0xe5, 0xc7, 0x42, 0x2a, 0x9c, 0x6f, 0x4f, 0x1d, 0xb8, 0x05, 0x20, 0x4b, 0xc6, 0x44, 0x76, 807 0x67, 0x89, 0x64, 0xf9, 0x2b, 0x1a, 0xaf, 0x01, 0x9d, 0x06, 0x94, 0x08, 0x1a, 0x7b, 0xaf, 0x97, 808 0x3b, 0x85, 0x7d, 0xe6, 0x2a, 0x62, 0x53, 0x87, 0xea, 0x22, 0xaf, 0xbb, 0xc0, 0xb7, 0xe0, 0x9f, 809 0x99, 0xba, 0xd3, 0x2b, 0x97, 0xba, 0xe9, 0x2b, 0x97, 0x06, 0xbe, 0x0f, 0xe8, 0x11, 0xed, 0xd3, 810 0x3f, 0x20, 0x11, 0xc3, 0xe4, 0x12, 0x98, 0x4d, 0x40, 0x51, 0xb3, 0xb3, 0xd3, 0x82, 0xd7, 0xe1, 811 0xaf, 0xc7, 0x03, 0x5f, 0x7c, 0xd0, 0xb0, 0xad, 0x2f, 0x05, 0x28, 0xab, 0x9c, 0x17, 0x34, 0x18, 812 0x32, 0x87, 0xa2, 0x11, 0x2c, 0x45, 0xc3, 0x88, 0x36, 0x13, 0x5d, 0x52, 0x0b, 0x60, 0x6d, 0x65, 813 0xbc, 0x6a, 0x4d, 0x4e, 0x3e, 0x7e, 0xff, 0xf9, 0x39, 0xf7, 0x00, 0x1d, 0xc9, 0xcd, 0x1e, 0xde, 814 0x4e, 0xbe, 0x03, 0x0e, 0x71, 0x0f, 0x98, 0x3d, 0xd6, 0xa3, 0x3e, 0xb1, 0xc7, 0xf1, 0x56, 0x4c, 815 0xec, 0x71, 0x6a, 0x03, 0x1e, 0x36, 0x9b, 0x13, 0x34, 0x84, 0xf2, 0xec, 0x12, 0xa2, 0x5a, 0x02, 816 0xb6, 0xf0, 0xb3, 0x60, 0xdd, 0xb8, 0x36, 0xae, 0x68, 0xed, 0x48, 0x5a, 0xff, 0x5b, 0x66, 0x96, 817 0x96, 0xaf, 0x32, 0x8f, 0x8c, 0x26, 0x7a, 0x03, 0xa5, 0x94, 0x54, 0x1c, 0xfd, 0x97, 0x54, 0x9d, 818 0x57, 0x30, 0xd5, 0x7f, 0x7a, 0xb8, 0xf1, 0xbf, 0x12, 0x68, 0x03, 0xad, 0x67, 0x80, 0xd0, 0x39, 819 0xc0, 0x74, 0x69, 0x91, 0x95, 0x9c, 0x9e, 0xdb, 0x64, 0x6b, 0x6e, 0x21, 0x70, 0x4d, 0x16, 0x35, 820 0x51, 0x25, 0xcb, 0x7e, 0x1c, 0x5d, 0xf9, 0x04, 0x5d, 0x42, 0x31, 0x35, 0x4a, 0x29, 0xde, 0xf3, 821 0x83, 0x6b, 0x55, 0x17, 0x07, 0x95, 0x4e, 0xfb, 0x12, 0x69, 0x1b, 0x57, 0x17, 0x23, 0xd9, 0x72, 822 0x1a, 0x23, 0xad, 0x06, 0x50, 0x4c, 0x0d, 0x64, 0x0a, 0x72, 0x7e, 0x4c, 0xad, 0x4a, 0x12, 0x9c, 823 0x99, 0x39, 0x7c, 0x53, 0x82, 0xed, 0x34, 0xb7, 0x7f, 0x07, 0x66, 0x8f, 0x59, 0x77, 0x72, 0x72, 824 0xf2, 0xf5, 0xaa, 0x66, 0x7c, 0xbb, 0xaa, 0x19, 0x3f, 0xae, 0x6a, 0xc6, 0xf9, 0xdd, 0x1e, 0x13, 825 0x6f, 0xc3, 0xce, 0xa1, 0xe3, 0x0d, 0x6c, 0x12, 0xf4, 0x3c, 0x3f, 0xf0, 0xde, 0xc9, 0x97, 0x03, 826 0xa7, 0x6b, 0x0f, 0x5b, 0xb6, 0x7f, 0xd1, 0x8b, 0x4a, 0x3a, 0x7d, 0x46, 0xa7, 0x7f, 0xa0, 0xce, 827 0xb2, 0xfc, 0xb7, 0xdc, 0xf9, 0x15, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x62, 0xcc, 0x3d, 0xa2, 0x06, 828 0x00, 0x00, 829 } 830 831 // Reference imports to suppress errors if they are not otherwise used. 832 var _ context.Context 833 var _ grpc.ClientConn 834 835 // This is a compile-time assertion to ensure that this generated file 836 // is compatible with the grpc package it is being compiled against. 837 const _ = grpc.SupportPackageIsVersion4 838 839 // AccountServiceClient is the client API for AccountService service. 840 // 841 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 842 type AccountServiceClient interface { 843 // CanI checks if the current account has permission to perform an action 844 CanI(ctx context.Context, in *CanIRequest, opts ...grpc.CallOption) (*CanIResponse, error) 845 // UpdatePassword updates an account's password to a new value 846 UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error) 847 // ListAccounts returns the list of accounts 848 ListAccounts(ctx context.Context, in *ListAccountRequest, opts ...grpc.CallOption) (*AccountsList, error) 849 // GetAccount returns an account 850 GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) 851 // CreateToken creates a token 852 CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) 853 // DeleteToken deletes a token 854 DeleteToken(ctx context.Context, in *DeleteTokenRequest, opts ...grpc.CallOption) (*EmptyResponse, error) 855 } 856 857 type accountServiceClient struct { 858 cc *grpc.ClientConn 859 } 860 861 func NewAccountServiceClient(cc *grpc.ClientConn) AccountServiceClient { 862 return &accountServiceClient{cc} 863 } 864 865 func (c *accountServiceClient) CanI(ctx context.Context, in *CanIRequest, opts ...grpc.CallOption) (*CanIResponse, error) { 866 out := new(CanIResponse) 867 err := c.cc.Invoke(ctx, "/account.AccountService/CanI", in, out, opts...) 868 if err != nil { 869 return nil, err 870 } 871 return out, nil 872 } 873 874 func (c *accountServiceClient) UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error) { 875 out := new(UpdatePasswordResponse) 876 err := c.cc.Invoke(ctx, "/account.AccountService/UpdatePassword", in, out, opts...) 877 if err != nil { 878 return nil, err 879 } 880 return out, nil 881 } 882 883 func (c *accountServiceClient) ListAccounts(ctx context.Context, in *ListAccountRequest, opts ...grpc.CallOption) (*AccountsList, error) { 884 out := new(AccountsList) 885 err := c.cc.Invoke(ctx, "/account.AccountService/ListAccounts", in, out, opts...) 886 if err != nil { 887 return nil, err 888 } 889 return out, nil 890 } 891 892 func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) { 893 out := new(Account) 894 err := c.cc.Invoke(ctx, "/account.AccountService/GetAccount", in, out, opts...) 895 if err != nil { 896 return nil, err 897 } 898 return out, nil 899 } 900 901 func (c *accountServiceClient) CreateToken(ctx context.Context, in *CreateTokenRequest, opts ...grpc.CallOption) (*CreateTokenResponse, error) { 902 out := new(CreateTokenResponse) 903 err := c.cc.Invoke(ctx, "/account.AccountService/CreateToken", in, out, opts...) 904 if err != nil { 905 return nil, err 906 } 907 return out, nil 908 } 909 910 func (c *accountServiceClient) DeleteToken(ctx context.Context, in *DeleteTokenRequest, opts ...grpc.CallOption) (*EmptyResponse, error) { 911 out := new(EmptyResponse) 912 err := c.cc.Invoke(ctx, "/account.AccountService/DeleteToken", in, out, opts...) 913 if err != nil { 914 return nil, err 915 } 916 return out, nil 917 } 918 919 // AccountServiceServer is the server API for AccountService service. 920 type AccountServiceServer interface { 921 // CanI checks if the current account has permission to perform an action 922 CanI(context.Context, *CanIRequest) (*CanIResponse, error) 923 // UpdatePassword updates an account's password to a new value 924 UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error) 925 // ListAccounts returns the list of accounts 926 ListAccounts(context.Context, *ListAccountRequest) (*AccountsList, error) 927 // GetAccount returns an account 928 GetAccount(context.Context, *GetAccountRequest) (*Account, error) 929 // CreateToken creates a token 930 CreateToken(context.Context, *CreateTokenRequest) (*CreateTokenResponse, error) 931 // DeleteToken deletes a token 932 DeleteToken(context.Context, *DeleteTokenRequest) (*EmptyResponse, error) 933 } 934 935 // UnimplementedAccountServiceServer can be embedded to have forward compatible implementations. 936 type UnimplementedAccountServiceServer struct { 937 } 938 939 func (*UnimplementedAccountServiceServer) CanI(ctx context.Context, req *CanIRequest) (*CanIResponse, error) { 940 return nil, status.Errorf(codes.Unimplemented, "method CanI not implemented") 941 } 942 func (*UnimplementedAccountServiceServer) UpdatePassword(ctx context.Context, req *UpdatePasswordRequest) (*UpdatePasswordResponse, error) { 943 return nil, status.Errorf(codes.Unimplemented, "method UpdatePassword not implemented") 944 } 945 func (*UnimplementedAccountServiceServer) ListAccounts(ctx context.Context, req *ListAccountRequest) (*AccountsList, error) { 946 return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") 947 } 948 func (*UnimplementedAccountServiceServer) GetAccount(ctx context.Context, req *GetAccountRequest) (*Account, error) { 949 return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") 950 } 951 func (*UnimplementedAccountServiceServer) CreateToken(ctx context.Context, req *CreateTokenRequest) (*CreateTokenResponse, error) { 952 return nil, status.Errorf(codes.Unimplemented, "method CreateToken not implemented") 953 } 954 func (*UnimplementedAccountServiceServer) DeleteToken(ctx context.Context, req *DeleteTokenRequest) (*EmptyResponse, error) { 955 return nil, status.Errorf(codes.Unimplemented, "method DeleteToken not implemented") 956 } 957 958 func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer) { 959 s.RegisterService(&_AccountService_serviceDesc, srv) 960 } 961 962 func _AccountService_CanI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 963 in := new(CanIRequest) 964 if err := dec(in); err != nil { 965 return nil, err 966 } 967 if interceptor == nil { 968 return srv.(AccountServiceServer).CanI(ctx, in) 969 } 970 info := &grpc.UnaryServerInfo{ 971 Server: srv, 972 FullMethod: "/account.AccountService/CanI", 973 } 974 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 975 return srv.(AccountServiceServer).CanI(ctx, req.(*CanIRequest)) 976 } 977 return interceptor(ctx, in, info, handler) 978 } 979 980 func _AccountService_UpdatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 981 in := new(UpdatePasswordRequest) 982 if err := dec(in); err != nil { 983 return nil, err 984 } 985 if interceptor == nil { 986 return srv.(AccountServiceServer).UpdatePassword(ctx, in) 987 } 988 info := &grpc.UnaryServerInfo{ 989 Server: srv, 990 FullMethod: "/account.AccountService/UpdatePassword", 991 } 992 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 993 return srv.(AccountServiceServer).UpdatePassword(ctx, req.(*UpdatePasswordRequest)) 994 } 995 return interceptor(ctx, in, info, handler) 996 } 997 998 func _AccountService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 999 in := new(ListAccountRequest) 1000 if err := dec(in); err != nil { 1001 return nil, err 1002 } 1003 if interceptor == nil { 1004 return srv.(AccountServiceServer).ListAccounts(ctx, in) 1005 } 1006 info := &grpc.UnaryServerInfo{ 1007 Server: srv, 1008 FullMethod: "/account.AccountService/ListAccounts", 1009 } 1010 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1011 return srv.(AccountServiceServer).ListAccounts(ctx, req.(*ListAccountRequest)) 1012 } 1013 return interceptor(ctx, in, info, handler) 1014 } 1015 1016 func _AccountService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1017 in := new(GetAccountRequest) 1018 if err := dec(in); err != nil { 1019 return nil, err 1020 } 1021 if interceptor == nil { 1022 return srv.(AccountServiceServer).GetAccount(ctx, in) 1023 } 1024 info := &grpc.UnaryServerInfo{ 1025 Server: srv, 1026 FullMethod: "/account.AccountService/GetAccount", 1027 } 1028 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1029 return srv.(AccountServiceServer).GetAccount(ctx, req.(*GetAccountRequest)) 1030 } 1031 return interceptor(ctx, in, info, handler) 1032 } 1033 1034 func _AccountService_CreateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1035 in := new(CreateTokenRequest) 1036 if err := dec(in); err != nil { 1037 return nil, err 1038 } 1039 if interceptor == nil { 1040 return srv.(AccountServiceServer).CreateToken(ctx, in) 1041 } 1042 info := &grpc.UnaryServerInfo{ 1043 Server: srv, 1044 FullMethod: "/account.AccountService/CreateToken", 1045 } 1046 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1047 return srv.(AccountServiceServer).CreateToken(ctx, req.(*CreateTokenRequest)) 1048 } 1049 return interceptor(ctx, in, info, handler) 1050 } 1051 1052 func _AccountService_DeleteToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1053 in := new(DeleteTokenRequest) 1054 if err := dec(in); err != nil { 1055 return nil, err 1056 } 1057 if interceptor == nil { 1058 return srv.(AccountServiceServer).DeleteToken(ctx, in) 1059 } 1060 info := &grpc.UnaryServerInfo{ 1061 Server: srv, 1062 FullMethod: "/account.AccountService/DeleteToken", 1063 } 1064 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1065 return srv.(AccountServiceServer).DeleteToken(ctx, req.(*DeleteTokenRequest)) 1066 } 1067 return interceptor(ctx, in, info, handler) 1068 } 1069 1070 var _AccountService_serviceDesc = grpc.ServiceDesc{ 1071 ServiceName: "account.AccountService", 1072 HandlerType: (*AccountServiceServer)(nil), 1073 Methods: []grpc.MethodDesc{ 1074 { 1075 MethodName: "CanI", 1076 Handler: _AccountService_CanI_Handler, 1077 }, 1078 { 1079 MethodName: "UpdatePassword", 1080 Handler: _AccountService_UpdatePassword_Handler, 1081 }, 1082 { 1083 MethodName: "ListAccounts", 1084 Handler: _AccountService_ListAccounts_Handler, 1085 }, 1086 { 1087 MethodName: "GetAccount", 1088 Handler: _AccountService_GetAccount_Handler, 1089 }, 1090 { 1091 MethodName: "CreateToken", 1092 Handler: _AccountService_CreateToken_Handler, 1093 }, 1094 { 1095 MethodName: "DeleteToken", 1096 Handler: _AccountService_DeleteToken_Handler, 1097 }, 1098 }, 1099 Streams: []grpc.StreamDesc{}, 1100 Metadata: "server/account/account.proto", 1101 } 1102 1103 func (m *UpdatePasswordRequest) Marshal() (dAtA []byte, err error) { 1104 size := m.Size() 1105 dAtA = make([]byte, size) 1106 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1107 if err != nil { 1108 return nil, err 1109 } 1110 return dAtA[:n], nil 1111 } 1112 1113 func (m *UpdatePasswordRequest) MarshalTo(dAtA []byte) (int, error) { 1114 size := m.Size() 1115 return m.MarshalToSizedBuffer(dAtA[:size]) 1116 } 1117 1118 func (m *UpdatePasswordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1119 i := len(dAtA) 1120 _ = i 1121 var l int 1122 _ = l 1123 if m.XXX_unrecognized != nil { 1124 i -= len(m.XXX_unrecognized) 1125 copy(dAtA[i:], m.XXX_unrecognized) 1126 } 1127 if len(m.Name) > 0 { 1128 i -= len(m.Name) 1129 copy(dAtA[i:], m.Name) 1130 i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) 1131 i-- 1132 dAtA[i] = 0x1a 1133 } 1134 if len(m.CurrentPassword) > 0 { 1135 i -= len(m.CurrentPassword) 1136 copy(dAtA[i:], m.CurrentPassword) 1137 i = encodeVarintAccount(dAtA, i, uint64(len(m.CurrentPassword))) 1138 i-- 1139 dAtA[i] = 0x12 1140 } 1141 if len(m.NewPassword) > 0 { 1142 i -= len(m.NewPassword) 1143 copy(dAtA[i:], m.NewPassword) 1144 i = encodeVarintAccount(dAtA, i, uint64(len(m.NewPassword))) 1145 i-- 1146 dAtA[i] = 0xa 1147 } 1148 return len(dAtA) - i, nil 1149 } 1150 1151 func (m *UpdatePasswordResponse) Marshal() (dAtA []byte, err error) { 1152 size := m.Size() 1153 dAtA = make([]byte, size) 1154 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1155 if err != nil { 1156 return nil, err 1157 } 1158 return dAtA[:n], nil 1159 } 1160 1161 func (m *UpdatePasswordResponse) MarshalTo(dAtA []byte) (int, error) { 1162 size := m.Size() 1163 return m.MarshalToSizedBuffer(dAtA[:size]) 1164 } 1165 1166 func (m *UpdatePasswordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1167 i := len(dAtA) 1168 _ = i 1169 var l int 1170 _ = l 1171 if m.XXX_unrecognized != nil { 1172 i -= len(m.XXX_unrecognized) 1173 copy(dAtA[i:], m.XXX_unrecognized) 1174 } 1175 return len(dAtA) - i, nil 1176 } 1177 1178 func (m *CanIRequest) Marshal() (dAtA []byte, err error) { 1179 size := m.Size() 1180 dAtA = make([]byte, size) 1181 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1182 if err != nil { 1183 return nil, err 1184 } 1185 return dAtA[:n], nil 1186 } 1187 1188 func (m *CanIRequest) MarshalTo(dAtA []byte) (int, error) { 1189 size := m.Size() 1190 return m.MarshalToSizedBuffer(dAtA[:size]) 1191 } 1192 1193 func (m *CanIRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1194 i := len(dAtA) 1195 _ = i 1196 var l int 1197 _ = l 1198 if m.XXX_unrecognized != nil { 1199 i -= len(m.XXX_unrecognized) 1200 copy(dAtA[i:], m.XXX_unrecognized) 1201 } 1202 if len(m.Subresource) > 0 { 1203 i -= len(m.Subresource) 1204 copy(dAtA[i:], m.Subresource) 1205 i = encodeVarintAccount(dAtA, i, uint64(len(m.Subresource))) 1206 i-- 1207 dAtA[i] = 0x1a 1208 } 1209 if len(m.Action) > 0 { 1210 i -= len(m.Action) 1211 copy(dAtA[i:], m.Action) 1212 i = encodeVarintAccount(dAtA, i, uint64(len(m.Action))) 1213 i-- 1214 dAtA[i] = 0x12 1215 } 1216 if len(m.Resource) > 0 { 1217 i -= len(m.Resource) 1218 copy(dAtA[i:], m.Resource) 1219 i = encodeVarintAccount(dAtA, i, uint64(len(m.Resource))) 1220 i-- 1221 dAtA[i] = 0xa 1222 } 1223 return len(dAtA) - i, nil 1224 } 1225 1226 func (m *CanIResponse) Marshal() (dAtA []byte, err error) { 1227 size := m.Size() 1228 dAtA = make([]byte, size) 1229 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1230 if err != nil { 1231 return nil, err 1232 } 1233 return dAtA[:n], nil 1234 } 1235 1236 func (m *CanIResponse) MarshalTo(dAtA []byte) (int, error) { 1237 size := m.Size() 1238 return m.MarshalToSizedBuffer(dAtA[:size]) 1239 } 1240 1241 func (m *CanIResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1242 i := len(dAtA) 1243 _ = i 1244 var l int 1245 _ = l 1246 if m.XXX_unrecognized != nil { 1247 i -= len(m.XXX_unrecognized) 1248 copy(dAtA[i:], m.XXX_unrecognized) 1249 } 1250 if len(m.Value) > 0 { 1251 i -= len(m.Value) 1252 copy(dAtA[i:], m.Value) 1253 i = encodeVarintAccount(dAtA, i, uint64(len(m.Value))) 1254 i-- 1255 dAtA[i] = 0xa 1256 } 1257 return len(dAtA) - i, nil 1258 } 1259 1260 func (m *GetAccountRequest) Marshal() (dAtA []byte, err error) { 1261 size := m.Size() 1262 dAtA = make([]byte, size) 1263 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1264 if err != nil { 1265 return nil, err 1266 } 1267 return dAtA[:n], nil 1268 } 1269 1270 func (m *GetAccountRequest) MarshalTo(dAtA []byte) (int, error) { 1271 size := m.Size() 1272 return m.MarshalToSizedBuffer(dAtA[:size]) 1273 } 1274 1275 func (m *GetAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1276 i := len(dAtA) 1277 _ = i 1278 var l int 1279 _ = l 1280 if m.XXX_unrecognized != nil { 1281 i -= len(m.XXX_unrecognized) 1282 copy(dAtA[i:], m.XXX_unrecognized) 1283 } 1284 if len(m.Name) > 0 { 1285 i -= len(m.Name) 1286 copy(dAtA[i:], m.Name) 1287 i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) 1288 i-- 1289 dAtA[i] = 0xa 1290 } 1291 return len(dAtA) - i, nil 1292 } 1293 1294 func (m *Account) Marshal() (dAtA []byte, err error) { 1295 size := m.Size() 1296 dAtA = make([]byte, size) 1297 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1298 if err != nil { 1299 return nil, err 1300 } 1301 return dAtA[:n], nil 1302 } 1303 1304 func (m *Account) MarshalTo(dAtA []byte) (int, error) { 1305 size := m.Size() 1306 return m.MarshalToSizedBuffer(dAtA[:size]) 1307 } 1308 1309 func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1310 i := len(dAtA) 1311 _ = i 1312 var l int 1313 _ = l 1314 if m.XXX_unrecognized != nil { 1315 i -= len(m.XXX_unrecognized) 1316 copy(dAtA[i:], m.XXX_unrecognized) 1317 } 1318 if len(m.Tokens) > 0 { 1319 for iNdEx := len(m.Tokens) - 1; iNdEx >= 0; iNdEx-- { 1320 { 1321 size, err := m.Tokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1322 if err != nil { 1323 return 0, err 1324 } 1325 i -= size 1326 i = encodeVarintAccount(dAtA, i, uint64(size)) 1327 } 1328 i-- 1329 dAtA[i] = 0x22 1330 } 1331 } 1332 if len(m.Capabilities) > 0 { 1333 for iNdEx := len(m.Capabilities) - 1; iNdEx >= 0; iNdEx-- { 1334 i -= len(m.Capabilities[iNdEx]) 1335 copy(dAtA[i:], m.Capabilities[iNdEx]) 1336 i = encodeVarintAccount(dAtA, i, uint64(len(m.Capabilities[iNdEx]))) 1337 i-- 1338 dAtA[i] = 0x1a 1339 } 1340 } 1341 if m.Enabled { 1342 i-- 1343 if m.Enabled { 1344 dAtA[i] = 1 1345 } else { 1346 dAtA[i] = 0 1347 } 1348 i-- 1349 dAtA[i] = 0x10 1350 } 1351 if len(m.Name) > 0 { 1352 i -= len(m.Name) 1353 copy(dAtA[i:], m.Name) 1354 i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) 1355 i-- 1356 dAtA[i] = 0xa 1357 } 1358 return len(dAtA) - i, nil 1359 } 1360 1361 func (m *AccountsList) Marshal() (dAtA []byte, err error) { 1362 size := m.Size() 1363 dAtA = make([]byte, size) 1364 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1365 if err != nil { 1366 return nil, err 1367 } 1368 return dAtA[:n], nil 1369 } 1370 1371 func (m *AccountsList) MarshalTo(dAtA []byte) (int, error) { 1372 size := m.Size() 1373 return m.MarshalToSizedBuffer(dAtA[:size]) 1374 } 1375 1376 func (m *AccountsList) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1377 i := len(dAtA) 1378 _ = i 1379 var l int 1380 _ = l 1381 if m.XXX_unrecognized != nil { 1382 i -= len(m.XXX_unrecognized) 1383 copy(dAtA[i:], m.XXX_unrecognized) 1384 } 1385 if len(m.Items) > 0 { 1386 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { 1387 { 1388 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1389 if err != nil { 1390 return 0, err 1391 } 1392 i -= size 1393 i = encodeVarintAccount(dAtA, i, uint64(size)) 1394 } 1395 i-- 1396 dAtA[i] = 0xa 1397 } 1398 } 1399 return len(dAtA) - i, nil 1400 } 1401 1402 func (m *Token) Marshal() (dAtA []byte, err error) { 1403 size := m.Size() 1404 dAtA = make([]byte, size) 1405 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1406 if err != nil { 1407 return nil, err 1408 } 1409 return dAtA[:n], nil 1410 } 1411 1412 func (m *Token) MarshalTo(dAtA []byte) (int, error) { 1413 size := m.Size() 1414 return m.MarshalToSizedBuffer(dAtA[:size]) 1415 } 1416 1417 func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1418 i := len(dAtA) 1419 _ = i 1420 var l int 1421 _ = l 1422 if m.XXX_unrecognized != nil { 1423 i -= len(m.XXX_unrecognized) 1424 copy(dAtA[i:], m.XXX_unrecognized) 1425 } 1426 if m.ExpiresAt != 0 { 1427 i = encodeVarintAccount(dAtA, i, uint64(m.ExpiresAt)) 1428 i-- 1429 dAtA[i] = 0x18 1430 } 1431 if m.IssuedAt != 0 { 1432 i = encodeVarintAccount(dAtA, i, uint64(m.IssuedAt)) 1433 i-- 1434 dAtA[i] = 0x10 1435 } 1436 if len(m.Id) > 0 { 1437 i -= len(m.Id) 1438 copy(dAtA[i:], m.Id) 1439 i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) 1440 i-- 1441 dAtA[i] = 0xa 1442 } 1443 return len(dAtA) - i, nil 1444 } 1445 1446 func (m *TokensList) Marshal() (dAtA []byte, err error) { 1447 size := m.Size() 1448 dAtA = make([]byte, size) 1449 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1450 if err != nil { 1451 return nil, err 1452 } 1453 return dAtA[:n], nil 1454 } 1455 1456 func (m *TokensList) MarshalTo(dAtA []byte) (int, error) { 1457 size := m.Size() 1458 return m.MarshalToSizedBuffer(dAtA[:size]) 1459 } 1460 1461 func (m *TokensList) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1462 i := len(dAtA) 1463 _ = i 1464 var l int 1465 _ = l 1466 if m.XXX_unrecognized != nil { 1467 i -= len(m.XXX_unrecognized) 1468 copy(dAtA[i:], m.XXX_unrecognized) 1469 } 1470 if len(m.Items) > 0 { 1471 for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { 1472 { 1473 size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1474 if err != nil { 1475 return 0, err 1476 } 1477 i -= size 1478 i = encodeVarintAccount(dAtA, i, uint64(size)) 1479 } 1480 i-- 1481 dAtA[i] = 0xa 1482 } 1483 } 1484 return len(dAtA) - i, nil 1485 } 1486 1487 func (m *CreateTokenRequest) Marshal() (dAtA []byte, err error) { 1488 size := m.Size() 1489 dAtA = make([]byte, size) 1490 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1491 if err != nil { 1492 return nil, err 1493 } 1494 return dAtA[:n], nil 1495 } 1496 1497 func (m *CreateTokenRequest) MarshalTo(dAtA []byte) (int, error) { 1498 size := m.Size() 1499 return m.MarshalToSizedBuffer(dAtA[:size]) 1500 } 1501 1502 func (m *CreateTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1503 i := len(dAtA) 1504 _ = i 1505 var l int 1506 _ = l 1507 if m.XXX_unrecognized != nil { 1508 i -= len(m.XXX_unrecognized) 1509 copy(dAtA[i:], m.XXX_unrecognized) 1510 } 1511 if len(m.Id) > 0 { 1512 i -= len(m.Id) 1513 copy(dAtA[i:], m.Id) 1514 i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) 1515 i-- 1516 dAtA[i] = 0x1a 1517 } 1518 if m.ExpiresIn != 0 { 1519 i = encodeVarintAccount(dAtA, i, uint64(m.ExpiresIn)) 1520 i-- 1521 dAtA[i] = 0x10 1522 } 1523 if len(m.Name) > 0 { 1524 i -= len(m.Name) 1525 copy(dAtA[i:], m.Name) 1526 i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) 1527 i-- 1528 dAtA[i] = 0xa 1529 } 1530 return len(dAtA) - i, nil 1531 } 1532 1533 func (m *CreateTokenResponse) Marshal() (dAtA []byte, err error) { 1534 size := m.Size() 1535 dAtA = make([]byte, size) 1536 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1537 if err != nil { 1538 return nil, err 1539 } 1540 return dAtA[:n], nil 1541 } 1542 1543 func (m *CreateTokenResponse) MarshalTo(dAtA []byte) (int, error) { 1544 size := m.Size() 1545 return m.MarshalToSizedBuffer(dAtA[:size]) 1546 } 1547 1548 func (m *CreateTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1549 i := len(dAtA) 1550 _ = i 1551 var l int 1552 _ = l 1553 if m.XXX_unrecognized != nil { 1554 i -= len(m.XXX_unrecognized) 1555 copy(dAtA[i:], m.XXX_unrecognized) 1556 } 1557 if len(m.Token) > 0 { 1558 i -= len(m.Token) 1559 copy(dAtA[i:], m.Token) 1560 i = encodeVarintAccount(dAtA, i, uint64(len(m.Token))) 1561 i-- 1562 dAtA[i] = 0xa 1563 } 1564 return len(dAtA) - i, nil 1565 } 1566 1567 func (m *DeleteTokenRequest) Marshal() (dAtA []byte, err error) { 1568 size := m.Size() 1569 dAtA = make([]byte, size) 1570 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1571 if err != nil { 1572 return nil, err 1573 } 1574 return dAtA[:n], nil 1575 } 1576 1577 func (m *DeleteTokenRequest) MarshalTo(dAtA []byte) (int, error) { 1578 size := m.Size() 1579 return m.MarshalToSizedBuffer(dAtA[:size]) 1580 } 1581 1582 func (m *DeleteTokenRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1583 i := len(dAtA) 1584 _ = i 1585 var l int 1586 _ = l 1587 if m.XXX_unrecognized != nil { 1588 i -= len(m.XXX_unrecognized) 1589 copy(dAtA[i:], m.XXX_unrecognized) 1590 } 1591 if len(m.Id) > 0 { 1592 i -= len(m.Id) 1593 copy(dAtA[i:], m.Id) 1594 i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) 1595 i-- 1596 dAtA[i] = 0x12 1597 } 1598 if len(m.Name) > 0 { 1599 i -= len(m.Name) 1600 copy(dAtA[i:], m.Name) 1601 i = encodeVarintAccount(dAtA, i, uint64(len(m.Name))) 1602 i-- 1603 dAtA[i] = 0xa 1604 } 1605 return len(dAtA) - i, nil 1606 } 1607 1608 func (m *ListAccountRequest) Marshal() (dAtA []byte, err error) { 1609 size := m.Size() 1610 dAtA = make([]byte, size) 1611 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1612 if err != nil { 1613 return nil, err 1614 } 1615 return dAtA[:n], nil 1616 } 1617 1618 func (m *ListAccountRequest) MarshalTo(dAtA []byte) (int, error) { 1619 size := m.Size() 1620 return m.MarshalToSizedBuffer(dAtA[:size]) 1621 } 1622 1623 func (m *ListAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1624 i := len(dAtA) 1625 _ = i 1626 var l int 1627 _ = l 1628 if m.XXX_unrecognized != nil { 1629 i -= len(m.XXX_unrecognized) 1630 copy(dAtA[i:], m.XXX_unrecognized) 1631 } 1632 return len(dAtA) - i, nil 1633 } 1634 1635 func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { 1636 size := m.Size() 1637 dAtA = make([]byte, size) 1638 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1639 if err != nil { 1640 return nil, err 1641 } 1642 return dAtA[:n], nil 1643 } 1644 1645 func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) { 1646 size := m.Size() 1647 return m.MarshalToSizedBuffer(dAtA[:size]) 1648 } 1649 1650 func (m *EmptyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1651 i := len(dAtA) 1652 _ = i 1653 var l int 1654 _ = l 1655 if m.XXX_unrecognized != nil { 1656 i -= len(m.XXX_unrecognized) 1657 copy(dAtA[i:], m.XXX_unrecognized) 1658 } 1659 return len(dAtA) - i, nil 1660 } 1661 1662 func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { 1663 offset -= sovAccount(v) 1664 base := offset 1665 for v >= 1<<7 { 1666 dAtA[offset] = uint8(v&0x7f | 0x80) 1667 v >>= 7 1668 offset++ 1669 } 1670 dAtA[offset] = uint8(v) 1671 return base 1672 } 1673 func (m *UpdatePasswordRequest) Size() (n int) { 1674 if m == nil { 1675 return 0 1676 } 1677 var l int 1678 _ = l 1679 l = len(m.NewPassword) 1680 if l > 0 { 1681 n += 1 + l + sovAccount(uint64(l)) 1682 } 1683 l = len(m.CurrentPassword) 1684 if l > 0 { 1685 n += 1 + l + sovAccount(uint64(l)) 1686 } 1687 l = len(m.Name) 1688 if l > 0 { 1689 n += 1 + l + sovAccount(uint64(l)) 1690 } 1691 if m.XXX_unrecognized != nil { 1692 n += len(m.XXX_unrecognized) 1693 } 1694 return n 1695 } 1696 1697 func (m *UpdatePasswordResponse) Size() (n int) { 1698 if m == nil { 1699 return 0 1700 } 1701 var l int 1702 _ = l 1703 if m.XXX_unrecognized != nil { 1704 n += len(m.XXX_unrecognized) 1705 } 1706 return n 1707 } 1708 1709 func (m *CanIRequest) Size() (n int) { 1710 if m == nil { 1711 return 0 1712 } 1713 var l int 1714 _ = l 1715 l = len(m.Resource) 1716 if l > 0 { 1717 n += 1 + l + sovAccount(uint64(l)) 1718 } 1719 l = len(m.Action) 1720 if l > 0 { 1721 n += 1 + l + sovAccount(uint64(l)) 1722 } 1723 l = len(m.Subresource) 1724 if l > 0 { 1725 n += 1 + l + sovAccount(uint64(l)) 1726 } 1727 if m.XXX_unrecognized != nil { 1728 n += len(m.XXX_unrecognized) 1729 } 1730 return n 1731 } 1732 1733 func (m *CanIResponse) Size() (n int) { 1734 if m == nil { 1735 return 0 1736 } 1737 var l int 1738 _ = l 1739 l = len(m.Value) 1740 if l > 0 { 1741 n += 1 + l + sovAccount(uint64(l)) 1742 } 1743 if m.XXX_unrecognized != nil { 1744 n += len(m.XXX_unrecognized) 1745 } 1746 return n 1747 } 1748 1749 func (m *GetAccountRequest) Size() (n int) { 1750 if m == nil { 1751 return 0 1752 } 1753 var l int 1754 _ = l 1755 l = len(m.Name) 1756 if l > 0 { 1757 n += 1 + l + sovAccount(uint64(l)) 1758 } 1759 if m.XXX_unrecognized != nil { 1760 n += len(m.XXX_unrecognized) 1761 } 1762 return n 1763 } 1764 1765 func (m *Account) Size() (n int) { 1766 if m == nil { 1767 return 0 1768 } 1769 var l int 1770 _ = l 1771 l = len(m.Name) 1772 if l > 0 { 1773 n += 1 + l + sovAccount(uint64(l)) 1774 } 1775 if m.Enabled { 1776 n += 2 1777 } 1778 if len(m.Capabilities) > 0 { 1779 for _, s := range m.Capabilities { 1780 l = len(s) 1781 n += 1 + l + sovAccount(uint64(l)) 1782 } 1783 } 1784 if len(m.Tokens) > 0 { 1785 for _, e := range m.Tokens { 1786 l = e.Size() 1787 n += 1 + l + sovAccount(uint64(l)) 1788 } 1789 } 1790 if m.XXX_unrecognized != nil { 1791 n += len(m.XXX_unrecognized) 1792 } 1793 return n 1794 } 1795 1796 func (m *AccountsList) Size() (n int) { 1797 if m == nil { 1798 return 0 1799 } 1800 var l int 1801 _ = l 1802 if len(m.Items) > 0 { 1803 for _, e := range m.Items { 1804 l = e.Size() 1805 n += 1 + l + sovAccount(uint64(l)) 1806 } 1807 } 1808 if m.XXX_unrecognized != nil { 1809 n += len(m.XXX_unrecognized) 1810 } 1811 return n 1812 } 1813 1814 func (m *Token) Size() (n int) { 1815 if m == nil { 1816 return 0 1817 } 1818 var l int 1819 _ = l 1820 l = len(m.Id) 1821 if l > 0 { 1822 n += 1 + l + sovAccount(uint64(l)) 1823 } 1824 if m.IssuedAt != 0 { 1825 n += 1 + sovAccount(uint64(m.IssuedAt)) 1826 } 1827 if m.ExpiresAt != 0 { 1828 n += 1 + sovAccount(uint64(m.ExpiresAt)) 1829 } 1830 if m.XXX_unrecognized != nil { 1831 n += len(m.XXX_unrecognized) 1832 } 1833 return n 1834 } 1835 1836 func (m *TokensList) Size() (n int) { 1837 if m == nil { 1838 return 0 1839 } 1840 var l int 1841 _ = l 1842 if len(m.Items) > 0 { 1843 for _, e := range m.Items { 1844 l = e.Size() 1845 n += 1 + l + sovAccount(uint64(l)) 1846 } 1847 } 1848 if m.XXX_unrecognized != nil { 1849 n += len(m.XXX_unrecognized) 1850 } 1851 return n 1852 } 1853 1854 func (m *CreateTokenRequest) Size() (n int) { 1855 if m == nil { 1856 return 0 1857 } 1858 var l int 1859 _ = l 1860 l = len(m.Name) 1861 if l > 0 { 1862 n += 1 + l + sovAccount(uint64(l)) 1863 } 1864 if m.ExpiresIn != 0 { 1865 n += 1 + sovAccount(uint64(m.ExpiresIn)) 1866 } 1867 l = len(m.Id) 1868 if l > 0 { 1869 n += 1 + l + sovAccount(uint64(l)) 1870 } 1871 if m.XXX_unrecognized != nil { 1872 n += len(m.XXX_unrecognized) 1873 } 1874 return n 1875 } 1876 1877 func (m *CreateTokenResponse) Size() (n int) { 1878 if m == nil { 1879 return 0 1880 } 1881 var l int 1882 _ = l 1883 l = len(m.Token) 1884 if l > 0 { 1885 n += 1 + l + sovAccount(uint64(l)) 1886 } 1887 if m.XXX_unrecognized != nil { 1888 n += len(m.XXX_unrecognized) 1889 } 1890 return n 1891 } 1892 1893 func (m *DeleteTokenRequest) Size() (n int) { 1894 if m == nil { 1895 return 0 1896 } 1897 var l int 1898 _ = l 1899 l = len(m.Name) 1900 if l > 0 { 1901 n += 1 + l + sovAccount(uint64(l)) 1902 } 1903 l = len(m.Id) 1904 if l > 0 { 1905 n += 1 + l + sovAccount(uint64(l)) 1906 } 1907 if m.XXX_unrecognized != nil { 1908 n += len(m.XXX_unrecognized) 1909 } 1910 return n 1911 } 1912 1913 func (m *ListAccountRequest) Size() (n int) { 1914 if m == nil { 1915 return 0 1916 } 1917 var l int 1918 _ = l 1919 if m.XXX_unrecognized != nil { 1920 n += len(m.XXX_unrecognized) 1921 } 1922 return n 1923 } 1924 1925 func (m *EmptyResponse) Size() (n int) { 1926 if m == nil { 1927 return 0 1928 } 1929 var l int 1930 _ = l 1931 if m.XXX_unrecognized != nil { 1932 n += len(m.XXX_unrecognized) 1933 } 1934 return n 1935 } 1936 1937 func sovAccount(x uint64) (n int) { 1938 return (math_bits.Len64(x|1) + 6) / 7 1939 } 1940 func sozAccount(x uint64) (n int) { 1941 return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1942 } 1943 func (m *UpdatePasswordRequest) Unmarshal(dAtA []byte) error { 1944 l := len(dAtA) 1945 iNdEx := 0 1946 for iNdEx < l { 1947 preIndex := iNdEx 1948 var wire uint64 1949 for shift := uint(0); ; shift += 7 { 1950 if shift >= 64 { 1951 return ErrIntOverflowAccount 1952 } 1953 if iNdEx >= l { 1954 return io.ErrUnexpectedEOF 1955 } 1956 b := dAtA[iNdEx] 1957 iNdEx++ 1958 wire |= uint64(b&0x7F) << shift 1959 if b < 0x80 { 1960 break 1961 } 1962 } 1963 fieldNum := int32(wire >> 3) 1964 wireType := int(wire & 0x7) 1965 if wireType == 4 { 1966 return fmt.Errorf("proto: UpdatePasswordRequest: wiretype end group for non-group") 1967 } 1968 if fieldNum <= 0 { 1969 return fmt.Errorf("proto: UpdatePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1970 } 1971 switch fieldNum { 1972 case 1: 1973 if wireType != 2 { 1974 return fmt.Errorf("proto: wrong wireType = %d for field NewPassword", wireType) 1975 } 1976 var stringLen uint64 1977 for shift := uint(0); ; shift += 7 { 1978 if shift >= 64 { 1979 return ErrIntOverflowAccount 1980 } 1981 if iNdEx >= l { 1982 return io.ErrUnexpectedEOF 1983 } 1984 b := dAtA[iNdEx] 1985 iNdEx++ 1986 stringLen |= uint64(b&0x7F) << shift 1987 if b < 0x80 { 1988 break 1989 } 1990 } 1991 intStringLen := int(stringLen) 1992 if intStringLen < 0 { 1993 return ErrInvalidLengthAccount 1994 } 1995 postIndex := iNdEx + intStringLen 1996 if postIndex < 0 { 1997 return ErrInvalidLengthAccount 1998 } 1999 if postIndex > l { 2000 return io.ErrUnexpectedEOF 2001 } 2002 m.NewPassword = string(dAtA[iNdEx:postIndex]) 2003 iNdEx = postIndex 2004 case 2: 2005 if wireType != 2 { 2006 return fmt.Errorf("proto: wrong wireType = %d for field CurrentPassword", wireType) 2007 } 2008 var stringLen uint64 2009 for shift := uint(0); ; shift += 7 { 2010 if shift >= 64 { 2011 return ErrIntOverflowAccount 2012 } 2013 if iNdEx >= l { 2014 return io.ErrUnexpectedEOF 2015 } 2016 b := dAtA[iNdEx] 2017 iNdEx++ 2018 stringLen |= uint64(b&0x7F) << shift 2019 if b < 0x80 { 2020 break 2021 } 2022 } 2023 intStringLen := int(stringLen) 2024 if intStringLen < 0 { 2025 return ErrInvalidLengthAccount 2026 } 2027 postIndex := iNdEx + intStringLen 2028 if postIndex < 0 { 2029 return ErrInvalidLengthAccount 2030 } 2031 if postIndex > l { 2032 return io.ErrUnexpectedEOF 2033 } 2034 m.CurrentPassword = string(dAtA[iNdEx:postIndex]) 2035 iNdEx = postIndex 2036 case 3: 2037 if wireType != 2 { 2038 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2039 } 2040 var stringLen uint64 2041 for shift := uint(0); ; shift += 7 { 2042 if shift >= 64 { 2043 return ErrIntOverflowAccount 2044 } 2045 if iNdEx >= l { 2046 return io.ErrUnexpectedEOF 2047 } 2048 b := dAtA[iNdEx] 2049 iNdEx++ 2050 stringLen |= uint64(b&0x7F) << shift 2051 if b < 0x80 { 2052 break 2053 } 2054 } 2055 intStringLen := int(stringLen) 2056 if intStringLen < 0 { 2057 return ErrInvalidLengthAccount 2058 } 2059 postIndex := iNdEx + intStringLen 2060 if postIndex < 0 { 2061 return ErrInvalidLengthAccount 2062 } 2063 if postIndex > l { 2064 return io.ErrUnexpectedEOF 2065 } 2066 m.Name = string(dAtA[iNdEx:postIndex]) 2067 iNdEx = postIndex 2068 default: 2069 iNdEx = preIndex 2070 skippy, err := skipAccount(dAtA[iNdEx:]) 2071 if err != nil { 2072 return err 2073 } 2074 if (skippy < 0) || (iNdEx+skippy) < 0 { 2075 return ErrInvalidLengthAccount 2076 } 2077 if (iNdEx + skippy) > l { 2078 return io.ErrUnexpectedEOF 2079 } 2080 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2081 iNdEx += skippy 2082 } 2083 } 2084 2085 if iNdEx > l { 2086 return io.ErrUnexpectedEOF 2087 } 2088 return nil 2089 } 2090 func (m *UpdatePasswordResponse) Unmarshal(dAtA []byte) error { 2091 l := len(dAtA) 2092 iNdEx := 0 2093 for iNdEx < l { 2094 preIndex := iNdEx 2095 var wire uint64 2096 for shift := uint(0); ; shift += 7 { 2097 if shift >= 64 { 2098 return ErrIntOverflowAccount 2099 } 2100 if iNdEx >= l { 2101 return io.ErrUnexpectedEOF 2102 } 2103 b := dAtA[iNdEx] 2104 iNdEx++ 2105 wire |= uint64(b&0x7F) << shift 2106 if b < 0x80 { 2107 break 2108 } 2109 } 2110 fieldNum := int32(wire >> 3) 2111 wireType := int(wire & 0x7) 2112 if wireType == 4 { 2113 return fmt.Errorf("proto: UpdatePasswordResponse: wiretype end group for non-group") 2114 } 2115 if fieldNum <= 0 { 2116 return fmt.Errorf("proto: UpdatePasswordResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2117 } 2118 switch fieldNum { 2119 default: 2120 iNdEx = preIndex 2121 skippy, err := skipAccount(dAtA[iNdEx:]) 2122 if err != nil { 2123 return err 2124 } 2125 if (skippy < 0) || (iNdEx+skippy) < 0 { 2126 return ErrInvalidLengthAccount 2127 } 2128 if (iNdEx + skippy) > l { 2129 return io.ErrUnexpectedEOF 2130 } 2131 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2132 iNdEx += skippy 2133 } 2134 } 2135 2136 if iNdEx > l { 2137 return io.ErrUnexpectedEOF 2138 } 2139 return nil 2140 } 2141 func (m *CanIRequest) Unmarshal(dAtA []byte) error { 2142 l := len(dAtA) 2143 iNdEx := 0 2144 for iNdEx < l { 2145 preIndex := iNdEx 2146 var wire uint64 2147 for shift := uint(0); ; shift += 7 { 2148 if shift >= 64 { 2149 return ErrIntOverflowAccount 2150 } 2151 if iNdEx >= l { 2152 return io.ErrUnexpectedEOF 2153 } 2154 b := dAtA[iNdEx] 2155 iNdEx++ 2156 wire |= uint64(b&0x7F) << shift 2157 if b < 0x80 { 2158 break 2159 } 2160 } 2161 fieldNum := int32(wire >> 3) 2162 wireType := int(wire & 0x7) 2163 if wireType == 4 { 2164 return fmt.Errorf("proto: CanIRequest: wiretype end group for non-group") 2165 } 2166 if fieldNum <= 0 { 2167 return fmt.Errorf("proto: CanIRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2168 } 2169 switch fieldNum { 2170 case 1: 2171 if wireType != 2 { 2172 return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) 2173 } 2174 var stringLen uint64 2175 for shift := uint(0); ; shift += 7 { 2176 if shift >= 64 { 2177 return ErrIntOverflowAccount 2178 } 2179 if iNdEx >= l { 2180 return io.ErrUnexpectedEOF 2181 } 2182 b := dAtA[iNdEx] 2183 iNdEx++ 2184 stringLen |= uint64(b&0x7F) << shift 2185 if b < 0x80 { 2186 break 2187 } 2188 } 2189 intStringLen := int(stringLen) 2190 if intStringLen < 0 { 2191 return ErrInvalidLengthAccount 2192 } 2193 postIndex := iNdEx + intStringLen 2194 if postIndex < 0 { 2195 return ErrInvalidLengthAccount 2196 } 2197 if postIndex > l { 2198 return io.ErrUnexpectedEOF 2199 } 2200 m.Resource = string(dAtA[iNdEx:postIndex]) 2201 iNdEx = postIndex 2202 case 2: 2203 if wireType != 2 { 2204 return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) 2205 } 2206 var stringLen uint64 2207 for shift := uint(0); ; shift += 7 { 2208 if shift >= 64 { 2209 return ErrIntOverflowAccount 2210 } 2211 if iNdEx >= l { 2212 return io.ErrUnexpectedEOF 2213 } 2214 b := dAtA[iNdEx] 2215 iNdEx++ 2216 stringLen |= uint64(b&0x7F) << shift 2217 if b < 0x80 { 2218 break 2219 } 2220 } 2221 intStringLen := int(stringLen) 2222 if intStringLen < 0 { 2223 return ErrInvalidLengthAccount 2224 } 2225 postIndex := iNdEx + intStringLen 2226 if postIndex < 0 { 2227 return ErrInvalidLengthAccount 2228 } 2229 if postIndex > l { 2230 return io.ErrUnexpectedEOF 2231 } 2232 m.Action = string(dAtA[iNdEx:postIndex]) 2233 iNdEx = postIndex 2234 case 3: 2235 if wireType != 2 { 2236 return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) 2237 } 2238 var stringLen uint64 2239 for shift := uint(0); ; shift += 7 { 2240 if shift >= 64 { 2241 return ErrIntOverflowAccount 2242 } 2243 if iNdEx >= l { 2244 return io.ErrUnexpectedEOF 2245 } 2246 b := dAtA[iNdEx] 2247 iNdEx++ 2248 stringLen |= uint64(b&0x7F) << shift 2249 if b < 0x80 { 2250 break 2251 } 2252 } 2253 intStringLen := int(stringLen) 2254 if intStringLen < 0 { 2255 return ErrInvalidLengthAccount 2256 } 2257 postIndex := iNdEx + intStringLen 2258 if postIndex < 0 { 2259 return ErrInvalidLengthAccount 2260 } 2261 if postIndex > l { 2262 return io.ErrUnexpectedEOF 2263 } 2264 m.Subresource = string(dAtA[iNdEx:postIndex]) 2265 iNdEx = postIndex 2266 default: 2267 iNdEx = preIndex 2268 skippy, err := skipAccount(dAtA[iNdEx:]) 2269 if err != nil { 2270 return err 2271 } 2272 if (skippy < 0) || (iNdEx+skippy) < 0 { 2273 return ErrInvalidLengthAccount 2274 } 2275 if (iNdEx + skippy) > l { 2276 return io.ErrUnexpectedEOF 2277 } 2278 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2279 iNdEx += skippy 2280 } 2281 } 2282 2283 if iNdEx > l { 2284 return io.ErrUnexpectedEOF 2285 } 2286 return nil 2287 } 2288 func (m *CanIResponse) Unmarshal(dAtA []byte) error { 2289 l := len(dAtA) 2290 iNdEx := 0 2291 for iNdEx < l { 2292 preIndex := iNdEx 2293 var wire uint64 2294 for shift := uint(0); ; shift += 7 { 2295 if shift >= 64 { 2296 return ErrIntOverflowAccount 2297 } 2298 if iNdEx >= l { 2299 return io.ErrUnexpectedEOF 2300 } 2301 b := dAtA[iNdEx] 2302 iNdEx++ 2303 wire |= uint64(b&0x7F) << shift 2304 if b < 0x80 { 2305 break 2306 } 2307 } 2308 fieldNum := int32(wire >> 3) 2309 wireType := int(wire & 0x7) 2310 if wireType == 4 { 2311 return fmt.Errorf("proto: CanIResponse: wiretype end group for non-group") 2312 } 2313 if fieldNum <= 0 { 2314 return fmt.Errorf("proto: CanIResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2315 } 2316 switch fieldNum { 2317 case 1: 2318 if wireType != 2 { 2319 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 2320 } 2321 var stringLen uint64 2322 for shift := uint(0); ; shift += 7 { 2323 if shift >= 64 { 2324 return ErrIntOverflowAccount 2325 } 2326 if iNdEx >= l { 2327 return io.ErrUnexpectedEOF 2328 } 2329 b := dAtA[iNdEx] 2330 iNdEx++ 2331 stringLen |= uint64(b&0x7F) << shift 2332 if b < 0x80 { 2333 break 2334 } 2335 } 2336 intStringLen := int(stringLen) 2337 if intStringLen < 0 { 2338 return ErrInvalidLengthAccount 2339 } 2340 postIndex := iNdEx + intStringLen 2341 if postIndex < 0 { 2342 return ErrInvalidLengthAccount 2343 } 2344 if postIndex > l { 2345 return io.ErrUnexpectedEOF 2346 } 2347 m.Value = string(dAtA[iNdEx:postIndex]) 2348 iNdEx = postIndex 2349 default: 2350 iNdEx = preIndex 2351 skippy, err := skipAccount(dAtA[iNdEx:]) 2352 if err != nil { 2353 return err 2354 } 2355 if (skippy < 0) || (iNdEx+skippy) < 0 { 2356 return ErrInvalidLengthAccount 2357 } 2358 if (iNdEx + skippy) > l { 2359 return io.ErrUnexpectedEOF 2360 } 2361 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2362 iNdEx += skippy 2363 } 2364 } 2365 2366 if iNdEx > l { 2367 return io.ErrUnexpectedEOF 2368 } 2369 return nil 2370 } 2371 func (m *GetAccountRequest) Unmarshal(dAtA []byte) error { 2372 l := len(dAtA) 2373 iNdEx := 0 2374 for iNdEx < l { 2375 preIndex := iNdEx 2376 var wire uint64 2377 for shift := uint(0); ; shift += 7 { 2378 if shift >= 64 { 2379 return ErrIntOverflowAccount 2380 } 2381 if iNdEx >= l { 2382 return io.ErrUnexpectedEOF 2383 } 2384 b := dAtA[iNdEx] 2385 iNdEx++ 2386 wire |= uint64(b&0x7F) << shift 2387 if b < 0x80 { 2388 break 2389 } 2390 } 2391 fieldNum := int32(wire >> 3) 2392 wireType := int(wire & 0x7) 2393 if wireType == 4 { 2394 return fmt.Errorf("proto: GetAccountRequest: wiretype end group for non-group") 2395 } 2396 if fieldNum <= 0 { 2397 return fmt.Errorf("proto: GetAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2398 } 2399 switch fieldNum { 2400 case 1: 2401 if wireType != 2 { 2402 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2403 } 2404 var stringLen uint64 2405 for shift := uint(0); ; shift += 7 { 2406 if shift >= 64 { 2407 return ErrIntOverflowAccount 2408 } 2409 if iNdEx >= l { 2410 return io.ErrUnexpectedEOF 2411 } 2412 b := dAtA[iNdEx] 2413 iNdEx++ 2414 stringLen |= uint64(b&0x7F) << shift 2415 if b < 0x80 { 2416 break 2417 } 2418 } 2419 intStringLen := int(stringLen) 2420 if intStringLen < 0 { 2421 return ErrInvalidLengthAccount 2422 } 2423 postIndex := iNdEx + intStringLen 2424 if postIndex < 0 { 2425 return ErrInvalidLengthAccount 2426 } 2427 if postIndex > l { 2428 return io.ErrUnexpectedEOF 2429 } 2430 m.Name = string(dAtA[iNdEx:postIndex]) 2431 iNdEx = postIndex 2432 default: 2433 iNdEx = preIndex 2434 skippy, err := skipAccount(dAtA[iNdEx:]) 2435 if err != nil { 2436 return err 2437 } 2438 if (skippy < 0) || (iNdEx+skippy) < 0 { 2439 return ErrInvalidLengthAccount 2440 } 2441 if (iNdEx + skippy) > l { 2442 return io.ErrUnexpectedEOF 2443 } 2444 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2445 iNdEx += skippy 2446 } 2447 } 2448 2449 if iNdEx > l { 2450 return io.ErrUnexpectedEOF 2451 } 2452 return nil 2453 } 2454 func (m *Account) Unmarshal(dAtA []byte) error { 2455 l := len(dAtA) 2456 iNdEx := 0 2457 for iNdEx < l { 2458 preIndex := iNdEx 2459 var wire uint64 2460 for shift := uint(0); ; shift += 7 { 2461 if shift >= 64 { 2462 return ErrIntOverflowAccount 2463 } 2464 if iNdEx >= l { 2465 return io.ErrUnexpectedEOF 2466 } 2467 b := dAtA[iNdEx] 2468 iNdEx++ 2469 wire |= uint64(b&0x7F) << shift 2470 if b < 0x80 { 2471 break 2472 } 2473 } 2474 fieldNum := int32(wire >> 3) 2475 wireType := int(wire & 0x7) 2476 if wireType == 4 { 2477 return fmt.Errorf("proto: Account: wiretype end group for non-group") 2478 } 2479 if fieldNum <= 0 { 2480 return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) 2481 } 2482 switch fieldNum { 2483 case 1: 2484 if wireType != 2 { 2485 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2486 } 2487 var stringLen uint64 2488 for shift := uint(0); ; shift += 7 { 2489 if shift >= 64 { 2490 return ErrIntOverflowAccount 2491 } 2492 if iNdEx >= l { 2493 return io.ErrUnexpectedEOF 2494 } 2495 b := dAtA[iNdEx] 2496 iNdEx++ 2497 stringLen |= uint64(b&0x7F) << shift 2498 if b < 0x80 { 2499 break 2500 } 2501 } 2502 intStringLen := int(stringLen) 2503 if intStringLen < 0 { 2504 return ErrInvalidLengthAccount 2505 } 2506 postIndex := iNdEx + intStringLen 2507 if postIndex < 0 { 2508 return ErrInvalidLengthAccount 2509 } 2510 if postIndex > l { 2511 return io.ErrUnexpectedEOF 2512 } 2513 m.Name = string(dAtA[iNdEx:postIndex]) 2514 iNdEx = postIndex 2515 case 2: 2516 if wireType != 0 { 2517 return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) 2518 } 2519 var v int 2520 for shift := uint(0); ; shift += 7 { 2521 if shift >= 64 { 2522 return ErrIntOverflowAccount 2523 } 2524 if iNdEx >= l { 2525 return io.ErrUnexpectedEOF 2526 } 2527 b := dAtA[iNdEx] 2528 iNdEx++ 2529 v |= int(b&0x7F) << shift 2530 if b < 0x80 { 2531 break 2532 } 2533 } 2534 m.Enabled = bool(v != 0) 2535 case 3: 2536 if wireType != 2 { 2537 return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) 2538 } 2539 var stringLen uint64 2540 for shift := uint(0); ; shift += 7 { 2541 if shift >= 64 { 2542 return ErrIntOverflowAccount 2543 } 2544 if iNdEx >= l { 2545 return io.ErrUnexpectedEOF 2546 } 2547 b := dAtA[iNdEx] 2548 iNdEx++ 2549 stringLen |= uint64(b&0x7F) << shift 2550 if b < 0x80 { 2551 break 2552 } 2553 } 2554 intStringLen := int(stringLen) 2555 if intStringLen < 0 { 2556 return ErrInvalidLengthAccount 2557 } 2558 postIndex := iNdEx + intStringLen 2559 if postIndex < 0 { 2560 return ErrInvalidLengthAccount 2561 } 2562 if postIndex > l { 2563 return io.ErrUnexpectedEOF 2564 } 2565 m.Capabilities = append(m.Capabilities, string(dAtA[iNdEx:postIndex])) 2566 iNdEx = postIndex 2567 case 4: 2568 if wireType != 2 { 2569 return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) 2570 } 2571 var msglen int 2572 for shift := uint(0); ; shift += 7 { 2573 if shift >= 64 { 2574 return ErrIntOverflowAccount 2575 } 2576 if iNdEx >= l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 b := dAtA[iNdEx] 2580 iNdEx++ 2581 msglen |= int(b&0x7F) << shift 2582 if b < 0x80 { 2583 break 2584 } 2585 } 2586 if msglen < 0 { 2587 return ErrInvalidLengthAccount 2588 } 2589 postIndex := iNdEx + msglen 2590 if postIndex < 0 { 2591 return ErrInvalidLengthAccount 2592 } 2593 if postIndex > l { 2594 return io.ErrUnexpectedEOF 2595 } 2596 m.Tokens = append(m.Tokens, &Token{}) 2597 if err := m.Tokens[len(m.Tokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2598 return err 2599 } 2600 iNdEx = postIndex 2601 default: 2602 iNdEx = preIndex 2603 skippy, err := skipAccount(dAtA[iNdEx:]) 2604 if err != nil { 2605 return err 2606 } 2607 if (skippy < 0) || (iNdEx+skippy) < 0 { 2608 return ErrInvalidLengthAccount 2609 } 2610 if (iNdEx + skippy) > l { 2611 return io.ErrUnexpectedEOF 2612 } 2613 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2614 iNdEx += skippy 2615 } 2616 } 2617 2618 if iNdEx > l { 2619 return io.ErrUnexpectedEOF 2620 } 2621 return nil 2622 } 2623 func (m *AccountsList) Unmarshal(dAtA []byte) error { 2624 l := len(dAtA) 2625 iNdEx := 0 2626 for iNdEx < l { 2627 preIndex := iNdEx 2628 var wire uint64 2629 for shift := uint(0); ; shift += 7 { 2630 if shift >= 64 { 2631 return ErrIntOverflowAccount 2632 } 2633 if iNdEx >= l { 2634 return io.ErrUnexpectedEOF 2635 } 2636 b := dAtA[iNdEx] 2637 iNdEx++ 2638 wire |= uint64(b&0x7F) << shift 2639 if b < 0x80 { 2640 break 2641 } 2642 } 2643 fieldNum := int32(wire >> 3) 2644 wireType := int(wire & 0x7) 2645 if wireType == 4 { 2646 return fmt.Errorf("proto: AccountsList: wiretype end group for non-group") 2647 } 2648 if fieldNum <= 0 { 2649 return fmt.Errorf("proto: AccountsList: illegal tag %d (wire type %d)", fieldNum, wire) 2650 } 2651 switch fieldNum { 2652 case 1: 2653 if wireType != 2 { 2654 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) 2655 } 2656 var msglen int 2657 for shift := uint(0); ; shift += 7 { 2658 if shift >= 64 { 2659 return ErrIntOverflowAccount 2660 } 2661 if iNdEx >= l { 2662 return io.ErrUnexpectedEOF 2663 } 2664 b := dAtA[iNdEx] 2665 iNdEx++ 2666 msglen |= int(b&0x7F) << shift 2667 if b < 0x80 { 2668 break 2669 } 2670 } 2671 if msglen < 0 { 2672 return ErrInvalidLengthAccount 2673 } 2674 postIndex := iNdEx + msglen 2675 if postIndex < 0 { 2676 return ErrInvalidLengthAccount 2677 } 2678 if postIndex > l { 2679 return io.ErrUnexpectedEOF 2680 } 2681 m.Items = append(m.Items, &Account{}) 2682 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2683 return err 2684 } 2685 iNdEx = postIndex 2686 default: 2687 iNdEx = preIndex 2688 skippy, err := skipAccount(dAtA[iNdEx:]) 2689 if err != nil { 2690 return err 2691 } 2692 if (skippy < 0) || (iNdEx+skippy) < 0 { 2693 return ErrInvalidLengthAccount 2694 } 2695 if (iNdEx + skippy) > l { 2696 return io.ErrUnexpectedEOF 2697 } 2698 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2699 iNdEx += skippy 2700 } 2701 } 2702 2703 if iNdEx > l { 2704 return io.ErrUnexpectedEOF 2705 } 2706 return nil 2707 } 2708 func (m *Token) Unmarshal(dAtA []byte) error { 2709 l := len(dAtA) 2710 iNdEx := 0 2711 for iNdEx < l { 2712 preIndex := iNdEx 2713 var wire uint64 2714 for shift := uint(0); ; shift += 7 { 2715 if shift >= 64 { 2716 return ErrIntOverflowAccount 2717 } 2718 if iNdEx >= l { 2719 return io.ErrUnexpectedEOF 2720 } 2721 b := dAtA[iNdEx] 2722 iNdEx++ 2723 wire |= uint64(b&0x7F) << shift 2724 if b < 0x80 { 2725 break 2726 } 2727 } 2728 fieldNum := int32(wire >> 3) 2729 wireType := int(wire & 0x7) 2730 if wireType == 4 { 2731 return fmt.Errorf("proto: Token: wiretype end group for non-group") 2732 } 2733 if fieldNum <= 0 { 2734 return fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire) 2735 } 2736 switch fieldNum { 2737 case 1: 2738 if wireType != 2 { 2739 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 2740 } 2741 var stringLen uint64 2742 for shift := uint(0); ; shift += 7 { 2743 if shift >= 64 { 2744 return ErrIntOverflowAccount 2745 } 2746 if iNdEx >= l { 2747 return io.ErrUnexpectedEOF 2748 } 2749 b := dAtA[iNdEx] 2750 iNdEx++ 2751 stringLen |= uint64(b&0x7F) << shift 2752 if b < 0x80 { 2753 break 2754 } 2755 } 2756 intStringLen := int(stringLen) 2757 if intStringLen < 0 { 2758 return ErrInvalidLengthAccount 2759 } 2760 postIndex := iNdEx + intStringLen 2761 if postIndex < 0 { 2762 return ErrInvalidLengthAccount 2763 } 2764 if postIndex > l { 2765 return io.ErrUnexpectedEOF 2766 } 2767 m.Id = string(dAtA[iNdEx:postIndex]) 2768 iNdEx = postIndex 2769 case 2: 2770 if wireType != 0 { 2771 return fmt.Errorf("proto: wrong wireType = %d for field IssuedAt", wireType) 2772 } 2773 m.IssuedAt = 0 2774 for shift := uint(0); ; shift += 7 { 2775 if shift >= 64 { 2776 return ErrIntOverflowAccount 2777 } 2778 if iNdEx >= l { 2779 return io.ErrUnexpectedEOF 2780 } 2781 b := dAtA[iNdEx] 2782 iNdEx++ 2783 m.IssuedAt |= int64(b&0x7F) << shift 2784 if b < 0x80 { 2785 break 2786 } 2787 } 2788 case 3: 2789 if wireType != 0 { 2790 return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAt", wireType) 2791 } 2792 m.ExpiresAt = 0 2793 for shift := uint(0); ; shift += 7 { 2794 if shift >= 64 { 2795 return ErrIntOverflowAccount 2796 } 2797 if iNdEx >= l { 2798 return io.ErrUnexpectedEOF 2799 } 2800 b := dAtA[iNdEx] 2801 iNdEx++ 2802 m.ExpiresAt |= int64(b&0x7F) << shift 2803 if b < 0x80 { 2804 break 2805 } 2806 } 2807 default: 2808 iNdEx = preIndex 2809 skippy, err := skipAccount(dAtA[iNdEx:]) 2810 if err != nil { 2811 return err 2812 } 2813 if (skippy < 0) || (iNdEx+skippy) < 0 { 2814 return ErrInvalidLengthAccount 2815 } 2816 if (iNdEx + skippy) > l { 2817 return io.ErrUnexpectedEOF 2818 } 2819 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2820 iNdEx += skippy 2821 } 2822 } 2823 2824 if iNdEx > l { 2825 return io.ErrUnexpectedEOF 2826 } 2827 return nil 2828 } 2829 func (m *TokensList) Unmarshal(dAtA []byte) error { 2830 l := len(dAtA) 2831 iNdEx := 0 2832 for iNdEx < l { 2833 preIndex := iNdEx 2834 var wire uint64 2835 for shift := uint(0); ; shift += 7 { 2836 if shift >= 64 { 2837 return ErrIntOverflowAccount 2838 } 2839 if iNdEx >= l { 2840 return io.ErrUnexpectedEOF 2841 } 2842 b := dAtA[iNdEx] 2843 iNdEx++ 2844 wire |= uint64(b&0x7F) << shift 2845 if b < 0x80 { 2846 break 2847 } 2848 } 2849 fieldNum := int32(wire >> 3) 2850 wireType := int(wire & 0x7) 2851 if wireType == 4 { 2852 return fmt.Errorf("proto: TokensList: wiretype end group for non-group") 2853 } 2854 if fieldNum <= 0 { 2855 return fmt.Errorf("proto: TokensList: illegal tag %d (wire type %d)", fieldNum, wire) 2856 } 2857 switch fieldNum { 2858 case 1: 2859 if wireType != 2 { 2860 return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) 2861 } 2862 var msglen int 2863 for shift := uint(0); ; shift += 7 { 2864 if shift >= 64 { 2865 return ErrIntOverflowAccount 2866 } 2867 if iNdEx >= l { 2868 return io.ErrUnexpectedEOF 2869 } 2870 b := dAtA[iNdEx] 2871 iNdEx++ 2872 msglen |= int(b&0x7F) << shift 2873 if b < 0x80 { 2874 break 2875 } 2876 } 2877 if msglen < 0 { 2878 return ErrInvalidLengthAccount 2879 } 2880 postIndex := iNdEx + msglen 2881 if postIndex < 0 { 2882 return ErrInvalidLengthAccount 2883 } 2884 if postIndex > l { 2885 return io.ErrUnexpectedEOF 2886 } 2887 m.Items = append(m.Items, &Token{}) 2888 if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2889 return err 2890 } 2891 iNdEx = postIndex 2892 default: 2893 iNdEx = preIndex 2894 skippy, err := skipAccount(dAtA[iNdEx:]) 2895 if err != nil { 2896 return err 2897 } 2898 if (skippy < 0) || (iNdEx+skippy) < 0 { 2899 return ErrInvalidLengthAccount 2900 } 2901 if (iNdEx + skippy) > l { 2902 return io.ErrUnexpectedEOF 2903 } 2904 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2905 iNdEx += skippy 2906 } 2907 } 2908 2909 if iNdEx > l { 2910 return io.ErrUnexpectedEOF 2911 } 2912 return nil 2913 } 2914 func (m *CreateTokenRequest) Unmarshal(dAtA []byte) error { 2915 l := len(dAtA) 2916 iNdEx := 0 2917 for iNdEx < l { 2918 preIndex := iNdEx 2919 var wire uint64 2920 for shift := uint(0); ; shift += 7 { 2921 if shift >= 64 { 2922 return ErrIntOverflowAccount 2923 } 2924 if iNdEx >= l { 2925 return io.ErrUnexpectedEOF 2926 } 2927 b := dAtA[iNdEx] 2928 iNdEx++ 2929 wire |= uint64(b&0x7F) << shift 2930 if b < 0x80 { 2931 break 2932 } 2933 } 2934 fieldNum := int32(wire >> 3) 2935 wireType := int(wire & 0x7) 2936 if wireType == 4 { 2937 return fmt.Errorf("proto: CreateTokenRequest: wiretype end group for non-group") 2938 } 2939 if fieldNum <= 0 { 2940 return fmt.Errorf("proto: CreateTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2941 } 2942 switch fieldNum { 2943 case 1: 2944 if wireType != 2 { 2945 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2946 } 2947 var stringLen uint64 2948 for shift := uint(0); ; shift += 7 { 2949 if shift >= 64 { 2950 return ErrIntOverflowAccount 2951 } 2952 if iNdEx >= l { 2953 return io.ErrUnexpectedEOF 2954 } 2955 b := dAtA[iNdEx] 2956 iNdEx++ 2957 stringLen |= uint64(b&0x7F) << shift 2958 if b < 0x80 { 2959 break 2960 } 2961 } 2962 intStringLen := int(stringLen) 2963 if intStringLen < 0 { 2964 return ErrInvalidLengthAccount 2965 } 2966 postIndex := iNdEx + intStringLen 2967 if postIndex < 0 { 2968 return ErrInvalidLengthAccount 2969 } 2970 if postIndex > l { 2971 return io.ErrUnexpectedEOF 2972 } 2973 m.Name = string(dAtA[iNdEx:postIndex]) 2974 iNdEx = postIndex 2975 case 2: 2976 if wireType != 0 { 2977 return fmt.Errorf("proto: wrong wireType = %d for field ExpiresIn", wireType) 2978 } 2979 m.ExpiresIn = 0 2980 for shift := uint(0); ; shift += 7 { 2981 if shift >= 64 { 2982 return ErrIntOverflowAccount 2983 } 2984 if iNdEx >= l { 2985 return io.ErrUnexpectedEOF 2986 } 2987 b := dAtA[iNdEx] 2988 iNdEx++ 2989 m.ExpiresIn |= int64(b&0x7F) << shift 2990 if b < 0x80 { 2991 break 2992 } 2993 } 2994 case 3: 2995 if wireType != 2 { 2996 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 2997 } 2998 var stringLen uint64 2999 for shift := uint(0); ; shift += 7 { 3000 if shift >= 64 { 3001 return ErrIntOverflowAccount 3002 } 3003 if iNdEx >= l { 3004 return io.ErrUnexpectedEOF 3005 } 3006 b := dAtA[iNdEx] 3007 iNdEx++ 3008 stringLen |= uint64(b&0x7F) << shift 3009 if b < 0x80 { 3010 break 3011 } 3012 } 3013 intStringLen := int(stringLen) 3014 if intStringLen < 0 { 3015 return ErrInvalidLengthAccount 3016 } 3017 postIndex := iNdEx + intStringLen 3018 if postIndex < 0 { 3019 return ErrInvalidLengthAccount 3020 } 3021 if postIndex > l { 3022 return io.ErrUnexpectedEOF 3023 } 3024 m.Id = string(dAtA[iNdEx:postIndex]) 3025 iNdEx = postIndex 3026 default: 3027 iNdEx = preIndex 3028 skippy, err := skipAccount(dAtA[iNdEx:]) 3029 if err != nil { 3030 return err 3031 } 3032 if (skippy < 0) || (iNdEx+skippy) < 0 { 3033 return ErrInvalidLengthAccount 3034 } 3035 if (iNdEx + skippy) > l { 3036 return io.ErrUnexpectedEOF 3037 } 3038 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3039 iNdEx += skippy 3040 } 3041 } 3042 3043 if iNdEx > l { 3044 return io.ErrUnexpectedEOF 3045 } 3046 return nil 3047 } 3048 func (m *CreateTokenResponse) Unmarshal(dAtA []byte) error { 3049 l := len(dAtA) 3050 iNdEx := 0 3051 for iNdEx < l { 3052 preIndex := iNdEx 3053 var wire uint64 3054 for shift := uint(0); ; shift += 7 { 3055 if shift >= 64 { 3056 return ErrIntOverflowAccount 3057 } 3058 if iNdEx >= l { 3059 return io.ErrUnexpectedEOF 3060 } 3061 b := dAtA[iNdEx] 3062 iNdEx++ 3063 wire |= uint64(b&0x7F) << shift 3064 if b < 0x80 { 3065 break 3066 } 3067 } 3068 fieldNum := int32(wire >> 3) 3069 wireType := int(wire & 0x7) 3070 if wireType == 4 { 3071 return fmt.Errorf("proto: CreateTokenResponse: wiretype end group for non-group") 3072 } 3073 if fieldNum <= 0 { 3074 return fmt.Errorf("proto: CreateTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3075 } 3076 switch fieldNum { 3077 case 1: 3078 if wireType != 2 { 3079 return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) 3080 } 3081 var stringLen uint64 3082 for shift := uint(0); ; shift += 7 { 3083 if shift >= 64 { 3084 return ErrIntOverflowAccount 3085 } 3086 if iNdEx >= l { 3087 return io.ErrUnexpectedEOF 3088 } 3089 b := dAtA[iNdEx] 3090 iNdEx++ 3091 stringLen |= uint64(b&0x7F) << shift 3092 if b < 0x80 { 3093 break 3094 } 3095 } 3096 intStringLen := int(stringLen) 3097 if intStringLen < 0 { 3098 return ErrInvalidLengthAccount 3099 } 3100 postIndex := iNdEx + intStringLen 3101 if postIndex < 0 { 3102 return ErrInvalidLengthAccount 3103 } 3104 if postIndex > l { 3105 return io.ErrUnexpectedEOF 3106 } 3107 m.Token = string(dAtA[iNdEx:postIndex]) 3108 iNdEx = postIndex 3109 default: 3110 iNdEx = preIndex 3111 skippy, err := skipAccount(dAtA[iNdEx:]) 3112 if err != nil { 3113 return err 3114 } 3115 if (skippy < 0) || (iNdEx+skippy) < 0 { 3116 return ErrInvalidLengthAccount 3117 } 3118 if (iNdEx + skippy) > l { 3119 return io.ErrUnexpectedEOF 3120 } 3121 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3122 iNdEx += skippy 3123 } 3124 } 3125 3126 if iNdEx > l { 3127 return io.ErrUnexpectedEOF 3128 } 3129 return nil 3130 } 3131 func (m *DeleteTokenRequest) Unmarshal(dAtA []byte) error { 3132 l := len(dAtA) 3133 iNdEx := 0 3134 for iNdEx < l { 3135 preIndex := iNdEx 3136 var wire uint64 3137 for shift := uint(0); ; shift += 7 { 3138 if shift >= 64 { 3139 return ErrIntOverflowAccount 3140 } 3141 if iNdEx >= l { 3142 return io.ErrUnexpectedEOF 3143 } 3144 b := dAtA[iNdEx] 3145 iNdEx++ 3146 wire |= uint64(b&0x7F) << shift 3147 if b < 0x80 { 3148 break 3149 } 3150 } 3151 fieldNum := int32(wire >> 3) 3152 wireType := int(wire & 0x7) 3153 if wireType == 4 { 3154 return fmt.Errorf("proto: DeleteTokenRequest: wiretype end group for non-group") 3155 } 3156 if fieldNum <= 0 { 3157 return fmt.Errorf("proto: DeleteTokenRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3158 } 3159 switch fieldNum { 3160 case 1: 3161 if wireType != 2 { 3162 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3163 } 3164 var stringLen uint64 3165 for shift := uint(0); ; shift += 7 { 3166 if shift >= 64 { 3167 return ErrIntOverflowAccount 3168 } 3169 if iNdEx >= l { 3170 return io.ErrUnexpectedEOF 3171 } 3172 b := dAtA[iNdEx] 3173 iNdEx++ 3174 stringLen |= uint64(b&0x7F) << shift 3175 if b < 0x80 { 3176 break 3177 } 3178 } 3179 intStringLen := int(stringLen) 3180 if intStringLen < 0 { 3181 return ErrInvalidLengthAccount 3182 } 3183 postIndex := iNdEx + intStringLen 3184 if postIndex < 0 { 3185 return ErrInvalidLengthAccount 3186 } 3187 if postIndex > l { 3188 return io.ErrUnexpectedEOF 3189 } 3190 m.Name = string(dAtA[iNdEx:postIndex]) 3191 iNdEx = postIndex 3192 case 2: 3193 if wireType != 2 { 3194 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 3195 } 3196 var stringLen uint64 3197 for shift := uint(0); ; shift += 7 { 3198 if shift >= 64 { 3199 return ErrIntOverflowAccount 3200 } 3201 if iNdEx >= l { 3202 return io.ErrUnexpectedEOF 3203 } 3204 b := dAtA[iNdEx] 3205 iNdEx++ 3206 stringLen |= uint64(b&0x7F) << shift 3207 if b < 0x80 { 3208 break 3209 } 3210 } 3211 intStringLen := int(stringLen) 3212 if intStringLen < 0 { 3213 return ErrInvalidLengthAccount 3214 } 3215 postIndex := iNdEx + intStringLen 3216 if postIndex < 0 { 3217 return ErrInvalidLengthAccount 3218 } 3219 if postIndex > l { 3220 return io.ErrUnexpectedEOF 3221 } 3222 m.Id = string(dAtA[iNdEx:postIndex]) 3223 iNdEx = postIndex 3224 default: 3225 iNdEx = preIndex 3226 skippy, err := skipAccount(dAtA[iNdEx:]) 3227 if err != nil { 3228 return err 3229 } 3230 if (skippy < 0) || (iNdEx+skippy) < 0 { 3231 return ErrInvalidLengthAccount 3232 } 3233 if (iNdEx + skippy) > l { 3234 return io.ErrUnexpectedEOF 3235 } 3236 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3237 iNdEx += skippy 3238 } 3239 } 3240 3241 if iNdEx > l { 3242 return io.ErrUnexpectedEOF 3243 } 3244 return nil 3245 } 3246 func (m *ListAccountRequest) Unmarshal(dAtA []byte) error { 3247 l := len(dAtA) 3248 iNdEx := 0 3249 for iNdEx < l { 3250 preIndex := iNdEx 3251 var wire uint64 3252 for shift := uint(0); ; shift += 7 { 3253 if shift >= 64 { 3254 return ErrIntOverflowAccount 3255 } 3256 if iNdEx >= l { 3257 return io.ErrUnexpectedEOF 3258 } 3259 b := dAtA[iNdEx] 3260 iNdEx++ 3261 wire |= uint64(b&0x7F) << shift 3262 if b < 0x80 { 3263 break 3264 } 3265 } 3266 fieldNum := int32(wire >> 3) 3267 wireType := int(wire & 0x7) 3268 if wireType == 4 { 3269 return fmt.Errorf("proto: ListAccountRequest: wiretype end group for non-group") 3270 } 3271 if fieldNum <= 0 { 3272 return fmt.Errorf("proto: ListAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3273 } 3274 switch fieldNum { 3275 default: 3276 iNdEx = preIndex 3277 skippy, err := skipAccount(dAtA[iNdEx:]) 3278 if err != nil { 3279 return err 3280 } 3281 if (skippy < 0) || (iNdEx+skippy) < 0 { 3282 return ErrInvalidLengthAccount 3283 } 3284 if (iNdEx + skippy) > l { 3285 return io.ErrUnexpectedEOF 3286 } 3287 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3288 iNdEx += skippy 3289 } 3290 } 3291 3292 if iNdEx > l { 3293 return io.ErrUnexpectedEOF 3294 } 3295 return nil 3296 } 3297 func (m *EmptyResponse) Unmarshal(dAtA []byte) error { 3298 l := len(dAtA) 3299 iNdEx := 0 3300 for iNdEx < l { 3301 preIndex := iNdEx 3302 var wire uint64 3303 for shift := uint(0); ; shift += 7 { 3304 if shift >= 64 { 3305 return ErrIntOverflowAccount 3306 } 3307 if iNdEx >= l { 3308 return io.ErrUnexpectedEOF 3309 } 3310 b := dAtA[iNdEx] 3311 iNdEx++ 3312 wire |= uint64(b&0x7F) << shift 3313 if b < 0x80 { 3314 break 3315 } 3316 } 3317 fieldNum := int32(wire >> 3) 3318 wireType := int(wire & 0x7) 3319 if wireType == 4 { 3320 return fmt.Errorf("proto: EmptyResponse: wiretype end group for non-group") 3321 } 3322 if fieldNum <= 0 { 3323 return fmt.Errorf("proto: EmptyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3324 } 3325 switch fieldNum { 3326 default: 3327 iNdEx = preIndex 3328 skippy, err := skipAccount(dAtA[iNdEx:]) 3329 if err != nil { 3330 return err 3331 } 3332 if (skippy < 0) || (iNdEx+skippy) < 0 { 3333 return ErrInvalidLengthAccount 3334 } 3335 if (iNdEx + skippy) > l { 3336 return io.ErrUnexpectedEOF 3337 } 3338 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3339 iNdEx += skippy 3340 } 3341 } 3342 3343 if iNdEx > l { 3344 return io.ErrUnexpectedEOF 3345 } 3346 return nil 3347 } 3348 func skipAccount(dAtA []byte) (n int, err error) { 3349 l := len(dAtA) 3350 iNdEx := 0 3351 depth := 0 3352 for iNdEx < l { 3353 var wire uint64 3354 for shift := uint(0); ; shift += 7 { 3355 if shift >= 64 { 3356 return 0, ErrIntOverflowAccount 3357 } 3358 if iNdEx >= l { 3359 return 0, io.ErrUnexpectedEOF 3360 } 3361 b := dAtA[iNdEx] 3362 iNdEx++ 3363 wire |= (uint64(b) & 0x7F) << shift 3364 if b < 0x80 { 3365 break 3366 } 3367 } 3368 wireType := int(wire & 0x7) 3369 switch wireType { 3370 case 0: 3371 for shift := uint(0); ; shift += 7 { 3372 if shift >= 64 { 3373 return 0, ErrIntOverflowAccount 3374 } 3375 if iNdEx >= l { 3376 return 0, io.ErrUnexpectedEOF 3377 } 3378 iNdEx++ 3379 if dAtA[iNdEx-1] < 0x80 { 3380 break 3381 } 3382 } 3383 case 1: 3384 iNdEx += 8 3385 case 2: 3386 var length int 3387 for shift := uint(0); ; shift += 7 { 3388 if shift >= 64 { 3389 return 0, ErrIntOverflowAccount 3390 } 3391 if iNdEx >= l { 3392 return 0, io.ErrUnexpectedEOF 3393 } 3394 b := dAtA[iNdEx] 3395 iNdEx++ 3396 length |= (int(b) & 0x7F) << shift 3397 if b < 0x80 { 3398 break 3399 } 3400 } 3401 if length < 0 { 3402 return 0, ErrInvalidLengthAccount 3403 } 3404 iNdEx += length 3405 case 3: 3406 depth++ 3407 case 4: 3408 if depth == 0 { 3409 return 0, ErrUnexpectedEndOfGroupAccount 3410 } 3411 depth-- 3412 case 5: 3413 iNdEx += 4 3414 default: 3415 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3416 } 3417 if iNdEx < 0 { 3418 return 0, ErrInvalidLengthAccount 3419 } 3420 if depth == 0 { 3421 return iNdEx, nil 3422 } 3423 } 3424 return 0, io.ErrUnexpectedEOF 3425 } 3426 3427 var ( 3428 ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") 3429 ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") 3430 ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") 3431 )