You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

callback.go 3.0 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // Copyright © 2023 OpenIM open source community. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package requestparams
  15. // OpenIMCallbackCommand OpenIM callback request command.
  16. type OpenIMCallbackCommand struct {
  17. Command string `form:"command" json:"command"`
  18. }
  19. // CommonCallbackReq Common callback request command.
  20. type CommonCallbackReq struct {
  21. SendID string `json:"sendID"`
  22. CallbackCommand string `json:"callbackCommand"`
  23. ServerMsgID string `json:"serverMsgID"`
  24. ClientMsgID string `json:"clientMsgID"`
  25. OperationID string `json:"operationID"`
  26. SenderPlatformID int32 `json:"senderPlatformID"`
  27. SenderNickname string `json:"senderNickname"`
  28. SessionType int32 `json:"sessionType"`
  29. MsgFrom int32 `json:"msgFrom"`
  30. ContentType int32 `json:"contentType"`
  31. Status int32 `json:"status"`
  32. CreateTime int64 `json:"createTime"`
  33. Content string `json:"content"`
  34. Seq uint32 `json:"seq"`
  35. AtUserIDList []string `json:"atUserList"`
  36. SenderFaceURL string `json:"faceURL"`
  37. Ex string `json:"ex"`
  38. }
  39. // CallbackBeforeSendSingleMsgReq Request body for BeforeSendSingleMsgCommand.
  40. type CallbackBeforeSendSingleMsgReq struct {
  41. CommonCallbackReq
  42. RecvID string `json:"recvID"`
  43. }
  44. // CallbackAfterSendSingleMsgReq Request body for AfterSendSingleMsgCommand.
  45. type CallbackAfterSendSingleMsgReq struct {
  46. CommonCallbackReq
  47. RecvID string `json:"recvID"`
  48. }
  49. // CallbackMsgModifyCommandReq Request body for MsgModifyCommand.
  50. type CallbackMsgModifyCommandReq struct {
  51. CommonCallbackReq
  52. }
  53. // UserStatusBaseCallback Common user callback request command.
  54. type UserStatusBaseCallback struct {
  55. CallbackCommand string `json:"callbackCommand"`
  56. OperationID string `json:"operationID"`
  57. PlatformID int `json:"platformID"`
  58. Platform string `json:"platform"`
  59. UserID string `json:"userID"`
  60. }
  61. // CallbackUserOnlineReq Request body for UserOnlineCommand.
  62. type CallbackUserOnlineReq struct {
  63. UserStatusBaseCallback
  64. // Token string `json:"token"`
  65. Seq int64 `json:"seq"`
  66. IsAppBackground bool `json:"isAppBackground"`
  67. ConnID string `json:"connID"`
  68. }
  69. // CallbackUserOfflineReq Request body for UserOfflineCommand.
  70. type CallbackUserOfflineReq struct {
  71. UserStatusBaseCallback
  72. Seq int64 `json:"seq"`
  73. ConnID string `json:"connID"`
  74. }