message.pb.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.23.0
  4. // protoc v3.11.4
  5. // source: message.proto
  6. package message
  7. import (
  8. context "context"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  14. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  15. reflect "reflect"
  16. sync "sync"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. // This is a compile-time assertion that a sufficiently up-to-date version
  25. // of the legacy proto package is being used.
  26. const _ = proto.ProtoPackageIsVersion4
  27. type SendMsgRequest struct {
  28. state protoimpl.MessageState
  29. sizeCache protoimpl.SizeCache
  30. unknownFields protoimpl.UnknownFields
  31. ReceiveUserId string `protobuf:"bytes,1,opt,name=receiveUserId,proto3" json:"receiveUserId,omitempty"` //接收方用户ID
  32. ReceiveName string `protobuf:"bytes,2,opt,name=receiveName,proto3" json:"receiveName,omitempty"` //接收方用户名
  33. SendUserId string `protobuf:"bytes,3,opt,name=sendUserId,proto3" json:"sendUserId,omitempty"` //发送方用户ID
  34. SendName string `protobuf:"bytes,4,opt,name=sendName,proto3" json:"sendName,omitempty"` //发送方用户名
  35. Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` //主题
  36. Content string `protobuf:"bytes,6,opt,name=content,proto3" json:"content,omitempty"` //内容
  37. MsgType int64 `protobuf:"varint,7,opt,name=msgType,proto3" json:"msgType,omitempty"` //消息类型 1:客服 2:系统通知 3:营销 4:用户会话
  38. Link string `protobuf:"bytes,8,opt,name=link,proto3" json:"link,omitempty"` //跳转链接
  39. CiteId string `protobuf:"bytes,9,opt,name=citeId,proto3" json:"citeId,omitempty"` //引用id
  40. Appid string `protobuf:"bytes,10,opt,name=appid,proto3" json:"appid,omitempty"` //应用标识
  41. }
  42. func (x *SendMsgRequest) Reset() {
  43. *x = SendMsgRequest{}
  44. if protoimpl.UnsafeEnabled {
  45. mi := &file_message_proto_msgTypes[0]
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. ms.StoreMessageInfo(mi)
  48. }
  49. }
  50. func (x *SendMsgRequest) String() string {
  51. return protoimpl.X.MessageStringOf(x)
  52. }
  53. func (*SendMsgRequest) ProtoMessage() {}
  54. func (x *SendMsgRequest) ProtoReflect() protoreflect.Message {
  55. mi := &file_message_proto_msgTypes[0]
  56. if protoimpl.UnsafeEnabled && x != nil {
  57. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  58. if ms.LoadMessageInfo() == nil {
  59. ms.StoreMessageInfo(mi)
  60. }
  61. return ms
  62. }
  63. return mi.MessageOf(x)
  64. }
  65. // Deprecated: Use SendMsgRequest.ProtoReflect.Descriptor instead.
  66. func (*SendMsgRequest) Descriptor() ([]byte, []int) {
  67. return file_message_proto_rawDescGZIP(), []int{0}
  68. }
  69. func (x *SendMsgRequest) GetReceiveUserId() string {
  70. if x != nil {
  71. return x.ReceiveUserId
  72. }
  73. return ""
  74. }
  75. func (x *SendMsgRequest) GetReceiveName() string {
  76. if x != nil {
  77. return x.ReceiveName
  78. }
  79. return ""
  80. }
  81. func (x *SendMsgRequest) GetSendUserId() string {
  82. if x != nil {
  83. return x.SendUserId
  84. }
  85. return ""
  86. }
  87. func (x *SendMsgRequest) GetSendName() string {
  88. if x != nil {
  89. return x.SendName
  90. }
  91. return ""
  92. }
  93. func (x *SendMsgRequest) GetTitle() string {
  94. if x != nil {
  95. return x.Title
  96. }
  97. return ""
  98. }
  99. func (x *SendMsgRequest) GetContent() string {
  100. if x != nil {
  101. return x.Content
  102. }
  103. return ""
  104. }
  105. func (x *SendMsgRequest) GetMsgType() int64 {
  106. if x != nil {
  107. return x.MsgType
  108. }
  109. return 0
  110. }
  111. func (x *SendMsgRequest) GetLink() string {
  112. if x != nil {
  113. return x.Link
  114. }
  115. return ""
  116. }
  117. func (x *SendMsgRequest) GetCiteId() string {
  118. if x != nil {
  119. return x.CiteId
  120. }
  121. return ""
  122. }
  123. func (x *SendMsgRequest) GetAppid() string {
  124. if x != nil {
  125. return x.Appid
  126. }
  127. return ""
  128. }
  129. type ChangeReadStatusRequest struct {
  130. state protoimpl.MessageState
  131. sizeCache protoimpl.SizeCache
  132. unknownFields protoimpl.UnknownFields
  133. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 消息id
  134. ReadStatus int64 `protobuf:"varint,2,opt,name=readStatus,proto3" json:"readStatus,omitempty"` // 阅读状态 0-未读 1-已读
  135. Appid string `protobuf:"bytes,3,opt,name=appid,proto3" json:"appid,omitempty"` //应用标识
  136. }
  137. func (x *ChangeReadStatusRequest) Reset() {
  138. *x = ChangeReadStatusRequest{}
  139. if protoimpl.UnsafeEnabled {
  140. mi := &file_message_proto_msgTypes[1]
  141. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  142. ms.StoreMessageInfo(mi)
  143. }
  144. }
  145. func (x *ChangeReadStatusRequest) String() string {
  146. return protoimpl.X.MessageStringOf(x)
  147. }
  148. func (*ChangeReadStatusRequest) ProtoMessage() {}
  149. func (x *ChangeReadStatusRequest) ProtoReflect() protoreflect.Message {
  150. mi := &file_message_proto_msgTypes[1]
  151. if protoimpl.UnsafeEnabled && x != nil {
  152. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  153. if ms.LoadMessageInfo() == nil {
  154. ms.StoreMessageInfo(mi)
  155. }
  156. return ms
  157. }
  158. return mi.MessageOf(x)
  159. }
  160. // Deprecated: Use ChangeReadStatusRequest.ProtoReflect.Descriptor instead.
  161. func (*ChangeReadStatusRequest) Descriptor() ([]byte, []int) {
  162. return file_message_proto_rawDescGZIP(), []int{1}
  163. }
  164. func (x *ChangeReadStatusRequest) GetId() int64 {
  165. if x != nil {
  166. return x.Id
  167. }
  168. return 0
  169. }
  170. func (x *ChangeReadStatusRequest) GetReadStatus() int64 {
  171. if x != nil {
  172. return x.ReadStatus
  173. }
  174. return 0
  175. }
  176. func (x *ChangeReadStatusRequest) GetAppid() string {
  177. if x != nil {
  178. return x.Appid
  179. }
  180. return ""
  181. }
  182. type Response struct {
  183. state protoimpl.MessageState
  184. sizeCache protoimpl.SizeCache
  185. unknownFields protoimpl.UnknownFields
  186. Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //状态码
  187. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` //响应消息
  188. }
  189. func (x *Response) Reset() {
  190. *x = Response{}
  191. if protoimpl.UnsafeEnabled {
  192. mi := &file_message_proto_msgTypes[2]
  193. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  194. ms.StoreMessageInfo(mi)
  195. }
  196. }
  197. func (x *Response) String() string {
  198. return protoimpl.X.MessageStringOf(x)
  199. }
  200. func (*Response) ProtoMessage() {}
  201. func (x *Response) ProtoReflect() protoreflect.Message {
  202. mi := &file_message_proto_msgTypes[2]
  203. if protoimpl.UnsafeEnabled && x != nil {
  204. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  205. if ms.LoadMessageInfo() == nil {
  206. ms.StoreMessageInfo(mi)
  207. }
  208. return ms
  209. }
  210. return mi.MessageOf(x)
  211. }
  212. // Deprecated: Use Response.ProtoReflect.Descriptor instead.
  213. func (*Response) Descriptor() ([]byte, []int) {
  214. return file_message_proto_rawDescGZIP(), []int{2}
  215. }
  216. func (x *Response) GetCode() int64 {
  217. if x != nil {
  218. return x.Code
  219. }
  220. return 0
  221. }
  222. func (x *Response) GetMessage() string {
  223. if x != nil {
  224. return x.Message
  225. }
  226. return ""
  227. }
  228. var File_message_proto protoreflect.FileDescriptor
  229. var file_message_proto_rawDesc = []byte{
  230. 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
  231. 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xa0, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x6e,
  232. 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x72,
  233. 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
  234. 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49,
  235. 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4e, 0x61, 0x6d, 0x65,
  236. 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4e,
  237. 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49,
  238. 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65,
  239. 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x18,
  240. 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12,
  241. 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
  242. 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
  243. 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
  244. 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
  245. 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
  246. 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x16, 0x0a,
  247. 0x06, 0x63, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63,
  248. 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x0a,
  249. 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x22, 0x5f, 0x0a, 0x17, 0x43,
  250. 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
  251. 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
  252. 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x53, 0x74,
  253. 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64,
  254. 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18,
  255. 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x22, 0x38, 0x0a, 0x08,
  256. 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
  257. 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07,
  258. 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d,
  259. 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x8d, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61,
  260. 0x67, 0x65, 0x12, 0x47, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64,
  261. 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
  262. 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75,
  263. 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
  264. 0x67, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x53,
  265. 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73,
  266. 0x73, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x75,
  267. 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65,
  268. 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  269. }
  270. var (
  271. file_message_proto_rawDescOnce sync.Once
  272. file_message_proto_rawDescData = file_message_proto_rawDesc
  273. )
  274. func file_message_proto_rawDescGZIP() []byte {
  275. file_message_proto_rawDescOnce.Do(func() {
  276. file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData)
  277. })
  278. return file_message_proto_rawDescData
  279. }
  280. var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  281. var file_message_proto_goTypes = []interface{}{
  282. (*SendMsgRequest)(nil), // 0: message.SendMsgRequest
  283. (*ChangeReadStatusRequest)(nil), // 1: message.ChangeReadStatusRequest
  284. (*Response)(nil), // 2: message.Response
  285. }
  286. var file_message_proto_depIdxs = []int32{
  287. 1, // 0: message.Message.ChangeReadStatus:input_type -> message.ChangeReadStatusRequest
  288. 0, // 1: message.Message.SendUserMsg:input_type -> message.SendMsgRequest
  289. 2, // 2: message.Message.ChangeReadStatus:output_type -> message.Response
  290. 2, // 3: message.Message.SendUserMsg:output_type -> message.Response
  291. 2, // [2:4] is the sub-list for method output_type
  292. 0, // [0:2] is the sub-list for method input_type
  293. 0, // [0:0] is the sub-list for extension type_name
  294. 0, // [0:0] is the sub-list for extension extendee
  295. 0, // [0:0] is the sub-list for field type_name
  296. }
  297. func init() { file_message_proto_init() }
  298. func file_message_proto_init() {
  299. if File_message_proto != nil {
  300. return
  301. }
  302. if !protoimpl.UnsafeEnabled {
  303. file_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  304. switch v := v.(*SendMsgRequest); i {
  305. case 0:
  306. return &v.state
  307. case 1:
  308. return &v.sizeCache
  309. case 2:
  310. return &v.unknownFields
  311. default:
  312. return nil
  313. }
  314. }
  315. file_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  316. switch v := v.(*ChangeReadStatusRequest); i {
  317. case 0:
  318. return &v.state
  319. case 1:
  320. return &v.sizeCache
  321. case 2:
  322. return &v.unknownFields
  323. default:
  324. return nil
  325. }
  326. }
  327. file_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  328. switch v := v.(*Response); i {
  329. case 0:
  330. return &v.state
  331. case 1:
  332. return &v.sizeCache
  333. case 2:
  334. return &v.unknownFields
  335. default:
  336. return nil
  337. }
  338. }
  339. }
  340. type x struct{}
  341. out := protoimpl.TypeBuilder{
  342. File: protoimpl.DescBuilder{
  343. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  344. RawDescriptor: file_message_proto_rawDesc,
  345. NumEnums: 0,
  346. NumMessages: 3,
  347. NumExtensions: 0,
  348. NumServices: 1,
  349. },
  350. GoTypes: file_message_proto_goTypes,
  351. DependencyIndexes: file_message_proto_depIdxs,
  352. MessageInfos: file_message_proto_msgTypes,
  353. }.Build()
  354. File_message_proto = out.File
  355. file_message_proto_rawDesc = nil
  356. file_message_proto_goTypes = nil
  357. file_message_proto_depIdxs = nil
  358. }
  359. // Reference imports to suppress errors if they are not otherwise used.
  360. var _ context.Context
  361. var _ grpc.ClientConnInterface
  362. // This is a compile-time assertion to ensure that this generated file
  363. // is compatible with the grpc package it is being compiled against.
  364. const _ = grpc.SupportPackageIsVersion6
  365. // MessageClient is the client API for Message service.
  366. //
  367. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  368. type MessageClient interface {
  369. //修改消息阅读状态
  370. ChangeReadStatus(ctx context.Context, in *ChangeReadStatusRequest, opts ...grpc.CallOption) (*Response, error)
  371. //指定用户发消息
  372. SendUserMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*Response, error)
  373. }
  374. type messageClient struct {
  375. cc grpc.ClientConnInterface
  376. }
  377. func NewMessageClient(cc grpc.ClientConnInterface) MessageClient {
  378. return &messageClient{cc}
  379. }
  380. func (c *messageClient) ChangeReadStatus(ctx context.Context, in *ChangeReadStatusRequest, opts ...grpc.CallOption) (*Response, error) {
  381. out := new(Response)
  382. err := c.cc.Invoke(ctx, "/message.Message/ChangeReadStatus", in, out, opts...)
  383. if err != nil {
  384. return nil, err
  385. }
  386. return out, nil
  387. }
  388. func (c *messageClient) SendUserMsg(ctx context.Context, in *SendMsgRequest, opts ...grpc.CallOption) (*Response, error) {
  389. out := new(Response)
  390. err := c.cc.Invoke(ctx, "/message.Message/SendUserMsg", in, out, opts...)
  391. if err != nil {
  392. return nil, err
  393. }
  394. return out, nil
  395. }
  396. // MessageServer is the server API for Message service.
  397. type MessageServer interface {
  398. //修改消息阅读状态
  399. ChangeReadStatus(context.Context, *ChangeReadStatusRequest) (*Response, error)
  400. //指定用户发消息
  401. SendUserMsg(context.Context, *SendMsgRequest) (*Response, error)
  402. }
  403. // UnimplementedMessageServer can be embedded to have forward compatible implementations.
  404. type UnimplementedMessageServer struct {
  405. }
  406. func (*UnimplementedMessageServer) ChangeReadStatus(context.Context, *ChangeReadStatusRequest) (*Response, error) {
  407. return nil, status.Errorf(codes.Unimplemented, "method ChangeReadStatus not implemented")
  408. }
  409. func (*UnimplementedMessageServer) SendUserMsg(context.Context, *SendMsgRequest) (*Response, error) {
  410. return nil, status.Errorf(codes.Unimplemented, "method SendUserMsg not implemented")
  411. }
  412. func RegisterMessageServer(s *grpc.Server, srv MessageServer) {
  413. s.RegisterService(&_Message_serviceDesc, srv)
  414. }
  415. func _Message_ChangeReadStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  416. in := new(ChangeReadStatusRequest)
  417. if err := dec(in); err != nil {
  418. return nil, err
  419. }
  420. if interceptor == nil {
  421. return srv.(MessageServer).ChangeReadStatus(ctx, in)
  422. }
  423. info := &grpc.UnaryServerInfo{
  424. Server: srv,
  425. FullMethod: "/message.Message/ChangeReadStatus",
  426. }
  427. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  428. return srv.(MessageServer).ChangeReadStatus(ctx, req.(*ChangeReadStatusRequest))
  429. }
  430. return interceptor(ctx, in, info, handler)
  431. }
  432. func _Message_SendUserMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  433. in := new(SendMsgRequest)
  434. if err := dec(in); err != nil {
  435. return nil, err
  436. }
  437. if interceptor == nil {
  438. return srv.(MessageServer).SendUserMsg(ctx, in)
  439. }
  440. info := &grpc.UnaryServerInfo{
  441. Server: srv,
  442. FullMethod: "/message.Message/SendUserMsg",
  443. }
  444. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  445. return srv.(MessageServer).SendUserMsg(ctx, req.(*SendMsgRequest))
  446. }
  447. return interceptor(ctx, in, info, handler)
  448. }
  449. var _Message_serviceDesc = grpc.ServiceDesc{
  450. ServiceName: "message.Message",
  451. HandlerType: (*MessageServer)(nil),
  452. Methods: []grpc.MethodDesc{
  453. {
  454. MethodName: "ChangeReadStatus",
  455. Handler: _Message_ChangeReadStatus_Handler,
  456. },
  457. {
  458. MethodName: "SendUserMsg",
  459. Handler: _Message_SendUserMsg_Handler,
  460. },
  461. },
  462. Streams: []grpc.StreamDesc{},
  463. Metadata: "message.proto",
  464. }