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.

msg.go 1.9 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 request
  15. // MsgInfo msg info.
  16. type MsgInfo struct {
  17. SendID string `json:"sendID" binding:"required"`
  18. RecvID string `json:"recvID" binding:"required"`
  19. GroupID string `json:"groupID"`
  20. SenderNickname string `json:"senderNickname"`
  21. SenderFaceURL string `json:"senderFaceURL"`
  22. SenderPlatformID int `json:"senderPlatformID"`
  23. Content *TextContent `json:"content" binding:"required"`
  24. ContentType int `json:"contentType" binding:"required"`
  25. SessionType int `json:"sessionType" binding:"required"`
  26. IsOnlineOnly bool `json:"isOnlineOnly"`
  27. NotOfflinePush bool `json:"notOfflinePush"`
  28. OfflinePushInfo *OfflinePushInfo `json:"offlinePushInfo"`
  29. }
  30. // TextContent text content.
  31. type TextContent struct {
  32. Text string `json:"text"`
  33. }
  34. // OfflinePushInfo offline push info.
  35. type OfflinePushInfo struct {
  36. Title string `json:"title"`
  37. Desc string `json:"desc"`
  38. Ex string `json:"ex"`
  39. IOSPushSound string `json:"iOSPushSound"`
  40. IOSBadgeCount bool `json:"iOSBadgeCount"`
  41. }