github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/protocol/chat1/api.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/chat1/api.avdl 3 4 package chat1 5 6 import ( 7 gregor1 "github.com/keybase/client/go/protocol/gregor1" 8 keybase1 "github.com/keybase/client/go/protocol/keybase1" 9 "github.com/keybase/go-framed-msgpack-rpc/rpc" 10 ) 11 12 type ConvIDStr string 13 14 func (o ConvIDStr) DeepCopy() ConvIDStr { 15 return o 16 } 17 18 type TLFIDStr string 19 20 func (o TLFIDStr) DeepCopy() TLFIDStr { 21 return o 22 } 23 24 type FlipGameIDStr string 25 26 func (o FlipGameIDStr) DeepCopy() FlipGameIDStr { 27 return o 28 } 29 30 type RateLimitRes struct { 31 Tank string `codec:"tank" json:"tank"` 32 Capacity int `codec:"capacity" json:"capacity"` 33 Reset int `codec:"reset" json:"reset"` 34 Gas int `codec:"gas" json:"gas"` 35 } 36 37 func (o RateLimitRes) DeepCopy() RateLimitRes { 38 return RateLimitRes{ 39 Tank: o.Tank, 40 Capacity: o.Capacity, 41 Reset: o.Reset, 42 Gas: o.Gas, 43 } 44 } 45 46 // A Keybase chat channel. This can be a channel in a team, or just an informal channel between two users. 47 // name: the name of the team or comma-separated list of participants 48 type ChatChannel struct { 49 Name string `codec:"name" json:"name"` 50 Public bool `codec:"public,omitempty" json:"public,omitempty"` 51 MembersType string `codec:"membersType,omitempty" json:"members_type,omitempty"` 52 TopicType string `codec:"topicType,omitempty" json:"topic_type,omitempty"` 53 TopicName string `codec:"topicName,omitempty" json:"topic_name,omitempty"` 54 } 55 56 func (o ChatChannel) DeepCopy() ChatChannel { 57 return ChatChannel{ 58 Name: o.Name, 59 Public: o.Public, 60 MembersType: o.MembersType, 61 TopicType: o.TopicType, 62 TopicName: o.TopicName, 63 } 64 } 65 66 // A chat message. The content goes in the `body` property! 67 type ChatMessage struct { 68 Body string `codec:"body" json:"body"` 69 } 70 71 func (o ChatMessage) DeepCopy() ChatMessage { 72 return ChatMessage{ 73 Body: o.Body, 74 } 75 } 76 77 type MsgSender struct { 78 Uid keybase1.UID `codec:"uid" json:"uid"` 79 Username string `codec:"username,omitempty" json:"username,omitempty"` 80 DeviceID keybase1.DeviceID `codec:"deviceID" json:"device_id"` 81 DeviceName string `codec:"deviceName,omitempty" json:"device_name,omitempty"` 82 } 83 84 func (o MsgSender) DeepCopy() MsgSender { 85 return MsgSender{ 86 Uid: o.Uid.DeepCopy(), 87 Username: o.Username, 88 DeviceID: o.DeviceID.DeepCopy(), 89 DeviceName: o.DeviceName, 90 } 91 } 92 93 type MsgBotInfo struct { 94 BotUID keybase1.UID `codec:"botUID" json:"bot_uid"` 95 BotUsername string `codec:"botUsername,omitempty" json:"bot_username,omitempty"` 96 } 97 98 func (o MsgBotInfo) DeepCopy() MsgBotInfo { 99 return MsgBotInfo{ 100 BotUID: o.BotUID.DeepCopy(), 101 BotUsername: o.BotUsername, 102 } 103 } 104 105 type MsgFlipContent struct { 106 Text string `codec:"text" json:"text"` 107 GameID FlipGameIDStr `codec:"gameID" json:"game_id"` 108 FlipConvID ConvIDStr `codec:"flipConvID" json:"flip_conv_id"` 109 UserMentions []KnownUserMention `codec:"userMentions" json:"user_mentions"` 110 TeamMentions []KnownTeamMention `codec:"teamMentions" json:"team_mentions"` 111 } 112 113 func (o MsgFlipContent) DeepCopy() MsgFlipContent { 114 return MsgFlipContent{ 115 Text: o.Text, 116 GameID: o.GameID.DeepCopy(), 117 FlipConvID: o.FlipConvID.DeepCopy(), 118 UserMentions: (func(x []KnownUserMention) []KnownUserMention { 119 if x == nil { 120 return nil 121 } 122 ret := make([]KnownUserMention, len(x)) 123 for i, v := range x { 124 vCopy := v.DeepCopy() 125 ret[i] = vCopy 126 } 127 return ret 128 })(o.UserMentions), 129 TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { 130 if x == nil { 131 return nil 132 } 133 ret := make([]KnownTeamMention, len(x)) 134 for i, v := range x { 135 vCopy := v.DeepCopy() 136 ret[i] = vCopy 137 } 138 return ret 139 })(o.TeamMentions), 140 } 141 } 142 143 type EmojiContent struct { 144 Alias string `codec:"alias" json:"alias"` 145 IsCrossTeam bool `codec:"isCrossTeam" json:"isCrossTeam"` 146 ConvID *ConvIDStr `codec:"convID,omitempty" json:"convID,omitempty"` 147 MessageID *MessageID `codec:"messageID,omitempty" json:"messageID,omitempty"` 148 } 149 150 func (o EmojiContent) DeepCopy() EmojiContent { 151 return EmojiContent{ 152 Alias: o.Alias, 153 IsCrossTeam: o.IsCrossTeam, 154 ConvID: (func(x *ConvIDStr) *ConvIDStr { 155 if x == nil { 156 return nil 157 } 158 tmp := (*x).DeepCopy() 159 return &tmp 160 })(o.ConvID), 161 MessageID: (func(x *MessageID) *MessageID { 162 if x == nil { 163 return nil 164 } 165 tmp := (*x).DeepCopy() 166 return &tmp 167 })(o.MessageID), 168 } 169 } 170 171 type MsgTextContent struct { 172 Body string `codec:"body" json:"body"` 173 Payments []TextPayment `codec:"payments" json:"payments"` 174 ReplyTo *MessageID `codec:"replyTo,omitempty" json:"replyTo,omitempty"` 175 ReplyToUID *string `codec:"replyToUID,omitempty" json:"replyToUID,omitempty"` 176 UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` 177 TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` 178 LiveLocation *LiveLocation `codec:"liveLocation,omitempty" json:"liveLocation,omitempty"` 179 Emojis []EmojiContent `codec:"emojis" json:"emojis"` 180 } 181 182 func (o MsgTextContent) DeepCopy() MsgTextContent { 183 return MsgTextContent{ 184 Body: o.Body, 185 Payments: (func(x []TextPayment) []TextPayment { 186 if x == nil { 187 return nil 188 } 189 ret := make([]TextPayment, len(x)) 190 for i, v := range x { 191 vCopy := v.DeepCopy() 192 ret[i] = vCopy 193 } 194 return ret 195 })(o.Payments), 196 ReplyTo: (func(x *MessageID) *MessageID { 197 if x == nil { 198 return nil 199 } 200 tmp := (*x).DeepCopy() 201 return &tmp 202 })(o.ReplyTo), 203 ReplyToUID: (func(x *string) *string { 204 if x == nil { 205 return nil 206 } 207 tmp := (*x) 208 return &tmp 209 })(o.ReplyToUID), 210 UserMentions: (func(x []KnownUserMention) []KnownUserMention { 211 if x == nil { 212 return nil 213 } 214 ret := make([]KnownUserMention, len(x)) 215 for i, v := range x { 216 vCopy := v.DeepCopy() 217 ret[i] = vCopy 218 } 219 return ret 220 })(o.UserMentions), 221 TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { 222 if x == nil { 223 return nil 224 } 225 ret := make([]KnownTeamMention, len(x)) 226 for i, v := range x { 227 vCopy := v.DeepCopy() 228 ret[i] = vCopy 229 } 230 return ret 231 })(o.TeamMentions), 232 LiveLocation: (func(x *LiveLocation) *LiveLocation { 233 if x == nil { 234 return nil 235 } 236 tmp := (*x).DeepCopy() 237 return &tmp 238 })(o.LiveLocation), 239 Emojis: (func(x []EmojiContent) []EmojiContent { 240 if x == nil { 241 return nil 242 } 243 ret := make([]EmojiContent, len(x)) 244 for i, v := range x { 245 vCopy := v.DeepCopy() 246 ret[i] = vCopy 247 } 248 return ret 249 })(o.Emojis), 250 } 251 } 252 253 type MsgContent struct { 254 TypeName string `codec:"typeName" json:"type"` 255 Text *MsgTextContent `codec:"text,omitempty" json:"text,omitempty"` 256 Attachment *MessageAttachment `codec:"attachment,omitempty" json:"attachment,omitempty"` 257 Edit *MessageEdit `codec:"edit,omitempty" json:"edit,omitempty"` 258 Reaction *MessageReaction `codec:"reaction,omitempty" json:"reaction,omitempty"` 259 Delete *MessageDelete `codec:"delete,omitempty" json:"delete,omitempty"` 260 Metadata *MessageConversationMetadata `codec:"metadata,omitempty" json:"metadata,omitempty"` 261 Headline *MessageHeadline `codec:"headline,omitempty" json:"headline,omitempty"` 262 AttachmentUploaded *MessageAttachmentUploaded `codec:"attachmentUploaded,omitempty" json:"attachment_uploaded,omitempty"` 263 System *MessageSystem `codec:"system,omitempty" json:"system,omitempty"` 264 SendPayment *MessageSendPayment `codec:"sendPayment,omitempty" json:"send_payment,omitempty"` 265 RequestPayment *MessageRequestPayment `codec:"requestPayment,omitempty" json:"request_payment,omitempty"` 266 Unfurl *MessageUnfurl `codec:"unfurl,omitempty" json:"unfurl,omitempty"` 267 Flip *MsgFlipContent `codec:"flip,omitempty" json:"flip,omitempty"` 268 } 269 270 func (o MsgContent) DeepCopy() MsgContent { 271 return MsgContent{ 272 TypeName: o.TypeName, 273 Text: (func(x *MsgTextContent) *MsgTextContent { 274 if x == nil { 275 return nil 276 } 277 tmp := (*x).DeepCopy() 278 return &tmp 279 })(o.Text), 280 Attachment: (func(x *MessageAttachment) *MessageAttachment { 281 if x == nil { 282 return nil 283 } 284 tmp := (*x).DeepCopy() 285 return &tmp 286 })(o.Attachment), 287 Edit: (func(x *MessageEdit) *MessageEdit { 288 if x == nil { 289 return nil 290 } 291 tmp := (*x).DeepCopy() 292 return &tmp 293 })(o.Edit), 294 Reaction: (func(x *MessageReaction) *MessageReaction { 295 if x == nil { 296 return nil 297 } 298 tmp := (*x).DeepCopy() 299 return &tmp 300 })(o.Reaction), 301 Delete: (func(x *MessageDelete) *MessageDelete { 302 if x == nil { 303 return nil 304 } 305 tmp := (*x).DeepCopy() 306 return &tmp 307 })(o.Delete), 308 Metadata: (func(x *MessageConversationMetadata) *MessageConversationMetadata { 309 if x == nil { 310 return nil 311 } 312 tmp := (*x).DeepCopy() 313 return &tmp 314 })(o.Metadata), 315 Headline: (func(x *MessageHeadline) *MessageHeadline { 316 if x == nil { 317 return nil 318 } 319 tmp := (*x).DeepCopy() 320 return &tmp 321 })(o.Headline), 322 AttachmentUploaded: (func(x *MessageAttachmentUploaded) *MessageAttachmentUploaded { 323 if x == nil { 324 return nil 325 } 326 tmp := (*x).DeepCopy() 327 return &tmp 328 })(o.AttachmentUploaded), 329 System: (func(x *MessageSystem) *MessageSystem { 330 if x == nil { 331 return nil 332 } 333 tmp := (*x).DeepCopy() 334 return &tmp 335 })(o.System), 336 SendPayment: (func(x *MessageSendPayment) *MessageSendPayment { 337 if x == nil { 338 return nil 339 } 340 tmp := (*x).DeepCopy() 341 return &tmp 342 })(o.SendPayment), 343 RequestPayment: (func(x *MessageRequestPayment) *MessageRequestPayment { 344 if x == nil { 345 return nil 346 } 347 tmp := (*x).DeepCopy() 348 return &tmp 349 })(o.RequestPayment), 350 Unfurl: (func(x *MessageUnfurl) *MessageUnfurl { 351 if x == nil { 352 return nil 353 } 354 tmp := (*x).DeepCopy() 355 return &tmp 356 })(o.Unfurl), 357 Flip: (func(x *MsgFlipContent) *MsgFlipContent { 358 if x == nil { 359 return nil 360 } 361 tmp := (*x).DeepCopy() 362 return &tmp 363 })(o.Flip), 364 } 365 } 366 367 type MsgSummary struct { 368 Id MessageID `codec:"id" json:"id"` 369 ConvID ConvIDStr `codec:"convID" json:"conversation_id"` 370 Channel ChatChannel `codec:"channel" json:"channel"` 371 Sender MsgSender `codec:"sender" json:"sender"` 372 SentAt int64 `codec:"sentAt" json:"sent_at"` 373 SentAtMs int64 `codec:"sentAtMs" json:"sent_at_ms"` 374 Content MsgContent `codec:"content" json:"content"` 375 Prev []MessagePreviousPointer `codec:"prev" json:"prev"` 376 Unread bool `codec:"unread" json:"unread"` 377 RevokedDevice bool `codec:"revokedDevice,omitempty" json:"revoked_device,omitempty"` 378 Offline bool `codec:"offline,omitempty" json:"offline,omitempty"` 379 KbfsEncrypted bool `codec:"kbfsEncrypted,omitempty" json:"kbfs_encrypted,omitempty"` 380 IsEphemeral bool `codec:"isEphemeral,omitempty" json:"is_ephemeral,omitempty"` 381 IsEphemeralExpired bool `codec:"isEphemeralExpired,omitempty" json:"is_ephemeral_expired,omitempty"` 382 ETime gregor1.Time `codec:"eTime,omitempty" json:"e_time,omitempty"` 383 Reactions *UIReactionMap `codec:"reactions,omitempty" json:"reactions,omitempty"` 384 HasPairwiseMacs bool `codec:"hasPairwiseMacs,omitempty" json:"has_pairwise_macs,omitempty"` 385 AtMentionUsernames []string `codec:"atMentionUsernames,omitempty" json:"at_mention_usernames,omitempty"` 386 ChannelMention string `codec:"channelMention,omitempty" json:"channel_mention,omitempty"` 387 ChannelNameMentions []UIChannelNameMention `codec:"channelNameMentions,omitempty" json:"channel_name_mentions,omitempty"` 388 BotInfo *MsgBotInfo `codec:"botInfo,omitempty" json:"bot_info,omitempty"` 389 } 390 391 func (o MsgSummary) DeepCopy() MsgSummary { 392 return MsgSummary{ 393 Id: o.Id.DeepCopy(), 394 ConvID: o.ConvID.DeepCopy(), 395 Channel: o.Channel.DeepCopy(), 396 Sender: o.Sender.DeepCopy(), 397 SentAt: o.SentAt, 398 SentAtMs: o.SentAtMs, 399 Content: o.Content.DeepCopy(), 400 Prev: (func(x []MessagePreviousPointer) []MessagePreviousPointer { 401 if x == nil { 402 return nil 403 } 404 ret := make([]MessagePreviousPointer, len(x)) 405 for i, v := range x { 406 vCopy := v.DeepCopy() 407 ret[i] = vCopy 408 } 409 return ret 410 })(o.Prev), 411 Unread: o.Unread, 412 RevokedDevice: o.RevokedDevice, 413 Offline: o.Offline, 414 KbfsEncrypted: o.KbfsEncrypted, 415 IsEphemeral: o.IsEphemeral, 416 IsEphemeralExpired: o.IsEphemeralExpired, 417 ETime: o.ETime.DeepCopy(), 418 Reactions: (func(x *UIReactionMap) *UIReactionMap { 419 if x == nil { 420 return nil 421 } 422 tmp := (*x).DeepCopy() 423 return &tmp 424 })(o.Reactions), 425 HasPairwiseMacs: o.HasPairwiseMacs, 426 AtMentionUsernames: (func(x []string) []string { 427 if x == nil { 428 return nil 429 } 430 ret := make([]string, len(x)) 431 for i, v := range x { 432 vCopy := v 433 ret[i] = vCopy 434 } 435 return ret 436 })(o.AtMentionUsernames), 437 ChannelMention: o.ChannelMention, 438 ChannelNameMentions: (func(x []UIChannelNameMention) []UIChannelNameMention { 439 if x == nil { 440 return nil 441 } 442 ret := make([]UIChannelNameMention, len(x)) 443 for i, v := range x { 444 vCopy := v.DeepCopy() 445 ret[i] = vCopy 446 } 447 return ret 448 })(o.ChannelNameMentions), 449 BotInfo: (func(x *MsgBotInfo) *MsgBotInfo { 450 if x == nil { 451 return nil 452 } 453 tmp := (*x).DeepCopy() 454 return &tmp 455 })(o.BotInfo), 456 } 457 } 458 459 type Message struct { 460 Msg *MsgSummary `codec:"msg,omitempty" json:"msg,omitempty"` 461 Error *string `codec:"error,omitempty" json:"error,omitempty"` 462 } 463 464 func (o Message) DeepCopy() Message { 465 return Message{ 466 Msg: (func(x *MsgSummary) *MsgSummary { 467 if x == nil { 468 return nil 469 } 470 tmp := (*x).DeepCopy() 471 return &tmp 472 })(o.Msg), 473 Error: (func(x *string) *string { 474 if x == nil { 475 return nil 476 } 477 tmp := (*x) 478 return &tmp 479 })(o.Error), 480 } 481 } 482 483 type Thread struct { 484 Messages []Message `codec:"messages" json:"messages"` 485 Pagination *Pagination `codec:"pagination,omitempty" json:"pagination,omitempty"` 486 Offline bool `codec:"offline,omitempty" json:"offline,omitempty"` 487 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"` 488 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 489 } 490 491 func (o Thread) DeepCopy() Thread { 492 return Thread{ 493 Messages: (func(x []Message) []Message { 494 if x == nil { 495 return nil 496 } 497 ret := make([]Message, len(x)) 498 for i, v := range x { 499 vCopy := v.DeepCopy() 500 ret[i] = vCopy 501 } 502 return ret 503 })(o.Messages), 504 Pagination: (func(x *Pagination) *Pagination { 505 if x == nil { 506 return nil 507 } 508 tmp := (*x).DeepCopy() 509 return &tmp 510 })(o.Pagination), 511 Offline: o.Offline, 512 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 513 if x == nil { 514 return nil 515 } 516 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 517 for i, v := range x { 518 vCopy := v.DeepCopy() 519 ret[i] = vCopy 520 } 521 return ret 522 })(o.IdentifyFailures), 523 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 524 if x == nil { 525 return nil 526 } 527 ret := make([]RateLimitRes, len(x)) 528 for i, v := range x { 529 vCopy := v.DeepCopy() 530 ret[i] = vCopy 531 } 532 return ret 533 })(o.RateLimits), 534 } 535 } 536 537 // A chat conversation. This is essentially a chat channel plus some additional metadata. 538 type ConvSummary struct { 539 Id ConvIDStr `codec:"id" json:"id"` 540 Channel ChatChannel `codec:"channel" json:"channel"` 541 IsDefaultConv bool `codec:"isDefaultConv" json:"is_default_conv"` 542 Unread bool `codec:"unread" json:"unread"` 543 ActiveAt int64 `codec:"activeAt" json:"active_at"` 544 ActiveAtMs int64 `codec:"activeAtMs" json:"active_at_ms"` 545 MemberStatus string `codec:"memberStatus" json:"member_status"` 546 ResetUsers []string `codec:"resetUsers,omitempty" json:"reset_users,omitempty"` 547 FinalizeInfo *ConversationFinalizeInfo `codec:"finalizeInfo,omitempty" json:"finalize_info,omitempty"` 548 Supersedes []string `codec:"supersedes,omitempty" json:"supersedes,omitempty"` 549 SupersededBy []string `codec:"supersededBy,omitempty" json:"superseded_by,omitempty"` 550 Error string `codec:"error,omitempty" json:"error,omitempty"` 551 CreatorInfo *ConversationCreatorInfoLocal `codec:"creatorInfo,omitempty" json:"creator_info,omitempty"` 552 } 553 554 func (o ConvSummary) DeepCopy() ConvSummary { 555 return ConvSummary{ 556 Id: o.Id.DeepCopy(), 557 Channel: o.Channel.DeepCopy(), 558 IsDefaultConv: o.IsDefaultConv, 559 Unread: o.Unread, 560 ActiveAt: o.ActiveAt, 561 ActiveAtMs: o.ActiveAtMs, 562 MemberStatus: o.MemberStatus, 563 ResetUsers: (func(x []string) []string { 564 if x == nil { 565 return nil 566 } 567 ret := make([]string, len(x)) 568 for i, v := range x { 569 vCopy := v 570 ret[i] = vCopy 571 } 572 return ret 573 })(o.ResetUsers), 574 FinalizeInfo: (func(x *ConversationFinalizeInfo) *ConversationFinalizeInfo { 575 if x == nil { 576 return nil 577 } 578 tmp := (*x).DeepCopy() 579 return &tmp 580 })(o.FinalizeInfo), 581 Supersedes: (func(x []string) []string { 582 if x == nil { 583 return nil 584 } 585 ret := make([]string, len(x)) 586 for i, v := range x { 587 vCopy := v 588 ret[i] = vCopy 589 } 590 return ret 591 })(o.Supersedes), 592 SupersededBy: (func(x []string) []string { 593 if x == nil { 594 return nil 595 } 596 ret := make([]string, len(x)) 597 for i, v := range x { 598 vCopy := v 599 ret[i] = vCopy 600 } 601 return ret 602 })(o.SupersededBy), 603 Error: o.Error, 604 CreatorInfo: (func(x *ConversationCreatorInfoLocal) *ConversationCreatorInfoLocal { 605 if x == nil { 606 return nil 607 } 608 tmp := (*x).DeepCopy() 609 return &tmp 610 })(o.CreatorInfo), 611 } 612 } 613 614 type ChatList struct { 615 Conversations []ConvSummary `codec:"conversations" json:"conversations"` 616 Offline bool `codec:"offline" json:"offline"` 617 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"` 618 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 619 } 620 621 func (o ChatList) DeepCopy() ChatList { 622 return ChatList{ 623 Conversations: (func(x []ConvSummary) []ConvSummary { 624 if x == nil { 625 return nil 626 } 627 ret := make([]ConvSummary, len(x)) 628 for i, v := range x { 629 vCopy := v.DeepCopy() 630 ret[i] = vCopy 631 } 632 return ret 633 })(o.Conversations), 634 Offline: o.Offline, 635 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 636 if x == nil { 637 return nil 638 } 639 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 640 for i, v := range x { 641 vCopy := v.DeepCopy() 642 ret[i] = vCopy 643 } 644 return ret 645 })(o.IdentifyFailures), 646 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 647 if x == nil { 648 return nil 649 } 650 ret := make([]RateLimitRes, len(x)) 651 for i, v := range x { 652 vCopy := v.DeepCopy() 653 ret[i] = vCopy 654 } 655 return ret 656 })(o.RateLimits), 657 } 658 } 659 660 type SendRes struct { 661 Message string `codec:"message" json:"message"` 662 MessageID *MessageID `codec:"messageID,omitempty" json:"id,omitempty"` 663 OutboxID *OutboxID `codec:"outboxID,omitempty" json:"outbox_id,omitempty"` 664 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"` 665 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 666 } 667 668 func (o SendRes) DeepCopy() SendRes { 669 return SendRes{ 670 Message: o.Message, 671 MessageID: (func(x *MessageID) *MessageID { 672 if x == nil { 673 return nil 674 } 675 tmp := (*x).DeepCopy() 676 return &tmp 677 })(o.MessageID), 678 OutboxID: (func(x *OutboxID) *OutboxID { 679 if x == nil { 680 return nil 681 } 682 tmp := (*x).DeepCopy() 683 return &tmp 684 })(o.OutboxID), 685 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 686 if x == nil { 687 return nil 688 } 689 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 690 for i, v := range x { 691 vCopy := v.DeepCopy() 692 ret[i] = vCopy 693 } 694 return ret 695 })(o.IdentifyFailures), 696 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 697 if x == nil { 698 return nil 699 } 700 ret := make([]RateLimitRes, len(x)) 701 for i, v := range x { 702 vCopy := v.DeepCopy() 703 ret[i] = vCopy 704 } 705 return ret 706 })(o.RateLimits), 707 } 708 } 709 710 type SearchInboxResOutput struct { 711 Results *ChatSearchInboxResults `codec:"results,omitempty" json:"results,omitempty"` 712 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"` 713 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 714 } 715 716 func (o SearchInboxResOutput) DeepCopy() SearchInboxResOutput { 717 return SearchInboxResOutput{ 718 Results: (func(x *ChatSearchInboxResults) *ChatSearchInboxResults { 719 if x == nil { 720 return nil 721 } 722 tmp := (*x).DeepCopy() 723 return &tmp 724 })(o.Results), 725 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 726 if x == nil { 727 return nil 728 } 729 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 730 for i, v := range x { 731 vCopy := v.DeepCopy() 732 ret[i] = vCopy 733 } 734 return ret 735 })(o.IdentifyFailures), 736 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 737 if x == nil { 738 return nil 739 } 740 ret := make([]RateLimitRes, len(x)) 741 for i, v := range x { 742 vCopy := v.DeepCopy() 743 ret[i] = vCopy 744 } 745 return ret 746 })(o.RateLimits), 747 } 748 } 749 750 type RegexpRes struct { 751 Hits []ChatSearchHit `codec:"hits" json:"hits"` 752 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"` 753 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 754 } 755 756 func (o RegexpRes) DeepCopy() RegexpRes { 757 return RegexpRes{ 758 Hits: (func(x []ChatSearchHit) []ChatSearchHit { 759 if x == nil { 760 return nil 761 } 762 ret := make([]ChatSearchHit, len(x)) 763 for i, v := range x { 764 vCopy := v.DeepCopy() 765 ret[i] = vCopy 766 } 767 return ret 768 })(o.Hits), 769 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 770 if x == nil { 771 return nil 772 } 773 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 774 for i, v := range x { 775 vCopy := v.DeepCopy() 776 ret[i] = vCopy 777 } 778 return ret 779 })(o.IdentifyFailures), 780 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 781 if x == nil { 782 return nil 783 } 784 ret := make([]RateLimitRes, len(x)) 785 for i, v := range x { 786 vCopy := v.DeepCopy() 787 ret[i] = vCopy 788 } 789 return ret 790 })(o.RateLimits), 791 } 792 } 793 794 type NewConvRes struct { 795 Id ConvIDStr `codec:"id" json:"id"` 796 IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures,omitempty" json:"identify_failures,omitempty"` 797 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 798 } 799 800 func (o NewConvRes) DeepCopy() NewConvRes { 801 return NewConvRes{ 802 Id: o.Id.DeepCopy(), 803 IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { 804 if x == nil { 805 return nil 806 } 807 ret := make([]keybase1.TLFIdentifyFailure, len(x)) 808 for i, v := range x { 809 vCopy := v.DeepCopy() 810 ret[i] = vCopy 811 } 812 return ret 813 })(o.IdentifyFailures), 814 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 815 if x == nil { 816 return nil 817 } 818 ret := make([]RateLimitRes, len(x)) 819 for i, v := range x { 820 vCopy := v.DeepCopy() 821 ret[i] = vCopy 822 } 823 return ret 824 })(o.RateLimits), 825 } 826 } 827 828 type ListCommandsRes struct { 829 Commands []UserBotCommandOutput `codec:"commands" json:"commands"` 830 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 831 } 832 833 func (o ListCommandsRes) DeepCopy() ListCommandsRes { 834 return ListCommandsRes{ 835 Commands: (func(x []UserBotCommandOutput) []UserBotCommandOutput { 836 if x == nil { 837 return nil 838 } 839 ret := make([]UserBotCommandOutput, len(x)) 840 for i, v := range x { 841 vCopy := v.DeepCopy() 842 ret[i] = vCopy 843 } 844 return ret 845 })(o.Commands), 846 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 847 if x == nil { 848 return nil 849 } 850 ret := make([]RateLimitRes, len(x)) 851 for i, v := range x { 852 vCopy := v.DeepCopy() 853 ret[i] = vCopy 854 } 855 return ret 856 })(o.RateLimits), 857 } 858 } 859 860 type EmptyRes struct { 861 RateLimits []RateLimitRes `codec:"rateLimits,omitempty" json:"ratelimits,omitempty"` 862 } 863 864 func (o EmptyRes) DeepCopy() EmptyRes { 865 return EmptyRes{ 866 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 867 if x == nil { 868 return nil 869 } 870 ret := make([]RateLimitRes, len(x)) 871 for i, v := range x { 872 vCopy := v.DeepCopy() 873 ret[i] = vCopy 874 } 875 return ret 876 })(o.RateLimits), 877 } 878 } 879 880 type MsgNotification struct { 881 Type string `codec:"type" json:"type"` 882 Source string `codec:"source" json:"source"` 883 Msg *MsgSummary `codec:"msg,omitempty" json:"msg,omitempty"` 884 Error *string `codec:"error,omitempty" json:"error,omitempty"` 885 Pagination *UIPagination `codec:"pagination,omitempty" json:"pagination,omitempty"` 886 } 887 888 func (o MsgNotification) DeepCopy() MsgNotification { 889 return MsgNotification{ 890 Type: o.Type, 891 Source: o.Source, 892 Msg: (func(x *MsgSummary) *MsgSummary { 893 if x == nil { 894 return nil 895 } 896 tmp := (*x).DeepCopy() 897 return &tmp 898 })(o.Msg), 899 Error: (func(x *string) *string { 900 if x == nil { 901 return nil 902 } 903 tmp := (*x) 904 return &tmp 905 })(o.Error), 906 Pagination: (func(x *UIPagination) *UIPagination { 907 if x == nil { 908 return nil 909 } 910 tmp := (*x).DeepCopy() 911 return &tmp 912 })(o.Pagination), 913 } 914 } 915 916 type ConvNotification struct { 917 Type string `codec:"type" json:"type"` 918 Conv *ConvSummary `codec:"conv,omitempty" json:"conv,omitempty"` 919 Error *string `codec:"error,omitempty" json:"error,omitempty"` 920 } 921 922 func (o ConvNotification) DeepCopy() ConvNotification { 923 return ConvNotification{ 924 Type: o.Type, 925 Conv: (func(x *ConvSummary) *ConvSummary { 926 if x == nil { 927 return nil 928 } 929 tmp := (*x).DeepCopy() 930 return &tmp 931 })(o.Conv), 932 Error: (func(x *string) *string { 933 if x == nil { 934 return nil 935 } 936 tmp := (*x) 937 return &tmp 938 })(o.Error), 939 } 940 } 941 942 type AdvertiseCommandAPIParam struct { 943 Typ string `codec:"typ" json:"type"` 944 Commands []UserBotCommandInput `codec:"commands" json:"commands"` 945 TeamName string `codec:"teamName,omitempty" json:"team_name,omitempty"` 946 ConvID ConvIDStr `codec:"convID,omitempty" json:"conv_id,omitempty"` 947 } 948 949 func (o AdvertiseCommandAPIParam) DeepCopy() AdvertiseCommandAPIParam { 950 return AdvertiseCommandAPIParam{ 951 Typ: o.Typ, 952 Commands: (func(x []UserBotCommandInput) []UserBotCommandInput { 953 if x == nil { 954 return nil 955 } 956 ret := make([]UserBotCommandInput, len(x)) 957 for i, v := range x { 958 vCopy := v.DeepCopy() 959 ret[i] = vCopy 960 } 961 return ret 962 })(o.Commands), 963 TeamName: o.TeamName, 964 ConvID: o.ConvID.DeepCopy(), 965 } 966 } 967 968 type ClearCommandAPIParam struct { 969 Typ string `codec:"typ" json:"type"` 970 TeamName string `codec:"teamName,omitempty" json:"team_name,omitempty"` 971 ConvID ConvIDStr `codec:"convID,omitempty" json:"conv_id,omitempty"` 972 } 973 974 func (o ClearCommandAPIParam) DeepCopy() ClearCommandAPIParam { 975 return ClearCommandAPIParam{ 976 Typ: o.Typ, 977 TeamName: o.TeamName, 978 ConvID: o.ConvID.DeepCopy(), 979 } 980 } 981 982 type ResetConvMemberAPI struct { 983 ConversationID ConvIDStr `codec:"conversationID" json:"conversationID"` 984 Username string `codec:"username" json:"username"` 985 } 986 987 func (o ResetConvMemberAPI) DeepCopy() ResetConvMemberAPI { 988 return ResetConvMemberAPI{ 989 ConversationID: o.ConversationID.DeepCopy(), 990 Username: o.Username, 991 } 992 } 993 994 type GetResetConvMembersRes struct { 995 Members []ResetConvMemberAPI `codec:"members" json:"members"` 996 RateLimits []RateLimitRes `codec:"rateLimits" json:"rateLimits"` 997 } 998 999 func (o GetResetConvMembersRes) DeepCopy() GetResetConvMembersRes { 1000 return GetResetConvMembersRes{ 1001 Members: (func(x []ResetConvMemberAPI) []ResetConvMemberAPI { 1002 if x == nil { 1003 return nil 1004 } 1005 ret := make([]ResetConvMemberAPI, len(x)) 1006 for i, v := range x { 1007 vCopy := v.DeepCopy() 1008 ret[i] = vCopy 1009 } 1010 return ret 1011 })(o.Members), 1012 RateLimits: (func(x []RateLimitRes) []RateLimitRes { 1013 if x == nil { 1014 return nil 1015 } 1016 ret := make([]RateLimitRes, len(x)) 1017 for i, v := range x { 1018 vCopy := v.DeepCopy() 1019 ret[i] = vCopy 1020 } 1021 return ret 1022 })(o.RateLimits), 1023 } 1024 } 1025 1026 type DeviceInfo struct { 1027 DeviceID keybase1.DeviceID `codec:"deviceID" json:"id"` 1028 DeviceDescription string `codec:"deviceDescription" json:"description"` 1029 DeviceType keybase1.DeviceTypeV2 `codec:"deviceType" json:"type"` 1030 DeviceCtime int64 `codec:"deviceCtime" json:"ctime"` 1031 } 1032 1033 func (o DeviceInfo) DeepCopy() DeviceInfo { 1034 return DeviceInfo{ 1035 DeviceID: o.DeviceID.DeepCopy(), 1036 DeviceDescription: o.DeviceDescription, 1037 DeviceType: o.DeviceType.DeepCopy(), 1038 DeviceCtime: o.DeviceCtime, 1039 } 1040 } 1041 1042 type GetDeviceInfoRes struct { 1043 Devices []DeviceInfo `codec:"devices" json:"devices"` 1044 } 1045 1046 func (o GetDeviceInfoRes) DeepCopy() GetDeviceInfoRes { 1047 return GetDeviceInfoRes{ 1048 Devices: (func(x []DeviceInfo) []DeviceInfo { 1049 if x == nil { 1050 return nil 1051 } 1052 ret := make([]DeviceInfo, len(x)) 1053 for i, v := range x { 1054 vCopy := v.DeepCopy() 1055 ret[i] = vCopy 1056 } 1057 return ret 1058 })(o.Devices), 1059 } 1060 } 1061 1062 type ApiInterface interface { 1063 } 1064 1065 func ApiProtocol(i ApiInterface) rpc.Protocol { 1066 return rpc.Protocol{ 1067 Name: "chat.1.api", 1068 Methods: map[string]rpc.ServeHandlerDescription{}, 1069 } 1070 } 1071 1072 type ApiClient struct { 1073 Cli rpc.GenericClient 1074 }