github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/protocol/keybase1/config.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/config.avdl 3 4 package keybase1 5 6 import ( 7 "errors" 8 "fmt" 9 "github.com/keybase/go-framed-msgpack-rpc/rpc" 10 context "golang.org/x/net/context" 11 "time" 12 ) 13 14 type CurrentStatus struct { 15 Configured bool `codec:"configured" json:"configured"` 16 Registered bool `codec:"registered" json:"registered"` 17 LoggedIn bool `codec:"loggedIn" json:"loggedIn"` 18 SessionIsValid bool `codec:"sessionIsValid" json:"sessionIsValid"` 19 User *User `codec:"user,omitempty" json:"user,omitempty"` 20 DeviceName string `codec:"deviceName" json:"deviceName"` 21 } 22 23 func (o CurrentStatus) DeepCopy() CurrentStatus { 24 return CurrentStatus{ 25 Configured: o.Configured, 26 Registered: o.Registered, 27 LoggedIn: o.LoggedIn, 28 SessionIsValid: o.SessionIsValid, 29 User: (func(x *User) *User { 30 if x == nil { 31 return nil 32 } 33 tmp := (*x).DeepCopy() 34 return &tmp 35 })(o.User), 36 DeviceName: o.DeviceName, 37 } 38 } 39 40 type SessionStatus struct { 41 SessionFor string `codec:"SessionFor" json:"SessionFor"` 42 Loaded bool `codec:"Loaded" json:"Loaded"` 43 Cleared bool `codec:"Cleared" json:"Cleared"` 44 SaltOnly bool `codec:"SaltOnly" json:"SaltOnly"` 45 Expired bool `codec:"Expired" json:"Expired"` 46 } 47 48 func (o SessionStatus) DeepCopy() SessionStatus { 49 return SessionStatus{ 50 SessionFor: o.SessionFor, 51 Loaded: o.Loaded, 52 Cleared: o.Cleared, 53 SaltOnly: o.SaltOnly, 54 Expired: o.Expired, 55 } 56 } 57 58 type ClientDetails struct { 59 Pid int `codec:"pid" json:"pid"` 60 ClientType ClientType `codec:"clientType" json:"clientType"` 61 Argv []string `codec:"argv" json:"argv"` 62 Desc string `codec:"desc" json:"desc"` 63 Version string `codec:"version" json:"version"` 64 } 65 66 func (o ClientDetails) DeepCopy() ClientDetails { 67 return ClientDetails{ 68 Pid: o.Pid, 69 ClientType: o.ClientType.DeepCopy(), 70 Argv: (func(x []string) []string { 71 if x == nil { 72 return nil 73 } 74 ret := make([]string, len(x)) 75 for i, v := range x { 76 vCopy := v 77 ret[i] = vCopy 78 } 79 return ret 80 })(o.Argv), 81 Desc: o.Desc, 82 Version: o.Version, 83 } 84 } 85 86 type ClientStatus struct { 87 Details ClientDetails `codec:"details" json:"details"` 88 ConnectionID int `codec:"connectionID" json:"connectionID"` 89 NotificationChannels NotificationChannels `codec:"notificationChannels" json:"notificationChannels"` 90 } 91 92 func (o ClientStatus) DeepCopy() ClientStatus { 93 return ClientStatus{ 94 Details: o.Details.DeepCopy(), 95 ConnectionID: o.ConnectionID, 96 NotificationChannels: o.NotificationChannels.DeepCopy(), 97 } 98 } 99 100 type PlatformInfo struct { 101 Os string `codec:"os" json:"os"` 102 OsVersion string `codec:"osVersion" json:"osVersion"` 103 Arch string `codec:"arch" json:"arch"` 104 GoVersion string `codec:"goVersion" json:"goVersion"` 105 } 106 107 func (o PlatformInfo) DeepCopy() PlatformInfo { 108 return PlatformInfo{ 109 Os: o.Os, 110 OsVersion: o.OsVersion, 111 Arch: o.Arch, 112 GoVersion: o.GoVersion, 113 } 114 } 115 116 type LoadDeviceErr struct { 117 Where string `codec:"where" json:"where"` 118 Desc string `codec:"desc" json:"desc"` 119 } 120 121 func (o LoadDeviceErr) DeepCopy() LoadDeviceErr { 122 return LoadDeviceErr{ 123 Where: o.Where, 124 Desc: o.Desc, 125 } 126 } 127 128 type DirSizeInfo struct { 129 NumFiles int `codec:"numFiles" json:"numFiles"` 130 Name string `codec:"name" json:"name"` 131 HumanSize string `codec:"humanSize" json:"humanSize"` 132 } 133 134 func (o DirSizeInfo) DeepCopy() DirSizeInfo { 135 return DirSizeInfo{ 136 NumFiles: o.NumFiles, 137 Name: o.Name, 138 HumanSize: o.HumanSize, 139 } 140 } 141 142 type ExtendedStatus struct { 143 Standalone bool `codec:"standalone" json:"standalone"` 144 PassphraseStreamCached bool `codec:"passphraseStreamCached" json:"passphraseStreamCached"` 145 TsecCached bool `codec:"tsecCached" json:"tsecCached"` 146 DeviceSigKeyCached bool `codec:"deviceSigKeyCached" json:"deviceSigKeyCached"` 147 DeviceEncKeyCached bool `codec:"deviceEncKeyCached" json:"deviceEncKeyCached"` 148 PaperSigKeyCached bool `codec:"paperSigKeyCached" json:"paperSigKeyCached"` 149 PaperEncKeyCached bool `codec:"paperEncKeyCached" json:"paperEncKeyCached"` 150 StoredSecret bool `codec:"storedSecret" json:"storedSecret"` 151 SecretPromptSkip bool `codec:"secretPromptSkip" json:"secretPromptSkip"` 152 RememberPassphrase bool `codec:"rememberPassphrase" json:"rememberPassphrase"` 153 Device *Device `codec:"device,omitempty" json:"device,omitempty"` 154 DeviceErr *LoadDeviceErr `codec:"deviceErr,omitempty" json:"deviceErr,omitempty"` 155 LogDir string `codec:"logDir" json:"logDir"` 156 Session *SessionStatus `codec:"session,omitempty" json:"session,omitempty"` 157 DefaultUsername string `codec:"defaultUsername" json:"defaultUsername"` 158 ProvisionedUsernames []string `codec:"provisionedUsernames" json:"provisionedUsernames"` 159 ConfiguredAccounts []ConfiguredAccount `codec:"configuredAccounts" json:"configuredAccounts"` 160 Clients []ClientStatus `codec:"Clients" json:"Clients"` 161 DeviceEkNames []string `codec:"deviceEkNames" json:"deviceEkNames"` 162 PlatformInfo PlatformInfo `codec:"platformInfo" json:"platformInfo"` 163 DefaultDeviceID DeviceID `codec:"defaultDeviceID" json:"defaultDeviceID"` 164 LocalDbStats []string `codec:"localDbStats" json:"localDbStats"` 165 LocalChatDbStats []string `codec:"localChatDbStats" json:"localChatDbStats"` 166 LocalBlockCacheDbStats []string `codec:"localBlockCacheDbStats" json:"localBlockCacheDbStats"` 167 LocalSyncCacheDbStats []string `codec:"localSyncCacheDbStats" json:"localSyncCacheDbStats"` 168 CacheDirSizeInfo []DirSizeInfo `codec:"cacheDirSizeInfo" json:"cacheDirSizeInfo"` 169 UiRouterMapping map[string]int `codec:"uiRouterMapping" json:"uiRouterMapping"` 170 } 171 172 func (o ExtendedStatus) DeepCopy() ExtendedStatus { 173 return ExtendedStatus{ 174 Standalone: o.Standalone, 175 PassphraseStreamCached: o.PassphraseStreamCached, 176 TsecCached: o.TsecCached, 177 DeviceSigKeyCached: o.DeviceSigKeyCached, 178 DeviceEncKeyCached: o.DeviceEncKeyCached, 179 PaperSigKeyCached: o.PaperSigKeyCached, 180 PaperEncKeyCached: o.PaperEncKeyCached, 181 StoredSecret: o.StoredSecret, 182 SecretPromptSkip: o.SecretPromptSkip, 183 RememberPassphrase: o.RememberPassphrase, 184 Device: (func(x *Device) *Device { 185 if x == nil { 186 return nil 187 } 188 tmp := (*x).DeepCopy() 189 return &tmp 190 })(o.Device), 191 DeviceErr: (func(x *LoadDeviceErr) *LoadDeviceErr { 192 if x == nil { 193 return nil 194 } 195 tmp := (*x).DeepCopy() 196 return &tmp 197 })(o.DeviceErr), 198 LogDir: o.LogDir, 199 Session: (func(x *SessionStatus) *SessionStatus { 200 if x == nil { 201 return nil 202 } 203 tmp := (*x).DeepCopy() 204 return &tmp 205 })(o.Session), 206 DefaultUsername: o.DefaultUsername, 207 ProvisionedUsernames: (func(x []string) []string { 208 if x == nil { 209 return nil 210 } 211 ret := make([]string, len(x)) 212 for i, v := range x { 213 vCopy := v 214 ret[i] = vCopy 215 } 216 return ret 217 })(o.ProvisionedUsernames), 218 ConfiguredAccounts: (func(x []ConfiguredAccount) []ConfiguredAccount { 219 if x == nil { 220 return nil 221 } 222 ret := make([]ConfiguredAccount, len(x)) 223 for i, v := range x { 224 vCopy := v.DeepCopy() 225 ret[i] = vCopy 226 } 227 return ret 228 })(o.ConfiguredAccounts), 229 Clients: (func(x []ClientStatus) []ClientStatus { 230 if x == nil { 231 return nil 232 } 233 ret := make([]ClientStatus, len(x)) 234 for i, v := range x { 235 vCopy := v.DeepCopy() 236 ret[i] = vCopy 237 } 238 return ret 239 })(o.Clients), 240 DeviceEkNames: (func(x []string) []string { 241 if x == nil { 242 return nil 243 } 244 ret := make([]string, len(x)) 245 for i, v := range x { 246 vCopy := v 247 ret[i] = vCopy 248 } 249 return ret 250 })(o.DeviceEkNames), 251 PlatformInfo: o.PlatformInfo.DeepCopy(), 252 DefaultDeviceID: o.DefaultDeviceID.DeepCopy(), 253 LocalDbStats: (func(x []string) []string { 254 if x == nil { 255 return nil 256 } 257 ret := make([]string, len(x)) 258 for i, v := range x { 259 vCopy := v 260 ret[i] = vCopy 261 } 262 return ret 263 })(o.LocalDbStats), 264 LocalChatDbStats: (func(x []string) []string { 265 if x == nil { 266 return nil 267 } 268 ret := make([]string, len(x)) 269 for i, v := range x { 270 vCopy := v 271 ret[i] = vCopy 272 } 273 return ret 274 })(o.LocalChatDbStats), 275 LocalBlockCacheDbStats: (func(x []string) []string { 276 if x == nil { 277 return nil 278 } 279 ret := make([]string, len(x)) 280 for i, v := range x { 281 vCopy := v 282 ret[i] = vCopy 283 } 284 return ret 285 })(o.LocalBlockCacheDbStats), 286 LocalSyncCacheDbStats: (func(x []string) []string { 287 if x == nil { 288 return nil 289 } 290 ret := make([]string, len(x)) 291 for i, v := range x { 292 vCopy := v 293 ret[i] = vCopy 294 } 295 return ret 296 })(o.LocalSyncCacheDbStats), 297 CacheDirSizeInfo: (func(x []DirSizeInfo) []DirSizeInfo { 298 if x == nil { 299 return nil 300 } 301 ret := make([]DirSizeInfo, len(x)) 302 for i, v := range x { 303 vCopy := v.DeepCopy() 304 ret[i] = vCopy 305 } 306 return ret 307 })(o.CacheDirSizeInfo), 308 UiRouterMapping: (func(x map[string]int) map[string]int { 309 if x == nil { 310 return nil 311 } 312 ret := make(map[string]int, len(x)) 313 for k, v := range x { 314 kCopy := k 315 vCopy := v 316 ret[kCopy] = vCopy 317 } 318 return ret 319 })(o.UiRouterMapping), 320 } 321 } 322 323 type KbClientStatus struct { 324 Version string `codec:"version" json:"version"` 325 } 326 327 func (o KbClientStatus) DeepCopy() KbClientStatus { 328 return KbClientStatus{ 329 Version: o.Version, 330 } 331 } 332 333 type KbServiceStatus struct { 334 Version string `codec:"version" json:"version"` 335 Running bool `codec:"running" json:"running"` 336 Pid string `codec:"pid" json:"pid"` 337 Log string `codec:"log" json:"log"` 338 EkLog string `codec:"ekLog" json:"ekLog"` 339 PerfLog string `codec:"perfLog" json:"perfLog"` 340 } 341 342 func (o KbServiceStatus) DeepCopy() KbServiceStatus { 343 return KbServiceStatus{ 344 Version: o.Version, 345 Running: o.Running, 346 Pid: o.Pid, 347 Log: o.Log, 348 EkLog: o.EkLog, 349 PerfLog: o.PerfLog, 350 } 351 } 352 353 type KBFSStatus struct { 354 Version string `codec:"version" json:"version"` 355 InstalledVersion string `codec:"installedVersion" json:"installedVersion"` 356 Running bool `codec:"running" json:"running"` 357 Pid string `codec:"pid" json:"pid"` 358 Log string `codec:"log" json:"log"` 359 PerfLog string `codec:"perfLog" json:"perfLog"` 360 Mount string `codec:"mount" json:"mount"` 361 } 362 363 func (o KBFSStatus) DeepCopy() KBFSStatus { 364 return KBFSStatus{ 365 Version: o.Version, 366 InstalledVersion: o.InstalledVersion, 367 Running: o.Running, 368 Pid: o.Pid, 369 Log: o.Log, 370 PerfLog: o.PerfLog, 371 Mount: o.Mount, 372 } 373 } 374 375 type DesktopStatus struct { 376 Version string `codec:"version" json:"version"` 377 Running bool `codec:"running" json:"running"` 378 Log string `codec:"log" json:"log"` 379 } 380 381 func (o DesktopStatus) DeepCopy() DesktopStatus { 382 return DesktopStatus{ 383 Version: o.Version, 384 Running: o.Running, 385 Log: o.Log, 386 } 387 } 388 389 type UpdaterStatus struct { 390 Log string `codec:"log" json:"log"` 391 } 392 393 func (o UpdaterStatus) DeepCopy() UpdaterStatus { 394 return UpdaterStatus{ 395 Log: o.Log, 396 } 397 } 398 399 type StartStatus struct { 400 Log string `codec:"log" json:"log"` 401 } 402 403 func (o StartStatus) DeepCopy() StartStatus { 404 return StartStatus{ 405 Log: o.Log, 406 } 407 } 408 409 type GitStatus struct { 410 Log string `codec:"log" json:"log"` 411 PerfLog string `codec:"perfLog" json:"perfLog"` 412 } 413 414 func (o GitStatus) DeepCopy() GitStatus { 415 return GitStatus{ 416 Log: o.Log, 417 PerfLog: o.PerfLog, 418 } 419 } 420 421 type FullStatus struct { 422 Username string `codec:"username" json:"username"` 423 ConfigPath string `codec:"configPath" json:"configPath"` 424 CurStatus CurrentStatus `codec:"curStatus" json:"curStatus"` 425 ExtStatus ExtendedStatus `codec:"extStatus" json:"extStatus"` 426 Client KbClientStatus `codec:"client" json:"client"` 427 Service KbServiceStatus `codec:"service" json:"service"` 428 Kbfs KBFSStatus `codec:"kbfs" json:"kbfs"` 429 Desktop DesktopStatus `codec:"desktop" json:"desktop"` 430 Updater UpdaterStatus `codec:"updater" json:"updater"` 431 Start StartStatus `codec:"start" json:"start"` 432 Git GitStatus `codec:"git" json:"git"` 433 } 434 435 func (o FullStatus) DeepCopy() FullStatus { 436 return FullStatus{ 437 Username: o.Username, 438 ConfigPath: o.ConfigPath, 439 CurStatus: o.CurStatus.DeepCopy(), 440 ExtStatus: o.ExtStatus.DeepCopy(), 441 Client: o.Client.DeepCopy(), 442 Service: o.Service.DeepCopy(), 443 Kbfs: o.Kbfs.DeepCopy(), 444 Desktop: o.Desktop.DeepCopy(), 445 Updater: o.Updater.DeepCopy(), 446 Start: o.Start.DeepCopy(), 447 Git: o.Git.DeepCopy(), 448 } 449 } 450 451 type LogSendID string 452 453 func (o LogSendID) DeepCopy() LogSendID { 454 return o 455 } 456 457 type AllProvisionedUsernames struct { 458 DefaultUsername string `codec:"defaultUsername" json:"defaultUsername"` 459 ProvisionedUsernames []string `codec:"provisionedUsernames" json:"provisionedUsernames"` 460 HasProvisionedUser bool `codec:"hasProvisionedUser" json:"hasProvisionedUser"` 461 } 462 463 func (o AllProvisionedUsernames) DeepCopy() AllProvisionedUsernames { 464 return AllProvisionedUsernames{ 465 DefaultUsername: o.DefaultUsername, 466 ProvisionedUsernames: (func(x []string) []string { 467 if x == nil { 468 return nil 469 } 470 ret := make([]string, len(x)) 471 for i, v := range x { 472 vCopy := v 473 ret[i] = vCopy 474 } 475 return ret 476 })(o.ProvisionedUsernames), 477 HasProvisionedUser: o.HasProvisionedUser, 478 } 479 } 480 481 type ForkType int 482 483 const ( 484 ForkType_NONE ForkType = 0 485 ForkType_AUTO ForkType = 1 486 ForkType_WATCHDOG ForkType = 2 487 ForkType_LAUNCHD ForkType = 3 488 ForkType_SYSTEMD ForkType = 4 489 ) 490 491 func (o ForkType) DeepCopy() ForkType { return o } 492 493 var ForkTypeMap = map[string]ForkType{ 494 "NONE": 0, 495 "AUTO": 1, 496 "WATCHDOG": 2, 497 "LAUNCHD": 3, 498 "SYSTEMD": 4, 499 } 500 501 var ForkTypeRevMap = map[ForkType]string{ 502 0: "NONE", 503 1: "AUTO", 504 2: "WATCHDOG", 505 3: "LAUNCHD", 506 4: "SYSTEMD", 507 } 508 509 func (e ForkType) String() string { 510 if v, ok := ForkTypeRevMap[e]; ok { 511 return v 512 } 513 return fmt.Sprintf("%v", int(e)) 514 } 515 516 type Config struct { 517 ServerURI string `codec:"serverURI" json:"serverURI"` 518 SocketFile string `codec:"socketFile" json:"socketFile"` 519 Label string `codec:"label" json:"label"` 520 RunMode string `codec:"runMode" json:"runMode"` 521 GpgExists bool `codec:"gpgExists" json:"gpgExists"` 522 GpgPath string `codec:"gpgPath" json:"gpgPath"` 523 Version string `codec:"version" json:"version"` 524 Path string `codec:"path" json:"path"` 525 BinaryRealpath string `codec:"binaryRealpath" json:"binaryRealpath"` 526 ConfigPath string `codec:"configPath" json:"configPath"` 527 VersionShort string `codec:"versionShort" json:"versionShort"` 528 VersionFull string `codec:"versionFull" json:"versionFull"` 529 IsAutoForked bool `codec:"isAutoForked" json:"isAutoForked"` 530 ForkType ForkType `codec:"forkType" json:"forkType"` 531 } 532 533 func (o Config) DeepCopy() Config { 534 return Config{ 535 ServerURI: o.ServerURI, 536 SocketFile: o.SocketFile, 537 Label: o.Label, 538 RunMode: o.RunMode, 539 GpgExists: o.GpgExists, 540 GpgPath: o.GpgPath, 541 Version: o.Version, 542 Path: o.Path, 543 BinaryRealpath: o.BinaryRealpath, 544 ConfigPath: o.ConfigPath, 545 VersionShort: o.VersionShort, 546 VersionFull: o.VersionFull, 547 IsAutoForked: o.IsAutoForked, 548 ForkType: o.ForkType.DeepCopy(), 549 } 550 } 551 552 type ConfigValue struct { 553 IsNull bool `codec:"isNull" json:"isNull"` 554 B *bool `codec:"b,omitempty" json:"b,omitempty"` 555 I *int `codec:"i,omitempty" json:"i,omitempty"` 556 F *float64 `codec:"f,omitempty" json:"f,omitempty"` 557 S *string `codec:"s,omitempty" json:"s,omitempty"` 558 O *string `codec:"o,omitempty" json:"o,omitempty"` 559 } 560 561 func (o ConfigValue) DeepCopy() ConfigValue { 562 return ConfigValue{ 563 IsNull: o.IsNull, 564 B: (func(x *bool) *bool { 565 if x == nil { 566 return nil 567 } 568 tmp := (*x) 569 return &tmp 570 })(o.B), 571 I: (func(x *int) *int { 572 if x == nil { 573 return nil 574 } 575 tmp := (*x) 576 return &tmp 577 })(o.I), 578 F: (func(x *float64) *float64 { 579 if x == nil { 580 return nil 581 } 582 tmp := (*x) 583 return &tmp 584 })(o.F), 585 S: (func(x *string) *string { 586 if x == nil { 587 return nil 588 } 589 tmp := (*x) 590 return &tmp 591 })(o.S), 592 O: (func(x *string) *string { 593 if x == nil { 594 return nil 595 } 596 tmp := (*x) 597 return &tmp 598 })(o.O), 599 } 600 } 601 602 type OutOfDateInfo struct { 603 UpgradeTo string `codec:"upgradeTo" json:"upgradeTo"` 604 UpgradeURI string `codec:"upgradeURI" json:"upgradeURI"` 605 CustomMessage string `codec:"customMessage" json:"customMessage"` 606 CriticalClockSkew int64 `codec:"criticalClockSkew" json:"criticalClockSkew"` 607 } 608 609 func (o OutOfDateInfo) DeepCopy() OutOfDateInfo { 610 return OutOfDateInfo{ 611 UpgradeTo: o.UpgradeTo, 612 UpgradeURI: o.UpgradeURI, 613 CustomMessage: o.CustomMessage, 614 CriticalClockSkew: o.CriticalClockSkew, 615 } 616 } 617 618 type UpdateInfoStatus int 619 620 const ( 621 UpdateInfoStatus_UP_TO_DATE UpdateInfoStatus = 0 622 UpdateInfoStatus_NEED_UPDATE UpdateInfoStatus = 1 623 UpdateInfoStatus_CRITICALLY_OUT_OF_DATE UpdateInfoStatus = 2 624 ) 625 626 func (o UpdateInfoStatus) DeepCopy() UpdateInfoStatus { return o } 627 628 var UpdateInfoStatusMap = map[string]UpdateInfoStatus{ 629 "UP_TO_DATE": 0, 630 "NEED_UPDATE": 1, 631 "CRITICALLY_OUT_OF_DATE": 2, 632 } 633 634 var UpdateInfoStatusRevMap = map[UpdateInfoStatus]string{ 635 0: "UP_TO_DATE", 636 1: "NEED_UPDATE", 637 2: "CRITICALLY_OUT_OF_DATE", 638 } 639 640 func (e UpdateInfoStatus) String() string { 641 if v, ok := UpdateInfoStatusRevMap[e]; ok { 642 return v 643 } 644 return fmt.Sprintf("%v", int(e)) 645 } 646 647 type UpdateInfo struct { 648 Status UpdateInfoStatus `codec:"status" json:"status"` 649 Message string `codec:"message" json:"message"` 650 } 651 652 func (o UpdateInfo) DeepCopy() UpdateInfo { 653 return UpdateInfo{ 654 Status: o.Status.DeepCopy(), 655 Message: o.Message, 656 } 657 } 658 659 type BootstrapStatus struct { 660 Registered bool `codec:"registered" json:"registered"` 661 LoggedIn bool `codec:"loggedIn" json:"loggedIn"` 662 Uid UID `codec:"uid" json:"uid"` 663 Username string `codec:"username" json:"username"` 664 DeviceID DeviceID `codec:"deviceID" json:"deviceID"` 665 DeviceName string `codec:"deviceName" json:"deviceName"` 666 Fullname FullName `codec:"fullname" json:"fullname"` 667 UserReacjis UserReacjis `codec:"userReacjis" json:"userReacjis"` 668 HttpSrvInfo *HttpSrvInfo `codec:"httpSrvInfo,omitempty" json:"httpSrvInfo,omitempty"` 669 } 670 671 func (o BootstrapStatus) DeepCopy() BootstrapStatus { 672 return BootstrapStatus{ 673 Registered: o.Registered, 674 LoggedIn: o.LoggedIn, 675 Uid: o.Uid.DeepCopy(), 676 Username: o.Username, 677 DeviceID: o.DeviceID.DeepCopy(), 678 DeviceName: o.DeviceName, 679 Fullname: o.Fullname.DeepCopy(), 680 UserReacjis: o.UserReacjis.DeepCopy(), 681 HttpSrvInfo: (func(x *HttpSrvInfo) *HttpSrvInfo { 682 if x == nil { 683 return nil 684 } 685 tmp := (*x).DeepCopy() 686 return &tmp 687 })(o.HttpSrvInfo), 688 } 689 } 690 691 type UpdateInfoStatus2 int 692 693 const ( 694 UpdateInfoStatus2_OK UpdateInfoStatus2 = 0 695 UpdateInfoStatus2_SUGGESTED UpdateInfoStatus2 = 1 696 UpdateInfoStatus2_CRITICAL UpdateInfoStatus2 = 2 697 ) 698 699 func (o UpdateInfoStatus2) DeepCopy() UpdateInfoStatus2 { return o } 700 701 var UpdateInfoStatus2Map = map[string]UpdateInfoStatus2{ 702 "OK": 0, 703 "SUGGESTED": 1, 704 "CRITICAL": 2, 705 } 706 707 var UpdateInfoStatus2RevMap = map[UpdateInfoStatus2]string{ 708 0: "OK", 709 1: "SUGGESTED", 710 2: "CRITICAL", 711 } 712 713 func (e UpdateInfoStatus2) String() string { 714 if v, ok := UpdateInfoStatus2RevMap[e]; ok { 715 return v 716 } 717 return fmt.Sprintf("%v", int(e)) 718 } 719 720 type UpdateDetails struct { 721 Message string `codec:"message" json:"message"` 722 } 723 724 func (o UpdateDetails) DeepCopy() UpdateDetails { 725 return UpdateDetails{ 726 Message: o.Message, 727 } 728 } 729 730 type UpdateInfo2 struct { 731 Status__ UpdateInfoStatus2 `codec:"status" json:"status"` 732 Suggested__ *UpdateDetails `codec:"suggested,omitempty" json:"suggested,omitempty"` 733 Critical__ *UpdateDetails `codec:"critical,omitempty" json:"critical,omitempty"` 734 } 735 736 func (o *UpdateInfo2) Status() (ret UpdateInfoStatus2, err error) { 737 switch o.Status__ { 738 case UpdateInfoStatus2_SUGGESTED: 739 if o.Suggested__ == nil { 740 err = errors.New("unexpected nil value for Suggested__") 741 return ret, err 742 } 743 case UpdateInfoStatus2_CRITICAL: 744 if o.Critical__ == nil { 745 err = errors.New("unexpected nil value for Critical__") 746 return ret, err 747 } 748 } 749 return o.Status__, nil 750 } 751 752 func (o UpdateInfo2) Suggested() (res UpdateDetails) { 753 if o.Status__ != UpdateInfoStatus2_SUGGESTED { 754 panic("wrong case accessed") 755 } 756 if o.Suggested__ == nil { 757 return 758 } 759 return *o.Suggested__ 760 } 761 762 func (o UpdateInfo2) Critical() (res UpdateDetails) { 763 if o.Status__ != UpdateInfoStatus2_CRITICAL { 764 panic("wrong case accessed") 765 } 766 if o.Critical__ == nil { 767 return 768 } 769 return *o.Critical__ 770 } 771 772 func NewUpdateInfo2WithOk() UpdateInfo2 { 773 return UpdateInfo2{ 774 Status__: UpdateInfoStatus2_OK, 775 } 776 } 777 778 func NewUpdateInfo2WithSuggested(v UpdateDetails) UpdateInfo2 { 779 return UpdateInfo2{ 780 Status__: UpdateInfoStatus2_SUGGESTED, 781 Suggested__: &v, 782 } 783 } 784 785 func NewUpdateInfo2WithCritical(v UpdateDetails) UpdateInfo2 { 786 return UpdateInfo2{ 787 Status__: UpdateInfoStatus2_CRITICAL, 788 Critical__: &v, 789 } 790 } 791 792 func (o UpdateInfo2) DeepCopy() UpdateInfo2 { 793 return UpdateInfo2{ 794 Status__: o.Status__.DeepCopy(), 795 Suggested__: (func(x *UpdateDetails) *UpdateDetails { 796 if x == nil { 797 return nil 798 } 799 tmp := (*x).DeepCopy() 800 return &tmp 801 })(o.Suggested__), 802 Critical__: (func(x *UpdateDetails) *UpdateDetails { 803 if x == nil { 804 return nil 805 } 806 tmp := (*x).DeepCopy() 807 return &tmp 808 })(o.Critical__), 809 } 810 } 811 812 type ProxyType int 813 814 const ( 815 ProxyType_No_Proxy ProxyType = 0 816 ProxyType_HTTP_Connect ProxyType = 1 817 ProxyType_Socks ProxyType = 2 818 ) 819 820 func (o ProxyType) DeepCopy() ProxyType { return o } 821 822 var ProxyTypeMap = map[string]ProxyType{ 823 "No_Proxy": 0, 824 "HTTP_Connect": 1, 825 "Socks": 2, 826 } 827 828 var ProxyTypeRevMap = map[ProxyType]string{ 829 0: "No_Proxy", 830 1: "HTTP_Connect", 831 2: "Socks", 832 } 833 834 func (e ProxyType) String() string { 835 if v, ok := ProxyTypeRevMap[e]; ok { 836 return v 837 } 838 return fmt.Sprintf("%v", int(e)) 839 } 840 841 type ProxyData struct { 842 AddressWithPort string `codec:"addressWithPort" json:"addressWithPort"` 843 ProxyType ProxyType `codec:"proxyType" json:"proxyType"` 844 CertPinning bool `codec:"certPinning" json:"certPinning"` 845 } 846 847 func (o ProxyData) DeepCopy() ProxyData { 848 return ProxyData{ 849 AddressWithPort: o.AddressWithPort, 850 ProxyType: o.ProxyType.DeepCopy(), 851 CertPinning: o.CertPinning, 852 } 853 } 854 855 type GetCurrentStatusArg struct { 856 SessionID int `codec:"sessionID" json:"sessionID"` 857 } 858 859 type GetClientStatusArg struct { 860 SessionID int `codec:"sessionID" json:"sessionID"` 861 } 862 863 type GetFullStatusArg struct { 864 SessionID int `codec:"sessionID" json:"sessionID"` 865 } 866 867 type IsServiceRunningArg struct { 868 SessionID int `codec:"sessionID" json:"sessionID"` 869 } 870 871 type IsKBFSRunningArg struct { 872 SessionID int `codec:"sessionID" json:"sessionID"` 873 } 874 875 type GetNetworkStatsArg struct { 876 SessionID int `codec:"sessionID" json:"sessionID"` 877 NetworkSrc NetworkSource `codec:"networkSrc" json:"networkSrc"` 878 } 879 880 type LogSendArg struct { 881 SessionID int `codec:"sessionID" json:"sessionID"` 882 StatusJSON string `codec:"statusJSON" json:"statusJSON"` 883 Feedback string `codec:"feedback" json:"feedback"` 884 SendLogs bool `codec:"sendLogs" json:"sendLogs"` 885 SendMaxBytes bool `codec:"sendMaxBytes" json:"sendMaxBytes"` 886 } 887 888 type GetAllProvisionedUsernamesArg struct { 889 SessionID int `codec:"sessionID" json:"sessionID"` 890 } 891 892 type GetConfigArg struct { 893 SessionID int `codec:"sessionID" json:"sessionID"` 894 } 895 896 type SetUserConfigArg struct { 897 SessionID int `codec:"sessionID" json:"sessionID"` 898 Username string `codec:"username" json:"username"` 899 Key string `codec:"key" json:"key"` 900 Value string `codec:"value" json:"value"` 901 } 902 903 type SetPathArg struct { 904 SessionID int `codec:"sessionID" json:"sessionID"` 905 Path string `codec:"path" json:"path"` 906 } 907 908 type HelloIAmArg struct { 909 Details ClientDetails `codec:"details" json:"details"` 910 } 911 912 type SetValueArg struct { 913 Path string `codec:"path" json:"path"` 914 Value ConfigValue `codec:"value" json:"value"` 915 } 916 917 type ClearValueArg struct { 918 Path string `codec:"path" json:"path"` 919 } 920 921 type GetValueArg struct { 922 Path string `codec:"path" json:"path"` 923 } 924 925 type GuiSetValueArg struct { 926 Path string `codec:"path" json:"path"` 927 Value ConfigValue `codec:"value" json:"value"` 928 } 929 930 type GuiClearValueArg struct { 931 Path string `codec:"path" json:"path"` 932 } 933 934 type GuiGetValueArg struct { 935 Path string `codec:"path" json:"path"` 936 } 937 938 type CheckAPIServerOutOfDateWarningArg struct { 939 } 940 941 type GetUpdateInfoArg struct { 942 } 943 944 type StartUpdateIfNeededArg struct { 945 } 946 947 type WaitForClientArg struct { 948 ClientType ClientType `codec:"clientType" json:"clientType"` 949 Timeout DurationSec `codec:"timeout" json:"timeout"` 950 } 951 952 type GetBootstrapStatusArg struct { 953 SessionID int `codec:"sessionID" json:"sessionID"` 954 } 955 956 type RequestFollowingAndUnverifiedFollowersArg struct { 957 SessionID int `codec:"sessionID" json:"sessionID"` 958 } 959 960 type GetRememberPassphraseArg struct { 961 SessionID int `codec:"sessionID" json:"sessionID"` 962 } 963 964 type SetRememberPassphraseArg struct { 965 SessionID int `codec:"sessionID" json:"sessionID"` 966 Remember bool `codec:"remember" json:"remember"` 967 } 968 969 type GetUpdateInfo2Arg struct { 970 Platform *string `codec:"platform,omitempty" json:"platform,omitempty"` 971 Version *string `codec:"version,omitempty" json:"version,omitempty"` 972 } 973 974 type SetProxyDataArg struct { 975 ProxyData ProxyData `codec:"proxyData" json:"proxyData"` 976 } 977 978 type GetProxyDataArg struct { 979 } 980 981 type ToggleRuntimeStatsArg struct { 982 } 983 984 type AppendGUILogsArg struct { 985 Content string `codec:"content" json:"content"` 986 } 987 988 type GenerateWebAuthTokenArg struct { 989 } 990 991 type UpdateLastLoggedInAndServerConfigArg struct { 992 ServerConfigPath string `codec:"serverConfigPath" json:"serverConfigPath"` 993 } 994 995 type ConfigInterface interface { 996 GetCurrentStatus(context.Context, int) (CurrentStatus, error) 997 GetClientStatus(context.Context, int) ([]ClientStatus, error) 998 GetFullStatus(context.Context, int) (*FullStatus, error) 999 IsServiceRunning(context.Context, int) (bool, error) 1000 IsKBFSRunning(context.Context, int) (bool, error) 1001 GetNetworkStats(context.Context, GetNetworkStatsArg) ([]InstrumentationStat, error) 1002 LogSend(context.Context, LogSendArg) (LogSendID, error) 1003 GetAllProvisionedUsernames(context.Context, int) (AllProvisionedUsernames, error) 1004 GetConfig(context.Context, int) (Config, error) 1005 // Change user config. 1006 // For example, to update primary picture source: 1007 // key=picture.source, value=twitter (or github) 1008 SetUserConfig(context.Context, SetUserConfigArg) error 1009 SetPath(context.Context, SetPathArg) error 1010 HelloIAm(context.Context, ClientDetails) error 1011 SetValue(context.Context, SetValueArg) error 1012 ClearValue(context.Context, string) error 1013 GetValue(context.Context, string) (ConfigValue, error) 1014 GuiSetValue(context.Context, GuiSetValueArg) error 1015 GuiClearValue(context.Context, string) error 1016 GuiGetValue(context.Context, string) (ConfigValue, error) 1017 // Check whether the API server has told us we're out of date. 1018 CheckAPIServerOutOfDateWarning(context.Context) (OutOfDateInfo, error) 1019 GetUpdateInfo(context.Context) (UpdateInfo, error) 1020 StartUpdateIfNeeded(context.Context) error 1021 // Wait for client type to connect to service. 1022 WaitForClient(context.Context, WaitForClientArg) (bool, error) 1023 GetBootstrapStatus(context.Context, int) (BootstrapStatus, error) 1024 RequestFollowingAndUnverifiedFollowers(context.Context, int) error 1025 GetRememberPassphrase(context.Context, int) (bool, error) 1026 SetRememberPassphrase(context.Context, SetRememberPassphraseArg) error 1027 // getUpdateInfo2 is to drive the redbar on mobile and desktop apps. The redbar tells you if 1028 // you are critically out of date. 1029 GetUpdateInfo2(context.Context, GetUpdateInfo2Arg) (UpdateInfo2, error) 1030 SetProxyData(context.Context, ProxyData) error 1031 GetProxyData(context.Context) (ProxyData, error) 1032 ToggleRuntimeStats(context.Context) error 1033 AppendGUILogs(context.Context, string) error 1034 GenerateWebAuthToken(context.Context) (string, error) 1035 UpdateLastLoggedInAndServerConfig(context.Context, string) error 1036 } 1037 1038 func ConfigProtocol(i ConfigInterface) rpc.Protocol { 1039 return rpc.Protocol{ 1040 Name: "keybase.1.config", 1041 Methods: map[string]rpc.ServeHandlerDescription{ 1042 "getCurrentStatus": { 1043 MakeArg: func() interface{} { 1044 var ret [1]GetCurrentStatusArg 1045 return &ret 1046 }, 1047 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1048 typedArgs, ok := args.(*[1]GetCurrentStatusArg) 1049 if !ok { 1050 err = rpc.NewTypeError((*[1]GetCurrentStatusArg)(nil), args) 1051 return 1052 } 1053 ret, err = i.GetCurrentStatus(ctx, typedArgs[0].SessionID) 1054 return 1055 }, 1056 }, 1057 "getClientStatus": { 1058 MakeArg: func() interface{} { 1059 var ret [1]GetClientStatusArg 1060 return &ret 1061 }, 1062 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1063 typedArgs, ok := args.(*[1]GetClientStatusArg) 1064 if !ok { 1065 err = rpc.NewTypeError((*[1]GetClientStatusArg)(nil), args) 1066 return 1067 } 1068 ret, err = i.GetClientStatus(ctx, typedArgs[0].SessionID) 1069 return 1070 }, 1071 }, 1072 "getFullStatus": { 1073 MakeArg: func() interface{} { 1074 var ret [1]GetFullStatusArg 1075 return &ret 1076 }, 1077 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1078 typedArgs, ok := args.(*[1]GetFullStatusArg) 1079 if !ok { 1080 err = rpc.NewTypeError((*[1]GetFullStatusArg)(nil), args) 1081 return 1082 } 1083 ret, err = i.GetFullStatus(ctx, typedArgs[0].SessionID) 1084 return 1085 }, 1086 }, 1087 "isServiceRunning": { 1088 MakeArg: func() interface{} { 1089 var ret [1]IsServiceRunningArg 1090 return &ret 1091 }, 1092 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1093 typedArgs, ok := args.(*[1]IsServiceRunningArg) 1094 if !ok { 1095 err = rpc.NewTypeError((*[1]IsServiceRunningArg)(nil), args) 1096 return 1097 } 1098 ret, err = i.IsServiceRunning(ctx, typedArgs[0].SessionID) 1099 return 1100 }, 1101 }, 1102 "isKBFSRunning": { 1103 MakeArg: func() interface{} { 1104 var ret [1]IsKBFSRunningArg 1105 return &ret 1106 }, 1107 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1108 typedArgs, ok := args.(*[1]IsKBFSRunningArg) 1109 if !ok { 1110 err = rpc.NewTypeError((*[1]IsKBFSRunningArg)(nil), args) 1111 return 1112 } 1113 ret, err = i.IsKBFSRunning(ctx, typedArgs[0].SessionID) 1114 return 1115 }, 1116 }, 1117 "getNetworkStats": { 1118 MakeArg: func() interface{} { 1119 var ret [1]GetNetworkStatsArg 1120 return &ret 1121 }, 1122 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1123 typedArgs, ok := args.(*[1]GetNetworkStatsArg) 1124 if !ok { 1125 err = rpc.NewTypeError((*[1]GetNetworkStatsArg)(nil), args) 1126 return 1127 } 1128 ret, err = i.GetNetworkStats(ctx, typedArgs[0]) 1129 return 1130 }, 1131 }, 1132 "logSend": { 1133 MakeArg: func() interface{} { 1134 var ret [1]LogSendArg 1135 return &ret 1136 }, 1137 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1138 typedArgs, ok := args.(*[1]LogSendArg) 1139 if !ok { 1140 err = rpc.NewTypeError((*[1]LogSendArg)(nil), args) 1141 return 1142 } 1143 ret, err = i.LogSend(ctx, typedArgs[0]) 1144 return 1145 }, 1146 }, 1147 "getAllProvisionedUsernames": { 1148 MakeArg: func() interface{} { 1149 var ret [1]GetAllProvisionedUsernamesArg 1150 return &ret 1151 }, 1152 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1153 typedArgs, ok := args.(*[1]GetAllProvisionedUsernamesArg) 1154 if !ok { 1155 err = rpc.NewTypeError((*[1]GetAllProvisionedUsernamesArg)(nil), args) 1156 return 1157 } 1158 ret, err = i.GetAllProvisionedUsernames(ctx, typedArgs[0].SessionID) 1159 return 1160 }, 1161 }, 1162 "getConfig": { 1163 MakeArg: func() interface{} { 1164 var ret [1]GetConfigArg 1165 return &ret 1166 }, 1167 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1168 typedArgs, ok := args.(*[1]GetConfigArg) 1169 if !ok { 1170 err = rpc.NewTypeError((*[1]GetConfigArg)(nil), args) 1171 return 1172 } 1173 ret, err = i.GetConfig(ctx, typedArgs[0].SessionID) 1174 return 1175 }, 1176 }, 1177 "setUserConfig": { 1178 MakeArg: func() interface{} { 1179 var ret [1]SetUserConfigArg 1180 return &ret 1181 }, 1182 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1183 typedArgs, ok := args.(*[1]SetUserConfigArg) 1184 if !ok { 1185 err = rpc.NewTypeError((*[1]SetUserConfigArg)(nil), args) 1186 return 1187 } 1188 err = i.SetUserConfig(ctx, typedArgs[0]) 1189 return 1190 }, 1191 }, 1192 "setPath": { 1193 MakeArg: func() interface{} { 1194 var ret [1]SetPathArg 1195 return &ret 1196 }, 1197 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1198 typedArgs, ok := args.(*[1]SetPathArg) 1199 if !ok { 1200 err = rpc.NewTypeError((*[1]SetPathArg)(nil), args) 1201 return 1202 } 1203 err = i.SetPath(ctx, typedArgs[0]) 1204 return 1205 }, 1206 }, 1207 "helloIAm": { 1208 MakeArg: func() interface{} { 1209 var ret [1]HelloIAmArg 1210 return &ret 1211 }, 1212 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1213 typedArgs, ok := args.(*[1]HelloIAmArg) 1214 if !ok { 1215 err = rpc.NewTypeError((*[1]HelloIAmArg)(nil), args) 1216 return 1217 } 1218 err = i.HelloIAm(ctx, typedArgs[0].Details) 1219 return 1220 }, 1221 }, 1222 "setValue": { 1223 MakeArg: func() interface{} { 1224 var ret [1]SetValueArg 1225 return &ret 1226 }, 1227 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1228 typedArgs, ok := args.(*[1]SetValueArg) 1229 if !ok { 1230 err = rpc.NewTypeError((*[1]SetValueArg)(nil), args) 1231 return 1232 } 1233 err = i.SetValue(ctx, typedArgs[0]) 1234 return 1235 }, 1236 }, 1237 "clearValue": { 1238 MakeArg: func() interface{} { 1239 var ret [1]ClearValueArg 1240 return &ret 1241 }, 1242 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1243 typedArgs, ok := args.(*[1]ClearValueArg) 1244 if !ok { 1245 err = rpc.NewTypeError((*[1]ClearValueArg)(nil), args) 1246 return 1247 } 1248 err = i.ClearValue(ctx, typedArgs[0].Path) 1249 return 1250 }, 1251 }, 1252 "getValue": { 1253 MakeArg: func() interface{} { 1254 var ret [1]GetValueArg 1255 return &ret 1256 }, 1257 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1258 typedArgs, ok := args.(*[1]GetValueArg) 1259 if !ok { 1260 err = rpc.NewTypeError((*[1]GetValueArg)(nil), args) 1261 return 1262 } 1263 ret, err = i.GetValue(ctx, typedArgs[0].Path) 1264 return 1265 }, 1266 }, 1267 "guiSetValue": { 1268 MakeArg: func() interface{} { 1269 var ret [1]GuiSetValueArg 1270 return &ret 1271 }, 1272 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1273 typedArgs, ok := args.(*[1]GuiSetValueArg) 1274 if !ok { 1275 err = rpc.NewTypeError((*[1]GuiSetValueArg)(nil), args) 1276 return 1277 } 1278 err = i.GuiSetValue(ctx, typedArgs[0]) 1279 return 1280 }, 1281 }, 1282 "guiClearValue": { 1283 MakeArg: func() interface{} { 1284 var ret [1]GuiClearValueArg 1285 return &ret 1286 }, 1287 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1288 typedArgs, ok := args.(*[1]GuiClearValueArg) 1289 if !ok { 1290 err = rpc.NewTypeError((*[1]GuiClearValueArg)(nil), args) 1291 return 1292 } 1293 err = i.GuiClearValue(ctx, typedArgs[0].Path) 1294 return 1295 }, 1296 }, 1297 "guiGetValue": { 1298 MakeArg: func() interface{} { 1299 var ret [1]GuiGetValueArg 1300 return &ret 1301 }, 1302 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1303 typedArgs, ok := args.(*[1]GuiGetValueArg) 1304 if !ok { 1305 err = rpc.NewTypeError((*[1]GuiGetValueArg)(nil), args) 1306 return 1307 } 1308 ret, err = i.GuiGetValue(ctx, typedArgs[0].Path) 1309 return 1310 }, 1311 }, 1312 "checkAPIServerOutOfDateWarning": { 1313 MakeArg: func() interface{} { 1314 var ret [1]CheckAPIServerOutOfDateWarningArg 1315 return &ret 1316 }, 1317 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1318 ret, err = i.CheckAPIServerOutOfDateWarning(ctx) 1319 return 1320 }, 1321 }, 1322 "getUpdateInfo": { 1323 MakeArg: func() interface{} { 1324 var ret [1]GetUpdateInfoArg 1325 return &ret 1326 }, 1327 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1328 ret, err = i.GetUpdateInfo(ctx) 1329 return 1330 }, 1331 }, 1332 "startUpdateIfNeeded": { 1333 MakeArg: func() interface{} { 1334 var ret [1]StartUpdateIfNeededArg 1335 return &ret 1336 }, 1337 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1338 err = i.StartUpdateIfNeeded(ctx) 1339 return 1340 }, 1341 }, 1342 "waitForClient": { 1343 MakeArg: func() interface{} { 1344 var ret [1]WaitForClientArg 1345 return &ret 1346 }, 1347 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1348 typedArgs, ok := args.(*[1]WaitForClientArg) 1349 if !ok { 1350 err = rpc.NewTypeError((*[1]WaitForClientArg)(nil), args) 1351 return 1352 } 1353 ret, err = i.WaitForClient(ctx, typedArgs[0]) 1354 return 1355 }, 1356 }, 1357 "getBootstrapStatus": { 1358 MakeArg: func() interface{} { 1359 var ret [1]GetBootstrapStatusArg 1360 return &ret 1361 }, 1362 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1363 typedArgs, ok := args.(*[1]GetBootstrapStatusArg) 1364 if !ok { 1365 err = rpc.NewTypeError((*[1]GetBootstrapStatusArg)(nil), args) 1366 return 1367 } 1368 ret, err = i.GetBootstrapStatus(ctx, typedArgs[0].SessionID) 1369 return 1370 }, 1371 }, 1372 "requestFollowingAndUnverifiedFollowers": { 1373 MakeArg: func() interface{} { 1374 var ret [1]RequestFollowingAndUnverifiedFollowersArg 1375 return &ret 1376 }, 1377 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1378 typedArgs, ok := args.(*[1]RequestFollowingAndUnverifiedFollowersArg) 1379 if !ok { 1380 err = rpc.NewTypeError((*[1]RequestFollowingAndUnverifiedFollowersArg)(nil), args) 1381 return 1382 } 1383 err = i.RequestFollowingAndUnverifiedFollowers(ctx, typedArgs[0].SessionID) 1384 return 1385 }, 1386 }, 1387 "getRememberPassphrase": { 1388 MakeArg: func() interface{} { 1389 var ret [1]GetRememberPassphraseArg 1390 return &ret 1391 }, 1392 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1393 typedArgs, ok := args.(*[1]GetRememberPassphraseArg) 1394 if !ok { 1395 err = rpc.NewTypeError((*[1]GetRememberPassphraseArg)(nil), args) 1396 return 1397 } 1398 ret, err = i.GetRememberPassphrase(ctx, typedArgs[0].SessionID) 1399 return 1400 }, 1401 }, 1402 "setRememberPassphrase": { 1403 MakeArg: func() interface{} { 1404 var ret [1]SetRememberPassphraseArg 1405 return &ret 1406 }, 1407 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1408 typedArgs, ok := args.(*[1]SetRememberPassphraseArg) 1409 if !ok { 1410 err = rpc.NewTypeError((*[1]SetRememberPassphraseArg)(nil), args) 1411 return 1412 } 1413 err = i.SetRememberPassphrase(ctx, typedArgs[0]) 1414 return 1415 }, 1416 }, 1417 "getUpdateInfo2": { 1418 MakeArg: func() interface{} { 1419 var ret [1]GetUpdateInfo2Arg 1420 return &ret 1421 }, 1422 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1423 typedArgs, ok := args.(*[1]GetUpdateInfo2Arg) 1424 if !ok { 1425 err = rpc.NewTypeError((*[1]GetUpdateInfo2Arg)(nil), args) 1426 return 1427 } 1428 ret, err = i.GetUpdateInfo2(ctx, typedArgs[0]) 1429 return 1430 }, 1431 }, 1432 "setProxyData": { 1433 MakeArg: func() interface{} { 1434 var ret [1]SetProxyDataArg 1435 return &ret 1436 }, 1437 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1438 typedArgs, ok := args.(*[1]SetProxyDataArg) 1439 if !ok { 1440 err = rpc.NewTypeError((*[1]SetProxyDataArg)(nil), args) 1441 return 1442 } 1443 err = i.SetProxyData(ctx, typedArgs[0].ProxyData) 1444 return 1445 }, 1446 }, 1447 "getProxyData": { 1448 MakeArg: func() interface{} { 1449 var ret [1]GetProxyDataArg 1450 return &ret 1451 }, 1452 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1453 ret, err = i.GetProxyData(ctx) 1454 return 1455 }, 1456 }, 1457 "toggleRuntimeStats": { 1458 MakeArg: func() interface{} { 1459 var ret [1]ToggleRuntimeStatsArg 1460 return &ret 1461 }, 1462 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1463 err = i.ToggleRuntimeStats(ctx) 1464 return 1465 }, 1466 }, 1467 "appendGUILogs": { 1468 MakeArg: func() interface{} { 1469 var ret [1]AppendGUILogsArg 1470 return &ret 1471 }, 1472 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1473 typedArgs, ok := args.(*[1]AppendGUILogsArg) 1474 if !ok { 1475 err = rpc.NewTypeError((*[1]AppendGUILogsArg)(nil), args) 1476 return 1477 } 1478 err = i.AppendGUILogs(ctx, typedArgs[0].Content) 1479 return 1480 }, 1481 }, 1482 "generateWebAuthToken": { 1483 MakeArg: func() interface{} { 1484 var ret [1]GenerateWebAuthTokenArg 1485 return &ret 1486 }, 1487 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1488 ret, err = i.GenerateWebAuthToken(ctx) 1489 return 1490 }, 1491 }, 1492 "updateLastLoggedInAndServerConfig": { 1493 MakeArg: func() interface{} { 1494 var ret [1]UpdateLastLoggedInAndServerConfigArg 1495 return &ret 1496 }, 1497 Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) { 1498 typedArgs, ok := args.(*[1]UpdateLastLoggedInAndServerConfigArg) 1499 if !ok { 1500 err = rpc.NewTypeError((*[1]UpdateLastLoggedInAndServerConfigArg)(nil), args) 1501 return 1502 } 1503 err = i.UpdateLastLoggedInAndServerConfig(ctx, typedArgs[0].ServerConfigPath) 1504 return 1505 }, 1506 }, 1507 }, 1508 } 1509 } 1510 1511 type ConfigClient struct { 1512 Cli rpc.GenericClient 1513 } 1514 1515 func (c ConfigClient) GetCurrentStatus(ctx context.Context, sessionID int) (res CurrentStatus, err error) { 1516 __arg := GetCurrentStatusArg{SessionID: sessionID} 1517 err = c.Cli.Call(ctx, "keybase.1.config.getCurrentStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 1518 return 1519 } 1520 1521 func (c ConfigClient) GetClientStatus(ctx context.Context, sessionID int) (res []ClientStatus, err error) { 1522 __arg := GetClientStatusArg{SessionID: sessionID} 1523 err = c.Cli.Call(ctx, "keybase.1.config.getClientStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 1524 return 1525 } 1526 1527 func (c ConfigClient) GetFullStatus(ctx context.Context, sessionID int) (res *FullStatus, err error) { 1528 __arg := GetFullStatusArg{SessionID: sessionID} 1529 err = c.Cli.Call(ctx, "keybase.1.config.getFullStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 1530 return 1531 } 1532 1533 func (c ConfigClient) IsServiceRunning(ctx context.Context, sessionID int) (res bool, err error) { 1534 __arg := IsServiceRunningArg{SessionID: sessionID} 1535 err = c.Cli.Call(ctx, "keybase.1.config.isServiceRunning", []interface{}{__arg}, &res, 0*time.Millisecond) 1536 return 1537 } 1538 1539 func (c ConfigClient) IsKBFSRunning(ctx context.Context, sessionID int) (res bool, err error) { 1540 __arg := IsKBFSRunningArg{SessionID: sessionID} 1541 err = c.Cli.Call(ctx, "keybase.1.config.isKBFSRunning", []interface{}{__arg}, &res, 0*time.Millisecond) 1542 return 1543 } 1544 1545 func (c ConfigClient) GetNetworkStats(ctx context.Context, __arg GetNetworkStatsArg) (res []InstrumentationStat, err error) { 1546 err = c.Cli.Call(ctx, "keybase.1.config.getNetworkStats", []interface{}{__arg}, &res, 0*time.Millisecond) 1547 return 1548 } 1549 1550 func (c ConfigClient) LogSend(ctx context.Context, __arg LogSendArg) (res LogSendID, err error) { 1551 err = c.Cli.Call(ctx, "keybase.1.config.logSend", []interface{}{__arg}, &res, 0*time.Millisecond) 1552 return 1553 } 1554 1555 func (c ConfigClient) GetAllProvisionedUsernames(ctx context.Context, sessionID int) (res AllProvisionedUsernames, err error) { 1556 __arg := GetAllProvisionedUsernamesArg{SessionID: sessionID} 1557 err = c.Cli.Call(ctx, "keybase.1.config.getAllProvisionedUsernames", []interface{}{__arg}, &res, 0*time.Millisecond) 1558 return 1559 } 1560 1561 func (c ConfigClient) GetConfig(ctx context.Context, sessionID int) (res Config, err error) { 1562 __arg := GetConfigArg{SessionID: sessionID} 1563 err = c.Cli.Call(ctx, "keybase.1.config.getConfig", []interface{}{__arg}, &res, 0*time.Millisecond) 1564 return 1565 } 1566 1567 // Change user config. 1568 // For example, to update primary picture source: 1569 // key=picture.source, value=twitter (or github) 1570 func (c ConfigClient) SetUserConfig(ctx context.Context, __arg SetUserConfigArg) (err error) { 1571 err = c.Cli.Call(ctx, "keybase.1.config.setUserConfig", []interface{}{__arg}, nil, 0*time.Millisecond) 1572 return 1573 } 1574 1575 func (c ConfigClient) SetPath(ctx context.Context, __arg SetPathArg) (err error) { 1576 err = c.Cli.Call(ctx, "keybase.1.config.setPath", []interface{}{__arg}, nil, 0*time.Millisecond) 1577 return 1578 } 1579 1580 func (c ConfigClient) HelloIAm(ctx context.Context, details ClientDetails) (err error) { 1581 __arg := HelloIAmArg{Details: details} 1582 err = c.Cli.Call(ctx, "keybase.1.config.helloIAm", []interface{}{__arg}, nil, 0*time.Millisecond) 1583 return 1584 } 1585 1586 func (c ConfigClient) SetValue(ctx context.Context, __arg SetValueArg) (err error) { 1587 err = c.Cli.Call(ctx, "keybase.1.config.setValue", []interface{}{__arg}, nil, 0*time.Millisecond) 1588 return 1589 } 1590 1591 func (c ConfigClient) ClearValue(ctx context.Context, path string) (err error) { 1592 __arg := ClearValueArg{Path: path} 1593 err = c.Cli.Call(ctx, "keybase.1.config.clearValue", []interface{}{__arg}, nil, 0*time.Millisecond) 1594 return 1595 } 1596 1597 func (c ConfigClient) GetValue(ctx context.Context, path string) (res ConfigValue, err error) { 1598 __arg := GetValueArg{Path: path} 1599 err = c.Cli.Call(ctx, "keybase.1.config.getValue", []interface{}{__arg}, &res, 0*time.Millisecond) 1600 return 1601 } 1602 1603 func (c ConfigClient) GuiSetValue(ctx context.Context, __arg GuiSetValueArg) (err error) { 1604 err = c.Cli.Call(ctx, "keybase.1.config.guiSetValue", []interface{}{__arg}, nil, 0*time.Millisecond) 1605 return 1606 } 1607 1608 func (c ConfigClient) GuiClearValue(ctx context.Context, path string) (err error) { 1609 __arg := GuiClearValueArg{Path: path} 1610 err = c.Cli.Call(ctx, "keybase.1.config.guiClearValue", []interface{}{__arg}, nil, 0*time.Millisecond) 1611 return 1612 } 1613 1614 func (c ConfigClient) GuiGetValue(ctx context.Context, path string) (res ConfigValue, err error) { 1615 __arg := GuiGetValueArg{Path: path} 1616 err = c.Cli.Call(ctx, "keybase.1.config.guiGetValue", []interface{}{__arg}, &res, 0*time.Millisecond) 1617 return 1618 } 1619 1620 // Check whether the API server has told us we're out of date. 1621 func (c ConfigClient) CheckAPIServerOutOfDateWarning(ctx context.Context) (res OutOfDateInfo, err error) { 1622 err = c.Cli.Call(ctx, "keybase.1.config.checkAPIServerOutOfDateWarning", []interface{}{CheckAPIServerOutOfDateWarningArg{}}, &res, 0*time.Millisecond) 1623 return 1624 } 1625 1626 func (c ConfigClient) GetUpdateInfo(ctx context.Context) (res UpdateInfo, err error) { 1627 err = c.Cli.Call(ctx, "keybase.1.config.getUpdateInfo", []interface{}{GetUpdateInfoArg{}}, &res, 0*time.Millisecond) 1628 return 1629 } 1630 1631 func (c ConfigClient) StartUpdateIfNeeded(ctx context.Context) (err error) { 1632 err = c.Cli.Call(ctx, "keybase.1.config.startUpdateIfNeeded", []interface{}{StartUpdateIfNeededArg{}}, nil, 0*time.Millisecond) 1633 return 1634 } 1635 1636 // Wait for client type to connect to service. 1637 func (c ConfigClient) WaitForClient(ctx context.Context, __arg WaitForClientArg) (res bool, err error) { 1638 err = c.Cli.Call(ctx, "keybase.1.config.waitForClient", []interface{}{__arg}, &res, 0*time.Millisecond) 1639 return 1640 } 1641 1642 func (c ConfigClient) GetBootstrapStatus(ctx context.Context, sessionID int) (res BootstrapStatus, err error) { 1643 __arg := GetBootstrapStatusArg{SessionID: sessionID} 1644 err = c.Cli.Call(ctx, "keybase.1.config.getBootstrapStatus", []interface{}{__arg}, &res, 0*time.Millisecond) 1645 return 1646 } 1647 1648 func (c ConfigClient) RequestFollowingAndUnverifiedFollowers(ctx context.Context, sessionID int) (err error) { 1649 __arg := RequestFollowingAndUnverifiedFollowersArg{SessionID: sessionID} 1650 err = c.Cli.Call(ctx, "keybase.1.config.requestFollowingAndUnverifiedFollowers", []interface{}{__arg}, nil, 0*time.Millisecond) 1651 return 1652 } 1653 1654 func (c ConfigClient) GetRememberPassphrase(ctx context.Context, sessionID int) (res bool, err error) { 1655 __arg := GetRememberPassphraseArg{SessionID: sessionID} 1656 err = c.Cli.Call(ctx, "keybase.1.config.getRememberPassphrase", []interface{}{__arg}, &res, 0*time.Millisecond) 1657 return 1658 } 1659 1660 func (c ConfigClient) SetRememberPassphrase(ctx context.Context, __arg SetRememberPassphraseArg) (err error) { 1661 err = c.Cli.Call(ctx, "keybase.1.config.setRememberPassphrase", []interface{}{__arg}, nil, 0*time.Millisecond) 1662 return 1663 } 1664 1665 // getUpdateInfo2 is to drive the redbar on mobile and desktop apps. The redbar tells you if 1666 // you are critically out of date. 1667 func (c ConfigClient) GetUpdateInfo2(ctx context.Context, __arg GetUpdateInfo2Arg) (res UpdateInfo2, err error) { 1668 err = c.Cli.Call(ctx, "keybase.1.config.getUpdateInfo2", []interface{}{__arg}, &res, 0*time.Millisecond) 1669 return 1670 } 1671 1672 func (c ConfigClient) SetProxyData(ctx context.Context, proxyData ProxyData) (err error) { 1673 __arg := SetProxyDataArg{ProxyData: proxyData} 1674 err = c.Cli.Call(ctx, "keybase.1.config.setProxyData", []interface{}{__arg}, nil, 0*time.Millisecond) 1675 return 1676 } 1677 1678 func (c ConfigClient) GetProxyData(ctx context.Context) (res ProxyData, err error) { 1679 err = c.Cli.Call(ctx, "keybase.1.config.getProxyData", []interface{}{GetProxyDataArg{}}, &res, 0*time.Millisecond) 1680 return 1681 } 1682 1683 func (c ConfigClient) ToggleRuntimeStats(ctx context.Context) (err error) { 1684 err = c.Cli.Call(ctx, "keybase.1.config.toggleRuntimeStats", []interface{}{ToggleRuntimeStatsArg{}}, nil, 0*time.Millisecond) 1685 return 1686 } 1687 1688 func (c ConfigClient) AppendGUILogs(ctx context.Context, content string) (err error) { 1689 __arg := AppendGUILogsArg{Content: content} 1690 err = c.Cli.Call(ctx, "keybase.1.config.appendGUILogs", []interface{}{__arg}, nil, 0*time.Millisecond) 1691 return 1692 } 1693 1694 func (c ConfigClient) GenerateWebAuthToken(ctx context.Context) (res string, err error) { 1695 err = c.Cli.Call(ctx, "keybase.1.config.generateWebAuthToken", []interface{}{GenerateWebAuthTokenArg{}}, &res, 0*time.Millisecond) 1696 return 1697 } 1698 1699 func (c ConfigClient) UpdateLastLoggedInAndServerConfig(ctx context.Context, serverConfigPath string) (err error) { 1700 __arg := UpdateLastLoggedInAndServerConfigArg{ServerConfigPath: serverConfigPath} 1701 err = c.Cli.Call(ctx, "keybase.1.config.updateLastLoggedInAndServerConfig", []interface{}{__arg}, nil, 0*time.Millisecond) 1702 return 1703 }