github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/protocol/keybase1/user.go (about) 1 // Auto-generated to Go types and interfaces using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler) 2 // Input file: avdl/keybase1/user.avdl 3 4 package keybase1 5 6 import ( 7 "fmt" 8 "github.com/keybase/go-framed-msgpack-rpc/rpc" 9 context "golang.org/x/net/context" 10 "time" 11 ) 12 13 type TrackProof struct { 14 ProofType string `codec:"proofType" json:"proofType"` 15 ProofName string `codec:"proofName" json:"proofName"` 16 IdString string `codec:"idString" json:"idString"` 17 } 18 19 func (o TrackProof) DeepCopy() TrackProof { 20 return TrackProof{ 21 ProofType: o.ProofType, 22 ProofName: o.ProofName, 23 IdString: o.IdString, 24 } 25 } 26 27 type WebProof struct { 28 Hostname string `codec:"hostname" json:"hostname"` 29 Protocols []string `codec:"protocols" json:"protocols"` 30 } 31 32 func (o WebProof) DeepCopy() WebProof { 33 return WebProof{ 34 Hostname: o.Hostname, 35 Protocols: (func(x []string) []string { 36 if x == nil { 37 return nil 38 } 39 ret := make([]string, len(x)) 40 for i, v := range x { 41 vCopy := v 42 ret[i] = vCopy 43 } 44 return ret 45 })(o.Protocols), 46 } 47 } 48 49 type Proofs struct { 50 Social []TrackProof `codec:"social" json:"social"` 51 Web []WebProof `codec:"web" json:"web"` 52 PublicKeys []PublicKey `codec:"publicKeys" json:"publicKeys"` 53 } 54 55 func (o Proofs) DeepCopy() Proofs { 56 return Proofs{ 57 Social: (func(x []TrackProof) []TrackProof { 58 if x == nil { 59 return nil 60 } 61 ret := make([]TrackProof, len(x)) 62 for i, v := range x { 63 vCopy := v.DeepCopy() 64 ret[i] = vCopy 65 } 66 return ret 67 })(o.Social), 68 Web: (func(x []WebProof) []WebProof { 69 if x == nil { 70 return nil 71 } 72 ret := make([]WebProof, len(x)) 73 for i, v := range x { 74 vCopy := v.DeepCopy() 75 ret[i] = vCopy 76 } 77 return ret 78 })(o.Web), 79 PublicKeys: (func(x []PublicKey) []PublicKey { 80 if x == nil { 81 return nil 82 } 83 ret := make([]PublicKey, len(x)) 84 for i, v := range x { 85 vCopy := v.DeepCopy() 86 ret[i] = vCopy 87 } 88 return ret 89 })(o.PublicKeys), 90 } 91 } 92 93 type UserSummary struct { 94 Uid UID `codec:"uid" json:"uid"` 95 Username string `codec:"username" json:"username"` 96 FullName string `codec:"fullName" json:"fullName"` 97 LinkID *LinkID `codec:"linkID,omitempty" json:"linkID,omitempty"` 98 } 99 100 func (o UserSummary) DeepCopy() UserSummary { 101 return UserSummary{ 102 Uid: o.Uid.DeepCopy(), 103 Username: o.Username, 104 FullName: o.FullName, 105 LinkID: (func(x *LinkID) *LinkID { 106 if x == nil { 107 return nil 108 } 109 tmp := (*x).DeepCopy() 110 return &tmp 111 })(o.LinkID), 112 } 113 } 114 115 type UserSummarySet struct { 116 Users []UserSummary `codec:"users" json:"users"` 117 Time Time `codec:"time" json:"time"` 118 Version int `codec:"version" json:"version"` 119 } 120 121 func (o UserSummarySet) DeepCopy() UserSummarySet { 122 return UserSummarySet{ 123 Users: (func(x []UserSummary) []UserSummary { 124 if x == nil { 125 return nil 126 } 127 ret := make([]UserSummary, len(x)) 128 for i, v := range x { 129 vCopy := v.DeepCopy() 130 ret[i] = vCopy 131 } 132 return ret 133 })(o.Users), 134 Time: o.Time.DeepCopy(), 135 Version: o.Version, 136 } 137 } 138 139 type EmailAddress string 140 141 func (o EmailAddress) DeepCopy() EmailAddress { 142 return o 143 } 144 145 type Email struct { 146 Email EmailAddress `codec:"email" json:"email"` 147 IsVerified bool `codec:"isVerified" json:"isVerified"` 148 IsPrimary bool `codec:"isPrimary" json:"isPrimary"` 149 Visibility IdentityVisibility `codec:"visibility" json:"visibility"` 150 LastVerifyEmailDate UnixTime `codec:"lastVerifyEmailDate" json:"lastVerifyEmailDate"` 151 } 152 153 func (o Email) DeepCopy() Email { 154 return Email{ 155 Email: o.Email.DeepCopy(), 156 IsVerified: o.IsVerified, 157 IsPrimary: o.IsPrimary, 158 Visibility: o.Visibility.DeepCopy(), 159 LastVerifyEmailDate: o.LastVerifyEmailDate.DeepCopy(), 160 } 161 } 162 163 type UserSettings struct { 164 Emails []Email `codec:"emails" json:"emails"` 165 PhoneNumbers []UserPhoneNumber `codec:"phoneNumbers" json:"phoneNumbers"` 166 } 167 168 func (o UserSettings) DeepCopy() UserSettings { 169 return UserSettings{ 170 Emails: (func(x []Email) []Email { 171 if x == nil { 172 return nil 173 } 174 ret := make([]Email, len(x)) 175 for i, v := range x { 176 vCopy := v.DeepCopy() 177 ret[i] = vCopy 178 } 179 return ret 180 })(o.Emails), 181 PhoneNumbers: (func(x []UserPhoneNumber) []UserPhoneNumber { 182 if x == nil { 183 return nil 184 } 185 ret := make([]UserPhoneNumber, len(x)) 186 for i, v := range x { 187 vCopy := v.DeepCopy() 188 ret[i] = vCopy 189 } 190 return ret 191 })(o.PhoneNumbers), 192 } 193 } 194 195 type InterestingPerson struct { 196 Uid UID `codec:"uid" json:"uid"` 197 Username string `codec:"username" json:"username"` 198 Fullname string `codec:"fullname" json:"fullname"` 199 ServiceMap map[string]string `codec:"serviceMap" json:"serviceMap"` 200 } 201 202 func (o InterestingPerson) DeepCopy() InterestingPerson { 203 return InterestingPerson{ 204 Uid: o.Uid.DeepCopy(), 205 Username: o.Username, 206 Fullname: o.Fullname, 207 ServiceMap: (func(x map[string]string) map[string]string { 208 if x == nil { 209 return nil 210 } 211 ret := make(map[string]string, len(x)) 212 for k, v := range x { 213 kCopy := k 214 vCopy := v 215 ret[kCopy] = vCopy 216 } 217 return ret 218 })(o.ServiceMap), 219 } 220 } 221 222 type ProofSuggestionsRes struct { 223 Suggestions []ProofSuggestion `codec:"suggestions" json:"suggestions"` 224 ShowMore bool `codec:"showMore" json:"showMore"` 225 } 226 227 func (o ProofSuggestionsRes) DeepCopy() ProofSuggestionsRes { 228 return ProofSuggestionsRes{ 229 Suggestions: (func(x []ProofSuggestion) []ProofSuggestion { 230 if x == nil { 231 return nil 232 } 233 ret := make([]ProofSuggestion, len(x)) 234 for i, v := range x { 235 vCopy := v.DeepCopy() 236 ret[i] = vCopy 237 } 238 return ret 239 })(o.Suggestions), 240 ShowMore: o.ShowMore, 241 } 242 } 243 244 type ProofSuggestion struct { 245 Key string `codec:"key" json:"key"` 246 BelowFold bool `codec:"belowFold" json:"belowFold"` 247 ProfileText string `codec:"profileText" json:"profileText"` 248 ProfileIcon []SizedImage `codec:"profileIcon" json:"profileIcon"` 249 ProfileIconDarkmode []SizedImage `codec:"profileIconDarkmode" json:"profileIconDarkmode"` 250 PickerText string `codec:"pickerText" json:"pickerText"` 251 PickerSubtext string `codec:"pickerSubtext" json:"pickerSubtext"` 252 PickerIcon []SizedImage `codec:"pickerIcon" json:"pickerIcon"` 253 PickerIconDarkmode []SizedImage `codec:"pickerIconDarkmode" json:"pickerIconDarkmode"` 254 Metas []Identify3RowMeta `codec:"metas" json:"metas"` 255 } 256 257 func (o ProofSuggestion) DeepCopy() ProofSuggestion { 258 return ProofSuggestion{ 259 Key: o.Key, 260 BelowFold: o.BelowFold, 261 ProfileText: o.ProfileText, 262 ProfileIcon: (func(x []SizedImage) []SizedImage { 263 if x == nil { 264 return nil 265 } 266 ret := make([]SizedImage, len(x)) 267 for i, v := range x { 268 vCopy := v.DeepCopy() 269 ret[i] = vCopy 270 } 271 return ret 272 })(o.ProfileIcon), 273 ProfileIconDarkmode: (func(x []SizedImage) []SizedImage { 274 if x == nil { 275 return nil 276 } 277 ret := make([]SizedImage, len(x)) 278 for i, v := range x { 279 vCopy := v.DeepCopy() 280 ret[i] = vCopy 281 } 282 return ret 283 })(o.ProfileIconDarkmode), 284 PickerText: o.PickerText, 285 PickerSubtext: o.PickerSubtext, 286 PickerIcon: (func(x []SizedImage) []SizedImage { 287 if x == nil { 288 return nil 289 } 290 ret := make([]SizedImage, len(x)) 291 for i, v := range x { 292 vCopy := v.DeepCopy() 293 ret[i] = vCopy 294 } 295 return ret 296 })(o.PickerIcon), 297 PickerIconDarkmode: (func(x []SizedImage) []SizedImage { 298 if x == nil { 299 return nil 300 } 301 ret := make([]SizedImage, len(x)) 302 for i, v := range x { 303 vCopy := v.DeepCopy() 304 ret[i] = vCopy 305 } 306 return ret 307 })(o.PickerIconDarkmode), 308 Metas: (func(x []Identify3RowMeta) []Identify3RowMeta { 309 if x == nil { 310 return nil 311 } 312 ret := make([]Identify3RowMeta, len(x)) 313 for i, v := range x { 314 vCopy := v.DeepCopy() 315 ret[i] = vCopy 316 } 317 return ret 318 })(o.Metas), 319 } 320 } 321 322 type NextMerkleRootRes struct { 323 Res *MerkleRootV2 `codec:"res,omitempty" json:"res,omitempty"` 324 } 325 326 func (o NextMerkleRootRes) DeepCopy() NextMerkleRootRes { 327 return NextMerkleRootRes{ 328 Res: (func(x *MerkleRootV2) *MerkleRootV2 { 329 if x == nil { 330 return nil 331 } 332 tmp := (*x).DeepCopy() 333 return &tmp 334 })(o.Res), 335 } 336 } 337 338 // PassphraseState values are used in .config.json, so should not be changed without a migration strategy 339 type PassphraseState int 340 341 const ( 342 PassphraseState_KNOWN PassphraseState = 0 343 PassphraseState_RANDOM PassphraseState = 1 344 ) 345 346 func (o PassphraseState) DeepCopy() PassphraseState { return o } 347 348 var PassphraseStateMap = map[string]PassphraseState{ 349 "KNOWN": 0, 350 "RANDOM": 1, 351 } 352 353 var PassphraseStateRevMap = map[PassphraseState]string{ 354 0: "KNOWN", 355 1: "RANDOM", 356 } 357 358 func (e PassphraseState) String() string { 359 if v, ok := PassphraseStateRevMap[e]; ok { 360 return v 361 } 362 return fmt.Sprintf("%v", int(e)) 363 } 364 365 type CanLogoutRes struct { 366 CanLogout bool `codec:"canLogout" json:"canLogout"` 367 Reason string `codec:"reason" json:"reason"` 368 PassphraseState PassphraseState `codec:"passphraseState" json:"passphraseState"` 369 } 370 371 func (o CanLogoutRes) DeepCopy() CanLogoutRes { 372 return CanLogoutRes{ 373 CanLogout: o.CanLogout, 374 Reason: o.Reason, 375 PassphraseState: o.PassphraseState.DeepCopy(), 376 } 377 } 378 379 type UserPassphraseStateMsg struct { 380 PassphraseState PassphraseState `codec:"passphraseState" json:"state"` 381 } 382 383 func (o UserPassphraseStateMsg) DeepCopy() UserPassphraseStateMsg { 384 return UserPassphraseStateMsg{ 385 PassphraseState: o.PassphraseState.DeepCopy(), 386 } 387 } 388 389 type UserBlockedRow struct { 390 Uid UID `codec:"uid" json:"block_uid"` 391 Username string `codec:"username" json:"block_username"` 392 Chat *bool `codec:"chat,omitempty" json:"chat,omitempty"` 393 Follow *bool `codec:"follow,omitempty" json:"follow,omitempty"` 394 } 395 396 func (o UserBlockedRow) DeepCopy() UserBlockedRow { 397 return UserBlockedRow{ 398 Uid: o.Uid.DeepCopy(), 399 Username: o.Username, 400 Chat: (func(x *bool) *bool { 401 if x == nil { 402 return nil 403 } 404 tmp := (*x) 405 return &tmp 406 })(o.Chat), 407 Follow: (func(x *bool) *bool { 408 if x == nil { 409 return nil 410 } 411 tmp := (*x) 412 return &tmp 413 })(o.Follow), 414 } 415 } 416 417 type UserBlockType int 418 419 const ( 420 UserBlockType_CHAT UserBlockType = 0 421 UserBlockType_FOLLOW UserBlockType = 1 422 ) 423 424 func (o UserBlockType) DeepCopy() UserBlockType { return o } 425 426 var UserBlockTypeMap = map[string]UserBlockType{ 427 "CHAT": 0, 428 "FOLLOW": 1, 429 } 430 431 var UserBlockTypeRevMap = map[UserBlockType]string{ 432 0: "CHAT", 433 1: "FOLLOW", 434 } 435 436 func (e UserBlockType) String() string { 437 if v, ok := UserBlockTypeRevMap[e]; ok { 438 return v 439 } 440 return fmt.Sprintf("%v", int(e)) 441 } 442 443 type UserBlockedBody struct { 444 Blocks []UserBlockedRow `codec:"blocks" json:"blocks"` 445 Uid UID `codec:"uid" json:"blocker_uid"` 446 Username string `codec:"username" json:"blocker_username"` 447 } 448 449 func (o UserBlockedBody) DeepCopy() UserBlockedBody { 450 return UserBlockedBody{ 451 Blocks: (func(x []UserBlockedRow) []UserBlockedRow { 452 if x == nil { 453 return nil 454 } 455 ret := make([]UserBlockedRow, len(x)) 456 for i, v := range x { 457 vCopy := v.DeepCopy() 458 ret[i] = vCopy 459 } 460 return ret 461 })(o.Blocks), 462 Uid: o.Uid.DeepCopy(), 463 Username: o.Username, 464 } 465 } 466 467 type UserBlockState struct { 468 BlockType UserBlockType `codec:"blockType" json:"blockType"` 469 Blocked bool `codec:"blocked" json:"blocked"` 470 } 471 472 func (o UserBlockState) DeepCopy() UserBlockState { 473 return UserBlockState{ 474 BlockType: o.BlockType.DeepCopy(), 475 Blocked: o.Blocked, 476 } 477 } 478 479 type UserBlockedSummary struct { 480 Blocker string `codec:"blocker" json:"blocker"` 481 Blocks map[string][]UserBlockState `codec:"blocks" json:"blocks"` 482 } 483 484 func (o UserBlockedSummary) DeepCopy() UserBlockedSummary { 485 return UserBlockedSummary{ 486 Blocker: o.Blocker, 487 Blocks: (func(x map[string][]UserBlockState) map[string][]UserBlockState { 488 if x == nil { 489 return nil 490 } 491 ret := make(map[string][]UserBlockState, len(x)) 492 for k, v := range x { 493 kCopy := k 494 vCopy := (func(x []UserBlockState) []UserBlockState { 495 if x == nil { 496 return nil 497 } 498 ret := make([]UserBlockState, len(x)) 499 for i, v := range x { 500 vCopy := v.DeepCopy() 501 ret[i] = vCopy 502 } 503 return ret 504 })(v) 505 ret[kCopy] = vCopy 506 } 507 return ret 508 })(o.Blocks), 509 } 510 } 511 512 type UserBlock struct { 513 Username string `codec:"username" json:"username"` 514 ChatBlocked bool `codec:"chatBlocked" json:"chatBlocked"` 515 FollowBlocked bool `codec:"followBlocked" json:"followBlocked"` 516 CreateTime *Time `codec:"createTime,omitempty" json:"createTime,omitempty"` 517 ModifyTime *Time `codec:"modifyTime,omitempty" json:"modifyTime,omitempty"` 518 } 519 520 func (o UserBlock) DeepCopy() UserBlock { 521 return UserBlock{ 522 Username: o.Username, 523 ChatBlocked: o.ChatBlocked, 524 FollowBlocked: o.FollowBlocked, 525 CreateTime: (func(x *Time) *Time { 526 if x == nil { 527 return nil 528 } 529 tmp := (*x).DeepCopy() 530 return &tmp 531 })(o.CreateTime), 532 ModifyTime: (func(x *Time) *Time { 533 if x == nil { 534 return nil 535 } 536 tmp := (*x).DeepCopy() 537 return &tmp 538 })(o.ModifyTime), 539 } 540 } 541 542 type UserBlockArg struct { 543 Username string `codec:"username" json:"username"` 544 SetChatBlock *bool `codec:"setChatBlock,omitempty" json:"setChatBlock,omitempty"` 545 SetFollowBlock *bool `codec:"setFollowBlock,omitempty" json:"setFollowBlock,omitempty"` 546 } 547 548 func (o UserBlockArg) DeepCopy() UserBlockArg { 549 return UserBlockArg{ 550 Username: o.Username, 551 SetChatBlock: (func(x *bool) *bool { 552 if x == nil { 553 return nil 554 } 555 tmp := (*x) 556 return &tmp 557 })(o.SetChatBlock), 558 SetFollowBlock: (func(x *bool) *bool { 559 if x == nil { 560 return nil 561 } 562 tmp := (*x) 563 return &tmp 564 })(o.SetFollowBlock), 565 } 566 } 567 568 type TeamBlock struct { 569 TeamName string `codec:"teamName" json:"fq_name"` 570 CreateTime Time `codec:"createTime" json:"ctime"` 571 } 572 573 func (o TeamBlock) DeepCopy() TeamBlock { 574 return TeamBlock{ 575 TeamName: o.TeamName, 576 CreateTime: o.CreateTime.DeepCopy(), 577 } 578 } 579 580 type ListTrackingArg struct { 581 SessionID int `codec:"sessionID" json:"sessionID"` 582 Filter string `codec:"filter" json:"filter"` 583 Assertion string `codec:"assertion" json:"assertion"` 584 } 585 586 type ListTrackingJSONArg struct { 587 SessionID int `codec:"sessionID" json:"sessionID"` 588 Filter string `codec:"filter" json:"filter"` 589 Verbose bool `codec:"verbose" json:"verbose"` 590 Assertion string `codec:"assertion" json:"assertion"` 591 } 592 593 type ListTrackersUnverifiedArg struct { 594 SessionID int `codec:"sessionID" json:"sessionID"` 595 Assertion string `codec:"assertion" json:"assertion"` 596 } 597 598 type LoadUserArg struct { 599 SessionID int `codec:"sessionID" json:"sessionID"` 600 Uid UID `codec:"uid" json:"uid"` 601 } 602 603 type LoadUserByNameArg struct { 604 SessionID int `codec:"sessionID" json:"sessionID"` 605 Username string `codec:"username" json:"username"` 606 } 607 608 type LoadUserPlusKeysArg struct { 609 SessionID int `codec:"sessionID" json:"sessionID"` 610 Uid UID `codec:"uid" json:"uid"` 611 PollForKID KID `codec:"pollForKID" json:"pollForKID"` 612 } 613 614 type LoadUserPlusKeysV2Arg struct { 615 SessionID int `codec:"sessionID" json:"sessionID"` 616 Uid UID `codec:"uid" json:"uid"` 617 PollForKID KID `codec:"pollForKID" json:"pollForKID"` 618 Oa OfflineAvailability `codec:"oa" json:"oa"` 619 } 620 621 type LoadPublicKeysArg struct { 622 SessionID int `codec:"sessionID" json:"sessionID"` 623 Uid UID `codec:"uid" json:"uid"` 624 } 625 626 type LoadMyPublicKeysArg struct { 627 SessionID int `codec:"sessionID" json:"sessionID"` 628 } 629 630 type LoadMySettingsArg struct { 631 SessionID int `codec:"sessionID" json:"sessionID"` 632 } 633 634 type LoadAllPublicKeysUnverifiedArg struct { 635 SessionID int `codec:"sessionID" json:"sessionID"` 636 Uid UID `codec:"uid" json:"uid"` 637 } 638 639 type ProfileEditArg struct { 640 SessionID int `codec:"sessionID" json:"sessionID"` 641 FullName string `codec:"fullName" json:"fullName"` 642 Location string `codec:"location" json:"location"` 643 Bio string `codec:"bio" json:"bio"` 644 } 645 646 type InterestingPeopleArg struct { 647 MaxUsers int `codec:"maxUsers" json:"maxUsers"` 648 Namespace string `codec:"namespace" json:"namespace"` 649 } 650 651 type MeUserVersionArg struct { 652 SessionID int `codec:"sessionID" json:"sessionID"` 653 ForcePoll bool `codec:"forcePoll" json:"forcePoll"` 654 } 655 656 type GetUPAKArg struct { 657 Uid UID `codec:"uid" json:"uid"` 658 Unstubbed bool `codec:"unstubbed" json:"unstubbed"` 659 } 660 661 type GetUPAKLiteArg struct { 662 Uid UID `codec:"uid" json:"uid"` 663 } 664 665 type UploadUserAvatarArg struct { 666 Filename string `codec:"filename" json:"filename"` 667 Crop *ImageCropRect `codec:"crop,omitempty" json:"crop,omitempty"` 668 } 669 670 type ProofSuggestionsArg struct { 671 SessionID int `codec:"sessionID" json:"sessionID"` 672 } 673 674 type FindNextMerkleRootAfterRevokeArg struct { 675 Uid UID `codec:"uid" json:"uid"` 676 Kid KID `codec:"kid" json:"kid"` 677 Loc SigChainLocation `codec:"loc" json:"loc"` 678 Prev MerkleRootV2 `codec:"prev" json:"prev"` 679 } 680 681 type FindNextMerkleRootAfterResetArg struct { 682 Uid UID `codec:"uid" json:"uid"` 683 ResetSeqno Seqno `codec:"resetSeqno" json:"resetSeqno"` 684 Prev ResetMerkleRoot `codec:"prev" json:"prev"` 685 } 686 687 type CanLogoutArg struct { 688 SessionID int `codec:"sessionID" json:"sessionID"` 689 } 690 691 type LoadPassphraseStateArg struct { 692 SessionID int `codec:"sessionID" json:"sessionID"` 693 } 694 695 type UserCardArg struct { 696 SessionID int `codec:"sessionID" json:"sessionID"` 697 Username string `codec:"username" json:"username"` 698 UseSession bool `codec:"useSession" json:"useSession"` 699 } 700 701 type SetUserBlocksArg struct { 702 SessionID int `codec:"sessionID" json:"sessionID"` 703 Blocks []UserBlockArg `codec:"blocks" json:"blocks"` 704 } 705 706 type GetUserBlocksArg struct { 707 SessionID int `codec:"sessionID" json:"sessionID"` 708 Usernames []string `codec:"usernames" json:"usernames"` 709 } 710 711 type ReportUserArg struct { 712 SessionID int `codec:"sessionID" json:"sessionID"` 713 Username string `codec:"username" json:"username"` 714 Reason string `codec:"reason" json:"reason"` 715 Comment string `codec:"comment" json:"comment"` 716 IncludeTranscript bool `codec:"includeTranscript" json:"includeTranscript"` 717 ConvID *string `codec:"convID,omitempty" json:"convID,omitempty"` 718 } 719 720 type DismissBlockButtonsArg struct { 721 TlfID TLFID `codec:"tlfID" json:"tlfID"` 722 } 723 724 type BlockUserArg struct { 725 Username string `codec:"username" json:"username"` 726 } 727 728 type UnblockUserArg struct { 729 Username string `codec:"username" json:"username"` 730 } 731 732 type GetTeamBlocksArg struct { 733 SessionID int `codec:"sessionID" json:"sessionID"` 734 } 735 736 type UserInterface interface { 737 // listTracking gets verified data from the tracking statements in the user's 738 // sigchain. However, it does not check to make sure the tracked users have 739 // not reset since the track statement. 740 // 741 // If assertion is empty, it will use the current logged in user. 742 ListTracking(context.Context, ListTrackingArg) (UserSummarySet, error) 743 ListTrackingJSON(context.Context, ListTrackingJSONArg) (string, error) 744 // listTrackersUnverified returns the users following the given user, and is unverified 745 // and server-trust. 746 ListTrackersUnverified(context.Context, ListTrackersUnverifiedArg) (UserSummarySet, error) 747 // Load a user from the server. 748 LoadUser(context.Context, LoadUserArg) (User, error) 749 LoadUserByName(context.Context, LoadUserByNameArg) (User, error) 750 // Load a user + device keys from the server. 751 LoadUserPlusKeys(context.Context, LoadUserPlusKeysArg) (UserPlusKeys, error) 752 LoadUserPlusKeysV2(context.Context, LoadUserPlusKeysV2Arg) (UserPlusKeysV2AllIncarnations, error) 753 // Load public keys for a user. 754 LoadPublicKeys(context.Context, LoadPublicKeysArg) ([]PublicKey, error) 755 // Load my public keys (for logged in user). 756 LoadMyPublicKeys(context.Context, int) ([]PublicKey, error) 757 // Load user settings (for logged in user). 758 LoadMySettings(context.Context, int) (UserSettings, error) 759 // Load all the user's public keys (even those in reset key families) 760 // from the server with no verification 761 LoadAllPublicKeysUnverified(context.Context, LoadAllPublicKeysUnverifiedArg) ([]PublicKey, error) 762 ProfileEdit(context.Context, ProfileEditArg) error 763 InterestingPeople(context.Context, InterestingPeopleArg) ([]InterestingPerson, error) 764 MeUserVersion(context.Context, MeUserVersionArg) (UserVersion, error) 765 // getUPAK returns a UPAK. Used mainly for debugging. 766 GetUPAK(context.Context, GetUPAKArg) (UPAKVersioned, error) 767 // getUPAKLite returns a UPKLiteV1AllIncarnations. Used mainly for debugging. 768 GetUPAKLite(context.Context, UID) (UPKLiteV1AllIncarnations, error) 769 UploadUserAvatar(context.Context, UploadUserAvatarArg) error 770 ProofSuggestions(context.Context, int) (ProofSuggestionsRes, error) 771 // FindNextMerkleRootAfterRevoke finds the first Merkle Root that contains the UID/KID 772 // revocation at the given SigChainLocataion. The MerkleRootV2 prev is a hint as to where 773 // we'll start our search. Usually it's the next one, but not always 774 FindNextMerkleRootAfterRevoke(context.Context, FindNextMerkleRootAfterRevokeArg) (NextMerkleRootRes, error) 775 // FindNextMerkleRootAfterReset finds the first Merkle root that contains the UID reset 776 // at resetSeqno. You should pass it prev, which was the last known Merkle root at the time of 777 // the reset. Usually, we'll just turn up the next Merkle root, but not always. 778 FindNextMerkleRootAfterReset(context.Context, FindNextMerkleRootAfterResetArg) (NextMerkleRootRes, error) 779 CanLogout(context.Context, int) (CanLogoutRes, error) 780 LoadPassphraseState(context.Context, int) (PassphraseState, error) 781 UserCard(context.Context, UserCardArg) (*UserCard, error) 782 SetUserBlocks(context.Context, SetUserBlocksArg) error 783 GetUserBlocks(context.Context, GetUserBlocksArg) ([]UserBlock, error) 784 ReportUser(context.Context, ReportUserArg) error 785 DismissBlockButtons(context.Context, TLFID) error 786 BlockUser(context.Context, string) error 787 UnblockUser(context.Context, string) error 788 GetTeamBlocks(context.Context, int) ([]TeamBlock, error) 789 } 790 791 func UserProtocol(i UserInterface) rpc.Protocol { 792 return rpc.Protocol{ 793 Name: "keybase.1.user", 794 Methods: map[string]rpc.ServeHandlerDescription{ 795 "listTracking": { 796 MakeArg: func() interface{} { 797 var ret [1]ListTrackingArg 798 return &ret 799 }, 800 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 801 typedArgs, ok := args.(*[1]ListTrackingArg) 802 if !ok { 803 err = rpc.NewTypeError((*[1]ListTrackingArg)(nil), args) 804 return 805 } 806 ret, err = i.ListTracking(ctx, typedArgs[0]) 807 return 808 }, 809 }, 810 "listTrackingJSON": { 811 MakeArg: func() interface{} { 812 var ret [1]ListTrackingJSONArg 813 return &ret 814 }, 815 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 816 typedArgs, ok := args.(*[1]ListTrackingJSONArg) 817 if !ok { 818 err = rpc.NewTypeError((*[1]ListTrackingJSONArg)(nil), args) 819 return 820 } 821 ret, err = i.ListTrackingJSON(ctx, typedArgs[0]) 822 return 823 }, 824 }, 825 "listTrackersUnverified": { 826 MakeArg: func() interface{} { 827 var ret [1]ListTrackersUnverifiedArg 828 return &ret 829 }, 830 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 831 typedArgs, ok := args.(*[1]ListTrackersUnverifiedArg) 832 if !ok { 833 err = rpc.NewTypeError((*[1]ListTrackersUnverifiedArg)(nil), args) 834 return 835 } 836 ret, err = i.ListTrackersUnverified(ctx, typedArgs[0]) 837 return 838 }, 839 }, 840 "loadUser": { 841 MakeArg: func() interface{} { 842 var ret [1]LoadUserArg 843 return &ret 844 }, 845 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 846 typedArgs, ok := args.(*[1]LoadUserArg) 847 if !ok { 848 err = rpc.NewTypeError((*[1]LoadUserArg)(nil), args) 849 return 850 } 851 ret, err = i.LoadUser(ctx, typedArgs[0]) 852 return 853 }, 854 }, 855 "loadUserByName": { 856 MakeArg: func() interface{} { 857 var ret [1]LoadUserByNameArg 858 return &ret 859 }, 860 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 861 typedArgs, ok := args.(*[1]LoadUserByNameArg) 862 if !ok { 863 err = rpc.NewTypeError((*[1]LoadUserByNameArg)(nil), args) 864 return 865 } 866 ret, err = i.LoadUserByName(ctx, typedArgs[0]) 867 return 868 }, 869 }, 870 "loadUserPlusKeys": { 871 MakeArg: func() interface{} { 872 var ret [1]LoadUserPlusKeysArg 873 return &ret 874 }, 875 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 876 typedArgs, ok := args.(*[1]LoadUserPlusKeysArg) 877 if !ok { 878 err = rpc.NewTypeError((*[1]LoadUserPlusKeysArg)(nil), args) 879 return 880 } 881 ret, err = i.LoadUserPlusKeys(ctx, typedArgs[0]) 882 return 883 }, 884 }, 885 "loadUserPlusKeysV2": { 886 MakeArg: func() interface{} { 887 var ret [1]LoadUserPlusKeysV2Arg 888 return &ret 889 }, 890 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 891 typedArgs, ok := args.(*[1]LoadUserPlusKeysV2Arg) 892 if !ok { 893 err = rpc.NewTypeError((*[1]LoadUserPlusKeysV2Arg)(nil), args) 894 return 895 } 896 ret, err = i.LoadUserPlusKeysV2(ctx, typedArgs[0]) 897 return 898 }, 899 }, 900 "loadPublicKeys": { 901 MakeArg: func() interface{} { 902 var ret [1]LoadPublicKeysArg 903 return &ret 904 }, 905 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 906 typedArgs, ok := args.(*[1]LoadPublicKeysArg) 907 if !ok { 908 err = rpc.NewTypeError((*[1]LoadPublicKeysArg)(nil), args) 909 return 910 } 911 ret, err = i.LoadPublicKeys(ctx, typedArgs[0]) 912 return 913 }, 914 }, 915 "loadMyPublicKeys": { 916 MakeArg: func() interface{} { 917 var ret [1]LoadMyPublicKeysArg 918 return &ret 919 }, 920 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 921 typedArgs, ok := args.(*[1]LoadMyPublicKeysArg) 922 if !ok { 923 err = rpc.NewTypeError((*[1]LoadMyPublicKeysArg)(nil), args) 924 return 925 } 926 ret, err = i.LoadMyPublicKeys(ctx, typedArgs[0].SessionID) 927 return 928 }, 929 }, 930 "loadMySettings": { 931 MakeArg: func() interface{} { 932 var ret [1]LoadMySettingsArg 933 return &ret 934 }, 935 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 936 typedArgs, ok := args.(*[1]LoadMySettingsArg) 937 if !ok { 938 err = rpc.NewTypeError((*[1]LoadMySettingsArg)(nil), args) 939 return 940 } 941 ret, err = i.LoadMySettings(ctx, typedArgs[0].SessionID) 942 return 943 }, 944 }, 945 "loadAllPublicKeysUnverified": { 946 MakeArg: func() interface{} { 947 var ret [1]LoadAllPublicKeysUnverifiedArg 948 return &ret 949 }, 950 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 951 typedArgs, ok := args.(*[1]LoadAllPublicKeysUnverifiedArg) 952 if !ok { 953 err = rpc.NewTypeError((*[1]LoadAllPublicKeysUnverifiedArg)(nil), args) 954 return 955 } 956 ret, err = i.LoadAllPublicKeysUnverified(ctx, typedArgs[0]) 957 return 958 }, 959 }, 960 "profileEdit": { 961 MakeArg: func() interface{} { 962 var ret [1]ProfileEditArg 963 return &ret 964 }, 965 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 966 typedArgs, ok := args.(*[1]ProfileEditArg) 967 if !ok { 968 err = rpc.NewTypeError((*[1]ProfileEditArg)(nil), args) 969 return 970 } 971 err = i.ProfileEdit(ctx, typedArgs[0]) 972 return 973 }, 974 }, 975 "interestingPeople": { 976 MakeArg: func() interface{} { 977 var ret [1]InterestingPeopleArg 978 return &ret 979 }, 980 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 981 typedArgs, ok := args.(*[1]InterestingPeopleArg) 982 if !ok { 983 err = rpc.NewTypeError((*[1]InterestingPeopleArg)(nil), args) 984 return 985 } 986 ret, err = i.InterestingPeople(ctx, typedArgs[0]) 987 return 988 }, 989 }, 990 "meUserVersion": { 991 MakeArg: func() interface{} { 992 var ret [1]MeUserVersionArg 993 return &ret 994 }, 995 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 996 typedArgs, ok := args.(*[1]MeUserVersionArg) 997 if !ok { 998 err = rpc.NewTypeError((*[1]MeUserVersionArg)(nil), args) 999 return 1000 } 1001 ret, err = i.MeUserVersion(ctx, typedArgs[0]) 1002 return 1003 }, 1004 }, 1005 "getUPAK": { 1006 MakeArg: func() interface{} { 1007 var ret [1]GetUPAKArg 1008 return &ret 1009 }, 1010 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1011 typedArgs, ok := args.(*[1]GetUPAKArg) 1012 if !ok { 1013 err = rpc.NewTypeError((*[1]GetUPAKArg)(nil), args) 1014 return 1015 } 1016 ret, err = i.GetUPAK(ctx, typedArgs[0]) 1017 return 1018 }, 1019 }, 1020 "getUPAKLite": { 1021 MakeArg: func() interface{} { 1022 var ret [1]GetUPAKLiteArg 1023 return &ret 1024 }, 1025 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1026 typedArgs, ok := args.(*[1]GetUPAKLiteArg) 1027 if !ok { 1028 err = rpc.NewTypeError((*[1]GetUPAKLiteArg)(nil), args) 1029 return 1030 } 1031 ret, err = i.GetUPAKLite(ctx, typedArgs[0].Uid) 1032 return 1033 }, 1034 }, 1035 "uploadUserAvatar": { 1036 MakeArg: func() interface{} { 1037 var ret [1]UploadUserAvatarArg 1038 return &ret 1039 }, 1040 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1041 typedArgs, ok := args.(*[1]UploadUserAvatarArg) 1042 if !ok { 1043 err = rpc.NewTypeError((*[1]UploadUserAvatarArg)(nil), args) 1044 return 1045 } 1046 err = i.UploadUserAvatar(ctx, typedArgs[0]) 1047 return 1048 }, 1049 }, 1050 "proofSuggestions": { 1051 MakeArg: func() interface{} { 1052 var ret [1]ProofSuggestionsArg 1053 return &ret 1054 }, 1055 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1056 typedArgs, ok := args.(*[1]ProofSuggestionsArg) 1057 if !ok { 1058 err = rpc.NewTypeError((*[1]ProofSuggestionsArg)(nil), args) 1059 return 1060 } 1061 ret, err = i.ProofSuggestions(ctx, typedArgs[0].SessionID) 1062 return 1063 }, 1064 }, 1065 "findNextMerkleRootAfterRevoke": { 1066 MakeArg: func() interface{} { 1067 var ret [1]FindNextMerkleRootAfterRevokeArg 1068 return &ret 1069 }, 1070 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1071 typedArgs, ok := args.(*[1]FindNextMerkleRootAfterRevokeArg) 1072 if !ok { 1073 err = rpc.NewTypeError((*[1]FindNextMerkleRootAfterRevokeArg)(nil), args) 1074 return 1075 } 1076 ret, err = i.FindNextMerkleRootAfterRevoke(ctx, typedArgs[0]) 1077 return 1078 }, 1079 }, 1080 "findNextMerkleRootAfterReset": { 1081 MakeArg: func() interface{} { 1082 var ret [1]FindNextMerkleRootAfterResetArg 1083 return &ret 1084 }, 1085 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1086 typedArgs, ok := args.(*[1]FindNextMerkleRootAfterResetArg) 1087 if !ok { 1088 err = rpc.NewTypeError((*[1]FindNextMerkleRootAfterResetArg)(nil), args) 1089 return 1090 } 1091 ret, err = i.FindNextMerkleRootAfterReset(ctx, typedArgs[0]) 1092 return 1093 }, 1094 }, 1095 "canLogout": { 1096 MakeArg: func() interface{} { 1097 var ret [1]CanLogoutArg 1098 return &ret 1099 }, 1100 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1101 typedArgs, ok := args.(*[1]CanLogoutArg) 1102 if !ok { 1103 err = rpc.NewTypeError((*[1]CanLogoutArg)(nil), args) 1104 return 1105 } 1106 ret, err = i.CanLogout(ctx, typedArgs[0].SessionID) 1107 return 1108 }, 1109 }, 1110 "loadPassphraseState": { 1111 MakeArg: func() interface{} { 1112 var ret [1]LoadPassphraseStateArg 1113 return &ret 1114 }, 1115 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1116 typedArgs, ok := args.(*[1]LoadPassphraseStateArg) 1117 if !ok { 1118 err = rpc.NewTypeError((*[1]LoadPassphraseStateArg)(nil), args) 1119 return 1120 } 1121 ret, err = i.LoadPassphraseState(ctx, typedArgs[0].SessionID) 1122 return 1123 }, 1124 }, 1125 "userCard": { 1126 MakeArg: func() interface{} { 1127 var ret [1]UserCardArg 1128 return &ret 1129 }, 1130 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1131 typedArgs, ok := args.(*[1]UserCardArg) 1132 if !ok { 1133 err = rpc.NewTypeError((*[1]UserCardArg)(nil), args) 1134 return 1135 } 1136 ret, err = i.UserCard(ctx, typedArgs[0]) 1137 return 1138 }, 1139 }, 1140 "setUserBlocks": { 1141 MakeArg: func() interface{} { 1142 var ret [1]SetUserBlocksArg 1143 return &ret 1144 }, 1145 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1146 typedArgs, ok := args.(*[1]SetUserBlocksArg) 1147 if !ok { 1148 err = rpc.NewTypeError((*[1]SetUserBlocksArg)(nil), args) 1149 return 1150 } 1151 err = i.SetUserBlocks(ctx, typedArgs[0]) 1152 return 1153 }, 1154 }, 1155 "getUserBlocks": { 1156 MakeArg: func() interface{} { 1157 var ret [1]GetUserBlocksArg 1158 return &ret 1159 }, 1160 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1161 typedArgs, ok := args.(*[1]GetUserBlocksArg) 1162 if !ok { 1163 err = rpc.NewTypeError((*[1]GetUserBlocksArg)(nil), args) 1164 return 1165 } 1166 ret, err = i.GetUserBlocks(ctx, typedArgs[0]) 1167 return 1168 }, 1169 }, 1170 "reportUser": { 1171 MakeArg: func() interface{} { 1172 var ret [1]ReportUserArg 1173 return &ret 1174 }, 1175 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1176 typedArgs, ok := args.(*[1]ReportUserArg) 1177 if !ok { 1178 err = rpc.NewTypeError((*[1]ReportUserArg)(nil), args) 1179 return 1180 } 1181 err = i.ReportUser(ctx, typedArgs[0]) 1182 return 1183 }, 1184 }, 1185 "dismissBlockButtons": { 1186 MakeArg: func() interface{} { 1187 var ret [1]DismissBlockButtonsArg 1188 return &ret 1189 }, 1190 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1191 typedArgs, ok := args.(*[1]DismissBlockButtonsArg) 1192 if !ok { 1193 err = rpc.NewTypeError((*[1]DismissBlockButtonsArg)(nil), args) 1194 return 1195 } 1196 err = i.DismissBlockButtons(ctx, typedArgs[0].TlfID) 1197 return 1198 }, 1199 }, 1200 "blockUser": { 1201 MakeArg: func() interface{} { 1202 var ret [1]BlockUserArg 1203 return &ret 1204 }, 1205 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1206 typedArgs, ok := args.(*[1]BlockUserArg) 1207 if !ok { 1208 err = rpc.NewTypeError((*[1]BlockUserArg)(nil), args) 1209 return 1210 } 1211 err = i.BlockUser(ctx, typedArgs[0].Username) 1212 return 1213 }, 1214 }, 1215 "unblockUser": { 1216 MakeArg: func() interface{} { 1217 var ret [1]UnblockUserArg 1218 return &ret 1219 }, 1220 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1221 typedArgs, ok := args.(*[1]UnblockUserArg) 1222 if !ok { 1223 err = rpc.NewTypeError((*[1]UnblockUserArg)(nil), args) 1224 return 1225 } 1226 err = i.UnblockUser(ctx, typedArgs[0].Username) 1227 return 1228 }, 1229 }, 1230 "getTeamBlocks": { 1231 MakeArg: func() interface{} { 1232 var ret [1]GetTeamBlocksArg 1233 return &ret 1234 }, 1235 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1236 typedArgs, ok := args.(*[1]GetTeamBlocksArg) 1237 if !ok { 1238 err = rpc.NewTypeError((*[1]GetTeamBlocksArg)(nil), args) 1239 return 1240 } 1241 ret, err = i.GetTeamBlocks(ctx, typedArgs[0].SessionID) 1242 return 1243 }, 1244 }, 1245 }, 1246 } 1247 } 1248 1249 type UserClient struct { 1250 Cli rpc.GenericClient 1251 } 1252 1253 // listTracking gets verified data from the tracking statements in the user's 1254 // sigchain. However, it does not check to make sure the tracked users have 1255 // not reset since the track statement. 1256 // 1257 // If assertion is empty, it will use the current logged in user. 1258 func (c UserClient) ListTracking(ctx context.Context, __arg ListTrackingArg) (res UserSummarySet, err error) { 1259 err = c.Cli.Call(ctx, "keybase.1.user.listTracking", []interface{}{__arg}, &res, 0*time.Millisecond) 1260 return 1261 } 1262 1263 func (c UserClient) ListTrackingJSON(ctx context.Context, __arg ListTrackingJSONArg) (res string, err error) { 1264 err = c.Cli.Call(ctx, "keybase.1.user.listTrackingJSON", []interface{}{__arg}, &res, 0*time.Millisecond) 1265 return 1266 } 1267 1268 // listTrackersUnverified returns the users following the given user, and is unverified 1269 // and server-trust. 1270 func (c UserClient) ListTrackersUnverified(ctx context.Context, __arg ListTrackersUnverifiedArg) (res UserSummarySet, err error) { 1271 err = c.Cli.Call(ctx, "keybase.1.user.listTrackersUnverified", []interface{}{__arg}, &res, 0*time.Millisecond) 1272 return 1273 } 1274 1275 // Load a user from the server. 1276 func (c UserClient) LoadUser(ctx context.Context, __arg LoadUserArg) (res User, err error) { 1277 err = c.Cli.Call(ctx, "keybase.1.user.loadUser", []interface{}{__arg}, &res, 0*time.Millisecond) 1278 return 1279 } 1280 1281 func (c UserClient) LoadUserByName(ctx context.Context, __arg LoadUserByNameArg) (res User, err error) { 1282 err = c.Cli.Call(ctx, "keybase.1.user.loadUserByName", []interface{}{__arg}, &res, 0*time.Millisecond) 1283 return 1284 } 1285 1286 // Load a user + device keys from the server. 1287 func (c UserClient) LoadUserPlusKeys(ctx context.Context, __arg LoadUserPlusKeysArg) (res UserPlusKeys, err error) { 1288 err = c.Cli.Call(ctx, "keybase.1.user.loadUserPlusKeys", []interface{}{__arg}, &res, 0*time.Millisecond) 1289 return 1290 } 1291 1292 func (c UserClient) LoadUserPlusKeysV2(ctx context.Context, __arg LoadUserPlusKeysV2Arg) (res UserPlusKeysV2AllIncarnations, err error) { 1293 err = c.Cli.Call(ctx, "keybase.1.user.loadUserPlusKeysV2", []interface{}{__arg}, &res, 0*time.Millisecond) 1294 return 1295 } 1296 1297 // Load public keys for a user. 1298 func (c UserClient) LoadPublicKeys(ctx context.Context, __arg LoadPublicKeysArg) (res []PublicKey, err error) { 1299 err = c.Cli.Call(ctx, "keybase.1.user.loadPublicKeys", []interface{}{__arg}, &res, 0*time.Millisecond) 1300 return 1301 } 1302 1303 // Load my public keys (for logged in user). 1304 func (c UserClient) LoadMyPublicKeys(ctx context.Context, sessionID int) (res []PublicKey, err error) { 1305 __arg := LoadMyPublicKeysArg{SessionID: sessionID} 1306 err = c.Cli.Call(ctx, "keybase.1.user.loadMyPublicKeys", []interface{}{__arg}, &res, 0*time.Millisecond) 1307 return 1308 } 1309 1310 // Load user settings (for logged in user). 1311 func (c UserClient) LoadMySettings(ctx context.Context, sessionID int) (res UserSettings, err error) { 1312 __arg := LoadMySettingsArg{SessionID: sessionID} 1313 err = c.Cli.Call(ctx, "keybase.1.user.loadMySettings", []interface{}{__arg}, &res, 0*time.Millisecond) 1314 return 1315 } 1316 1317 // Load all the user's public keys (even those in reset key families) 1318 // from the server with no verification 1319 func (c UserClient) LoadAllPublicKeysUnverified(ctx context.Context, __arg LoadAllPublicKeysUnverifiedArg) (res []PublicKey, err error) { 1320 err = c.Cli.Call(ctx, "keybase.1.user.loadAllPublicKeysUnverified", []interface{}{__arg}, &res, 0*time.Millisecond) 1321 return 1322 } 1323 1324 func (c UserClient) ProfileEdit(ctx context.Context, __arg ProfileEditArg) (err error) { 1325 err = c.Cli.Call(ctx, "keybase.1.user.profileEdit", []interface{}{__arg}, nil, 0*time.Millisecond) 1326 return 1327 } 1328 1329 func (c UserClient) InterestingPeople(ctx context.Context, __arg InterestingPeopleArg) (res []InterestingPerson, err error) { 1330 err = c.Cli.Call(ctx, "keybase.1.user.interestingPeople", []interface{}{__arg}, &res, 0*time.Millisecond) 1331 return 1332 } 1333 1334 func (c UserClient) MeUserVersion(ctx context.Context, __arg MeUserVersionArg) (res UserVersion, err error) { 1335 err = c.Cli.Call(ctx, "keybase.1.user.meUserVersion", []interface{}{__arg}, &res, 0*time.Millisecond) 1336 return 1337 } 1338 1339 // getUPAK returns a UPAK. Used mainly for debugging. 1340 func (c UserClient) GetUPAK(ctx context.Context, __arg GetUPAKArg) (res UPAKVersioned, err error) { 1341 err = c.Cli.Call(ctx, "keybase.1.user.getUPAK", []interface{}{__arg}, &res, 0*time.Millisecond) 1342 return 1343 } 1344 1345 // getUPAKLite returns a UPKLiteV1AllIncarnations. Used mainly for debugging. 1346 func (c UserClient) GetUPAKLite(ctx context.Context, uid UID) (res UPKLiteV1AllIncarnations, err error) { 1347 __arg := GetUPAKLiteArg{Uid: uid} 1348 err = c.Cli.Call(ctx, "keybase.1.user.getUPAKLite", []interface{}{__arg}, &res, 0*time.Millisecond) 1349 return 1350 } 1351 1352 func (c UserClient) UploadUserAvatar(ctx context.Context, __arg UploadUserAvatarArg) (err error) { 1353 err = c.Cli.Call(ctx, "keybase.1.user.uploadUserAvatar", []interface{}{__arg}, nil, 0*time.Millisecond) 1354 return 1355 } 1356 1357 func (c UserClient) ProofSuggestions(ctx context.Context, sessionID int) (res ProofSuggestionsRes, err error) { 1358 __arg := ProofSuggestionsArg{SessionID: sessionID} 1359 err = c.Cli.Call(ctx, "keybase.1.user.proofSuggestions", []interface{}{__arg}, &res, 0*time.Millisecond) 1360 return 1361 } 1362 1363 // FindNextMerkleRootAfterRevoke finds the first Merkle Root that contains the UID/KID 1364 // revocation at the given SigChainLocataion. The MerkleRootV2 prev is a hint as to where 1365 // we'll start our search. Usually it's the next one, but not always 1366 func (c UserClient) FindNextMerkleRootAfterRevoke(ctx context.Context, __arg FindNextMerkleRootAfterRevokeArg) (res NextMerkleRootRes, err error) { 1367 err = c.Cli.Call(ctx, "keybase.1.user.findNextMerkleRootAfterRevoke", []interface{}{__arg}, &res, 0*time.Millisecond) 1368 return 1369 } 1370 1371 // FindNextMerkleRootAfterReset finds the first Merkle root that contains the UID reset 1372 // at resetSeqno. You should pass it prev, which was the last known Merkle root at the time of 1373 // the reset. Usually, we'll just turn up the next Merkle root, but not always. 1374 func (c UserClient) FindNextMerkleRootAfterReset(ctx context.Context, __arg FindNextMerkleRootAfterResetArg) (res NextMerkleRootRes, err error) { 1375 err = c.Cli.Call(ctx, "keybase.1.user.findNextMerkleRootAfterReset", []interface{}{__arg}, &res, 0*time.Millisecond) 1376 return 1377 } 1378 1379 func (c UserClient) CanLogout(ctx context.Context, sessionID int) (res CanLogoutRes, err error) { 1380 __arg := CanLogoutArg{SessionID: sessionID} 1381 err = c.Cli.Call(ctx, "keybase.1.user.canLogout", []interface{}{__arg}, &res, 0*time.Millisecond) 1382 return 1383 } 1384 1385 func (c UserClient) LoadPassphraseState(ctx context.Context, sessionID int) (res PassphraseState, err error) { 1386 __arg := LoadPassphraseStateArg{SessionID: sessionID} 1387 err = c.Cli.Call(ctx, "keybase.1.user.loadPassphraseState", []interface{}{__arg}, &res, 0*time.Millisecond) 1388 return 1389 } 1390 1391 func (c UserClient) UserCard(ctx context.Context, __arg UserCardArg) (res *UserCard, err error) { 1392 err = c.Cli.Call(ctx, "keybase.1.user.userCard", []interface{}{__arg}, &res, 0*time.Millisecond) 1393 return 1394 } 1395 1396 func (c UserClient) SetUserBlocks(ctx context.Context, __arg SetUserBlocksArg) (err error) { 1397 err = c.Cli.Call(ctx, "keybase.1.user.setUserBlocks", []interface{}{__arg}, nil, 0*time.Millisecond) 1398 return 1399 } 1400 1401 func (c UserClient) GetUserBlocks(ctx context.Context, __arg GetUserBlocksArg) (res []UserBlock, err error) { 1402 err = c.Cli.Call(ctx, "keybase.1.user.getUserBlocks", []interface{}{__arg}, &res, 0*time.Millisecond) 1403 return 1404 } 1405 1406 func (c UserClient) ReportUser(ctx context.Context, __arg ReportUserArg) (err error) { 1407 err = c.Cli.Call(ctx, "keybase.1.user.reportUser", []interface{}{__arg}, nil, 0*time.Millisecond) 1408 return 1409 } 1410 1411 func (c UserClient) DismissBlockButtons(ctx context.Context, tlfID TLFID) (err error) { 1412 __arg := DismissBlockButtonsArg{TlfID: tlfID} 1413 err = c.Cli.Call(ctx, "keybase.1.user.dismissBlockButtons", []interface{}{__arg}, nil, 0*time.Millisecond) 1414 return 1415 } 1416 1417 func (c UserClient) BlockUser(ctx context.Context, username string) (err error) { 1418 __arg := BlockUserArg{Username: username} 1419 err = c.Cli.Call(ctx, "keybase.1.user.blockUser", []interface{}{__arg}, nil, 0*time.Millisecond) 1420 return 1421 } 1422 1423 func (c UserClient) UnblockUser(ctx context.Context, username string) (err error) { 1424 __arg := UnblockUserArg{Username: username} 1425 err = c.Cli.Call(ctx, "keybase.1.user.unblockUser", []interface{}{__arg}, nil, 0*time.Millisecond) 1426 return 1427 } 1428 1429 func (c UserClient) GetTeamBlocks(ctx context.Context, sessionID int) (res []TeamBlock, err error) { 1430 __arg := GetTeamBlocksArg{SessionID: sessionID} 1431 err = c.Cli.Call(ctx, "keybase.1.user.getTeamBlocks", []interface{}{__arg}, &res, 0*time.Millisecond) 1432 return 1433 }