From 63727649a6b8c2218b7beccfd51650b713d2e881 Mon Sep 17 00:00:00 2001 From: ZuoZuo <68836346+Mrz-sakura@users.noreply.github.com> Date: Thu, 14 May 2026 00:25:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- api/proto/activity/v1/activity.pb.go | 1370 +++++-- api/proto/activity/v1/activity_grpc.pb.go | 2 +- api/proto/events/room/v1/events.pb.go | 598 ++- api/proto/events/room/v1/events.proto | 6 + api/proto/game/v1/game.pb.go | 424 +- api/proto/game/v1/game_grpc.pb.go | 2 +- api/proto/room/v1/room.pb.go | 3582 ++++++++++++----- api/proto/room/v1/room.proto | 58 +- api/proto/room/v1/room_grpc.pb.go | 116 +- api/proto/user/v1/auth.pb.go | 248 +- api/proto/user/v1/auth_grpc.pb.go | 2 +- api/proto/user/v1/host.pb.go | 1150 +++++- api/proto/user/v1/host_grpc.pb.go | 2 +- api/proto/user/v1/user.pb.go | 1898 +++++++-- api/proto/user/v1/user_grpc.pb.go | 2 +- api/proto/wallet/v1/wallet.pb.go | 2074 ++++++++-- api/proto/wallet/v1/wallet_grpc.pb.go | 2 +- docs/flutter对接/房间关注接口Flutter对接.md | 125 + docs/flutter对接/房间踢人接口Flutter对接.md | 322 ++ docs/flutter对接/房间锁房接口Flutter对接.md | 383 ++ docs/notice-service架构.md | 66 +- docs/openapi/gateway.swagger.yaml | 165 +- docs/房间区域置顶.md | 46 + docs/接口清单.md | 10 +- docs/社交关系接口.md | 3 +- docs/语音房区域房间列表架构.md | 17 +- docs/语音房基础闭环实现.md | 4 +- docs/语音房客户端接口流程.md | 80 +- server/admin/docs/权限管理.md | 3 + .../internal/modules/roomadmin/handler.go | 67 + .../admin/internal/modules/roomadmin/pin.go | 409 ++ .../internal/modules/roomadmin/pin_test.go | 46 + .../internal/modules/roomadmin/request.go | 14 + .../internal/modules/roomadmin/routes.go | 3 + .../internal/modules/roomadmin/service.go | 8 +- server/admin/internal/repository/seed.go | 15 +- .../internal/client/room_client.go | 15 + .../transport/http/activityapi/handler.go | 33 + .../registration_reward_handler.go | 4 +- .../http/{ => activityapi}/task_handler.go | 11 +- .../http/{ => appapi}/app_config_handler.go | 25 +- .../http/{ => appapi}/device_handler.go | 14 +- .../internal/transport/http/appapi/handler.go | 72 + .../http/{ => appapi}/upload_handler.go | 4 +- .../internal/transport/http/auth_handler.go | 2 +- .../transport/http/callbackapi/handler.go | 58 + .../{ => callbackapi}/tencent_im_callback.go | 2 +- .../{ => callbackapi}/tencent_rtc_callback.go | 2 +- .../http/{ => gameapi}/game_handler.go | 16 +- .../transport/http/{ => gameapi}/game_view.go | 2 +- .../transport/http/gameapi/handler.go | 47 + .../internal/transport/http/handler.go | 22 +- .../transport/http/httpkit/response.go | 182 + .../transport/http/httproutes/router.go | 4 + .../http/manager_center_handler_test.go | 20 +- .../transport/http/managerapi/handler.go | 36 + .../manager_center_handler.go | 35 +- .../transport/http/messageapi/handler.go | 41 + .../http/{ => messageapi}/message_handler.go | 30 +- .../transport/http/resourceapi/handler.go | 41 + .../{ => resourceapi}/resource_handler.go | 18 +- .../internal/transport/http/response_test.go | 220 +- .../transport/http/roomapi/gift_view.go | 97 + .../transport/http/roomapi/handler.go | 84 + .../http/{ => roomapi}/room_handler.go | 251 +- .../transport/http/{ => roomapi}/room_view.go | 40 +- .../http/{ => roomapi}/rtc_handler.go | 17 +- .../internal/transport/http/router.go | 213 +- .../transport/http/userapi/auth_view.go | 45 + .../transport/http/userapi/handler.go | 67 + .../{ => userapi}/host_identity_handler.go | 10 +- .../{ => userapi}/my_page_overview_handler.go | 8 +- .../http/{ => userapi}/social_handler.go | 26 +- .../http/{ => userapi}/user_handler.go | 34 +- .../{ => walletapi}/app_wallet_handler.go | 12 +- .../transport/http/walletapi/handler.go | 58 + .../transport/http/walletapi/view_shared.go | 65 + .../http/{ => walletapi}/vip_handler.go | 4 +- .../http/{ => walletapi}/wallet_handler.go | 12 +- .../notice-service/configs/config.docker.yaml | 11 + .../configs/config.tencent.example.yaml | 11 + services/notice-service/configs/config.yaml | 11 + services/notice-service/internal/app/app.go | 35 + .../notice-service/internal/config/config.go | 24 +- .../roomnotice/mysql_integration_test.go | 174 + .../modules/roomnotice/mysql_repository.go | 382 ++ .../internal/modules/roomnotice/service.go | 142 + .../modules/roomnotice/service_test.go | 145 + .../internal/modules/roomnotice/worker.go | 92 + .../deploy/mysql/initdb/001_room_service.sql | 34 + .../internal/integration/tencent_im.go | 11 + .../internal/room/command/command.go | 18 + .../internal/room/service/create_room.go | 17 +- .../internal/room/service/current_room.go | 13 + .../internal/room/service/follow.go | 85 + .../internal/room/service/follow_test.go | 128 + .../internal/room/service/helpers.go | 9 +- .../internal/room/service/kick_test.go | 108 + .../internal/room/service/lifecycle.go | 7 + .../internal/room/service/list.go | 65 +- .../internal/room/service/lock_test.go | 105 + .../room/service/mic_publish_timeout.go | 8 + .../internal/room/service/moderation.go | 17 +- .../room/service/online_users_query.go | 12 +- .../internal/room/service/outbox_worker.go | 6 + .../internal/room/service/pin_test.go | 88 + .../internal/room/service/pipeline.go | 71 +- .../internal/room/service/presence.go | 6 + .../internal/room/service/profile.go | 24 +- .../internal/room/service/recovery.go | 11 + .../internal/room/service/repository.go | 63 + .../internal/room/service/room_lock.go | 120 + .../internal/room/service/rtc_event.go | 28 +- .../internal/room/service/service.go | 2 + .../internal/room/service/snapshot.go | 2 + .../internal/room/service/snapshot_query.go | 6 + .../internal/room/service/system_evict.go | 16 +- .../room-service/internal/room/state/state.go | 34 +- .../internal/storage/mysql/repository.go | 341 +- .../internal/testutil/mysqltest/mysqltest.go | 31 + .../internal/transport/grpc/server.go | 26 + 122 files changed, 14858 insertions(+), 3008 deletions(-) create mode 100644 docs/flutter对接/房间关注接口Flutter对接.md create mode 100644 docs/flutter对接/房间踢人接口Flutter对接.md create mode 100644 docs/flutter对接/房间锁房接口Flutter对接.md create mode 100644 docs/房间区域置顶.md create mode 100644 server/admin/internal/modules/roomadmin/pin.go create mode 100644 server/admin/internal/modules/roomadmin/pin_test.go create mode 100644 services/gateway-service/internal/transport/http/activityapi/handler.go rename services/gateway-service/internal/transport/http/{ => activityapi}/registration_reward_handler.go (97%) rename services/gateway-service/internal/transport/http/{ => activityapi}/task_handler.go (95%) rename services/gateway-service/internal/transport/http/{ => appapi}/app_config_handler.go (86%) rename services/gateway-service/internal/transport/http/{ => appapi}/device_handler.go (91%) create mode 100644 services/gateway-service/internal/transport/http/appapi/handler.go rename services/gateway-service/internal/transport/http/{ => appapi}/upload_handler.go (98%) create mode 100644 services/gateway-service/internal/transport/http/callbackapi/handler.go rename services/gateway-service/internal/transport/http/{ => callbackapi}/tencent_im_callback.go (99%) rename services/gateway-service/internal/transport/http/{ => callbackapi}/tencent_rtc_callback.go (99%) rename services/gateway-service/internal/transport/http/{ => gameapi}/game_handler.go (91%) rename services/gateway-service/internal/transport/http/{ => gameapi}/game_view.go (99%) create mode 100644 services/gateway-service/internal/transport/http/gameapi/handler.go create mode 100644 services/gateway-service/internal/transport/http/managerapi/handler.go rename services/gateway-service/internal/transport/http/{ => managerapi}/manager_center_handler.go (91%) create mode 100644 services/gateway-service/internal/transport/http/messageapi/handler.go rename services/gateway-service/internal/transport/http/{ => messageapi}/message_handler.go (93%) create mode 100644 services/gateway-service/internal/transport/http/resourceapi/handler.go rename services/gateway-service/internal/transport/http/{ => resourceapi}/resource_handler.go (96%) create mode 100644 services/gateway-service/internal/transport/http/roomapi/gift_view.go create mode 100644 services/gateway-service/internal/transport/http/roomapi/handler.go rename services/gateway-service/internal/transport/http/{ => roomapi}/room_handler.go (83%) rename services/gateway-service/internal/transport/http/{ => roomapi}/room_view.go (93%) rename services/gateway-service/internal/transport/http/{ => roomapi}/rtc_handler.go (92%) create mode 100644 services/gateway-service/internal/transport/http/userapi/auth_view.go create mode 100644 services/gateway-service/internal/transport/http/userapi/handler.go rename services/gateway-service/internal/transport/http/{ => userapi}/host_identity_handler.go (96%) rename services/gateway-service/internal/transport/http/{ => userapi}/my_page_overview_handler.go (97%) rename services/gateway-service/internal/transport/http/{ => userapi}/social_handler.go (95%) rename services/gateway-service/internal/transport/http/{ => userapi}/user_handler.go (95%) rename services/gateway-service/internal/transport/http/{ => walletapi}/app_wallet_handler.go (98%) create mode 100644 services/gateway-service/internal/transport/http/walletapi/handler.go create mode 100644 services/gateway-service/internal/transport/http/walletapi/view_shared.go rename services/gateway-service/internal/transport/http/{ => walletapi}/vip_handler.go (98%) rename services/gateway-service/internal/transport/http/{ => walletapi}/wallet_handler.go (97%) create mode 100644 services/notice-service/internal/modules/roomnotice/mysql_integration_test.go create mode 100644 services/notice-service/internal/modules/roomnotice/mysql_repository.go create mode 100644 services/notice-service/internal/modules/roomnotice/service.go create mode 100644 services/notice-service/internal/modules/roomnotice/service_test.go create mode 100644 services/notice-service/internal/modules/roomnotice/worker.go create mode 100644 services/room-service/internal/room/service/follow.go create mode 100644 services/room-service/internal/room/service/follow_test.go create mode 100644 services/room-service/internal/room/service/kick_test.go create mode 100644 services/room-service/internal/room/service/lock_test.go create mode 100644 services/room-service/internal/room/service/pin_test.go create mode 100644 services/room-service/internal/room/service/room_lock.go diff --git a/README.md b/README.md index ca54ae1c..01d0ee7c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ HY Voice Room 是语音房后端 monorepo。当前架构不再自研 IM 长连 - `user-service` 当前承接登录、三方注册、密码、refresh session、用户主数据、默认短号和临时靓号基础能力。 - `activity-service` 当前承接每日任务、活动/系统消息基础能力和房间事件 consumer 边界;`room_outbox` 到 activity/audit 的实际消费链路按独立消费位点接入。 - `cron-service` 当前负责后台调度、任务运行记录,以及通过内部 gRPC 触发 owner service 批处理;它不直接拥有房间、账务、用户或活动业务状态。 -- `notice-service` 当前消费 `wallet_outbox` 的余额变更事件,异步投递腾讯云 IM 单聊私有通知;后续 push、站内 inbox 和其它 owner outbox 消费按模块继续扩展。 +- `notice-service` 当前消费 `wallet_outbox` 的余额变更事件和 `room_outbox` 的踢人事件,异步投递腾讯云 IM 单聊私有通知;房间群消息和群成员控制仍由 `room-service` 的房间 IM bridge 处理。 - 腾讯云 IM 承担客户端长连接、群消息、公屏、单聊、离线/漫游和全球接入能力;本仓库不再部署 `im-service`。 - 多 App 共用同一套后端服务,入口由 `gateway-service` 通过包名或 `app_code` 解析租户;所有业务库表按 `app_code` 隔离,设计细节见 `docs/多App租户架构.md`。 @@ -107,7 +107,7 @@ Authorization: Bearer - `X-Request-ID`/`request_id` 由后端生成,只做链路追踪;写操作的 `command_id` 由前端按用户动作生成,用于服务端幂等。 - `room-service` 在 `CreateRoom` 成功后写 `room_outbox`,由 outbox worker 异步创建或补偿同名腾讯云 IM 群组。 - `room-service` 在上下麦、禁言、踢人、送礼等命令提交后只写房间状态、command log 和 outbox;腾讯云 IM 房间系统自定义消息由 outbox worker 异步投递。 -- `notice-service` 消费钱包余额变更 outbox,向单个用户发送 `wallet_notice` 私有自定义消息;钱包不会直接调用腾讯云 IM。 +- `notice-service` 消费钱包余额变更 outbox 和房间踢人 outbox,向单个用户发送 `wallet_notice`、`room_notice` 私有自定义消息;owner service 不直接调用腾讯云 IM 单聊。 - `gateway-service` 已提供 `/api/v1/tencent-im/callback`,支持腾讯云 IM 入群前和发言前回调,并分别回查 `VerifyRoomPresence` 和 `CheckSpeakPermission`。 腾讯云 IM 配置分别在: @@ -197,7 +197,7 @@ services/notice-service/ async user notice delivery workers - 腾讯云 IM 回调入口已经落在 gateway;线上仍必须在腾讯云 IM 控制台启用 `Group.CallbackBeforeApplyJoinGroup` 和 `Group.CallbackBeforeSendMsg`,并配置公网 callback URL 与鉴权 token。 - 前端对同一次用户写动作的 HTTP 重试必须复用同一个 `command_id`;`X-Request-ID` 不需要也不应该由前端传入。 - `wallet-service` App 运行路径使用 MySQL 扣费事务;本地需要先通过 compose initdb 建好 `hyapp_wallet`。 -- `notice-service` 本地默认不启用腾讯云 IM worker;线上启用 `wallet_notice_worker.enabled=true` 时必须同时启用 `tencent_im.enabled=true`。 +- `notice-service` 本地默认不启用腾讯云 IM worker;线上启用 `wallet_notice_worker.enabled=true` 或 `room_notice_worker.enabled=true` 时必须同时启用 `tencent_im.enabled=true`。 - `activity-service` 已承接每日任务和消息/活动基础能力;`room_outbox` 到 activity/audit 的实际消费链路仍需按独立消费位点补齐。 - `room-service` App 已启动 `room_outbox` 补偿 worker;该状态只表示腾讯云 IM 系统消息补偿结果,activity/audit 后续必须使用独立消费位点。 - JWT、腾讯云 IM secret 等本地配置只能用开发值,线上必须走安全配置源。 diff --git a/api/proto/activity/v1/activity.pb.go b/api/proto/activity/v1/activity.pb.go index 75a682c2..2e6690b7 100644 --- a/api/proto/activity/v1/activity.pb.go +++ b/api/proto/activity/v1/activity.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/activity/v1/activity.proto package activityv1 @@ -36,9 +36,11 @@ type RequestMeta struct { func (x *RequestMeta) Reset() { *x = RequestMeta{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestMeta) String() string { @@ -49,7 +51,7 @@ func (*RequestMeta) ProtoMessage() {} func (x *RequestMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -110,9 +112,11 @@ type PingActivityRequest struct { func (x *PingActivityRequest) Reset() { *x = PingActivityRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PingActivityRequest) String() string { @@ -123,7 +127,7 @@ func (*PingActivityRequest) ProtoMessage() {} func (x *PingActivityRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -157,9 +161,11 @@ type PingActivityResponse struct { func (x *PingActivityResponse) Reset() { *x = PingActivityResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PingActivityResponse) String() string { @@ -170,7 +176,7 @@ func (*PingActivityResponse) ProtoMessage() {} func (x *PingActivityResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,9 +217,11 @@ type GetActivityStatusRequest struct { func (x *GetActivityStatusRequest) Reset() { *x = GetActivityStatusRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetActivityStatusRequest) String() string { @@ -224,7 +232,7 @@ func (*GetActivityStatusRequest) ProtoMessage() {} func (x *GetActivityStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -265,9 +273,11 @@ type GetActivityStatusResponse struct { func (x *GetActivityStatusResponse) Reset() { *x = GetActivityStatusResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetActivityStatusResponse) String() string { @@ -278,7 +288,7 @@ func (*GetActivityStatusResponse) ProtoMessage() {} func (x *GetActivityStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -321,9 +331,11 @@ type MessageTabSection struct { func (x *MessageTabSection) Reset() { *x = MessageTabSection{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MessageTabSection) String() string { @@ -334,7 +346,7 @@ func (*MessageTabSection) ProtoMessage() {} func (x *MessageTabSection) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -389,9 +401,11 @@ type ListMessageTabsRequest struct { func (x *ListMessageTabsRequest) Reset() { *x = ListMessageTabsRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListMessageTabsRequest) String() string { @@ -402,7 +416,7 @@ func (*ListMessageTabsRequest) ProtoMessage() {} func (x *ListMessageTabsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -442,9 +456,11 @@ type ListMessageTabsResponse struct { func (x *ListMessageTabsResponse) Reset() { *x = ListMessageTabsResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListMessageTabsResponse) String() string { @@ -455,7 +471,7 @@ func (*ListMessageTabsResponse) ProtoMessage() {} func (x *ListMessageTabsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -498,9 +514,11 @@ type InboxMessage struct { func (x *InboxMessage) Reset() { *x = InboxMessage{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InboxMessage) String() string { @@ -511,7 +529,7 @@ func (*InboxMessage) ProtoMessage() {} func (x *InboxMessage) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -618,9 +636,11 @@ type ListInboxMessagesRequest struct { func (x *ListInboxMessagesRequest) Reset() { *x = ListInboxMessagesRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListInboxMessagesRequest) String() string { @@ -631,7 +651,7 @@ func (*ListInboxMessagesRequest) ProtoMessage() {} func (x *ListInboxMessagesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -694,9 +714,11 @@ type ListInboxMessagesResponse struct { func (x *ListInboxMessagesResponse) Reset() { *x = ListInboxMessagesResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListInboxMessagesResponse) String() string { @@ -707,7 +729,7 @@ func (*ListInboxMessagesResponse) ProtoMessage() {} func (x *ListInboxMessagesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -756,9 +778,11 @@ type MarkInboxMessageReadRequest struct { func (x *MarkInboxMessageReadRequest) Reset() { *x = MarkInboxMessageReadRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MarkInboxMessageReadRequest) String() string { @@ -769,7 +793,7 @@ func (*MarkInboxMessageReadRequest) ProtoMessage() {} func (x *MarkInboxMessageReadRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -818,9 +842,11 @@ type MarkInboxMessageReadResponse struct { func (x *MarkInboxMessageReadResponse) Reset() { *x = MarkInboxMessageReadResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MarkInboxMessageReadResponse) String() string { @@ -831,7 +857,7 @@ func (*MarkInboxMessageReadResponse) ProtoMessage() {} func (x *MarkInboxMessageReadResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -880,9 +906,11 @@ type MarkInboxSectionReadRequest struct { func (x *MarkInboxSectionReadRequest) Reset() { *x = MarkInboxSectionReadRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MarkInboxSectionReadRequest) String() string { @@ -893,7 +921,7 @@ func (*MarkInboxSectionReadRequest) ProtoMessage() {} func (x *MarkInboxSectionReadRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -941,9 +969,11 @@ type MarkInboxSectionReadResponse struct { func (x *MarkInboxSectionReadResponse) Reset() { *x = MarkInboxSectionReadResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MarkInboxSectionReadResponse) String() string { @@ -954,7 +984,7 @@ func (*MarkInboxSectionReadResponse) ProtoMessage() {} func (x *MarkInboxSectionReadResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -996,9 +1026,11 @@ type DeleteInboxMessageRequest struct { func (x *DeleteInboxMessageRequest) Reset() { *x = DeleteInboxMessageRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteInboxMessageRequest) String() string { @@ -1009,7 +1041,7 @@ func (*DeleteInboxMessageRequest) ProtoMessage() {} func (x *DeleteInboxMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1057,9 +1089,11 @@ type DeleteInboxMessageResponse struct { func (x *DeleteInboxMessageResponse) Reset() { *x = DeleteInboxMessageResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteInboxMessageResponse) String() string { @@ -1070,7 +1104,7 @@ func (*DeleteInboxMessageResponse) ProtoMessage() {} func (x *DeleteInboxMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1130,9 +1164,11 @@ type CreateInboxMessageRequest struct { func (x *CreateInboxMessageRequest) Reset() { *x = CreateInboxMessageRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateInboxMessageRequest) String() string { @@ -1143,7 +1179,7 @@ func (*CreateInboxMessageRequest) ProtoMessage() {} func (x *CreateInboxMessageRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1317,9 +1353,11 @@ type CreateInboxMessageResponse struct { func (x *CreateInboxMessageResponse) Reset() { *x = CreateInboxMessageResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateInboxMessageResponse) String() string { @@ -1330,7 +1368,7 @@ func (*CreateInboxMessageResponse) ProtoMessage() {} func (x *CreateInboxMessageResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1377,9 +1415,11 @@ type CreateFanoutJobRequest struct { func (x *CreateFanoutJobRequest) Reset() { *x = CreateFanoutJobRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateFanoutJobRequest) String() string { @@ -1390,7 +1430,7 @@ func (*CreateFanoutJobRequest) ProtoMessage() {} func (x *CreateFanoutJobRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1474,9 +1514,11 @@ type CreateFanoutJobResponse struct { func (x *CreateFanoutJobResponse) Reset() { *x = CreateFanoutJobResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateFanoutJobResponse) String() string { @@ -1487,7 +1529,7 @@ func (*CreateFanoutJobResponse) ProtoMessage() {} func (x *CreateFanoutJobResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1538,9 +1580,11 @@ type CronBatchRequest struct { func (x *CronBatchRequest) Reset() { *x = CronBatchRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CronBatchRequest) String() string { @@ -1551,7 +1595,7 @@ func (*CronBatchRequest) ProtoMessage() {} func (x *CronBatchRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1616,9 +1660,11 @@ type CronBatchResponse struct { func (x *CronBatchResponse) Reset() { *x = CronBatchResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CronBatchResponse) String() string { @@ -1629,7 +1675,7 @@ func (*CronBatchResponse) ProtoMessage() {} func (x *CronBatchResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1706,9 +1752,11 @@ type TaskItem struct { func (x *TaskItem) Reset() { *x = TaskItem{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskItem) String() string { @@ -1719,7 +1767,7 @@ func (*TaskItem) ProtoMessage() {} func (x *TaskItem) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1867,9 +1915,11 @@ type TaskSection struct { func (x *TaskSection) Reset() { *x = TaskSection{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskSection) String() string { @@ -1880,7 +1930,7 @@ func (*TaskSection) ProtoMessage() {} func (x *TaskSection) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1935,9 +1985,11 @@ type ListUserTasksRequest struct { func (x *ListUserTasksRequest) Reset() { *x = ListUserTasksRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListUserTasksRequest) String() string { @@ -1948,7 +2000,7 @@ func (*ListUserTasksRequest) ProtoMessage() {} func (x *ListUserTasksRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1990,9 +2042,11 @@ type ListUserTasksResponse struct { func (x *ListUserTasksResponse) Reset() { *x = ListUserTasksResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListUserTasksResponse) String() string { @@ -2003,7 +2057,7 @@ func (*ListUserTasksResponse) ProtoMessage() {} func (x *ListUserTasksResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2055,9 +2109,11 @@ type ClaimTaskRewardRequest struct { func (x *ClaimTaskRewardRequest) Reset() { *x = ClaimTaskRewardRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ClaimTaskRewardRequest) String() string { @@ -2068,7 +2124,7 @@ func (*ClaimTaskRewardRequest) ProtoMessage() {} func (x *ClaimTaskRewardRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2144,9 +2200,11 @@ type ClaimTaskRewardResponse struct { func (x *ClaimTaskRewardResponse) Reset() { *x = ClaimTaskRewardResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ClaimTaskRewardResponse) String() string { @@ -2157,7 +2215,7 @@ func (*ClaimTaskRewardResponse) ProtoMessage() {} func (x *ClaimTaskRewardResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2253,9 +2311,11 @@ type ConsumeTaskEventRequest struct { func (x *ConsumeTaskEventRequest) Reset() { *x = ConsumeTaskEventRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsumeTaskEventRequest) String() string { @@ -2266,7 +2326,7 @@ func (*ConsumeTaskEventRequest) ProtoMessage() {} func (x *ConsumeTaskEventRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2350,9 +2410,11 @@ type ConsumeTaskEventResponse struct { func (x *ConsumeTaskEventResponse) Reset() { *x = ConsumeTaskEventResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsumeTaskEventResponse) String() string { @@ -2363,7 +2425,7 @@ func (*ConsumeTaskEventResponse) ProtoMessage() {} func (x *ConsumeTaskEventResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2412,9 +2474,11 @@ type BroadcastJoinGroup struct { func (x *BroadcastJoinGroup) Reset() { *x = BroadcastJoinGroup{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BroadcastJoinGroup) String() string { @@ -2425,7 +2489,7 @@ func (*BroadcastJoinGroup) ProtoMessage() {} func (x *BroadcastJoinGroup) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2471,9 +2535,11 @@ type EnsureBroadcastGroupsRequest struct { func (x *EnsureBroadcastGroupsRequest) Reset() { *x = EnsureBroadcastGroupsRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EnsureBroadcastGroupsRequest) String() string { @@ -2484,7 +2550,7 @@ func (*EnsureBroadcastGroupsRequest) ProtoMessage() {} func (x *EnsureBroadcastGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2516,9 +2582,11 @@ type EnsureBroadcastGroupsResponse struct { func (x *EnsureBroadcastGroupsResponse) Reset() { *x = EnsureBroadcastGroupsResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EnsureBroadcastGroupsResponse) String() string { @@ -2529,7 +2597,7 @@ func (*EnsureBroadcastGroupsResponse) ProtoMessage() {} func (x *EnsureBroadcastGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2565,9 +2633,11 @@ type PublishRegionBroadcastRequest struct { func (x *PublishRegionBroadcastRequest) Reset() { *x = PublishRegionBroadcastRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PublishRegionBroadcastRequest) String() string { @@ -2578,7 +2648,7 @@ func (*PublishRegionBroadcastRequest) ProtoMessage() {} func (x *PublishRegionBroadcastRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2641,9 +2711,11 @@ type PublishGlobalBroadcastRequest struct { func (x *PublishGlobalBroadcastRequest) Reset() { *x = PublishGlobalBroadcastRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PublishGlobalBroadcastRequest) String() string { @@ -2654,7 +2726,7 @@ func (*PublishGlobalBroadcastRequest) ProtoMessage() {} func (x *PublishGlobalBroadcastRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2710,9 +2782,11 @@ type PublishBroadcastResponse struct { func (x *PublishBroadcastResponse) Reset() { *x = PublishBroadcastResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PublishBroadcastResponse) String() string { @@ -2723,7 +2797,7 @@ func (*PublishBroadcastResponse) ProtoMessage() {} func (x *PublishBroadcastResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2780,9 +2854,11 @@ type RemoveRegionBroadcastMemberRequest struct { func (x *RemoveRegionBroadcastMemberRequest) Reset() { *x = RemoveRegionBroadcastMemberRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RemoveRegionBroadcastMemberRequest) String() string { @@ -2793,7 +2869,7 @@ func (*RemoveRegionBroadcastMemberRequest) ProtoMessage() {} func (x *RemoveRegionBroadcastMemberRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2847,9 +2923,11 @@ type RemoveRegionBroadcastMemberResponse struct { func (x *RemoveRegionBroadcastMemberResponse) Reset() { *x = RemoveRegionBroadcastMemberResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RemoveRegionBroadcastMemberResponse) String() string { @@ -2860,7 +2938,7 @@ func (*RemoveRegionBroadcastMemberResponse) ProtoMessage() {} func (x *RemoveRegionBroadcastMemberResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2902,9 +2980,11 @@ type ProcessBroadcastOutboxBatchResponse struct { func (x *ProcessBroadcastOutboxBatchResponse) Reset() { *x = ProcessBroadcastOutboxBatchResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProcessBroadcastOutboxBatchResponse) String() string { @@ -2915,7 +2995,7 @@ func (*ProcessBroadcastOutboxBatchResponse) ProtoMessage() {} func (x *ProcessBroadcastOutboxBatchResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2969,9 +3049,11 @@ type ConsumeRoomEventRequest struct { func (x *ConsumeRoomEventRequest) Reset() { *x = ConsumeRoomEventRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsumeRoomEventRequest) String() string { @@ -2982,7 +3064,7 @@ func (*ConsumeRoomEventRequest) ProtoMessage() {} func (x *ConsumeRoomEventRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3024,9 +3106,11 @@ type ConsumeRoomEventResponse struct { func (x *ConsumeRoomEventResponse) Reset() { *x = ConsumeRoomEventResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsumeRoomEventResponse) String() string { @@ -3037,7 +3121,7 @@ func (*ConsumeRoomEventResponse) ProtoMessage() {} func (x *ConsumeRoomEventResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3108,9 +3192,11 @@ type TaskDefinition struct { func (x *TaskDefinition) Reset() { *x = TaskDefinition{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TaskDefinition) String() string { @@ -3121,7 +3207,7 @@ func (*TaskDefinition) ProtoMessage() {} func (x *TaskDefinition) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3279,9 +3365,11 @@ type ListTaskDefinitionsRequest struct { func (x *ListTaskDefinitionsRequest) Reset() { *x = ListTaskDefinitionsRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListTaskDefinitionsRequest) String() string { @@ -3292,7 +3380,7 @@ func (*ListTaskDefinitionsRequest) ProtoMessage() {} func (x *ListTaskDefinitionsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3367,9 +3455,11 @@ type ListTaskDefinitionsResponse struct { func (x *ListTaskDefinitionsResponse) Reset() { *x = ListTaskDefinitionsResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListTaskDefinitionsResponse) String() string { @@ -3380,7 +3470,7 @@ func (*ListTaskDefinitionsResponse) ProtoMessage() {} func (x *ListTaskDefinitionsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3434,9 +3524,11 @@ type UpsertTaskDefinitionRequest struct { func (x *UpsertTaskDefinitionRequest) Reset() { *x = UpsertTaskDefinitionRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpsertTaskDefinitionRequest) String() string { @@ -3447,7 +3539,7 @@ func (*UpsertTaskDefinitionRequest) ProtoMessage() {} func (x *UpsertTaskDefinitionRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3578,9 +3670,11 @@ type UpsertTaskDefinitionResponse struct { func (x *UpsertTaskDefinitionResponse) Reset() { *x = UpsertTaskDefinitionResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpsertTaskDefinitionResponse) String() string { @@ -3591,7 +3685,7 @@ func (*UpsertTaskDefinitionResponse) ProtoMessage() {} func (x *UpsertTaskDefinitionResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3634,9 +3728,11 @@ type SetTaskDefinitionStatusRequest struct { func (x *SetTaskDefinitionStatusRequest) Reset() { *x = SetTaskDefinitionStatusRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetTaskDefinitionStatusRequest) String() string { @@ -3647,7 +3743,7 @@ func (*SetTaskDefinitionStatusRequest) ProtoMessage() {} func (x *SetTaskDefinitionStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3700,9 +3796,11 @@ type SetTaskDefinitionStatusResponse struct { func (x *SetTaskDefinitionStatusResponse) Reset() { *x = SetTaskDefinitionStatusResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetTaskDefinitionStatusResponse) String() string { @@ -3713,7 +3811,7 @@ func (*SetTaskDefinitionStatusResponse) ProtoMessage() {} func (x *SetTaskDefinitionStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3754,9 +3852,11 @@ type RegistrationRewardConfig struct { func (x *RegistrationRewardConfig) Reset() { *x = RegistrationRewardConfig{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegistrationRewardConfig) String() string { @@ -3767,7 +3867,7 @@ func (*RegistrationRewardConfig) ProtoMessage() {} func (x *RegistrationRewardConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3870,9 +3970,11 @@ type RegistrationRewardClaim struct { func (x *RegistrationRewardClaim) Reset() { *x = RegistrationRewardClaim{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegistrationRewardClaim) String() string { @@ -3883,7 +3985,7 @@ func (*RegistrationRewardClaim) ProtoMessage() {} func (x *RegistrationRewardClaim) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4024,9 +4126,11 @@ type RegistrationRewardEligibility struct { func (x *RegistrationRewardEligibility) Reset() { *x = RegistrationRewardEligibility{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegistrationRewardEligibility) String() string { @@ -4037,7 +4141,7 @@ func (*RegistrationRewardEligibility) ProtoMessage() {} func (x *RegistrationRewardEligibility) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4141,9 +4245,11 @@ type GetRegistrationRewardEligibilityRequest struct { func (x *GetRegistrationRewardEligibilityRequest) Reset() { *x = GetRegistrationRewardEligibilityRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRegistrationRewardEligibilityRequest) String() string { @@ -4154,7 +4260,7 @@ func (*GetRegistrationRewardEligibilityRequest) ProtoMessage() {} func (x *GetRegistrationRewardEligibilityRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4193,9 +4299,11 @@ type GetRegistrationRewardEligibilityResponse struct { func (x *GetRegistrationRewardEligibilityResponse) Reset() { *x = GetRegistrationRewardEligibilityResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRegistrationRewardEligibilityResponse) String() string { @@ -4206,7 +4314,7 @@ func (*GetRegistrationRewardEligibilityResponse) ProtoMessage() {} func (x *GetRegistrationRewardEligibilityResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4241,9 +4349,11 @@ type IssueRegistrationRewardRequest struct { func (x *IssueRegistrationRewardRequest) Reset() { *x = IssueRegistrationRewardRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *IssueRegistrationRewardRequest) String() string { @@ -4254,7 +4364,7 @@ func (*IssueRegistrationRewardRequest) ProtoMessage() {} func (x *IssueRegistrationRewardRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4302,9 +4412,11 @@ type IssueRegistrationRewardResponse struct { func (x *IssueRegistrationRewardResponse) Reset() { *x = IssueRegistrationRewardResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *IssueRegistrationRewardResponse) String() string { @@ -4315,7 +4427,7 @@ func (*IssueRegistrationRewardResponse) ProtoMessage() {} func (x *IssueRegistrationRewardResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4362,9 +4474,11 @@ type GetRegistrationRewardConfigRequest struct { func (x *GetRegistrationRewardConfigRequest) Reset() { *x = GetRegistrationRewardConfigRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRegistrationRewardConfigRequest) String() string { @@ -4375,7 +4489,7 @@ func (*GetRegistrationRewardConfigRequest) ProtoMessage() {} func (x *GetRegistrationRewardConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[56] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4407,9 +4521,11 @@ type GetRegistrationRewardConfigResponse struct { func (x *GetRegistrationRewardConfigResponse) Reset() { *x = GetRegistrationRewardConfigResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRegistrationRewardConfigResponse) String() string { @@ -4420,7 +4536,7 @@ func (*GetRegistrationRewardConfigResponse) ProtoMessage() {} func (x *GetRegistrationRewardConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[57] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4459,9 +4575,11 @@ type UpdateRegistrationRewardConfigRequest struct { func (x *UpdateRegistrationRewardConfigRequest) Reset() { *x = UpdateRegistrationRewardConfigRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateRegistrationRewardConfigRequest) String() string { @@ -4472,7 +4590,7 @@ func (*UpdateRegistrationRewardConfigRequest) ProtoMessage() {} func (x *UpdateRegistrationRewardConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[58] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4546,9 +4664,11 @@ type UpdateRegistrationRewardConfigResponse struct { func (x *UpdateRegistrationRewardConfigResponse) Reset() { *x = UpdateRegistrationRewardConfigResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateRegistrationRewardConfigResponse) String() string { @@ -4559,7 +4679,7 @@ func (*UpdateRegistrationRewardConfigResponse) ProtoMessage() {} func (x *UpdateRegistrationRewardConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[59] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4596,9 +4716,11 @@ type ListRegistrationRewardClaimsRequest struct { func (x *ListRegistrationRewardClaimsRequest) Reset() { *x = ListRegistrationRewardClaimsRequest{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRegistrationRewardClaimsRequest) String() string { @@ -4609,7 +4731,7 @@ func (*ListRegistrationRewardClaimsRequest) ProtoMessage() {} func (x *ListRegistrationRewardClaimsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[60] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4670,9 +4792,11 @@ type ListRegistrationRewardClaimsResponse struct { func (x *ListRegistrationRewardClaimsResponse) Reset() { *x = ListRegistrationRewardClaimsResponse{} - mi := &file_proto_activity_v1_activity_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_activity_v1_activity_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRegistrationRewardClaimsResponse) String() string { @@ -4683,7 +4807,7 @@ func (*ListRegistrationRewardClaimsResponse) ProtoMessage() {} func (x *ListRegistrationRewardClaimsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_activity_v1_activity_proto_msgTypes[61] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5887,6 +6011,752 @@ func file_proto_activity_v1_activity_proto_init() { if File_proto_activity_v1_activity_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_proto_activity_v1_activity_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RequestMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*PingActivityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*PingActivityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetActivityStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetActivityStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*MessageTabSection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListMessageTabsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ListMessageTabsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*InboxMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListInboxMessagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ListInboxMessagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*MarkInboxMessageReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*MarkInboxMessageReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*MarkInboxSectionReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*MarkInboxSectionReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*DeleteInboxMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*DeleteInboxMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*CreateInboxMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*CreateInboxMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*CreateFanoutJobRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*CreateFanoutJobResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*CronBatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*CronBatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*TaskItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*TaskSection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*ListUserTasksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ListUserTasksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*ClaimTaskRewardRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ClaimTaskRewardResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*ConsumeTaskEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*ConsumeTaskEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*BroadcastJoinGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*EnsureBroadcastGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*EnsureBroadcastGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*PublishRegionBroadcastRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*PublishGlobalBroadcastRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*PublishBroadcastResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*RemoveRegionBroadcastMemberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*RemoveRegionBroadcastMemberResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*ProcessBroadcastOutboxBatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*ConsumeRoomEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[41].Exporter = func(v any, i int) any { + switch v := v.(*ConsumeRoomEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[42].Exporter = func(v any, i int) any { + switch v := v.(*TaskDefinition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[43].Exporter = func(v any, i int) any { + switch v := v.(*ListTaskDefinitionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[44].Exporter = func(v any, i int) any { + switch v := v.(*ListTaskDefinitionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*UpsertTaskDefinitionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*UpsertTaskDefinitionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*SetTaskDefinitionStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*SetTaskDefinitionStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*RegistrationRewardConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*RegistrationRewardClaim); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*RegistrationRewardEligibility); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[52].Exporter = func(v any, i int) any { + switch v := v.(*GetRegistrationRewardEligibilityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[53].Exporter = func(v any, i int) any { + switch v := v.(*GetRegistrationRewardEligibilityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[54].Exporter = func(v any, i int) any { + switch v := v.(*IssueRegistrationRewardRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[55].Exporter = func(v any, i int) any { + switch v := v.(*IssueRegistrationRewardResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[56].Exporter = func(v any, i int) any { + switch v := v.(*GetRegistrationRewardConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*GetRegistrationRewardConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[58].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRegistrationRewardConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[59].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRegistrationRewardConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[60].Exporter = func(v any, i int) any { + switch v := v.(*ListRegistrationRewardClaimsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_activity_v1_activity_proto_msgTypes[61].Exporter = func(v any, i int) any { + switch v := v.(*ListRegistrationRewardClaimsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/proto/activity/v1/activity_grpc.pb.go b/api/proto/activity/v1/activity_grpc.pb.go index 0fd0022a..46d1fec6 100644 --- a/api/proto/activity/v1/activity_grpc.pb.go +++ b/api/proto/activity/v1/activity_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/activity/v1/activity.proto package activityv1 diff --git a/api/proto/events/room/v1/events.pb.go b/api/proto/events/room/v1/events.pb.go index cf28a605..b39df568 100644 --- a/api/proto/events/room/v1/events.pb.go +++ b/api/proto/events/room/v1/events.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/events/room/v1/events.proto package roomeventsv1 @@ -38,9 +38,11 @@ type EventEnvelope struct { func (x *EventEnvelope) Reset() { *x = EventEnvelope{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EventEnvelope) String() string { @@ -51,7 +53,7 @@ func (*EventEnvelope) ProtoMessage() {} func (x *EventEnvelope) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,9 +134,11 @@ type RoomCreated struct { func (x *RoomCreated) Reset() { *x = RoomCreated{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomCreated) String() string { @@ -145,7 +149,7 @@ func (*RoomCreated) ProtoMessage() {} func (x *RoomCreated) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -217,9 +221,11 @@ type RoomProfileUpdated struct { func (x *RoomProfileUpdated) Reset() { *x = RoomProfileUpdated{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomProfileUpdated) String() string { @@ -230,7 +236,7 @@ func (*RoomProfileUpdated) ProtoMessage() {} func (x *RoomProfileUpdated) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,9 +298,11 @@ type RoomUserJoined struct { func (x *RoomUserJoined) Reset() { *x = RoomUserJoined{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomUserJoined) String() string { @@ -305,7 +313,7 @@ func (*RoomUserJoined) ProtoMessage() {} func (x *RoomUserJoined) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -345,9 +353,11 @@ type RoomUserLeft struct { func (x *RoomUserLeft) Reset() { *x = RoomUserLeft{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomUserLeft) String() string { @@ -358,7 +368,7 @@ func (*RoomUserLeft) ProtoMessage() {} func (x *RoomUserLeft) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,9 +402,11 @@ type RoomClosed struct { func (x *RoomClosed) Reset() { *x = RoomClosed{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomClosed) String() string { @@ -405,7 +417,7 @@ func (*RoomClosed) ProtoMessage() {} func (x *RoomClosed) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -458,9 +470,11 @@ type RoomMicChanged struct { func (x *RoomMicChanged) Reset() { *x = RoomMicChanged{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomMicChanged) String() string { @@ -471,7 +485,7 @@ func (*RoomMicChanged) ProtoMessage() {} func (x *RoomMicChanged) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -576,9 +590,11 @@ type RoomMicSeatLocked struct { func (x *RoomMicSeatLocked) Reset() { *x = RoomMicSeatLocked{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomMicSeatLocked) String() string { @@ -589,7 +605,7 @@ func (*RoomMicSeatLocked) ProtoMessage() {} func (x *RoomMicSeatLocked) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -637,9 +653,11 @@ type RoomChatEnabledChanged struct { func (x *RoomChatEnabledChanged) Reset() { *x = RoomChatEnabledChanged{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomChatEnabledChanged) String() string { @@ -650,7 +668,7 @@ func (*RoomChatEnabledChanged) ProtoMessage() {} func (x *RoomChatEnabledChanged) ProtoReflect() protoreflect.Message { mi := &file_proto_events_room_v1_events_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -679,6 +697,62 @@ func (x *RoomChatEnabledChanged) GetEnabled() bool { return false } +// RoomPasswordChanged 表达房间入房密码状态变更,不携带明文或哈希。 +type RoomPasswordChanged struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ActorUserId int64 `protobuf:"varint,1,opt,name=actor_user_id,json=actorUserId,proto3" json:"actor_user_id,omitempty"` + Locked bool `protobuf:"varint,2,opt,name=locked,proto3" json:"locked,omitempty"` +} + +func (x *RoomPasswordChanged) Reset() { + *x = RoomPasswordChanged{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RoomPasswordChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RoomPasswordChanged) ProtoMessage() {} + +func (x *RoomPasswordChanged) ProtoReflect() protoreflect.Message { + mi := &file_proto_events_room_v1_events_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RoomPasswordChanged.ProtoReflect.Descriptor instead. +func (*RoomPasswordChanged) Descriptor() ([]byte, []int) { + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{9} +} + +func (x *RoomPasswordChanged) GetActorUserId() int64 { + if x != nil { + return x.ActorUserId + } + return 0 +} + +func (x *RoomPasswordChanged) GetLocked() bool { + if x != nil { + return x.Locked + } + return false +} + // RoomAdminChanged 表达房间管理员集合变更。 type RoomAdminChanged struct { state protoimpl.MessageState @@ -692,9 +766,11 @@ type RoomAdminChanged struct { func (x *RoomAdminChanged) Reset() { *x = RoomAdminChanged{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomAdminChanged) String() string { @@ -704,8 +780,8 @@ func (x *RoomAdminChanged) String() string { func (*RoomAdminChanged) ProtoMessage() {} func (x *RoomAdminChanged) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[9] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -717,7 +793,7 @@ func (x *RoomAdminChanged) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomAdminChanged.ProtoReflect.Descriptor instead. func (*RoomAdminChanged) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{9} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{10} } func (x *RoomAdminChanged) GetActorUserId() int64 { @@ -754,9 +830,11 @@ type RoomUserMuted struct { func (x *RoomUserMuted) Reset() { *x = RoomUserMuted{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomUserMuted) String() string { @@ -766,8 +844,8 @@ func (x *RoomUserMuted) String() string { func (*RoomUserMuted) ProtoMessage() {} func (x *RoomUserMuted) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[10] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -779,7 +857,7 @@ func (x *RoomUserMuted) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomUserMuted.ProtoReflect.Descriptor instead. func (*RoomUserMuted) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{10} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{11} } func (x *RoomUserMuted) GetActorUserId() int64 { @@ -815,9 +893,11 @@ type RoomUserKicked struct { func (x *RoomUserKicked) Reset() { *x = RoomUserKicked{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomUserKicked) String() string { @@ -827,8 +907,8 @@ func (x *RoomUserKicked) String() string { func (*RoomUserKicked) ProtoMessage() {} func (x *RoomUserKicked) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[11] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,7 +920,7 @@ func (x *RoomUserKicked) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomUserKicked.ProtoReflect.Descriptor instead. func (*RoomUserKicked) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{11} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{12} } func (x *RoomUserKicked) GetActorUserId() int64 { @@ -869,9 +949,11 @@ type RoomUserUnbanned struct { func (x *RoomUserUnbanned) Reset() { *x = RoomUserUnbanned{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomUserUnbanned) String() string { @@ -881,8 +963,8 @@ func (x *RoomUserUnbanned) String() string { func (*RoomUserUnbanned) ProtoMessage() {} func (x *RoomUserUnbanned) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[12] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -894,7 +976,7 @@ func (x *RoomUserUnbanned) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomUserUnbanned.ProtoReflect.Descriptor instead. func (*RoomUserUnbanned) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{12} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{13} } func (x *RoomUserUnbanned) GetActorUserId() int64 { @@ -929,9 +1011,11 @@ type RoomGiftSent struct { func (x *RoomGiftSent) Reset() { *x = RoomGiftSent{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomGiftSent) String() string { @@ -941,8 +1025,8 @@ func (x *RoomGiftSent) String() string { func (*RoomGiftSent) ProtoMessage() {} func (x *RoomGiftSent) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[13] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -954,7 +1038,7 @@ func (x *RoomGiftSent) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomGiftSent.ProtoReflect.Descriptor instead. func (*RoomGiftSent) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{13} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{14} } func (x *RoomGiftSent) GetSenderUserId() int64 { @@ -1025,9 +1109,11 @@ type RoomHeatChanged struct { func (x *RoomHeatChanged) Reset() { *x = RoomHeatChanged{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomHeatChanged) String() string { @@ -1037,8 +1123,8 @@ func (x *RoomHeatChanged) String() string { func (*RoomHeatChanged) ProtoMessage() {} func (x *RoomHeatChanged) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[14] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1050,7 +1136,7 @@ func (x *RoomHeatChanged) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomHeatChanged.ProtoReflect.Descriptor instead. func (*RoomHeatChanged) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{14} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{15} } func (x *RoomHeatChanged) GetDelta() int64 { @@ -1080,9 +1166,11 @@ type RoomRankChanged struct { func (x *RoomRankChanged) Reset() { *x = RoomRankChanged{} - mi := &file_proto_events_room_v1_events_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_events_room_v1_events_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomRankChanged) String() string { @@ -1092,8 +1180,8 @@ func (x *RoomRankChanged) String() string { func (*RoomRankChanged) ProtoMessage() {} func (x *RoomRankChanged) ProtoReflect() protoreflect.Message { - mi := &file_proto_events_room_v1_events_proto_msgTypes[15] - if x != nil { + mi := &file_proto_events_room_v1_events_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1105,7 +1193,7 @@ func (x *RoomRankChanged) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomRankChanged.ProtoReflect.Descriptor instead. func (*RoomRankChanged) Descriptor() ([]byte, []int) { - return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{15} + return file_proto_events_room_v1_events_proto_rawDescGZIP(), []int{16} } func (x *RoomRankChanged) GetUserId() int64 { @@ -1222,67 +1310,72 @@ var file_proto_events_room_v1_events_proto_rawDesc = []byte{ 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x76, 0x0a, 0x10, 0x52, - 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, - 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x22, 0x6f, 0x0a, 0x0d, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x4d, - 0x75, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, + 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x51, 0x0a, 0x13, 0x52, + 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x76, + 0x0a, 0x10, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x6f, 0x0a, 0x0d, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, + 0x65, 0x72, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x22, 0x5a, 0x0a, 0x0e, 0x52, 0x6f, 0x6f, 0x6d, 0x55, + 0x73, 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, + 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x5c, 0x0a, 0x10, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x55, + 0x6e, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x22, 0xaa, 0x02, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x47, 0x69, 0x66, 0x74, 0x53, 0x65, + 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, - 0x75, 0x74, 0x65, 0x64, 0x22, 0x5a, 0x0a, 0x0e, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, - 0x4b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, - 0x63, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x22, 0x5c, 0x0a, 0x10, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x55, 0x6e, 0x62, 0x61, - 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xaa, - 0x02, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x47, 0x69, 0x66, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, - 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x67, - 0x69, 0x66, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, - 0x66, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x69, 0x66, 0x74, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x66, 0x74, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x49, 0x64, - 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, - 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x4a, 0x0a, 0x0f, 0x52, - 0x6f, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x64, - 0x65, 0x6c, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, - 0x68, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x74, 0x22, 0x5f, 0x0a, 0x0f, 0x52, 0x6f, 0x6f, 0x6d, 0x52, - 0x61, 0x6e, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x66, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, - 0x69, 0x66, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x2f, 0x76, 0x31, - 0x3b, 0x72, 0x6f, 0x6f, 0x6d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, + 0x0a, 0x07, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x69, 0x66, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x66, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, + 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x49, 0x64, 0x22, 0x4a, + 0x0a, 0x0f, 0x52, 0x6f, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x65, 0x61, 0x74, 0x22, 0x5f, 0x0a, 0x0f, 0x52, 0x6f, + 0x6f, 0x6d, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x67, 0x69, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x67, 0x69, 0x66, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, + 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x6f, 0x6d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x76, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1297,7 +1390,7 @@ func file_proto_events_room_v1_events_proto_rawDescGZIP() []byte { return file_proto_events_room_v1_events_proto_rawDescData } -var file_proto_events_room_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_proto_events_room_v1_events_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_proto_events_room_v1_events_proto_goTypes = []any{ (*EventEnvelope)(nil), // 0: hyapp.events.room.v1.EventEnvelope (*RoomCreated)(nil), // 1: hyapp.events.room.v1.RoomCreated @@ -1308,13 +1401,14 @@ var file_proto_events_room_v1_events_proto_goTypes = []any{ (*RoomMicChanged)(nil), // 6: hyapp.events.room.v1.RoomMicChanged (*RoomMicSeatLocked)(nil), // 7: hyapp.events.room.v1.RoomMicSeatLocked (*RoomChatEnabledChanged)(nil), // 8: hyapp.events.room.v1.RoomChatEnabledChanged - (*RoomAdminChanged)(nil), // 9: hyapp.events.room.v1.RoomAdminChanged - (*RoomUserMuted)(nil), // 10: hyapp.events.room.v1.RoomUserMuted - (*RoomUserKicked)(nil), // 11: hyapp.events.room.v1.RoomUserKicked - (*RoomUserUnbanned)(nil), // 12: hyapp.events.room.v1.RoomUserUnbanned - (*RoomGiftSent)(nil), // 13: hyapp.events.room.v1.RoomGiftSent - (*RoomHeatChanged)(nil), // 14: hyapp.events.room.v1.RoomHeatChanged - (*RoomRankChanged)(nil), // 15: hyapp.events.room.v1.RoomRankChanged + (*RoomPasswordChanged)(nil), // 9: hyapp.events.room.v1.RoomPasswordChanged + (*RoomAdminChanged)(nil), // 10: hyapp.events.room.v1.RoomAdminChanged + (*RoomUserMuted)(nil), // 11: hyapp.events.room.v1.RoomUserMuted + (*RoomUserKicked)(nil), // 12: hyapp.events.room.v1.RoomUserKicked + (*RoomUserUnbanned)(nil), // 13: hyapp.events.room.v1.RoomUserUnbanned + (*RoomGiftSent)(nil), // 14: hyapp.events.room.v1.RoomGiftSent + (*RoomHeatChanged)(nil), // 15: hyapp.events.room.v1.RoomHeatChanged + (*RoomRankChanged)(nil), // 16: hyapp.events.room.v1.RoomRankChanged } var file_proto_events_room_v1_events_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -1329,13 +1423,219 @@ func file_proto_events_room_v1_events_proto_init() { if File_proto_events_room_v1_events_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_proto_events_room_v1_events_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*EventEnvelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RoomCreated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*RoomProfileUpdated); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*RoomUserJoined); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*RoomUserLeft); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*RoomClosed); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*RoomMicChanged); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*RoomMicSeatLocked); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*RoomChatEnabledChanged); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*RoomPasswordChanged); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*RoomAdminChanged); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*RoomUserMuted); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*RoomUserKicked); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*RoomUserUnbanned); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*RoomGiftSent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*RoomHeatChanged); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_events_room_v1_events_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*RoomRankChanged); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_events_room_v1_events_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/api/proto/events/room/v1/events.proto b/api/proto/events/room/v1/events.proto index a04da523..6eb9ab69 100644 --- a/api/proto/events/room/v1/events.proto +++ b/api/proto/events/room/v1/events.proto @@ -84,6 +84,12 @@ message RoomChatEnabledChanged { bool enabled = 2; } +// RoomPasswordChanged 表达房间入房密码状态变更,不携带明文或哈希。 +message RoomPasswordChanged { + int64 actor_user_id = 1; + bool locked = 2; +} + // RoomAdminChanged 表达房间管理员集合变更。 message RoomAdminChanged { int64 actor_user_id = 1; diff --git a/api/proto/game/v1/game.pb.go b/api/proto/game/v1/game.pb.go index c2fba1d9..aacb553f 100644 --- a/api/proto/game/v1/game.pb.go +++ b/api/proto/game/v1/game.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/game/v1/game.proto package gamev1 @@ -36,9 +36,11 @@ type RequestMeta struct { func (x *RequestMeta) Reset() { *x = RequestMeta{} - mi := &file_proto_game_v1_game_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestMeta) String() string { @@ -49,7 +51,7 @@ func (*RequestMeta) ProtoMessage() {} func (x *RequestMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -123,9 +125,11 @@ type GamePlatform struct { func (x *GamePlatform) Reset() { *x = GamePlatform{} - mi := &file_proto_game_v1_game_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GamePlatform) String() string { @@ -136,7 +140,7 @@ func (*GamePlatform) ProtoMessage() {} func (x *GamePlatform) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -232,9 +236,11 @@ type GameCatalogItem struct { func (x *GameCatalogItem) Reset() { *x = GameCatalogItem{} - mi := &file_proto_game_v1_game_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GameCatalogItem) String() string { @@ -245,7 +251,7 @@ func (*GameCatalogItem) ProtoMessage() {} func (x *GameCatalogItem) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -394,9 +400,11 @@ type AppGame struct { func (x *AppGame) Reset() { *x = AppGame{} - mi := &file_proto_game_v1_game_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AppGame) String() string { @@ -407,7 +415,7 @@ func (*AppGame) ProtoMessage() {} func (x *AppGame) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -529,9 +537,11 @@ type ListGamesRequest struct { func (x *ListGamesRequest) Reset() { *x = ListGamesRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListGamesRequest) String() string { @@ -542,7 +552,7 @@ func (*ListGamesRequest) ProtoMessage() {} func (x *ListGamesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,9 +627,11 @@ type ListGamesResponse struct { func (x *ListGamesResponse) Reset() { *x = ListGamesResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListGamesResponse) String() string { @@ -630,7 +642,7 @@ func (*ListGamesResponse) ProtoMessage() {} func (x *ListGamesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -674,9 +686,11 @@ type LaunchGameRequest struct { func (x *LaunchGameRequest) Reset() { *x = LaunchGameRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LaunchGameRequest) String() string { @@ -687,7 +701,7 @@ func (*LaunchGameRequest) ProtoMessage() {} func (x *LaunchGameRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -758,9 +772,11 @@ type LaunchGameResponse struct { func (x *LaunchGameResponse) Reset() { *x = LaunchGameResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LaunchGameResponse) String() string { @@ -771,7 +787,7 @@ func (*LaunchGameResponse) ProtoMessage() {} func (x *LaunchGameResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -837,9 +853,11 @@ type CallbackRequest struct { func (x *CallbackRequest) Reset() { *x = CallbackRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallbackRequest) String() string { @@ -850,7 +868,7 @@ func (*CallbackRequest) ProtoMessage() {} func (x *CallbackRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -925,9 +943,11 @@ type CallbackResponse struct { func (x *CallbackResponse) Reset() { *x = CallbackResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CallbackResponse) String() string { @@ -938,7 +958,7 @@ func (*CallbackResponse) ProtoMessage() {} func (x *CallbackResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -978,9 +998,11 @@ type ListPlatformsRequest struct { func (x *ListPlatformsRequest) Reset() { *x = ListPlatformsRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPlatformsRequest) String() string { @@ -991,7 +1013,7 @@ func (*ListPlatformsRequest) ProtoMessage() {} func (x *ListPlatformsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1031,9 +1053,11 @@ type ListPlatformsResponse struct { func (x *ListPlatformsResponse) Reset() { *x = ListPlatformsResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPlatformsResponse) String() string { @@ -1044,7 +1068,7 @@ func (*ListPlatformsResponse) ProtoMessage() {} func (x *ListPlatformsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,9 +1108,11 @@ type UpsertPlatformRequest struct { func (x *UpsertPlatformRequest) Reset() { *x = UpsertPlatformRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpsertPlatformRequest) String() string { @@ -1097,7 +1123,7 @@ func (*UpsertPlatformRequest) ProtoMessage() {} func (x *UpsertPlatformRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1137,9 +1163,11 @@ type PlatformResponse struct { func (x *PlatformResponse) Reset() { *x = PlatformResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PlatformResponse) String() string { @@ -1150,7 +1178,7 @@ func (*PlatformResponse) ProtoMessage() {} func (x *PlatformResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1193,9 +1221,11 @@ type ListCatalogRequest struct { func (x *ListCatalogRequest) Reset() { *x = ListCatalogRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListCatalogRequest) String() string { @@ -1206,7 +1236,7 @@ func (*ListCatalogRequest) ProtoMessage() {} func (x *ListCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1268,9 +1298,11 @@ type ListCatalogResponse struct { func (x *ListCatalogResponse) Reset() { *x = ListCatalogResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListCatalogResponse) String() string { @@ -1281,7 +1313,7 @@ func (*ListCatalogResponse) ProtoMessage() {} func (x *ListCatalogResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1328,9 +1360,11 @@ type UpsertCatalogRequest struct { func (x *UpsertCatalogRequest) Reset() { *x = UpsertCatalogRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpsertCatalogRequest) String() string { @@ -1341,7 +1375,7 @@ func (*UpsertCatalogRequest) ProtoMessage() {} func (x *UpsertCatalogRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1381,9 +1415,11 @@ type CatalogResponse struct { func (x *CatalogResponse) Reset() { *x = CatalogResponse{} - mi := &file_proto_game_v1_game_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CatalogResponse) String() string { @@ -1394,7 +1430,7 @@ func (*CatalogResponse) ProtoMessage() {} func (x *CatalogResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1435,9 +1471,11 @@ type SetGameStatusRequest struct { func (x *SetGameStatusRequest) Reset() { *x = SetGameStatusRequest{} - mi := &file_proto_game_v1_game_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_game_v1_game_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetGameStatusRequest) String() string { @@ -1448,7 +1486,7 @@ func (*SetGameStatusRequest) ProtoMessage() {} func (x *SetGameStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_game_v1_game_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1862,6 +1900,236 @@ func file_proto_game_v1_game_proto_init() { if File_proto_game_v1_game_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_proto_game_v1_game_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RequestMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GamePlatform); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GameCatalogItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*AppGame); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListGamesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListGamesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*LaunchGameRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*LaunchGameResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*CallbackRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*CallbackResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ListPlatformsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ListPlatformsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*UpsertPlatformRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*PlatformResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*ListCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*ListCatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*UpsertCatalogRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*CatalogResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_game_v1_game_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*SetGameStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/proto/game/v1/game_grpc.pb.go b/api/proto/game/v1/game_grpc.pb.go index c05a6c31..8d86ee73 100644 --- a/api/proto/game/v1/game_grpc.pb.go +++ b/api/proto/game/v1/game_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/game/v1/game.proto package gamev1 diff --git a/api/proto/room/v1/room.pb.go b/api/proto/room/v1/room.pb.go index b9ddd2fd..184321ed 100644 --- a/api/proto/room/v1/room.pb.go +++ b/api/proto/room/v1/room.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/room/v1/room.proto package roomv1 @@ -41,9 +41,11 @@ type RequestMeta struct { func (x *RequestMeta) Reset() { *x = RequestMeta{} - mi := &file_proto_room_v1_room_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestMeta) String() string { @@ -54,7 +56,7 @@ func (*RequestMeta) ProtoMessage() {} func (x *RequestMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -138,9 +140,11 @@ type CommandResult struct { func (x *CommandResult) Reset() { *x = CommandResult{} - mi := &file_proto_room_v1_room_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CommandResult) String() string { @@ -151,7 +155,7 @@ func (*CommandResult) ProtoMessage() {} func (x *CommandResult) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -201,9 +205,11 @@ type RoomUser struct { func (x *RoomUser) Reset() { *x = RoomUser{} - mi := &file_proto_room_v1_room_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomUser) String() string { @@ -214,7 +220,7 @@ func (*RoomUser) ProtoMessage() {} func (x *RoomUser) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -282,9 +288,11 @@ type SeatState struct { func (x *SeatState) Reset() { *x = SeatState{} - mi := &file_proto_room_v1_room_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SeatState) String() string { @@ -295,7 +303,7 @@ func (*SeatState) ProtoMessage() {} func (x *SeatState) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -387,9 +395,11 @@ type RankItem struct { func (x *RankItem) Reset() { *x = RankItem{} - mi := &file_proto_room_v1_room_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RankItem) String() string { @@ -400,7 +410,7 @@ func (*RankItem) ProtoMessage() {} func (x *RankItem) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -466,13 +476,17 @@ type RoomSnapshot struct { AppCode string `protobuf:"bytes,16,opt,name=app_code,json=appCode,proto3" json:"app_code,omitempty"` RoomShortId string `protobuf:"bytes,17,opt,name=room_short_id,json=roomShortId,proto3" json:"room_short_id,omitempty"` VisibleRegionId int64 `protobuf:"varint,18,opt,name=visible_region_id,json=visibleRegionId,proto3" json:"visible_region_id,omitempty"` + // locked 只表达房间是否需要入房密码;具体密码哈希不对外映射到 HTTP JSON。 + Locked bool `protobuf:"varint,19,opt,name=locked,proto3" json:"locked,omitempty"` } func (x *RoomSnapshot) Reset() { *x = RoomSnapshot{} - mi := &file_proto_room_v1_room_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomSnapshot) String() string { @@ -483,7 +497,7 @@ func (*RoomSnapshot) ProtoMessage() {} func (x *RoomSnapshot) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -617,6 +631,13 @@ func (x *RoomSnapshot) GetVisibleRegionId() int64 { return 0 } +func (x *RoomSnapshot) GetLocked() bool { + if x != nil { + return x.Locked + } + return false +} + // CreateRoomRequest 创建一个新的房间执行单元。 // 必填语义:meta.room_id、meta.command_id、meta.actor_user_id、mode 和 room_name。 // 同一个 meta.actor_user_id 只能作为 owner 创建一个房间;重复创建返回 Conflict。 @@ -644,9 +665,11 @@ type CreateRoomRequest struct { func (x *CreateRoomRequest) Reset() { *x = CreateRoomRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateRoomRequest) String() string { @@ -657,7 +680,7 @@ func (*CreateRoomRequest) ProtoMessage() {} func (x *CreateRoomRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -740,9 +763,11 @@ type CreateRoomResponse struct { func (x *CreateRoomResponse) Reset() { *x = CreateRoomResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateRoomResponse) String() string { @@ -753,7 +778,7 @@ func (*CreateRoomResponse) ProtoMessage() {} func (x *CreateRoomResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -798,9 +823,11 @@ type UpdateRoomProfileRequest struct { func (x *UpdateRoomProfileRequest) Reset() { *x = UpdateRoomProfileRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateRoomProfileRequest) String() string { @@ -811,7 +838,7 @@ func (*UpdateRoomProfileRequest) ProtoMessage() {} func (x *UpdateRoomProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -873,9 +900,11 @@ type UpdateRoomProfileResponse struct { func (x *UpdateRoomProfileResponse) Reset() { *x = UpdateRoomProfileResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateRoomProfileResponse) String() string { @@ -886,7 +915,7 @@ func (*UpdateRoomProfileResponse) ProtoMessage() {} func (x *UpdateRoomProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -923,13 +952,17 @@ type JoinRoomRequest struct { Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` + // password 只用于本次入房校验;room-service 不把明文写入 command log 或快照。 + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` } func (x *JoinRoomRequest) Reset() { *x = JoinRoomRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *JoinRoomRequest) String() string { @@ -940,7 +973,7 @@ func (*JoinRoomRequest) ProtoMessage() {} func (x *JoinRoomRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -969,6 +1002,13 @@ func (x *JoinRoomRequest) GetRole() string { return "" } +func (x *JoinRoomRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + // JoinRoomResponse 返回加入后的房间快照。 type JoinRoomResponse struct { state protoimpl.MessageState @@ -982,9 +1022,11 @@ type JoinRoomResponse struct { func (x *JoinRoomResponse) Reset() { *x = JoinRoomResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *JoinRoomResponse) String() string { @@ -995,7 +1037,7 @@ func (*JoinRoomResponse) ProtoMessage() {} func (x *JoinRoomResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1043,9 +1085,11 @@ type RoomHeartbeatRequest struct { func (x *RoomHeartbeatRequest) Reset() { *x = RoomHeartbeatRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomHeartbeatRequest) String() string { @@ -1056,7 +1100,7 @@ func (*RoomHeartbeatRequest) ProtoMessage() {} func (x *RoomHeartbeatRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,9 +1135,11 @@ type RoomHeartbeatResponse struct { func (x *RoomHeartbeatResponse) Reset() { *x = RoomHeartbeatResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomHeartbeatResponse) String() string { @@ -1104,7 +1150,7 @@ func (*RoomHeartbeatResponse) ProtoMessage() {} func (x *RoomHeartbeatResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,9 +1197,11 @@ type LeaveRoomRequest struct { func (x *LeaveRoomRequest) Reset() { *x = LeaveRoomRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LeaveRoomRequest) String() string { @@ -1164,7 +1212,7 @@ func (*LeaveRoomRequest) ProtoMessage() {} func (x *LeaveRoomRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1198,9 +1246,11 @@ type LeaveRoomResponse struct { func (x *LeaveRoomResponse) Reset() { *x = LeaveRoomResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LeaveRoomResponse) String() string { @@ -1211,7 +1261,7 @@ func (*LeaveRoomResponse) ProtoMessage() {} func (x *LeaveRoomResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,9 +1302,11 @@ type CloseRoomRequest struct { func (x *CloseRoomRequest) Reset() { *x = CloseRoomRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CloseRoomRequest) String() string { @@ -1265,7 +1317,7 @@ func (*CloseRoomRequest) ProtoMessage() {} func (x *CloseRoomRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1306,9 +1358,11 @@ type CloseRoomResponse struct { func (x *CloseRoomResponse) Reset() { *x = CloseRoomResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CloseRoomResponse) String() string { @@ -1319,7 +1373,7 @@ func (*CloseRoomResponse) ProtoMessage() {} func (x *CloseRoomResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1360,9 +1414,11 @@ type MicUpRequest struct { func (x *MicUpRequest) Reset() { *x = MicUpRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MicUpRequest) String() string { @@ -1373,7 +1429,7 @@ func (*MicUpRequest) ProtoMessage() {} func (x *MicUpRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1417,9 +1473,11 @@ type MicUpResponse struct { func (x *MicUpResponse) Reset() { *x = MicUpResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MicUpResponse) String() string { @@ -1430,7 +1488,7 @@ func (*MicUpResponse) ProtoMessage() {} func (x *MicUpResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1494,9 +1552,11 @@ type MicDownRequest struct { func (x *MicDownRequest) Reset() { *x = MicDownRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MicDownRequest) String() string { @@ -1507,7 +1567,7 @@ func (*MicDownRequest) ProtoMessage() {} func (x *MicDownRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1556,9 +1616,11 @@ type MicDownResponse struct { func (x *MicDownResponse) Reset() { *x = MicDownResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MicDownResponse) String() string { @@ -1569,7 +1631,7 @@ func (*MicDownResponse) ProtoMessage() {} func (x *MicDownResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1618,9 +1680,11 @@ type ChangeMicSeatRequest struct { func (x *ChangeMicSeatRequest) Reset() { *x = ChangeMicSeatRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChangeMicSeatRequest) String() string { @@ -1631,7 +1695,7 @@ func (*ChangeMicSeatRequest) ProtoMessage() {} func (x *ChangeMicSeatRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1679,9 +1743,11 @@ type ChangeMicSeatResponse struct { func (x *ChangeMicSeatResponse) Reset() { *x = ChangeMicSeatResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChangeMicSeatResponse) String() string { @@ -1692,7 +1758,7 @@ func (*ChangeMicSeatResponse) ProtoMessage() {} func (x *ChangeMicSeatResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1739,9 +1805,11 @@ type ConfirmMicPublishingRequest struct { func (x *ConfirmMicPublishingRequest) Reset() { *x = ConfirmMicPublishingRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConfirmMicPublishingRequest) String() string { @@ -1752,7 +1820,7 @@ func (*ConfirmMicPublishingRequest) ProtoMessage() {} func (x *ConfirmMicPublishingRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,9 +1890,11 @@ type ConfirmMicPublishingResponse struct { func (x *ConfirmMicPublishingResponse) Reset() { *x = ConfirmMicPublishingResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConfirmMicPublishingResponse) String() string { @@ -1835,7 +1905,7 @@ func (*ConfirmMicPublishingResponse) ProtoMessage() {} func (x *ConfirmMicPublishingResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1885,9 +1955,11 @@ type SetMicMuteRequest struct { func (x *SetMicMuteRequest) Reset() { *x = SetMicMuteRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetMicMuteRequest) String() string { @@ -1898,7 +1970,7 @@ func (*SetMicMuteRequest) ProtoMessage() {} func (x *SetMicMuteRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1947,9 +2019,11 @@ type SetMicMuteResponse struct { func (x *SetMicMuteResponse) Reset() { *x = SetMicMuteResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetMicMuteResponse) String() string { @@ -1960,7 +2034,7 @@ func (*SetMicMuteResponse) ProtoMessage() {} func (x *SetMicMuteResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2014,9 +2088,11 @@ type ApplyRTCEventRequest struct { func (x *ApplyRTCEventRequest) Reset() { *x = ApplyRTCEventRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyRTCEventRequest) String() string { @@ -2027,7 +2103,7 @@ func (*ApplyRTCEventRequest) ProtoMessage() {} func (x *ApplyRTCEventRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2104,9 +2180,11 @@ type ApplyRTCEventResponse struct { func (x *ApplyRTCEventResponse) Reset() { *x = ApplyRTCEventResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyRTCEventResponse) String() string { @@ -2117,7 +2195,7 @@ func (*ApplyRTCEventResponse) ProtoMessage() {} func (x *ApplyRTCEventResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2166,9 +2244,11 @@ type SetMicSeatLockRequest struct { func (x *SetMicSeatLockRequest) Reset() { *x = SetMicSeatLockRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetMicSeatLockRequest) String() string { @@ -2179,7 +2259,7 @@ func (*SetMicSeatLockRequest) ProtoMessage() {} func (x *SetMicSeatLockRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2227,9 +2307,11 @@ type SetMicSeatLockResponse struct { func (x *SetMicSeatLockResponse) Reset() { *x = SetMicSeatLockResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetMicSeatLockResponse) String() string { @@ -2240,7 +2322,7 @@ func (*SetMicSeatLockResponse) ProtoMessage() {} func (x *SetMicSeatLockResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2281,9 +2363,11 @@ type SetChatEnabledRequest struct { func (x *SetChatEnabledRequest) Reset() { *x = SetChatEnabledRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetChatEnabledRequest) String() string { @@ -2294,7 +2378,7 @@ func (*SetChatEnabledRequest) ProtoMessage() {} func (x *SetChatEnabledRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2335,9 +2419,11 @@ type SetChatEnabledResponse struct { func (x *SetChatEnabledResponse) Reset() { *x = SetChatEnabledResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetChatEnabledResponse) String() string { @@ -2348,7 +2434,7 @@ func (*SetChatEnabledResponse) ProtoMessage() {} func (x *SetChatEnabledResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_room_v1_room_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2377,6 +2463,127 @@ func (x *SetChatEnabledResponse) GetRoom() *RoomSnapshot { return nil } +// SetRoomPasswordRequest 设置或清空房间入房密码。 +// locked=true 时 password 必须非空;locked=false 表示清空密码并解除锁房。 +type SetRoomPasswordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Locked bool `protobuf:"varint,2,opt,name=locked,proto3" json:"locked,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *SetRoomPasswordRequest) Reset() { + *x = SetRoomPasswordRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRoomPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRoomPasswordRequest) ProtoMessage() {} + +func (x *SetRoomPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_room_v1_room_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRoomPasswordRequest.ProtoReflect.Descriptor instead. +func (*SetRoomPasswordRequest) Descriptor() ([]byte, []int) { + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{34} +} + +func (x *SetRoomPasswordRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *SetRoomPasswordRequest) GetLocked() bool { + if x != nil { + return x.Locked + } + return false +} + +func (x *SetRoomPasswordRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +// SetRoomPasswordResponse 返回锁房状态变更后的最新房间快照。 +type SetRoomPasswordResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result *CommandResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + Room *RoomSnapshot `protobuf:"bytes,2,opt,name=room,proto3" json:"room,omitempty"` +} + +func (x *SetRoomPasswordResponse) Reset() { + *x = SetRoomPasswordResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRoomPasswordResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRoomPasswordResponse) ProtoMessage() {} + +func (x *SetRoomPasswordResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_room_v1_room_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetRoomPasswordResponse.ProtoReflect.Descriptor instead. +func (*SetRoomPasswordResponse) Descriptor() ([]byte, []int) { + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{35} +} + +func (x *SetRoomPasswordResponse) GetResult() *CommandResult { + if x != nil { + return x.Result + } + return nil +} + +func (x *SetRoomPasswordResponse) GetRoom() *RoomSnapshot { + if x != nil { + return x.Room + } + return nil +} + // SetRoomAdminRequest 添加或移除房间管理员。 type SetRoomAdminRequest struct { state protoimpl.MessageState @@ -2390,9 +2597,11 @@ type SetRoomAdminRequest struct { func (x *SetRoomAdminRequest) Reset() { *x = SetRoomAdminRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetRoomAdminRequest) String() string { @@ -2402,8 +2611,8 @@ func (x *SetRoomAdminRequest) String() string { func (*SetRoomAdminRequest) ProtoMessage() {} func (x *SetRoomAdminRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[34] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2415,7 +2624,7 @@ func (x *SetRoomAdminRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRoomAdminRequest.ProtoReflect.Descriptor instead. func (*SetRoomAdminRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{34} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{36} } func (x *SetRoomAdminRequest) GetMeta() *RequestMeta { @@ -2451,9 +2660,11 @@ type SetRoomAdminResponse struct { func (x *SetRoomAdminResponse) Reset() { *x = SetRoomAdminResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetRoomAdminResponse) String() string { @@ -2463,8 +2674,8 @@ func (x *SetRoomAdminResponse) String() string { func (*SetRoomAdminResponse) ProtoMessage() {} func (x *SetRoomAdminResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[35] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2476,7 +2687,7 @@ func (x *SetRoomAdminResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRoomAdminResponse.ProtoReflect.Descriptor instead. func (*SetRoomAdminResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{35} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{37} } func (x *SetRoomAdminResponse) GetResult() *CommandResult { @@ -2506,9 +2717,11 @@ type MuteUserRequest struct { func (x *MuteUserRequest) Reset() { *x = MuteUserRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MuteUserRequest) String() string { @@ -2518,8 +2731,8 @@ func (x *MuteUserRequest) String() string { func (*MuteUserRequest) ProtoMessage() {} func (x *MuteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[36] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2531,7 +2744,7 @@ func (x *MuteUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MuteUserRequest.ProtoReflect.Descriptor instead. func (*MuteUserRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{36} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{38} } func (x *MuteUserRequest) GetMeta() *RequestMeta { @@ -2567,9 +2780,11 @@ type MuteUserResponse struct { func (x *MuteUserResponse) Reset() { *x = MuteUserResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MuteUserResponse) String() string { @@ -2579,8 +2794,8 @@ func (x *MuteUserResponse) String() string { func (*MuteUserResponse) ProtoMessage() {} func (x *MuteUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[37] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2592,7 +2807,7 @@ func (x *MuteUserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MuteUserResponse.ProtoReflect.Descriptor instead. func (*MuteUserResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{37} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{39} } func (x *MuteUserResponse) GetResult() *CommandResult { @@ -2621,9 +2836,11 @@ type KickUserRequest struct { func (x *KickUserRequest) Reset() { *x = KickUserRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KickUserRequest) String() string { @@ -2633,8 +2850,8 @@ func (x *KickUserRequest) String() string { func (*KickUserRequest) ProtoMessage() {} func (x *KickUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[38] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2646,7 +2863,7 @@ func (x *KickUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KickUserRequest.ProtoReflect.Descriptor instead. func (*KickUserRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{38} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{40} } func (x *KickUserRequest) GetMeta() *RequestMeta { @@ -2671,13 +2888,19 @@ type KickUserResponse struct { Result *CommandResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` Room *RoomSnapshot `protobuf:"bytes,2,opt,name=room,proto3" json:"room,omitempty"` + // rtc_kicked 表示 room-service 已通过 TRTC 服务端接口移除目标用户;失败不回滚房间踢人事实。 + RtcKicked bool `protobuf:"varint,3,opt,name=rtc_kicked,json=rtcKicked,proto3" json:"rtc_kicked,omitempty"` + // rtc_kick_error 仅用于调用方排障和告警,客户端展示仍以统一错误码和房间状态为准。 + RtcKickError string `protobuf:"bytes,4,opt,name=rtc_kick_error,json=rtcKickError,proto3" json:"rtc_kick_error,omitempty"` } func (x *KickUserResponse) Reset() { *x = KickUserResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KickUserResponse) String() string { @@ -2687,8 +2910,8 @@ func (x *KickUserResponse) String() string { func (*KickUserResponse) ProtoMessage() {} func (x *KickUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[39] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2700,7 +2923,7 @@ func (x *KickUserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use KickUserResponse.ProtoReflect.Descriptor instead. func (*KickUserResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{39} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{41} } func (x *KickUserResponse) GetResult() *CommandResult { @@ -2717,6 +2940,20 @@ func (x *KickUserResponse) GetRoom() *RoomSnapshot { return nil } +func (x *KickUserResponse) GetRtcKicked() bool { + if x != nil { + return x.RtcKicked + } + return false +} + +func (x *KickUserResponse) GetRtcKickError() string { + if x != nil { + return x.RtcKickError + } + return "" +} + // UnbanUserRequest 解除房间内 ban,用户仍需重新 JoinRoom。 type UnbanUserRequest struct { state protoimpl.MessageState @@ -2729,9 +2966,11 @@ type UnbanUserRequest struct { func (x *UnbanUserRequest) Reset() { *x = UnbanUserRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnbanUserRequest) String() string { @@ -2741,8 +2980,8 @@ func (x *UnbanUserRequest) String() string { func (*UnbanUserRequest) ProtoMessage() {} func (x *UnbanUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[40] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2754,7 +2993,7 @@ func (x *UnbanUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UnbanUserRequest.ProtoReflect.Descriptor instead. func (*UnbanUserRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{40} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{42} } func (x *UnbanUserRequest) GetMeta() *RequestMeta { @@ -2783,9 +3022,11 @@ type UnbanUserResponse struct { func (x *UnbanUserResponse) Reset() { *x = UnbanUserResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnbanUserResponse) String() string { @@ -2795,8 +3036,8 @@ func (x *UnbanUserResponse) String() string { func (*UnbanUserResponse) ProtoMessage() {} func (x *UnbanUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[41] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2808,7 +3049,7 @@ func (x *UnbanUserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UnbanUserResponse.ProtoReflect.Descriptor instead. func (*UnbanUserResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{41} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{43} } func (x *UnbanUserResponse) GetResult() *CommandResult { @@ -2842,9 +3083,11 @@ type SystemEvictUserRequest struct { func (x *SystemEvictUserRequest) Reset() { *x = SystemEvictUserRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SystemEvictUserRequest) String() string { @@ -2854,8 +3097,8 @@ func (x *SystemEvictUserRequest) String() string { func (*SystemEvictUserRequest) ProtoMessage() {} func (x *SystemEvictUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[42] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2867,7 +3110,7 @@ func (x *SystemEvictUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemEvictUserRequest.ProtoReflect.Descriptor instead. func (*SystemEvictUserRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{42} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{44} } func (x *SystemEvictUserRequest) GetMeta() *RequestMeta { @@ -2921,9 +3164,11 @@ type SystemEvictUserResponse struct { func (x *SystemEvictUserResponse) Reset() { *x = SystemEvictUserResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SystemEvictUserResponse) String() string { @@ -2933,8 +3178,8 @@ func (x *SystemEvictUserResponse) String() string { func (*SystemEvictUserResponse) ProtoMessage() {} func (x *SystemEvictUserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[43] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2946,7 +3191,7 @@ func (x *SystemEvictUserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SystemEvictUserResponse.ProtoReflect.Descriptor instead. func (*SystemEvictUserResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{43} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{45} } func (x *SystemEvictUserResponse) GetHadCurrentRoom() bool { @@ -3009,9 +3254,11 @@ type SendGiftRequest struct { func (x *SendGiftRequest) Reset() { *x = SendGiftRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SendGiftRequest) String() string { @@ -3021,8 +3268,8 @@ func (x *SendGiftRequest) String() string { func (*SendGiftRequest) ProtoMessage() {} func (x *SendGiftRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[44] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3034,7 +3281,7 @@ func (x *SendGiftRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendGiftRequest.ProtoReflect.Descriptor instead. func (*SendGiftRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{44} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{46} } func (x *SendGiftRequest) GetMeta() *RequestMeta { @@ -3094,9 +3341,11 @@ type SendGiftResponse struct { func (x *SendGiftResponse) Reset() { *x = SendGiftResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SendGiftResponse) String() string { @@ -3106,8 +3355,8 @@ func (x *SendGiftResponse) String() string { func (*SendGiftResponse) ProtoMessage() {} func (x *SendGiftResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[45] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3119,7 +3368,7 @@ func (x *SendGiftResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SendGiftResponse.ProtoReflect.Descriptor instead. func (*SendGiftResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{45} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{47} } func (x *SendGiftResponse) GetResult() *CommandResult { @@ -3170,9 +3419,11 @@ type CheckSpeakPermissionRequest struct { func (x *CheckSpeakPermissionRequest) Reset() { *x = CheckSpeakPermissionRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CheckSpeakPermissionRequest) String() string { @@ -3182,8 +3433,8 @@ func (x *CheckSpeakPermissionRequest) String() string { func (*CheckSpeakPermissionRequest) ProtoMessage() {} func (x *CheckSpeakPermissionRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[46] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3195,7 +3446,7 @@ func (x *CheckSpeakPermissionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckSpeakPermissionRequest.ProtoReflect.Descriptor instead. func (*CheckSpeakPermissionRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{46} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{48} } func (x *CheckSpeakPermissionRequest) GetRoomId() string { @@ -3232,9 +3483,11 @@ type CheckSpeakPermissionResponse struct { func (x *CheckSpeakPermissionResponse) Reset() { *x = CheckSpeakPermissionResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CheckSpeakPermissionResponse) String() string { @@ -3244,8 +3497,8 @@ func (x *CheckSpeakPermissionResponse) String() string { func (*CheckSpeakPermissionResponse) ProtoMessage() {} func (x *CheckSpeakPermissionResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[47] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3257,7 +3510,7 @@ func (x *CheckSpeakPermissionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckSpeakPermissionResponse.ProtoReflect.Descriptor instead. func (*CheckSpeakPermissionResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{47} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{49} } func (x *CheckSpeakPermissionResponse) GetAllowed() bool { @@ -3296,9 +3549,11 @@ type VerifyRoomPresenceRequest struct { func (x *VerifyRoomPresenceRequest) Reset() { *x = VerifyRoomPresenceRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VerifyRoomPresenceRequest) String() string { @@ -3308,8 +3563,8 @@ func (x *VerifyRoomPresenceRequest) String() string { func (*VerifyRoomPresenceRequest) ProtoMessage() {} func (x *VerifyRoomPresenceRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[48] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3321,7 +3576,7 @@ func (x *VerifyRoomPresenceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifyRoomPresenceRequest.ProtoReflect.Descriptor instead. func (*VerifyRoomPresenceRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{48} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{50} } func (x *VerifyRoomPresenceRequest) GetRoomId() string { @@ -3372,9 +3627,11 @@ type VerifyRoomPresenceResponse struct { func (x *VerifyRoomPresenceResponse) Reset() { *x = VerifyRoomPresenceResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VerifyRoomPresenceResponse) String() string { @@ -3384,8 +3641,8 @@ func (x *VerifyRoomPresenceResponse) String() string { func (*VerifyRoomPresenceResponse) ProtoMessage() {} func (x *VerifyRoomPresenceResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[49] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3397,7 +3654,7 @@ func (x *VerifyRoomPresenceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifyRoomPresenceResponse.ProtoReflect.Descriptor instead. func (*VerifyRoomPresenceResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{49} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{51} } func (x *VerifyRoomPresenceResponse) GetPresent() bool { @@ -3439,9 +3696,11 @@ type ListRoomsRequest struct { func (x *ListRoomsRequest) Reset() { *x = ListRoomsRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoomsRequest) String() string { @@ -3451,8 +3710,8 @@ func (x *ListRoomsRequest) String() string { func (*ListRoomsRequest) ProtoMessage() {} func (x *ListRoomsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[50] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3464,7 +3723,7 @@ func (x *ListRoomsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoomsRequest.ProtoReflect.Descriptor instead. func (*ListRoomsRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{50} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{52} } func (x *ListRoomsRequest) GetMeta() *RequestMeta { @@ -3516,7 +3775,7 @@ func (x *ListRoomsRequest) GetQuery() string { return "" } -// ListRoomFeedsRequest 查询 Mine 页 visited/friend/following 用户房间流。 +// ListRoomFeedsRequest 查询 Mine 页 visited/friend/following/followed 房间流。 // 它和公共房间发现列表分离,避免把用户关系流误建模成房间全集过滤。 type ListRoomFeedsRequest struct { state protoimpl.MessageState @@ -3536,9 +3795,11 @@ type ListRoomFeedsRequest struct { func (x *ListRoomFeedsRequest) Reset() { *x = ListRoomFeedsRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoomFeedsRequest) String() string { @@ -3548,8 +3809,8 @@ func (x *ListRoomFeedsRequest) String() string { func (*ListRoomFeedsRequest) ProtoMessage() {} func (x *ListRoomFeedsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[51] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3561,7 +3822,7 @@ func (x *ListRoomFeedsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoomFeedsRequest.ProtoReflect.Descriptor instead. func (*ListRoomFeedsRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{51} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{53} } func (x *ListRoomFeedsRequest) GetMeta() *RequestMeta { @@ -3632,9 +3893,11 @@ type RoomFeedRelatedUser struct { func (x *RoomFeedRelatedUser) Reset() { *x = RoomFeedRelatedUser{} - mi := &file_proto_room_v1_room_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomFeedRelatedUser) String() string { @@ -3644,8 +3907,8 @@ func (x *RoomFeedRelatedUser) String() string { func (*RoomFeedRelatedUser) ProtoMessage() {} func (x *RoomFeedRelatedUser) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[52] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3657,7 +3920,7 @@ func (x *RoomFeedRelatedUser) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomFeedRelatedUser.ProtoReflect.Descriptor instead. func (*RoomFeedRelatedUser) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{52} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{54} } func (x *RoomFeedRelatedUser) GetUserId() int64 { @@ -3693,13 +3956,16 @@ type RoomListItem struct { VisibleRegionId int64 `protobuf:"varint,12,opt,name=visible_region_id,json=visibleRegionId,proto3" json:"visible_region_id,omitempty"` AppCode string `protobuf:"bytes,13,opt,name=app_code,json=appCode,proto3" json:"app_code,omitempty"` RoomShortId string `protobuf:"bytes,14,opt,name=room_short_id,json=roomShortId,proto3" json:"room_short_id,omitempty"` + Locked bool `protobuf:"varint,15,opt,name=locked,proto3" json:"locked,omitempty"` } func (x *RoomListItem) Reset() { *x = RoomListItem{} - mi := &file_proto_room_v1_room_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoomListItem) String() string { @@ -3709,8 +3975,8 @@ func (x *RoomListItem) String() string { func (*RoomListItem) ProtoMessage() {} func (x *RoomListItem) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[53] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3722,7 +3988,7 @@ func (x *RoomListItem) ProtoReflect() protoreflect.Message { // Deprecated: Use RoomListItem.ProtoReflect.Descriptor instead. func (*RoomListItem) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{53} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{55} } func (x *RoomListItem) GetRoomId() string { @@ -3816,6 +4082,13 @@ func (x *RoomListItem) GetRoomShortId() string { return "" } +func (x *RoomListItem) GetLocked() bool { + if x != nil { + return x.Locked + } + return false +} + // ListRoomsResponse 返回一页房间卡片和下一页不透明 cursor。 type ListRoomsResponse struct { state protoimpl.MessageState @@ -3828,9 +4101,11 @@ type ListRoomsResponse struct { func (x *ListRoomsResponse) Reset() { *x = ListRoomsResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoomsResponse) String() string { @@ -3840,8 +4115,8 @@ func (x *ListRoomsResponse) String() string { func (*ListRoomsResponse) ProtoMessage() {} func (x *ListRoomsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[54] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3853,7 +4128,7 @@ func (x *ListRoomsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoomsResponse.ProtoReflect.Descriptor instead. func (*ListRoomsResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{54} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{56} } func (x *ListRoomsResponse) GetRooms() []*RoomListItem { @@ -3883,9 +4158,11 @@ type GetMyRoomRequest struct { func (x *GetMyRoomRequest) Reset() { *x = GetMyRoomRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetMyRoomRequest) String() string { @@ -3895,8 +4172,8 @@ func (x *GetMyRoomRequest) String() string { func (*GetMyRoomRequest) ProtoMessage() {} func (x *GetMyRoomRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[55] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3908,7 +4185,7 @@ func (x *GetMyRoomRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMyRoomRequest.ProtoReflect.Descriptor instead. func (*GetMyRoomRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{55} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{57} } func (x *GetMyRoomRequest) GetMeta() *RequestMeta { @@ -3939,9 +4216,11 @@ type GetMyRoomResponse struct { func (x *GetMyRoomResponse) Reset() { *x = GetMyRoomResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetMyRoomResponse) String() string { @@ -3951,8 +4230,8 @@ func (x *GetMyRoomResponse) String() string { func (*GetMyRoomResponse) ProtoMessage() {} func (x *GetMyRoomResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[56] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[58] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3964,7 +4243,7 @@ func (x *GetMyRoomResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMyRoomResponse.ProtoReflect.Descriptor instead. func (*GetMyRoomResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{56} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{58} } func (x *GetMyRoomResponse) GetHasRoom() bool { @@ -4001,9 +4280,11 @@ type GetCurrentRoomRequest struct { func (x *GetCurrentRoomRequest) Reset() { *x = GetCurrentRoomRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetCurrentRoomRequest) String() string { @@ -4013,8 +4294,8 @@ func (x *GetCurrentRoomRequest) String() string { func (*GetCurrentRoomRequest) ProtoMessage() {} func (x *GetCurrentRoomRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[57] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[59] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4026,7 +4307,7 @@ func (x *GetCurrentRoomRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCurrentRoomRequest.ProtoReflect.Descriptor instead. func (*GetCurrentRoomRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{57} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{59} } func (x *GetCurrentRoomRequest) GetMeta() *RequestMeta { @@ -4063,9 +4344,11 @@ type GetCurrentRoomResponse struct { func (x *GetCurrentRoomResponse) Reset() { *x = GetCurrentRoomResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetCurrentRoomResponse) String() string { @@ -4075,8 +4358,8 @@ func (x *GetCurrentRoomResponse) String() string { func (*GetCurrentRoomResponse) ProtoMessage() {} func (x *GetCurrentRoomResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[58] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4088,7 +4371,7 @@ func (x *GetCurrentRoomResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetCurrentRoomResponse.ProtoReflect.Descriptor instead. func (*GetCurrentRoomResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{58} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{60} } func (x *GetCurrentRoomResponse) GetHasCurrentRoom() bool { @@ -4168,9 +4451,11 @@ type GetRoomSnapshotRequest struct { func (x *GetRoomSnapshotRequest) Reset() { *x = GetRoomSnapshotRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRoomSnapshotRequest) String() string { @@ -4180,8 +4465,8 @@ func (x *GetRoomSnapshotRequest) String() string { func (*GetRoomSnapshotRequest) ProtoMessage() {} func (x *GetRoomSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[59] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[61] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4193,7 +4478,7 @@ func (x *GetRoomSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRoomSnapshotRequest.ProtoReflect.Descriptor instead. func (*GetRoomSnapshotRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{59} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{61} } func (x *GetRoomSnapshotRequest) GetMeta() *RequestMeta { @@ -4225,13 +4510,17 @@ type GetRoomSnapshotResponse struct { Room *RoomSnapshot `protobuf:"bytes,1,opt,name=room,proto3" json:"room,omitempty"` ServerTimeMs int64 `protobuf:"varint,2,opt,name=server_time_ms,json=serverTimeMs,proto3" json:"server_time_ms,omitempty"` + // is_followed 表达 viewer 是否已经关注该房间;它来自 room_follows 关系表,不属于 Room Cell 核心快照。 + IsFollowed bool `protobuf:"varint,3,opt,name=is_followed,json=isFollowed,proto3" json:"is_followed,omitempty"` } func (x *GetRoomSnapshotResponse) Reset() { *x = GetRoomSnapshotResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRoomSnapshotResponse) String() string { @@ -4241,8 +4530,8 @@ func (x *GetRoomSnapshotResponse) String() string { func (*GetRoomSnapshotResponse) ProtoMessage() {} func (x *GetRoomSnapshotResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[60] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[62] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4254,7 +4543,7 @@ func (x *GetRoomSnapshotResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRoomSnapshotResponse.ProtoReflect.Descriptor instead. func (*GetRoomSnapshotResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{60} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{62} } func (x *GetRoomSnapshotResponse) GetRoom() *RoomSnapshot { @@ -4271,6 +4560,13 @@ func (x *GetRoomSnapshotResponse) GetServerTimeMs() int64 { return 0 } +func (x *GetRoomSnapshotResponse) GetIsFollowed() bool { + if x != nil { + return x.IsFollowed + } + return false +} + // ListRoomOnlineUsersRequest 分页查询房间在线用户,不让客户端拉完整 RoomSnapshot 做列表分页。 type ListRoomOnlineUsersRequest struct { state protoimpl.MessageState @@ -4286,9 +4582,11 @@ type ListRoomOnlineUsersRequest struct { func (x *ListRoomOnlineUsersRequest) Reset() { *x = ListRoomOnlineUsersRequest{} - mi := &file_proto_room_v1_room_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoomOnlineUsersRequest) String() string { @@ -4298,8 +4596,8 @@ func (x *ListRoomOnlineUsersRequest) String() string { func (*ListRoomOnlineUsersRequest) ProtoMessage() {} func (x *ListRoomOnlineUsersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[61] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[63] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4311,7 +4609,7 @@ func (x *ListRoomOnlineUsersRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoomOnlineUsersRequest.ProtoReflect.Descriptor instead. func (*ListRoomOnlineUsersRequest) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{61} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{63} } func (x *ListRoomOnlineUsersRequest) GetMeta() *RequestMeta { @@ -4363,9 +4661,11 @@ type ListRoomOnlineUsersResponse struct { func (x *ListRoomOnlineUsersResponse) Reset() { *x = ListRoomOnlineUsersResponse{} - mi := &file_proto_room_v1_room_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoomOnlineUsersResponse) String() string { @@ -4375,8 +4675,8 @@ func (x *ListRoomOnlineUsersResponse) String() string { func (*ListRoomOnlineUsersResponse) ProtoMessage() {} func (x *ListRoomOnlineUsersResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_room_v1_room_proto_msgTypes[62] - if x != nil { + mi := &file_proto_room_v1_room_proto_msgTypes[64] + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4388,7 +4688,7 @@ func (x *ListRoomOnlineUsersResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRoomOnlineUsersResponse.ProtoReflect.Descriptor instead. func (*ListRoomOnlineUsersResponse) Descriptor() ([]byte, []int) { - return file_proto_room_v1_room_proto_rawDescGZIP(), []int{62} + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{64} } func (x *ListRoomOnlineUsersResponse) GetUsers() []*RoomUser { @@ -4426,6 +4726,269 @@ func (x *ListRoomOnlineUsersResponse) GetServerTimeMs() int64 { return 0 } +// FollowRoomRequest 建立当前用户对房间的关注关系。 +// 该关系是 room-service 的用户-房间低频关系事实,不进入 Room Cell command log。 +type FollowRoomRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + RoomId string `protobuf:"bytes,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` + UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` +} + +func (x *FollowRoomRequest) Reset() { + *x = FollowRoomRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FollowRoomRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FollowRoomRequest) ProtoMessage() {} + +func (x *FollowRoomRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_room_v1_room_proto_msgTypes[65] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FollowRoomRequest.ProtoReflect.Descriptor instead. +func (*FollowRoomRequest) Descriptor() ([]byte, []int) { + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{65} +} + +func (x *FollowRoomRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *FollowRoomRequest) GetRoomId() string { + if x != nil { + return x.RoomId + } + return "" +} + +func (x *FollowRoomRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +type FollowRoomResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` + Followed bool `protobuf:"varint,2,opt,name=followed,proto3" json:"followed,omitempty"` + FollowedAtMs int64 `protobuf:"varint,3,opt,name=followed_at_ms,json=followedAtMs,proto3" json:"followed_at_ms,omitempty"` + ServerTimeMs int64 `protobuf:"varint,4,opt,name=server_time_ms,json=serverTimeMs,proto3" json:"server_time_ms,omitempty"` +} + +func (x *FollowRoomResponse) Reset() { + *x = FollowRoomResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FollowRoomResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FollowRoomResponse) ProtoMessage() {} + +func (x *FollowRoomResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_room_v1_room_proto_msgTypes[66] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FollowRoomResponse.ProtoReflect.Descriptor instead. +func (*FollowRoomResponse) Descriptor() ([]byte, []int) { + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{66} +} + +func (x *FollowRoomResponse) GetRoomId() string { + if x != nil { + return x.RoomId + } + return "" +} + +func (x *FollowRoomResponse) GetFollowed() bool { + if x != nil { + return x.Followed + } + return false +} + +func (x *FollowRoomResponse) GetFollowedAtMs() int64 { + if x != nil { + return x.FollowedAtMs + } + return 0 +} + +func (x *FollowRoomResponse) GetServerTimeMs() int64 { + if x != nil { + return x.ServerTimeMs + } + return 0 +} + +// UnfollowRoomRequest 取消当前用户对房间的关注关系;未关注时按幂等成功处理。 +type UnfollowRoomRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + RoomId string `protobuf:"bytes,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` + UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` +} + +func (x *UnfollowRoomRequest) Reset() { + *x = UnfollowRoomRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnfollowRoomRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnfollowRoomRequest) ProtoMessage() {} + +func (x *UnfollowRoomRequest) ProtoReflect() protoreflect.Message { + mi := &file_proto_room_v1_room_proto_msgTypes[67] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnfollowRoomRequest.ProtoReflect.Descriptor instead. +func (*UnfollowRoomRequest) Descriptor() ([]byte, []int) { + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{67} +} + +func (x *UnfollowRoomRequest) GetMeta() *RequestMeta { + if x != nil { + return x.Meta + } + return nil +} + +func (x *UnfollowRoomRequest) GetRoomId() string { + if x != nil { + return x.RoomId + } + return "" +} + +func (x *UnfollowRoomRequest) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +type UnfollowRoomResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoomId string `protobuf:"bytes,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"` + Followed bool `protobuf:"varint,2,opt,name=followed,proto3" json:"followed,omitempty"` + ServerTimeMs int64 `protobuf:"varint,3,opt,name=server_time_ms,json=serverTimeMs,proto3" json:"server_time_ms,omitempty"` +} + +func (x *UnfollowRoomResponse) Reset() { + *x = UnfollowRoomResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_room_v1_room_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnfollowRoomResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnfollowRoomResponse) ProtoMessage() {} + +func (x *UnfollowRoomResponse) ProtoReflect() protoreflect.Message { + mi := &file_proto_room_v1_room_proto_msgTypes[68] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnfollowRoomResponse.ProtoReflect.Descriptor instead. +func (*UnfollowRoomResponse) Descriptor() ([]byte, []int) { + return file_proto_room_v1_room_proto_rawDescGZIP(), []int{68} +} + +func (x *UnfollowRoomResponse) GetRoomId() string { + if x != nil { + return x.RoomId + } + return "" +} + +func (x *UnfollowRoomResponse) GetFollowed() bool { + if x != nil { + return x.Followed + } + return false +} + +func (x *UnfollowRoomResponse) GetServerTimeMs() int64 { + if x != nil { + return x.ServerTimeMs + } + return 0 +} + var File_proto_room_v1_room_proto protoreflect.FileDescriptor var file_proto_room_v1_room_proto_rawDesc = []byte{ @@ -4493,7 +5056,7 @@ var file_proto_room_v1_room_proto_rawDesc = []byte{ 0x69, 0x66, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x66, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x73, 0x22, 0xc9, + 0x03, 0x52, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x73, 0x22, 0xe1, 0x05, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, @@ -4534,151 +5097,214 @@ var file_proto_room_v1_room_proto_rawDesc = []byte{ 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, - 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x1a, 0x3a, - 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x45, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xaf, 0x02, 0x0a, 0x11, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x1a, 0x3a, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x45, 0x78, + 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0xaf, 0x02, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x74, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, + 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x76, + 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x6d, 0x41, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x72, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x53, 0x68, 0x6f, + 0x72, 0x74, 0x49, 0x64, 0x22, 0x7b, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, + 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, - 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, - 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, - 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x6d, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x29, 0x0a, - 0x10, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x6f, 0x6f, 0x6d, - 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x22, 0x7b, 0x0a, 0x12, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0xa8, 0x02, 0x0a, 0x18, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, - 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, 0x6f, 0x6f, - 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, - 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x0a, 0x72, 0x6f, 0x6f, 0x6d, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2e, - 0x0a, 0x10, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0f, 0x72, 0x6f, 0x6f, 0x6d, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x22, - 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x48, 0x03, 0x52, 0x09, 0x73, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, - 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, - 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x55, 0x0a, 0x0f, 0x4a, 0x6f, 0x69, - 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, - 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, - 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, - 0x22, 0xa6, 0x01, 0x0a, 0x10, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x46, 0x0a, 0x14, 0x52, 0x6f, 0x6f, - 0x6d, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x22, 0xab, 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, - 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2f, - 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, - 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, - 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, - 0x42, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, - 0x65, 0x74, 0x61, 0x22, 0x7a, 0x0a, 0x11, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, - 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, - 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, - 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, - 0x5a, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, - 0x65, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x11, 0x43, - 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x57, 0x0a, 0x0c, 0x4d, 0x69, 0x63, 0x55, 0x70, + 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, + 0x6d, 0x22, 0xa8, 0x02, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x20, + 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x6d, 0x41, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x10, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x02, 0x52, 0x0f, 0x72, 0x6f, 0x6f, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x09, 0x73, 0x65, + 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, + 0x6f, 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x72, 0x6f, 0x6f, + 0x6d, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x72, 0x6f, 0x6f, + 0x6d, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, + 0x0b, 0x5f, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x82, 0x01, 0x0a, + 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, + 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, + 0x6d, 0x22, 0x71, 0x0a, 0x0f, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, + 0x6d, 0x65, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x22, 0xa6, 0x01, 0x0a, 0x10, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x6f, 0x6f, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, + 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, + 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x04, + 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, + 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x46, 0x0a, + 0x14, 0x52, 0x6f, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xab, 0x01, 0x0a, 0x15, 0x52, 0x6f, 0x6f, 0x6d, 0x48, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, + 0x6f, 0x6f, 0x6d, 0x22, 0x42, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, - 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, - 0x22, 0xe5, 0x01, 0x0a, 0x0d, 0x4d, 0x69, 0x63, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, - 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, - 0x6f, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, - 0x6f, 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, 0x65, - 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x73, 0x22, 0x7e, 0x0a, 0x0e, 0x4d, 0x69, 0x63, 0x44, - 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x4d, 0x69, 0x63, - 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x7a, 0x0a, 0x11, 0x4c, 0x65, 0x61, 0x76, 0x65, + 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, + 0x6f, 0x6f, 0x6d, 0x22, 0x5a, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x6f, 0x6f, 0x6d, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, + 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, + 0x7a, 0x0a, 0x11, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, + 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x57, 0x0a, 0x0c, 0x4d, + 0x69, 0x63, 0x55, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, + 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x73, + 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, + 0x61, 0x74, 0x4e, 0x6f, 0x22, 0xe5, 0x01, 0x0a, 0x0d, 0x4d, 0x69, 0x63, 0x55, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, + 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x6d, 0x69, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x5f, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x44, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x4d, 0x73, 0x22, 0x7e, 0x0a, 0x0e, + 0x4d, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, + 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x91, 0x01, 0x0a, + 0x0f, 0x4d, 0x69, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, + 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, + 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, + 0x22, 0x85, 0x01, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x63, 0x53, 0x65, + 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, + 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x22, 0x7e, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x4d, 0x69, 0x63, 0x53, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, + 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0xf8, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x4d, 0x69, 0x63, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, + 0x0a, 0x0e, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x1c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4d, + 0x69, 0x63, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, + 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, + 0x74, 0x4e, 0x6f, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, + 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x7f, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, 0x4d, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, + 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x6d, 0x75, 0x74, 0x65, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, + 0x4d, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, @@ -4686,116 +5312,42 @@ var file_proto_room_v1_room_proto_rawDesc = []byte{ 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x85, 0x01, 0x0a, - 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x63, 0x53, 0x65, 0x61, 0x74, 0x52, 0x65, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x8b, 0x02, 0x0a, + 0x14, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x54, 0x43, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, - 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, - 0x61, 0x74, 0x4e, 0x6f, 0x22, 0x7e, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, - 0x63, 0x53, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, - 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0xf8, 0x01, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x4d, 0x69, 0x63, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x69, - 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, - 0x9e, 0x01, 0x0a, 0x1c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x4d, 0x69, 0x63, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, - 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, - 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x22, 0x7f, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, 0x4d, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, - 0x64, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, 0x4d, 0x75, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x8b, 0x02, 0x0a, 0x14, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x52, 0x54, 0x43, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x52, 0x54, 0x43, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, - 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, - 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, - 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x22, 0x78, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, 0x53, 0x65, 0x61, 0x74, 0x4c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, - 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x61, - 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, 0x74, - 0x4e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x7f, 0x0a, 0x16, 0x53, 0x65, - 0x74, 0x4d, 0x69, 0x63, 0x53, 0x65, 0x61, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0b, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, + 0x0a, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x41, + 0x70, 0x70, 0x6c, 0x79, 0x52, 0x54, 0x43, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, - 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x61, 0x0a, 0x15, 0x53, - 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x7f, - 0x0a, 0x16, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, + 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x65, 0x61, + 0x74, 0x4e, 0x6f, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, + 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x78, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, 0x53, 0x65, + 0x61, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, + 0x07, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x6e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x73, 0x65, 0x61, 0x74, 0x4e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x7f, + 0x0a, 0x16, 0x53, 0x65, 0x74, 0x4d, 0x69, 0x63, 0x53, 0x65, 0x61, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, @@ -4803,315 +5355,385 @@ var file_proto_room_v1_room_proto_rawDesc = []byte{ 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, - 0x85, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x7d, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x52, 0x6f, - 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, - 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x7d, 0x0a, 0x0f, 0x4d, 0x75, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, - 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x6d, 0x75, 0x74, 0x65, 0x64, 0x22, 0x79, 0x0a, 0x10, 0x4d, 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, - 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, - 0x22, 0x67, 0x0a, 0x0f, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, - 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x10, 0x4b, 0x69, 0x63, - 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x61, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x22, 0x7f, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, + 0x6f, 0x6f, 0x6d, 0x22, 0x7c, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x16, 0x0a, + 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, + 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x22, 0x80, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, - 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x68, 0x0a, 0x10, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x55, 0x73, 0x65, + 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x85, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, + 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, + 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x7d, 0x0a, 0x14, + 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, + 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, + 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x7d, 0x0a, 0x0f, 0x4d, + 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, + 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x22, 0x79, 0x0a, 0x10, 0x4d, 0x75, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x67, 0x0a, 0x0f, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7a, - 0x0a, 0x11, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xbe, + 0x01, 0x0a, 0x10, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0xd4, 0x01, 0x0a, 0x16, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x22, 0x0a, - 0x0d, 0x62, 0x61, 0x6e, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x62, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x6f, 0x6f, - 0x6d, 0x22, 0x88, 0x02, 0x0a, 0x17, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, - 0x10, 0x68, 0x61, 0x64, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x64, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, - 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, - 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x17, - 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x74, 0x63, 0x5f, 0x6b, - 0x69, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x74, 0x63, - 0x4b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x74, 0x63, 0x5f, 0x6b, 0x69, - 0x63, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x72, 0x74, 0x63, 0x4b, 0x69, 0x63, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xe8, 0x01, 0x0a, - 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x74, + 0x63, 0x5f, 0x6b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x72, 0x74, 0x63, 0x4b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x74, 0x63, + 0x5f, 0x6b, 0x69, 0x63, 0x6b, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x72, 0x74, 0x63, 0x4b, 0x69, 0x63, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, + 0x68, 0x0a, 0x10, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x11, 0x55, 0x6e, 0x62, + 0x61, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, + 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0xd4, 0x01, 0x0a, 0x16, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x69, 0x66, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x26, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, - 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, - 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x74, 0x12, 0x34, 0x0a, - 0x09, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x52, - 0x61, 0x6e, 0x6b, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, - 0x72, 0x6f, 0x6f, 0x6d, 0x22, 0x6a, 0x0a, 0x1b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, - 0x61, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, - 0x22, 0x73, 0x0a, 0x1c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x71, - 0x0a, 0x1a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x65, 0x73, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0xea, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, - 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, - 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, - 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, - 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x62, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xb7, - 0x02, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, - 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, - 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0c, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, - 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, - 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x62, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, - 0x73, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x47, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x52, 0x6f, 0x6f, 0x6d, - 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x73, 0x22, 0x9b, 0x03, - 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x17, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x62, 0x61, 0x6e, 0x5f, + 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x62, 0x61, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x6f, 0x6f, 0x6d, 0x22, 0x88, 0x02, 0x0a, + 0x17, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x64, 0x5f, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x64, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, + 0x6f, 0x6d, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x74, 0x63, 0x5f, 0x6b, 0x69, 0x63, 0x6b, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x74, 0x63, 0x4b, 0x69, 0x63, 0x6b, 0x65, + 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x72, 0x74, 0x63, 0x5f, 0x6b, 0x69, 0x63, 0x6b, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x74, 0x63, 0x4b, 0x69, + 0x63, 0x6b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xe8, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, + 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, + 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x17, 0x0a, 0x07, 0x67, 0x69, 0x66, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x69, + 0x66, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x67, 0x69, 0x66, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, + 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2c, 0x0a, + 0x12, 0x62, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62, 0x69, 0x6c, 0x6c, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x6f, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x72, 0x6f, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x67, 0x69, 0x66, 0x74, + 0x5f, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x79, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x2f, + 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, + 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x22, + 0x6a, 0x0a, 0x1b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, - 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, - 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x68, 0x65, 0x61, 0x74, 0x12, 0x21, - 0x0a, 0x0c, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x61, - 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, - 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x53, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, - 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, - 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x6f, 0x6f, 0x6d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x11, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x31, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x72, 0x6f, - 0x6f, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x73, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x43, 0x75, - 0x72, 0x73, 0x6f, 0x72, 0x22, 0x66, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, - 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x85, 0x01, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x2f, 0x0a, - 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, - 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x24, - 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, - 0x6d, 0x65, 0x4d, 0x73, 0x22, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x73, 0x0a, 0x1c, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0xa6, 0x01, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x71, 0x0a, 0x1a, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, + 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xea, 0x01, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x69, 0x65, 0x77, 0x65, + 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, 0x62, + 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x74, 0x61, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0xb7, 0x02, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x69, 0x65, 0x77, + 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x69, 0x73, 0x69, + 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x74, 0x61, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x22, 0x63, 0x0a, 0x13, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x4d, 0x73, 0x22, 0xb3, 0x03, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, + 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x61, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x68, 0x65, 0x61, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x73, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x6f, + 0x63, 0x63, 0x75, 0x70, 0x69, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x61, 0x74, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, 0x63, 0x63, 0x75, 0x70, 0x69, + 0x65, 0x64, 0x53, 0x65, 0x61, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x76, + 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x52, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, 0x53, + 0x68, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x67, + 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x63, + 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x78, + 0x74, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x66, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x79, + 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, + 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, + 0x85, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x61, 0x73, 0x5f, 0x72, 0x6f, 0x6f, + 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x68, 0x61, 0x73, 0x52, 0x6f, 0x6f, 0x6d, + 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, + 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xd6, 0x02, 0x0a, 0x16, 0x47, 0x65, + 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x68, 0x61, 0x73, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x17, + 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, + 0x6f, 0x6f, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, + 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x24, + 0x0a, 0x0e, 0x6d, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x12, 0x6e, 0x65, 0x65, + 0x64, 0x5f, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x69, 0x6d, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x65, 0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e, 0x49, + 0x6d, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x65, 0x64, 0x5f, 0x72, + 0x74, 0x63, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x6e, 0x65, 0x65, 0x64, 0x52, 0x74, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x0e, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, + 0x4d, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, - 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0xd6, 0x02, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x28, 0x0a, 0x10, 0x68, 0x61, 0x73, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x68, 0x61, 0x73, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x72, - 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, - 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x6f, 0x6f, 0x6d, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6d, - 0x69, 0x63, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x12, 0x6e, 0x65, 0x65, 0x64, 0x5f, 0x6a, - 0x6f, 0x69, 0x6e, 0x5f, 0x69, 0x6d, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x65, 0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6d, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x65, 0x64, 0x5f, 0x72, 0x74, 0x63, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x65, - 0x64, 0x52, 0x74, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, - 0x87, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, - 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, - 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x69, 0x65, - 0x77, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x70, 0x0a, 0x17, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, - 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x1a, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, - 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, - 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x69, 0x65, - 0x77, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x1b, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, - 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x91, 0x01, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x22, 0xbc, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, + 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x76, 0x69, 0x65, 0x77, + 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, + 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, + 0xb9, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2d, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x6f, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, 0x75, 0x0a, 0x11, 0x46, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x12, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, + 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x24, + 0x0a, 0x0e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, 0x6d, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x41, 0x74, 0x4d, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x22, 0x77, 0x0a, 0x13, 0x55, 0x6e, + 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x14, 0x55, 0x6e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, + 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x72, + 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, + 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, - 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x32, 0xd2, 0x0d, 0x0a, 0x12, 0x52, 0x6f, 0x6f, 0x6d, 0x43, + 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x32, 0xe0, 0x0f, 0x0a, 0x12, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x20, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, @@ -5189,92 +5811,109 @@ var file_proto_room_v1_room_proto_rawDesc = []byte{ 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0c, 0x53, 0x65, 0x74, - 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, - 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, - 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4b, 0x0a, 0x08, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x63, 0x6b, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, 0x63, 0x6b, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x09, - 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, 0x79, 0x61, - 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x61, 0x6e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, - 0x25, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, - 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, - 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, 0x1e, 0x2e, 0x68, 0x79, 0x61, - 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x47, - 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x68, 0x79, 0x61, - 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x47, - 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xee, 0x01, 0x0a, 0x10, - 0x52, 0x6f, 0x6f, 0x6d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x6f, 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, - 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, - 0x65, 0x61, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x69, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x28, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, - 0x6f, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x29, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x65, 0x73, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb9, 0x04, 0x0a, - 0x10, 0x52, 0x6f, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x1f, - 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, - 0x64, 0x73, 0x12, 0x23, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x47, 0x65, 0x74, - 0x4d, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x1f, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, 0x6d, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, - 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x24, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, - 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x25, 0x2e, 0x68, 0x79, - 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x13, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x12, 0x29, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x68, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, 0x53, 0x65, 0x74, + 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0c, 0x53, + 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x68, 0x79, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, + 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x12, 0x1e, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, + 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x69, + 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, + 0x0a, 0x09, 0x55, 0x6e, 0x62, 0x61, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x68, 0x79, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, 0x61, + 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x62, + 0x61, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, + 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x25, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, + 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x76, 0x69, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4b, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, 0x1e, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x68, + 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, + 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, + 0x0a, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x20, 0x2e, 0x68, 0x79, + 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, + 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x57, 0x0a, 0x0c, 0x55, 0x6e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, + 0x12, 0x22, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x6e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x6f, 0x6f, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xee, 0x01, 0x0a, 0x10, 0x52, 0x6f, + 0x6f, 0x6d, 0x47, 0x75, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, + 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, + 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, + 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x61, 0x6b, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x69, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x65, + 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x28, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, + 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, + 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x29, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb9, 0x04, 0x0a, 0x10, 0x52, + 0x6f, 0x6f, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x4e, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x1f, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x68, 0x79, 0x61, 0x70, - 0x70, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x6f, 0x6d, 0x76, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x56, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x73, + 0x12, 0x23, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x46, 0x65, 0x65, 0x64, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, + 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x79, + 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x1f, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, + 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, + 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x24, 0x2e, 0x68, 0x79, 0x61, 0x70, + 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x25, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, + 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x25, 0x2e, 0x68, 0x79, 0x61, 0x70, + 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, + 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, + 0x29, 0x2e, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x68, 0x79, 0x61, + 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x6f, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x6f, 0x6f, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x26, 0x5a, 0x24, 0x68, 0x79, 0x61, 0x70, 0x70, 0x2e, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x72, 0x6f, 0x6f, 0x6d, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x6f, 0x6d, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5289,7 +5928,7 @@ func file_proto_room_v1_room_proto_rawDescGZIP() []byte { return file_proto_room_v1_room_proto_rawDescData } -var file_proto_room_v1_room_proto_msgTypes = make([]protoimpl.MessageInfo, 64) +var file_proto_room_v1_room_proto_msgTypes = make([]protoimpl.MessageInfo, 70) var file_proto_room_v1_room_proto_goTypes = []any{ (*RequestMeta)(nil), // 0: hyapp.room.v1.RequestMeta (*CommandResult)(nil), // 1: hyapp.room.v1.CommandResult @@ -5325,42 +5964,48 @@ var file_proto_room_v1_room_proto_goTypes = []any{ (*SetMicSeatLockResponse)(nil), // 31: hyapp.room.v1.SetMicSeatLockResponse (*SetChatEnabledRequest)(nil), // 32: hyapp.room.v1.SetChatEnabledRequest (*SetChatEnabledResponse)(nil), // 33: hyapp.room.v1.SetChatEnabledResponse - (*SetRoomAdminRequest)(nil), // 34: hyapp.room.v1.SetRoomAdminRequest - (*SetRoomAdminResponse)(nil), // 35: hyapp.room.v1.SetRoomAdminResponse - (*MuteUserRequest)(nil), // 36: hyapp.room.v1.MuteUserRequest - (*MuteUserResponse)(nil), // 37: hyapp.room.v1.MuteUserResponse - (*KickUserRequest)(nil), // 38: hyapp.room.v1.KickUserRequest - (*KickUserResponse)(nil), // 39: hyapp.room.v1.KickUserResponse - (*UnbanUserRequest)(nil), // 40: hyapp.room.v1.UnbanUserRequest - (*UnbanUserResponse)(nil), // 41: hyapp.room.v1.UnbanUserResponse - (*SystemEvictUserRequest)(nil), // 42: hyapp.room.v1.SystemEvictUserRequest - (*SystemEvictUserResponse)(nil), // 43: hyapp.room.v1.SystemEvictUserResponse - (*SendGiftRequest)(nil), // 44: hyapp.room.v1.SendGiftRequest - (*SendGiftResponse)(nil), // 45: hyapp.room.v1.SendGiftResponse - (*CheckSpeakPermissionRequest)(nil), // 46: hyapp.room.v1.CheckSpeakPermissionRequest - (*CheckSpeakPermissionResponse)(nil), // 47: hyapp.room.v1.CheckSpeakPermissionResponse - (*VerifyRoomPresenceRequest)(nil), // 48: hyapp.room.v1.VerifyRoomPresenceRequest - (*VerifyRoomPresenceResponse)(nil), // 49: hyapp.room.v1.VerifyRoomPresenceResponse - (*ListRoomsRequest)(nil), // 50: hyapp.room.v1.ListRoomsRequest - (*ListRoomFeedsRequest)(nil), // 51: hyapp.room.v1.ListRoomFeedsRequest - (*RoomFeedRelatedUser)(nil), // 52: hyapp.room.v1.RoomFeedRelatedUser - (*RoomListItem)(nil), // 53: hyapp.room.v1.RoomListItem - (*ListRoomsResponse)(nil), // 54: hyapp.room.v1.ListRoomsResponse - (*GetMyRoomRequest)(nil), // 55: hyapp.room.v1.GetMyRoomRequest - (*GetMyRoomResponse)(nil), // 56: hyapp.room.v1.GetMyRoomResponse - (*GetCurrentRoomRequest)(nil), // 57: hyapp.room.v1.GetCurrentRoomRequest - (*GetCurrentRoomResponse)(nil), // 58: hyapp.room.v1.GetCurrentRoomResponse - (*GetRoomSnapshotRequest)(nil), // 59: hyapp.room.v1.GetRoomSnapshotRequest - (*GetRoomSnapshotResponse)(nil), // 60: hyapp.room.v1.GetRoomSnapshotResponse - (*ListRoomOnlineUsersRequest)(nil), // 61: hyapp.room.v1.ListRoomOnlineUsersRequest - (*ListRoomOnlineUsersResponse)(nil), // 62: hyapp.room.v1.ListRoomOnlineUsersResponse - nil, // 63: hyapp.room.v1.RoomSnapshot.RoomExtEntry + (*SetRoomPasswordRequest)(nil), // 34: hyapp.room.v1.SetRoomPasswordRequest + (*SetRoomPasswordResponse)(nil), // 35: hyapp.room.v1.SetRoomPasswordResponse + (*SetRoomAdminRequest)(nil), // 36: hyapp.room.v1.SetRoomAdminRequest + (*SetRoomAdminResponse)(nil), // 37: hyapp.room.v1.SetRoomAdminResponse + (*MuteUserRequest)(nil), // 38: hyapp.room.v1.MuteUserRequest + (*MuteUserResponse)(nil), // 39: hyapp.room.v1.MuteUserResponse + (*KickUserRequest)(nil), // 40: hyapp.room.v1.KickUserRequest + (*KickUserResponse)(nil), // 41: hyapp.room.v1.KickUserResponse + (*UnbanUserRequest)(nil), // 42: hyapp.room.v1.UnbanUserRequest + (*UnbanUserResponse)(nil), // 43: hyapp.room.v1.UnbanUserResponse + (*SystemEvictUserRequest)(nil), // 44: hyapp.room.v1.SystemEvictUserRequest + (*SystemEvictUserResponse)(nil), // 45: hyapp.room.v1.SystemEvictUserResponse + (*SendGiftRequest)(nil), // 46: hyapp.room.v1.SendGiftRequest + (*SendGiftResponse)(nil), // 47: hyapp.room.v1.SendGiftResponse + (*CheckSpeakPermissionRequest)(nil), // 48: hyapp.room.v1.CheckSpeakPermissionRequest + (*CheckSpeakPermissionResponse)(nil), // 49: hyapp.room.v1.CheckSpeakPermissionResponse + (*VerifyRoomPresenceRequest)(nil), // 50: hyapp.room.v1.VerifyRoomPresenceRequest + (*VerifyRoomPresenceResponse)(nil), // 51: hyapp.room.v1.VerifyRoomPresenceResponse + (*ListRoomsRequest)(nil), // 52: hyapp.room.v1.ListRoomsRequest + (*ListRoomFeedsRequest)(nil), // 53: hyapp.room.v1.ListRoomFeedsRequest + (*RoomFeedRelatedUser)(nil), // 54: hyapp.room.v1.RoomFeedRelatedUser + (*RoomListItem)(nil), // 55: hyapp.room.v1.RoomListItem + (*ListRoomsResponse)(nil), // 56: hyapp.room.v1.ListRoomsResponse + (*GetMyRoomRequest)(nil), // 57: hyapp.room.v1.GetMyRoomRequest + (*GetMyRoomResponse)(nil), // 58: hyapp.room.v1.GetMyRoomResponse + (*GetCurrentRoomRequest)(nil), // 59: hyapp.room.v1.GetCurrentRoomRequest + (*GetCurrentRoomResponse)(nil), // 60: hyapp.room.v1.GetCurrentRoomResponse + (*GetRoomSnapshotRequest)(nil), // 61: hyapp.room.v1.GetRoomSnapshotRequest + (*GetRoomSnapshotResponse)(nil), // 62: hyapp.room.v1.GetRoomSnapshotResponse + (*ListRoomOnlineUsersRequest)(nil), // 63: hyapp.room.v1.ListRoomOnlineUsersRequest + (*ListRoomOnlineUsersResponse)(nil), // 64: hyapp.room.v1.ListRoomOnlineUsersResponse + (*FollowRoomRequest)(nil), // 65: hyapp.room.v1.FollowRoomRequest + (*FollowRoomResponse)(nil), // 66: hyapp.room.v1.FollowRoomResponse + (*UnfollowRoomRequest)(nil), // 67: hyapp.room.v1.UnfollowRoomRequest + (*UnfollowRoomResponse)(nil), // 68: hyapp.room.v1.UnfollowRoomResponse + nil, // 69: hyapp.room.v1.RoomSnapshot.RoomExtEntry } var file_proto_room_v1_room_proto_depIdxs = []int32{ 3, // 0: hyapp.room.v1.RoomSnapshot.mic_seats:type_name -> hyapp.room.v1.SeatState 2, // 1: hyapp.room.v1.RoomSnapshot.online_users:type_name -> hyapp.room.v1.RoomUser 4, // 2: hyapp.room.v1.RoomSnapshot.gift_rank:type_name -> hyapp.room.v1.RankItem - 63, // 3: hyapp.room.v1.RoomSnapshot.room_ext:type_name -> hyapp.room.v1.RoomSnapshot.RoomExtEntry + 69, // 3: hyapp.room.v1.RoomSnapshot.room_ext:type_name -> hyapp.room.v1.RoomSnapshot.RoomExtEntry 0, // 4: hyapp.room.v1.CreateRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta 1, // 5: hyapp.room.v1.CreateRoomResponse.result:type_name -> hyapp.room.v1.CommandResult 5, // 6: hyapp.room.v1.CreateRoomResponse.room:type_name -> hyapp.room.v1.RoomSnapshot @@ -5405,97 +6050,108 @@ var file_proto_room_v1_room_proto_depIdxs = []int32{ 0, // 45: hyapp.room.v1.SetChatEnabledRequest.meta:type_name -> hyapp.room.v1.RequestMeta 1, // 46: hyapp.room.v1.SetChatEnabledResponse.result:type_name -> hyapp.room.v1.CommandResult 5, // 47: hyapp.room.v1.SetChatEnabledResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 48: hyapp.room.v1.SetRoomAdminRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 1, // 49: hyapp.room.v1.SetRoomAdminResponse.result:type_name -> hyapp.room.v1.CommandResult - 5, // 50: hyapp.room.v1.SetRoomAdminResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 51: hyapp.room.v1.MuteUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 1, // 52: hyapp.room.v1.MuteUserResponse.result:type_name -> hyapp.room.v1.CommandResult - 5, // 53: hyapp.room.v1.MuteUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 54: hyapp.room.v1.KickUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 1, // 55: hyapp.room.v1.KickUserResponse.result:type_name -> hyapp.room.v1.CommandResult - 5, // 56: hyapp.room.v1.KickUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 57: hyapp.room.v1.UnbanUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 1, // 58: hyapp.room.v1.UnbanUserResponse.result:type_name -> hyapp.room.v1.CommandResult - 5, // 59: hyapp.room.v1.UnbanUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 60: hyapp.room.v1.SystemEvictUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 1, // 61: hyapp.room.v1.SystemEvictUserResponse.result:type_name -> hyapp.room.v1.CommandResult - 5, // 62: hyapp.room.v1.SystemEvictUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 63: hyapp.room.v1.SendGiftRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 1, // 64: hyapp.room.v1.SendGiftResponse.result:type_name -> hyapp.room.v1.CommandResult - 4, // 65: hyapp.room.v1.SendGiftResponse.gift_rank:type_name -> hyapp.room.v1.RankItem - 5, // 66: hyapp.room.v1.SendGiftResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 67: hyapp.room.v1.ListRoomsRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 0, // 68: hyapp.room.v1.ListRoomFeedsRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 52, // 69: hyapp.room.v1.ListRoomFeedsRequest.related_users:type_name -> hyapp.room.v1.RoomFeedRelatedUser - 53, // 70: hyapp.room.v1.ListRoomsResponse.rooms:type_name -> hyapp.room.v1.RoomListItem - 0, // 71: hyapp.room.v1.GetMyRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 53, // 72: hyapp.room.v1.GetMyRoomResponse.room:type_name -> hyapp.room.v1.RoomListItem - 0, // 73: hyapp.room.v1.GetCurrentRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 0, // 74: hyapp.room.v1.GetRoomSnapshotRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 5, // 75: hyapp.room.v1.GetRoomSnapshotResponse.room:type_name -> hyapp.room.v1.RoomSnapshot - 0, // 76: hyapp.room.v1.ListRoomOnlineUsersRequest.meta:type_name -> hyapp.room.v1.RequestMeta - 2, // 77: hyapp.room.v1.ListRoomOnlineUsersResponse.users:type_name -> hyapp.room.v1.RoomUser - 6, // 78: hyapp.room.v1.RoomCommandService.CreateRoom:input_type -> hyapp.room.v1.CreateRoomRequest - 8, // 79: hyapp.room.v1.RoomCommandService.UpdateRoomProfile:input_type -> hyapp.room.v1.UpdateRoomProfileRequest - 10, // 80: hyapp.room.v1.RoomCommandService.JoinRoom:input_type -> hyapp.room.v1.JoinRoomRequest - 12, // 81: hyapp.room.v1.RoomCommandService.RoomHeartbeat:input_type -> hyapp.room.v1.RoomHeartbeatRequest - 14, // 82: hyapp.room.v1.RoomCommandService.LeaveRoom:input_type -> hyapp.room.v1.LeaveRoomRequest - 16, // 83: hyapp.room.v1.RoomCommandService.CloseRoom:input_type -> hyapp.room.v1.CloseRoomRequest - 18, // 84: hyapp.room.v1.RoomCommandService.MicUp:input_type -> hyapp.room.v1.MicUpRequest - 20, // 85: hyapp.room.v1.RoomCommandService.MicDown:input_type -> hyapp.room.v1.MicDownRequest - 22, // 86: hyapp.room.v1.RoomCommandService.ChangeMicSeat:input_type -> hyapp.room.v1.ChangeMicSeatRequest - 24, // 87: hyapp.room.v1.RoomCommandService.ConfirmMicPublishing:input_type -> hyapp.room.v1.ConfirmMicPublishingRequest - 26, // 88: hyapp.room.v1.RoomCommandService.SetMicMute:input_type -> hyapp.room.v1.SetMicMuteRequest - 28, // 89: hyapp.room.v1.RoomCommandService.ApplyRTCEvent:input_type -> hyapp.room.v1.ApplyRTCEventRequest - 30, // 90: hyapp.room.v1.RoomCommandService.SetMicSeatLock:input_type -> hyapp.room.v1.SetMicSeatLockRequest - 32, // 91: hyapp.room.v1.RoomCommandService.SetChatEnabled:input_type -> hyapp.room.v1.SetChatEnabledRequest - 34, // 92: hyapp.room.v1.RoomCommandService.SetRoomAdmin:input_type -> hyapp.room.v1.SetRoomAdminRequest - 36, // 93: hyapp.room.v1.RoomCommandService.MuteUser:input_type -> hyapp.room.v1.MuteUserRequest - 38, // 94: hyapp.room.v1.RoomCommandService.KickUser:input_type -> hyapp.room.v1.KickUserRequest - 40, // 95: hyapp.room.v1.RoomCommandService.UnbanUser:input_type -> hyapp.room.v1.UnbanUserRequest - 42, // 96: hyapp.room.v1.RoomCommandService.SystemEvictUser:input_type -> hyapp.room.v1.SystemEvictUserRequest - 44, // 97: hyapp.room.v1.RoomCommandService.SendGift:input_type -> hyapp.room.v1.SendGiftRequest - 46, // 98: hyapp.room.v1.RoomGuardService.CheckSpeakPermission:input_type -> hyapp.room.v1.CheckSpeakPermissionRequest - 48, // 99: hyapp.room.v1.RoomGuardService.VerifyRoomPresence:input_type -> hyapp.room.v1.VerifyRoomPresenceRequest - 50, // 100: hyapp.room.v1.RoomQueryService.ListRooms:input_type -> hyapp.room.v1.ListRoomsRequest - 51, // 101: hyapp.room.v1.RoomQueryService.ListRoomFeeds:input_type -> hyapp.room.v1.ListRoomFeedsRequest - 55, // 102: hyapp.room.v1.RoomQueryService.GetMyRoom:input_type -> hyapp.room.v1.GetMyRoomRequest - 57, // 103: hyapp.room.v1.RoomQueryService.GetCurrentRoom:input_type -> hyapp.room.v1.GetCurrentRoomRequest - 59, // 104: hyapp.room.v1.RoomQueryService.GetRoomSnapshot:input_type -> hyapp.room.v1.GetRoomSnapshotRequest - 61, // 105: hyapp.room.v1.RoomQueryService.ListRoomOnlineUsers:input_type -> hyapp.room.v1.ListRoomOnlineUsersRequest - 7, // 106: hyapp.room.v1.RoomCommandService.CreateRoom:output_type -> hyapp.room.v1.CreateRoomResponse - 9, // 107: hyapp.room.v1.RoomCommandService.UpdateRoomProfile:output_type -> hyapp.room.v1.UpdateRoomProfileResponse - 11, // 108: hyapp.room.v1.RoomCommandService.JoinRoom:output_type -> hyapp.room.v1.JoinRoomResponse - 13, // 109: hyapp.room.v1.RoomCommandService.RoomHeartbeat:output_type -> hyapp.room.v1.RoomHeartbeatResponse - 15, // 110: hyapp.room.v1.RoomCommandService.LeaveRoom:output_type -> hyapp.room.v1.LeaveRoomResponse - 17, // 111: hyapp.room.v1.RoomCommandService.CloseRoom:output_type -> hyapp.room.v1.CloseRoomResponse - 19, // 112: hyapp.room.v1.RoomCommandService.MicUp:output_type -> hyapp.room.v1.MicUpResponse - 21, // 113: hyapp.room.v1.RoomCommandService.MicDown:output_type -> hyapp.room.v1.MicDownResponse - 23, // 114: hyapp.room.v1.RoomCommandService.ChangeMicSeat:output_type -> hyapp.room.v1.ChangeMicSeatResponse - 25, // 115: hyapp.room.v1.RoomCommandService.ConfirmMicPublishing:output_type -> hyapp.room.v1.ConfirmMicPublishingResponse - 27, // 116: hyapp.room.v1.RoomCommandService.SetMicMute:output_type -> hyapp.room.v1.SetMicMuteResponse - 29, // 117: hyapp.room.v1.RoomCommandService.ApplyRTCEvent:output_type -> hyapp.room.v1.ApplyRTCEventResponse - 31, // 118: hyapp.room.v1.RoomCommandService.SetMicSeatLock:output_type -> hyapp.room.v1.SetMicSeatLockResponse - 33, // 119: hyapp.room.v1.RoomCommandService.SetChatEnabled:output_type -> hyapp.room.v1.SetChatEnabledResponse - 35, // 120: hyapp.room.v1.RoomCommandService.SetRoomAdmin:output_type -> hyapp.room.v1.SetRoomAdminResponse - 37, // 121: hyapp.room.v1.RoomCommandService.MuteUser:output_type -> hyapp.room.v1.MuteUserResponse - 39, // 122: hyapp.room.v1.RoomCommandService.KickUser:output_type -> hyapp.room.v1.KickUserResponse - 41, // 123: hyapp.room.v1.RoomCommandService.UnbanUser:output_type -> hyapp.room.v1.UnbanUserResponse - 43, // 124: hyapp.room.v1.RoomCommandService.SystemEvictUser:output_type -> hyapp.room.v1.SystemEvictUserResponse - 45, // 125: hyapp.room.v1.RoomCommandService.SendGift:output_type -> hyapp.room.v1.SendGiftResponse - 47, // 126: hyapp.room.v1.RoomGuardService.CheckSpeakPermission:output_type -> hyapp.room.v1.CheckSpeakPermissionResponse - 49, // 127: hyapp.room.v1.RoomGuardService.VerifyRoomPresence:output_type -> hyapp.room.v1.VerifyRoomPresenceResponse - 54, // 128: hyapp.room.v1.RoomQueryService.ListRooms:output_type -> hyapp.room.v1.ListRoomsResponse - 54, // 129: hyapp.room.v1.RoomQueryService.ListRoomFeeds:output_type -> hyapp.room.v1.ListRoomsResponse - 56, // 130: hyapp.room.v1.RoomQueryService.GetMyRoom:output_type -> hyapp.room.v1.GetMyRoomResponse - 58, // 131: hyapp.room.v1.RoomQueryService.GetCurrentRoom:output_type -> hyapp.room.v1.GetCurrentRoomResponse - 60, // 132: hyapp.room.v1.RoomQueryService.GetRoomSnapshot:output_type -> hyapp.room.v1.GetRoomSnapshotResponse - 62, // 133: hyapp.room.v1.RoomQueryService.ListRoomOnlineUsers:output_type -> hyapp.room.v1.ListRoomOnlineUsersResponse - 106, // [106:134] is the sub-list for method output_type - 78, // [78:106] is the sub-list for method input_type - 78, // [78:78] is the sub-list for extension type_name - 78, // [78:78] is the sub-list for extension extendee - 0, // [0:78] is the sub-list for field type_name + 0, // 48: hyapp.room.v1.SetRoomPasswordRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 49: hyapp.room.v1.SetRoomPasswordResponse.result:type_name -> hyapp.room.v1.CommandResult + 5, // 50: hyapp.room.v1.SetRoomPasswordResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 51: hyapp.room.v1.SetRoomAdminRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 52: hyapp.room.v1.SetRoomAdminResponse.result:type_name -> hyapp.room.v1.CommandResult + 5, // 53: hyapp.room.v1.SetRoomAdminResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 54: hyapp.room.v1.MuteUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 55: hyapp.room.v1.MuteUserResponse.result:type_name -> hyapp.room.v1.CommandResult + 5, // 56: hyapp.room.v1.MuteUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 57: hyapp.room.v1.KickUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 58: hyapp.room.v1.KickUserResponse.result:type_name -> hyapp.room.v1.CommandResult + 5, // 59: hyapp.room.v1.KickUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 60: hyapp.room.v1.UnbanUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 61: hyapp.room.v1.UnbanUserResponse.result:type_name -> hyapp.room.v1.CommandResult + 5, // 62: hyapp.room.v1.UnbanUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 63: hyapp.room.v1.SystemEvictUserRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 64: hyapp.room.v1.SystemEvictUserResponse.result:type_name -> hyapp.room.v1.CommandResult + 5, // 65: hyapp.room.v1.SystemEvictUserResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 66: hyapp.room.v1.SendGiftRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 1, // 67: hyapp.room.v1.SendGiftResponse.result:type_name -> hyapp.room.v1.CommandResult + 4, // 68: hyapp.room.v1.SendGiftResponse.gift_rank:type_name -> hyapp.room.v1.RankItem + 5, // 69: hyapp.room.v1.SendGiftResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 70: hyapp.room.v1.ListRoomsRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 0, // 71: hyapp.room.v1.ListRoomFeedsRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 54, // 72: hyapp.room.v1.ListRoomFeedsRequest.related_users:type_name -> hyapp.room.v1.RoomFeedRelatedUser + 55, // 73: hyapp.room.v1.ListRoomsResponse.rooms:type_name -> hyapp.room.v1.RoomListItem + 0, // 74: hyapp.room.v1.GetMyRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 55, // 75: hyapp.room.v1.GetMyRoomResponse.room:type_name -> hyapp.room.v1.RoomListItem + 0, // 76: hyapp.room.v1.GetCurrentRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 0, // 77: hyapp.room.v1.GetRoomSnapshotRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 5, // 78: hyapp.room.v1.GetRoomSnapshotResponse.room:type_name -> hyapp.room.v1.RoomSnapshot + 0, // 79: hyapp.room.v1.ListRoomOnlineUsersRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 2, // 80: hyapp.room.v1.ListRoomOnlineUsersResponse.users:type_name -> hyapp.room.v1.RoomUser + 0, // 81: hyapp.room.v1.FollowRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 0, // 82: hyapp.room.v1.UnfollowRoomRequest.meta:type_name -> hyapp.room.v1.RequestMeta + 6, // 83: hyapp.room.v1.RoomCommandService.CreateRoom:input_type -> hyapp.room.v1.CreateRoomRequest + 8, // 84: hyapp.room.v1.RoomCommandService.UpdateRoomProfile:input_type -> hyapp.room.v1.UpdateRoomProfileRequest + 10, // 85: hyapp.room.v1.RoomCommandService.JoinRoom:input_type -> hyapp.room.v1.JoinRoomRequest + 12, // 86: hyapp.room.v1.RoomCommandService.RoomHeartbeat:input_type -> hyapp.room.v1.RoomHeartbeatRequest + 14, // 87: hyapp.room.v1.RoomCommandService.LeaveRoom:input_type -> hyapp.room.v1.LeaveRoomRequest + 16, // 88: hyapp.room.v1.RoomCommandService.CloseRoom:input_type -> hyapp.room.v1.CloseRoomRequest + 18, // 89: hyapp.room.v1.RoomCommandService.MicUp:input_type -> hyapp.room.v1.MicUpRequest + 20, // 90: hyapp.room.v1.RoomCommandService.MicDown:input_type -> hyapp.room.v1.MicDownRequest + 22, // 91: hyapp.room.v1.RoomCommandService.ChangeMicSeat:input_type -> hyapp.room.v1.ChangeMicSeatRequest + 24, // 92: hyapp.room.v1.RoomCommandService.ConfirmMicPublishing:input_type -> hyapp.room.v1.ConfirmMicPublishingRequest + 26, // 93: hyapp.room.v1.RoomCommandService.SetMicMute:input_type -> hyapp.room.v1.SetMicMuteRequest + 28, // 94: hyapp.room.v1.RoomCommandService.ApplyRTCEvent:input_type -> hyapp.room.v1.ApplyRTCEventRequest + 30, // 95: hyapp.room.v1.RoomCommandService.SetMicSeatLock:input_type -> hyapp.room.v1.SetMicSeatLockRequest + 32, // 96: hyapp.room.v1.RoomCommandService.SetChatEnabled:input_type -> hyapp.room.v1.SetChatEnabledRequest + 34, // 97: hyapp.room.v1.RoomCommandService.SetRoomPassword:input_type -> hyapp.room.v1.SetRoomPasswordRequest + 36, // 98: hyapp.room.v1.RoomCommandService.SetRoomAdmin:input_type -> hyapp.room.v1.SetRoomAdminRequest + 38, // 99: hyapp.room.v1.RoomCommandService.MuteUser:input_type -> hyapp.room.v1.MuteUserRequest + 40, // 100: hyapp.room.v1.RoomCommandService.KickUser:input_type -> hyapp.room.v1.KickUserRequest + 42, // 101: hyapp.room.v1.RoomCommandService.UnbanUser:input_type -> hyapp.room.v1.UnbanUserRequest + 44, // 102: hyapp.room.v1.RoomCommandService.SystemEvictUser:input_type -> hyapp.room.v1.SystemEvictUserRequest + 46, // 103: hyapp.room.v1.RoomCommandService.SendGift:input_type -> hyapp.room.v1.SendGiftRequest + 65, // 104: hyapp.room.v1.RoomCommandService.FollowRoom:input_type -> hyapp.room.v1.FollowRoomRequest + 67, // 105: hyapp.room.v1.RoomCommandService.UnfollowRoom:input_type -> hyapp.room.v1.UnfollowRoomRequest + 48, // 106: hyapp.room.v1.RoomGuardService.CheckSpeakPermission:input_type -> hyapp.room.v1.CheckSpeakPermissionRequest + 50, // 107: hyapp.room.v1.RoomGuardService.VerifyRoomPresence:input_type -> hyapp.room.v1.VerifyRoomPresenceRequest + 52, // 108: hyapp.room.v1.RoomQueryService.ListRooms:input_type -> hyapp.room.v1.ListRoomsRequest + 53, // 109: hyapp.room.v1.RoomQueryService.ListRoomFeeds:input_type -> hyapp.room.v1.ListRoomFeedsRequest + 57, // 110: hyapp.room.v1.RoomQueryService.GetMyRoom:input_type -> hyapp.room.v1.GetMyRoomRequest + 59, // 111: hyapp.room.v1.RoomQueryService.GetCurrentRoom:input_type -> hyapp.room.v1.GetCurrentRoomRequest + 61, // 112: hyapp.room.v1.RoomQueryService.GetRoomSnapshot:input_type -> hyapp.room.v1.GetRoomSnapshotRequest + 63, // 113: hyapp.room.v1.RoomQueryService.ListRoomOnlineUsers:input_type -> hyapp.room.v1.ListRoomOnlineUsersRequest + 7, // 114: hyapp.room.v1.RoomCommandService.CreateRoom:output_type -> hyapp.room.v1.CreateRoomResponse + 9, // 115: hyapp.room.v1.RoomCommandService.UpdateRoomProfile:output_type -> hyapp.room.v1.UpdateRoomProfileResponse + 11, // 116: hyapp.room.v1.RoomCommandService.JoinRoom:output_type -> hyapp.room.v1.JoinRoomResponse + 13, // 117: hyapp.room.v1.RoomCommandService.RoomHeartbeat:output_type -> hyapp.room.v1.RoomHeartbeatResponse + 15, // 118: hyapp.room.v1.RoomCommandService.LeaveRoom:output_type -> hyapp.room.v1.LeaveRoomResponse + 17, // 119: hyapp.room.v1.RoomCommandService.CloseRoom:output_type -> hyapp.room.v1.CloseRoomResponse + 19, // 120: hyapp.room.v1.RoomCommandService.MicUp:output_type -> hyapp.room.v1.MicUpResponse + 21, // 121: hyapp.room.v1.RoomCommandService.MicDown:output_type -> hyapp.room.v1.MicDownResponse + 23, // 122: hyapp.room.v1.RoomCommandService.ChangeMicSeat:output_type -> hyapp.room.v1.ChangeMicSeatResponse + 25, // 123: hyapp.room.v1.RoomCommandService.ConfirmMicPublishing:output_type -> hyapp.room.v1.ConfirmMicPublishingResponse + 27, // 124: hyapp.room.v1.RoomCommandService.SetMicMute:output_type -> hyapp.room.v1.SetMicMuteResponse + 29, // 125: hyapp.room.v1.RoomCommandService.ApplyRTCEvent:output_type -> hyapp.room.v1.ApplyRTCEventResponse + 31, // 126: hyapp.room.v1.RoomCommandService.SetMicSeatLock:output_type -> hyapp.room.v1.SetMicSeatLockResponse + 33, // 127: hyapp.room.v1.RoomCommandService.SetChatEnabled:output_type -> hyapp.room.v1.SetChatEnabledResponse + 35, // 128: hyapp.room.v1.RoomCommandService.SetRoomPassword:output_type -> hyapp.room.v1.SetRoomPasswordResponse + 37, // 129: hyapp.room.v1.RoomCommandService.SetRoomAdmin:output_type -> hyapp.room.v1.SetRoomAdminResponse + 39, // 130: hyapp.room.v1.RoomCommandService.MuteUser:output_type -> hyapp.room.v1.MuteUserResponse + 41, // 131: hyapp.room.v1.RoomCommandService.KickUser:output_type -> hyapp.room.v1.KickUserResponse + 43, // 132: hyapp.room.v1.RoomCommandService.UnbanUser:output_type -> hyapp.room.v1.UnbanUserResponse + 45, // 133: hyapp.room.v1.RoomCommandService.SystemEvictUser:output_type -> hyapp.room.v1.SystemEvictUserResponse + 47, // 134: hyapp.room.v1.RoomCommandService.SendGift:output_type -> hyapp.room.v1.SendGiftResponse + 66, // 135: hyapp.room.v1.RoomCommandService.FollowRoom:output_type -> hyapp.room.v1.FollowRoomResponse + 68, // 136: hyapp.room.v1.RoomCommandService.UnfollowRoom:output_type -> hyapp.room.v1.UnfollowRoomResponse + 49, // 137: hyapp.room.v1.RoomGuardService.CheckSpeakPermission:output_type -> hyapp.room.v1.CheckSpeakPermissionResponse + 51, // 138: hyapp.room.v1.RoomGuardService.VerifyRoomPresence:output_type -> hyapp.room.v1.VerifyRoomPresenceResponse + 56, // 139: hyapp.room.v1.RoomQueryService.ListRooms:output_type -> hyapp.room.v1.ListRoomsResponse + 56, // 140: hyapp.room.v1.RoomQueryService.ListRoomFeeds:output_type -> hyapp.room.v1.ListRoomsResponse + 58, // 141: hyapp.room.v1.RoomQueryService.GetMyRoom:output_type -> hyapp.room.v1.GetMyRoomResponse + 60, // 142: hyapp.room.v1.RoomQueryService.GetCurrentRoom:output_type -> hyapp.room.v1.GetCurrentRoomResponse + 62, // 143: hyapp.room.v1.RoomQueryService.GetRoomSnapshot:output_type -> hyapp.room.v1.GetRoomSnapshotResponse + 64, // 144: hyapp.room.v1.RoomQueryService.ListRoomOnlineUsers:output_type -> hyapp.room.v1.ListRoomOnlineUsersResponse + 114, // [114:145] is the sub-list for method output_type + 83, // [83:114] is the sub-list for method input_type + 83, // [83:83] is the sub-list for extension type_name + 83, // [83:83] is the sub-list for extension extendee + 0, // [0:83] is the sub-list for field type_name } func init() { file_proto_room_v1_room_proto_init() } @@ -5503,6 +6159,836 @@ func file_proto_room_v1_room_proto_init() { if File_proto_room_v1_room_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_proto_room_v1_room_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RequestMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*CommandResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*RoomUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*SeatState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*RankItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*RoomSnapshot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*CreateRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*CreateRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRoomProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRoomProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*JoinRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*JoinRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*RoomHeartbeatRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*RoomHeartbeatResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*LeaveRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*LeaveRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*CloseRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*CloseRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*MicUpRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*MicUpResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*MicDownRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*MicDownResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*ChangeMicSeatRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*ChangeMicSeatResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*ConfirmMicPublishingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*ConfirmMicPublishingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*SetMicMuteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*SetMicMuteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ApplyRTCEventRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*ApplyRTCEventResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*SetMicSeatLockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*SetMicSeatLockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*SetChatEnabledRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*SetChatEnabledResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*SetRoomPasswordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*SetRoomPasswordResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*SetRoomAdminRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*SetRoomAdminResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*MuteUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*MuteUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*KickUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[41].Exporter = func(v any, i int) any { + switch v := v.(*KickUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[42].Exporter = func(v any, i int) any { + switch v := v.(*UnbanUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[43].Exporter = func(v any, i int) any { + switch v := v.(*UnbanUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[44].Exporter = func(v any, i int) any { + switch v := v.(*SystemEvictUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*SystemEvictUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*SendGiftRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*SendGiftResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*CheckSpeakPermissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*CheckSpeakPermissionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*VerifyRoomPresenceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*VerifyRoomPresenceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[52].Exporter = func(v any, i int) any { + switch v := v.(*ListRoomsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[53].Exporter = func(v any, i int) any { + switch v := v.(*ListRoomFeedsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[54].Exporter = func(v any, i int) any { + switch v := v.(*RoomFeedRelatedUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[55].Exporter = func(v any, i int) any { + switch v := v.(*RoomListItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[56].Exporter = func(v any, i int) any { + switch v := v.(*ListRoomsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*GetMyRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[58].Exporter = func(v any, i int) any { + switch v := v.(*GetMyRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[59].Exporter = func(v any, i int) any { + switch v := v.(*GetCurrentRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[60].Exporter = func(v any, i int) any { + switch v := v.(*GetCurrentRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[61].Exporter = func(v any, i int) any { + switch v := v.(*GetRoomSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[62].Exporter = func(v any, i int) any { + switch v := v.(*GetRoomSnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[63].Exporter = func(v any, i int) any { + switch v := v.(*ListRoomOnlineUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[64].Exporter = func(v any, i int) any { + switch v := v.(*ListRoomOnlineUsersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[65].Exporter = func(v any, i int) any { + switch v := v.(*FollowRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[66].Exporter = func(v any, i int) any { + switch v := v.(*FollowRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[67].Exporter = func(v any, i int) any { + switch v := v.(*UnfollowRoomRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_room_v1_room_proto_msgTypes[68].Exporter = func(v any, i int) any { + switch v := v.(*UnfollowRoomResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_proto_room_v1_room_proto_msgTypes[8].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ @@ -5510,7 +6996,7 @@ func file_proto_room_v1_room_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_room_v1_room_proto_rawDesc, NumEnums: 0, - NumMessages: 64, + NumMessages: 70, NumExtensions: 0, NumServices: 3, }, diff --git a/api/proto/room/v1/room.proto b/api/proto/room/v1/room.proto index b83ead88..ef373f51 100644 --- a/api/proto/room/v1/room.proto +++ b/api/proto/room/v1/room.proto @@ -80,6 +80,8 @@ message RoomSnapshot { string app_code = 16; string room_short_id = 17; int64 visible_region_id = 18; + // locked 只表达房间是否需要入房密码;具体密码哈希不对外映射到 HTTP JSON。 + bool locked = 19; } // CreateRoomRequest 创建一个新的房间执行单元。 @@ -129,6 +131,8 @@ message UpdateRoomProfileResponse { message JoinRoomRequest { RequestMeta meta = 1; string role = 2; + // password 只用于本次入房校验;room-service 不把明文写入 command log 或快照。 + string password = 3; } // JoinRoomResponse 返回加入后的房间快照。 @@ -295,6 +299,20 @@ message SetChatEnabledResponse { RoomSnapshot room = 2; } +// SetRoomPasswordRequest 设置或清空房间入房密码。 +// locked=true 时 password 必须非空;locked=false 表示清空密码并解除锁房。 +message SetRoomPasswordRequest { + RequestMeta meta = 1; + bool locked = 2; + string password = 3; +} + +// SetRoomPasswordResponse 返回锁房状态变更后的最新房间快照。 +message SetRoomPasswordResponse { + CommandResult result = 1; + RoomSnapshot room = 2; +} + // SetRoomAdminRequest 添加或移除房间管理员。 message SetRoomAdminRequest { RequestMeta meta = 1; @@ -331,6 +349,10 @@ message KickUserRequest { message KickUserResponse { CommandResult result = 1; RoomSnapshot room = 2; + // rtc_kicked 表示 room-service 已通过 TRTC 服务端接口移除目标用户;失败不回滚房间踢人事实。 + bool rtc_kicked = 3; + // rtc_kick_error 仅用于调用方排障和告警,客户端展示仍以统一错误码和房间状态为准。 + string rtc_kick_error = 4; } // UnbanUserRequest 解除房间内 ban,用户仍需重新 JoinRoom。 @@ -429,7 +451,7 @@ message ListRoomsRequest { string query = 7; } -// ListRoomFeedsRequest 查询 Mine 页 visited/friend/following 用户房间流。 +// ListRoomFeedsRequest 查询 Mine 页 visited/friend/following/followed 房间流。 // 它和公共房间发现列表分离,避免把用户关系流误建模成房间全集过滤。 message ListRoomFeedsRequest { RequestMeta meta = 1; @@ -464,6 +486,7 @@ message RoomListItem { int64 visible_region_id = 12; string app_code = 13; string room_short_id = 14; + bool locked = 15; } // ListRoomsResponse 返回一页房间卡片和下一页不透明 cursor。 @@ -520,6 +543,8 @@ message GetRoomSnapshotRequest { message GetRoomSnapshotResponse { RoomSnapshot room = 1; int64 server_time_ms = 2; + // is_followed 表达 viewer 是否已经关注该房间;它来自 room_follows 关系表,不属于 Room Cell 核心快照。 + bool is_followed = 3; } // ListRoomOnlineUsersRequest 分页查询房间在线用户,不让客户端拉完整 RoomSnapshot 做列表分页。 @@ -539,6 +564,34 @@ message ListRoomOnlineUsersResponse { int64 server_time_ms = 5; } +// FollowRoomRequest 建立当前用户对房间的关注关系。 +// 该关系是 room-service 的用户-房间低频关系事实,不进入 Room Cell command log。 +message FollowRoomRequest { + RequestMeta meta = 1; + string room_id = 2; + int64 user_id = 3; +} + +message FollowRoomResponse { + string room_id = 1; + bool followed = 2; + int64 followed_at_ms = 3; + int64 server_time_ms = 4; +} + +// UnfollowRoomRequest 取消当前用户对房间的关注关系;未关注时按幂等成功处理。 +message UnfollowRoomRequest { + RequestMeta meta = 1; + string room_id = 2; + int64 user_id = 3; +} + +message UnfollowRoomResponse { + string room_id = 1; + bool followed = 2; + int64 server_time_ms = 3; +} + // RoomCommandService 承载所有会改变房间状态的命令。 service RoomCommandService { rpc CreateRoom(CreateRoomRequest) returns (CreateRoomResponse); @@ -555,12 +608,15 @@ service RoomCommandService { rpc ApplyRTCEvent(ApplyRTCEventRequest) returns (ApplyRTCEventResponse); rpc SetMicSeatLock(SetMicSeatLockRequest) returns (SetMicSeatLockResponse); rpc SetChatEnabled(SetChatEnabledRequest) returns (SetChatEnabledResponse); + rpc SetRoomPassword(SetRoomPasswordRequest) returns (SetRoomPasswordResponse); rpc SetRoomAdmin(SetRoomAdminRequest) returns (SetRoomAdminResponse); rpc MuteUser(MuteUserRequest) returns (MuteUserResponse); rpc KickUser(KickUserRequest) returns (KickUserResponse); rpc UnbanUser(UnbanUserRequest) returns (UnbanUserResponse); rpc SystemEvictUser(SystemEvictUserRequest) returns (SystemEvictUserResponse); rpc SendGift(SendGiftRequest) returns (SendGiftResponse); + rpc FollowRoom(FollowRoomRequest) returns (FollowRoomResponse); + rpc UnfollowRoom(UnfollowRoomRequest) returns (UnfollowRoomResponse); } // RoomGuardService 提供给腾讯云 IM 回调或 gateway 做实时守卫查询。 diff --git a/api/proto/room/v1/room_grpc.pb.go b/api/proto/room/v1/room_grpc.pb.go index b7af8dd2..8ac23da4 100644 --- a/api/proto/room/v1/room_grpc.pb.go +++ b/api/proto/room/v1/room_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/room/v1/room.proto package roomv1 @@ -33,12 +33,15 @@ const ( RoomCommandService_ApplyRTCEvent_FullMethodName = "/hyapp.room.v1.RoomCommandService/ApplyRTCEvent" RoomCommandService_SetMicSeatLock_FullMethodName = "/hyapp.room.v1.RoomCommandService/SetMicSeatLock" RoomCommandService_SetChatEnabled_FullMethodName = "/hyapp.room.v1.RoomCommandService/SetChatEnabled" + RoomCommandService_SetRoomPassword_FullMethodName = "/hyapp.room.v1.RoomCommandService/SetRoomPassword" RoomCommandService_SetRoomAdmin_FullMethodName = "/hyapp.room.v1.RoomCommandService/SetRoomAdmin" RoomCommandService_MuteUser_FullMethodName = "/hyapp.room.v1.RoomCommandService/MuteUser" RoomCommandService_KickUser_FullMethodName = "/hyapp.room.v1.RoomCommandService/KickUser" RoomCommandService_UnbanUser_FullMethodName = "/hyapp.room.v1.RoomCommandService/UnbanUser" RoomCommandService_SystemEvictUser_FullMethodName = "/hyapp.room.v1.RoomCommandService/SystemEvictUser" RoomCommandService_SendGift_FullMethodName = "/hyapp.room.v1.RoomCommandService/SendGift" + RoomCommandService_FollowRoom_FullMethodName = "/hyapp.room.v1.RoomCommandService/FollowRoom" + RoomCommandService_UnfollowRoom_FullMethodName = "/hyapp.room.v1.RoomCommandService/UnfollowRoom" ) // RoomCommandServiceClient is the client API for RoomCommandService service. @@ -61,12 +64,15 @@ type RoomCommandServiceClient interface { ApplyRTCEvent(ctx context.Context, in *ApplyRTCEventRequest, opts ...grpc.CallOption) (*ApplyRTCEventResponse, error) SetMicSeatLock(ctx context.Context, in *SetMicSeatLockRequest, opts ...grpc.CallOption) (*SetMicSeatLockResponse, error) SetChatEnabled(ctx context.Context, in *SetChatEnabledRequest, opts ...grpc.CallOption) (*SetChatEnabledResponse, error) + SetRoomPassword(ctx context.Context, in *SetRoomPasswordRequest, opts ...grpc.CallOption) (*SetRoomPasswordResponse, error) SetRoomAdmin(ctx context.Context, in *SetRoomAdminRequest, opts ...grpc.CallOption) (*SetRoomAdminResponse, error) MuteUser(ctx context.Context, in *MuteUserRequest, opts ...grpc.CallOption) (*MuteUserResponse, error) KickUser(ctx context.Context, in *KickUserRequest, opts ...grpc.CallOption) (*KickUserResponse, error) UnbanUser(ctx context.Context, in *UnbanUserRequest, opts ...grpc.CallOption) (*UnbanUserResponse, error) SystemEvictUser(ctx context.Context, in *SystemEvictUserRequest, opts ...grpc.CallOption) (*SystemEvictUserResponse, error) SendGift(ctx context.Context, in *SendGiftRequest, opts ...grpc.CallOption) (*SendGiftResponse, error) + FollowRoom(ctx context.Context, in *FollowRoomRequest, opts ...grpc.CallOption) (*FollowRoomResponse, error) + UnfollowRoom(ctx context.Context, in *UnfollowRoomRequest, opts ...grpc.CallOption) (*UnfollowRoomResponse, error) } type roomCommandServiceClient struct { @@ -217,6 +223,16 @@ func (c *roomCommandServiceClient) SetChatEnabled(ctx context.Context, in *SetCh return out, nil } +func (c *roomCommandServiceClient) SetRoomPassword(ctx context.Context, in *SetRoomPasswordRequest, opts ...grpc.CallOption) (*SetRoomPasswordResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetRoomPasswordResponse) + err := c.cc.Invoke(ctx, RoomCommandService_SetRoomPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *roomCommandServiceClient) SetRoomAdmin(ctx context.Context, in *SetRoomAdminRequest, opts ...grpc.CallOption) (*SetRoomAdminResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SetRoomAdminResponse) @@ -277,6 +293,26 @@ func (c *roomCommandServiceClient) SendGift(ctx context.Context, in *SendGiftReq return out, nil } +func (c *roomCommandServiceClient) FollowRoom(ctx context.Context, in *FollowRoomRequest, opts ...grpc.CallOption) (*FollowRoomResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(FollowRoomResponse) + err := c.cc.Invoke(ctx, RoomCommandService_FollowRoom_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *roomCommandServiceClient) UnfollowRoom(ctx context.Context, in *UnfollowRoomRequest, opts ...grpc.CallOption) (*UnfollowRoomResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnfollowRoomResponse) + err := c.cc.Invoke(ctx, RoomCommandService_UnfollowRoom_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // RoomCommandServiceServer is the server API for RoomCommandService service. // All implementations must embed UnimplementedRoomCommandServiceServer // for forward compatibility. @@ -297,12 +333,15 @@ type RoomCommandServiceServer interface { ApplyRTCEvent(context.Context, *ApplyRTCEventRequest) (*ApplyRTCEventResponse, error) SetMicSeatLock(context.Context, *SetMicSeatLockRequest) (*SetMicSeatLockResponse, error) SetChatEnabled(context.Context, *SetChatEnabledRequest) (*SetChatEnabledResponse, error) + SetRoomPassword(context.Context, *SetRoomPasswordRequest) (*SetRoomPasswordResponse, error) SetRoomAdmin(context.Context, *SetRoomAdminRequest) (*SetRoomAdminResponse, error) MuteUser(context.Context, *MuteUserRequest) (*MuteUserResponse, error) KickUser(context.Context, *KickUserRequest) (*KickUserResponse, error) UnbanUser(context.Context, *UnbanUserRequest) (*UnbanUserResponse, error) SystemEvictUser(context.Context, *SystemEvictUserRequest) (*SystemEvictUserResponse, error) SendGift(context.Context, *SendGiftRequest) (*SendGiftResponse, error) + FollowRoom(context.Context, *FollowRoomRequest) (*FollowRoomResponse, error) + UnfollowRoom(context.Context, *UnfollowRoomRequest) (*UnfollowRoomResponse, error) mustEmbedUnimplementedRoomCommandServiceServer() } @@ -355,6 +394,9 @@ func (UnimplementedRoomCommandServiceServer) SetMicSeatLock(context.Context, *Se func (UnimplementedRoomCommandServiceServer) SetChatEnabled(context.Context, *SetChatEnabledRequest) (*SetChatEnabledResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetChatEnabled not implemented") } +func (UnimplementedRoomCommandServiceServer) SetRoomPassword(context.Context, *SetRoomPasswordRequest) (*SetRoomPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetRoomPassword not implemented") +} func (UnimplementedRoomCommandServiceServer) SetRoomAdmin(context.Context, *SetRoomAdminRequest) (*SetRoomAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetRoomAdmin not implemented") } @@ -373,6 +415,12 @@ func (UnimplementedRoomCommandServiceServer) SystemEvictUser(context.Context, *S func (UnimplementedRoomCommandServiceServer) SendGift(context.Context, *SendGiftRequest) (*SendGiftResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendGift not implemented") } +func (UnimplementedRoomCommandServiceServer) FollowRoom(context.Context, *FollowRoomRequest) (*FollowRoomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FollowRoom not implemented") +} +func (UnimplementedRoomCommandServiceServer) UnfollowRoom(context.Context, *UnfollowRoomRequest) (*UnfollowRoomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnfollowRoom not implemented") +} func (UnimplementedRoomCommandServiceServer) mustEmbedUnimplementedRoomCommandServiceServer() {} func (UnimplementedRoomCommandServiceServer) testEmbeddedByValue() {} @@ -646,6 +694,24 @@ func _RoomCommandService_SetChatEnabled_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _RoomCommandService_SetRoomPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRoomPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoomCommandServiceServer).SetRoomPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RoomCommandService_SetRoomPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoomCommandServiceServer).SetRoomPassword(ctx, req.(*SetRoomPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _RoomCommandService_SetRoomAdmin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetRoomAdminRequest) if err := dec(in); err != nil { @@ -754,6 +820,42 @@ func _RoomCommandService_SendGift_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _RoomCommandService_FollowRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FollowRoomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoomCommandServiceServer).FollowRoom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RoomCommandService_FollowRoom_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoomCommandServiceServer).FollowRoom(ctx, req.(*FollowRoomRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RoomCommandService_UnfollowRoom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnfollowRoomRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RoomCommandServiceServer).UnfollowRoom(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RoomCommandService_UnfollowRoom_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RoomCommandServiceServer).UnfollowRoom(ctx, req.(*UnfollowRoomRequest)) + } + return interceptor(ctx, in, info, handler) +} + // RoomCommandService_ServiceDesc is the grpc.ServiceDesc for RoomCommandService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -817,6 +919,10 @@ var RoomCommandService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SetChatEnabled", Handler: _RoomCommandService_SetChatEnabled_Handler, }, + { + MethodName: "SetRoomPassword", + Handler: _RoomCommandService_SetRoomPassword_Handler, + }, { MethodName: "SetRoomAdmin", Handler: _RoomCommandService_SetRoomAdmin_Handler, @@ -841,6 +947,14 @@ var RoomCommandService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendGift", Handler: _RoomCommandService_SendGift_Handler, }, + { + MethodName: "FollowRoom", + Handler: _RoomCommandService_FollowRoom_Handler, + }, + { + MethodName: "UnfollowRoom", + Handler: _RoomCommandService_UnfollowRoom_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/room/v1/room.proto", diff --git a/api/proto/user/v1/auth.pb.go b/api/proto/user/v1/auth.pb.go index 49dd2016..dabd98a8 100644 --- a/api/proto/user/v1/auth.pb.go +++ b/api/proto/user/v1/auth.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/user/v1/auth.proto package userv1 @@ -33,9 +33,11 @@ type LoginPasswordRequest struct { func (x *LoginPasswordRequest) Reset() { *x = LoginPasswordRequest{} - mi := &file_proto_user_v1_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoginPasswordRequest) String() string { @@ -46,7 +48,7 @@ func (*LoginPasswordRequest) ProtoMessage() {} func (x *LoginPasswordRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -112,9 +114,11 @@ type LoginThirdPartyRequest struct { func (x *LoginThirdPartyRequest) Reset() { *x = LoginThirdPartyRequest{} - mi := &file_proto_user_v1_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoginThirdPartyRequest) String() string { @@ -125,7 +129,7 @@ func (*LoginThirdPartyRequest) ProtoMessage() {} func (x *LoginThirdPartyRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -294,9 +298,11 @@ type AuthResponse struct { func (x *AuthResponse) Reset() { *x = AuthResponse{} - mi := &file_proto_user_v1_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AuthResponse) String() string { @@ -307,7 +313,7 @@ func (*AuthResponse) ProtoMessage() {} func (x *AuthResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -363,9 +369,11 @@ type SetPasswordRequest struct { func (x *SetPasswordRequest) Reset() { *x = SetPasswordRequest{} - mi := &file_proto_user_v1_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetPasswordRequest) String() string { @@ -376,7 +384,7 @@ func (*SetPasswordRequest) ProtoMessage() {} func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -423,9 +431,11 @@ type SetPasswordResponse struct { func (x *SetPasswordResponse) Reset() { *x = SetPasswordResponse{} - mi := &file_proto_user_v1_auth_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetPasswordResponse) String() string { @@ -436,7 +446,7 @@ func (*SetPasswordResponse) ProtoMessage() {} func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,9 +480,11 @@ type RefreshTokenRequest struct { func (x *RefreshTokenRequest) Reset() { *x = RefreshTokenRequest{} - mi := &file_proto_user_v1_auth_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RefreshTokenRequest) String() string { @@ -483,7 +495,7 @@ func (*RefreshTokenRequest) ProtoMessage() {} func (x *RefreshTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -523,9 +535,11 @@ type RefreshTokenResponse struct { func (x *RefreshTokenResponse) Reset() { *x = RefreshTokenResponse{} - mi := &file_proto_user_v1_auth_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RefreshTokenResponse) String() string { @@ -536,7 +550,7 @@ func (*RefreshTokenResponse) ProtoMessage() {} func (x *RefreshTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -571,9 +585,11 @@ type LogoutRequest struct { func (x *LogoutRequest) Reset() { *x = LogoutRequest{} - mi := &file_proto_user_v1_auth_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LogoutRequest) String() string { @@ -584,7 +600,7 @@ func (*LogoutRequest) ProtoMessage() {} func (x *LogoutRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -631,9 +647,11 @@ type LogoutResponse struct { func (x *LogoutResponse) Reset() { *x = LogoutResponse{} - mi := &file_proto_user_v1_auth_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LogoutResponse) String() string { @@ -644,7 +662,7 @@ func (*LogoutResponse) ProtoMessage() {} func (x *LogoutResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -682,9 +700,11 @@ type RecordLoginBlockedRequest struct { func (x *RecordLoginBlockedRequest) Reset() { *x = RecordLoginBlockedRequest{} - mi := &file_proto_user_v1_auth_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RecordLoginBlockedRequest) String() string { @@ -695,7 +715,7 @@ func (*RecordLoginBlockedRequest) ProtoMessage() {} func (x *RecordLoginBlockedRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -763,9 +783,11 @@ type RecordLoginBlockedResponse struct { func (x *RecordLoginBlockedResponse) Reset() { *x = RecordLoginBlockedResponse{} - mi := &file_proto_user_v1_auth_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_auth_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RecordLoginBlockedResponse) String() string { @@ -776,7 +798,7 @@ func (*RecordLoginBlockedResponse) ProtoMessage() {} func (x *RecordLoginBlockedResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_auth_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1017,6 +1039,140 @@ func file_proto_user_v1_auth_proto_init() { return } file_proto_user_v1_user_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_user_v1_auth_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*LoginPasswordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*LoginThirdPartyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*AuthResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*SetPasswordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*SetPasswordResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*RefreshTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*RefreshTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*LogoutRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*LogoutResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*RecordLoginBlockedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_auth_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*RecordLoginBlockedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/proto/user/v1/auth_grpc.pb.go b/api/proto/user/v1/auth_grpc.pb.go index 31c77a58..0100fe96 100644 --- a/api/proto/user/v1/auth_grpc.pb.go +++ b/api/proto/user/v1/auth_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/user/v1/auth.proto package userv1 diff --git a/api/proto/user/v1/host.pb.go b/api/proto/user/v1/host.pb.go index 01d186ac..424b7b03 100644 --- a/api/proto/user/v1/host.pb.go +++ b/api/proto/user/v1/host.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/user/v1/host.proto package userv1 @@ -39,9 +39,11 @@ type HostProfile struct { func (x *HostProfile) Reset() { *x = HostProfile{} - mi := &file_proto_user_v1_host_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *HostProfile) String() string { @@ -52,7 +54,7 @@ func (*HostProfile) ProtoMessage() {} func (x *HostProfile) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -151,9 +153,11 @@ type Agency struct { func (x *Agency) Reset() { *x = Agency{} - mi := &file_proto_user_v1_host_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Agency) String() string { @@ -164,7 +168,7 @@ func (*Agency) ProtoMessage() {} func (x *Agency) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -274,9 +278,11 @@ type BDProfile struct { func (x *BDProfile) Reset() { *x = BDProfile{} - mi := &file_proto_user_v1_host_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BDProfile) String() string { @@ -287,7 +293,7 @@ func (*BDProfile) ProtoMessage() {} func (x *BDProfile) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,9 +380,11 @@ type CoinSellerProfile struct { func (x *CoinSellerProfile) Reset() { *x = CoinSellerProfile{} - mi := &file_proto_user_v1_host_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CoinSellerProfile) String() string { @@ -387,7 +395,7 @@ func (*CoinSellerProfile) ProtoMessage() {} func (x *CoinSellerProfile) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,9 +475,11 @@ type UserRoleSummary struct { func (x *UserRoleSummary) Reset() { *x = UserRoleSummary{} - mi := &file_proto_user_v1_host_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserRoleSummary) String() string { @@ -480,7 +490,7 @@ func (*UserRoleSummary) ProtoMessage() {} func (x *UserRoleSummary) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -601,9 +611,11 @@ type AgencyMembership struct { func (x *AgencyMembership) Reset() { *x = AgencyMembership{} - mi := &file_proto_user_v1_host_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AgencyMembership) String() string { @@ -614,7 +626,7 @@ func (*AgencyMembership) ProtoMessage() {} func (x *AgencyMembership) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -734,9 +746,11 @@ type AgencyApplication struct { func (x *AgencyApplication) Reset() { *x = AgencyApplication{} - mi := &file_proto_user_v1_host_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AgencyApplication) String() string { @@ -747,7 +761,7 @@ func (*AgencyApplication) ProtoMessage() {} func (x *AgencyApplication) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -865,9 +879,11 @@ type RoleInvitation struct { func (x *RoleInvitation) Reset() { *x = RoleInvitation{} - mi := &file_proto_user_v1_host_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RoleInvitation) String() string { @@ -878,7 +894,7 @@ func (*RoleInvitation) ProtoMessage() {} func (x *RoleInvitation) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,9 +1034,11 @@ type SearchAgenciesRequest struct { func (x *SearchAgenciesRequest) Reset() { *x = SearchAgenciesRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SearchAgenciesRequest) String() string { @@ -1031,7 +1049,7 @@ func (*SearchAgenciesRequest) ProtoMessage() {} func (x *SearchAgenciesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1084,9 +1102,11 @@ type SearchAgenciesResponse struct { func (x *SearchAgenciesResponse) Reset() { *x = SearchAgenciesResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SearchAgenciesResponse) String() string { @@ -1097,7 +1117,7 @@ func (*SearchAgenciesResponse) ProtoMessage() {} func (x *SearchAgenciesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1132,9 +1152,11 @@ type ApplyToAgencyRequest struct { func (x *ApplyToAgencyRequest) Reset() { *x = ApplyToAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyToAgencyRequest) String() string { @@ -1145,7 +1167,7 @@ func (*ApplyToAgencyRequest) ProtoMessage() {} func (x *ApplyToAgencyRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1198,9 +1220,11 @@ type ApplyToAgencyResponse struct { func (x *ApplyToAgencyResponse) Reset() { *x = ApplyToAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyToAgencyResponse) String() string { @@ -1211,7 +1235,7 @@ func (*ApplyToAgencyResponse) ProtoMessage() {} func (x *ApplyToAgencyResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,9 +1272,11 @@ type ReviewAgencyApplicationRequest struct { func (x *ReviewAgencyApplicationRequest) Reset() { *x = ReviewAgencyApplicationRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ReviewAgencyApplicationRequest) String() string { @@ -1261,7 +1287,7 @@ func (*ReviewAgencyApplicationRequest) ProtoMessage() {} func (x *ReviewAgencyApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1330,9 +1356,11 @@ type ReviewAgencyApplicationResponse struct { func (x *ReviewAgencyApplicationResponse) Reset() { *x = ReviewAgencyApplicationResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ReviewAgencyApplicationResponse) String() string { @@ -1343,7 +1371,7 @@ func (*ReviewAgencyApplicationResponse) ProtoMessage() {} func (x *ReviewAgencyApplicationResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1394,9 +1422,11 @@ type KickAgencyHostRequest struct { func (x *KickAgencyHostRequest) Reset() { *x = KickAgencyHostRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KickAgencyHostRequest) String() string { @@ -1407,7 +1437,7 @@ func (*KickAgencyHostRequest) ProtoMessage() {} func (x *KickAgencyHostRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1475,9 +1505,11 @@ type KickAgencyHostResponse struct { func (x *KickAgencyHostResponse) Reset() { *x = KickAgencyHostResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KickAgencyHostResponse) String() string { @@ -1488,7 +1520,7 @@ func (*KickAgencyHostResponse) ProtoMessage() {} func (x *KickAgencyHostResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1531,9 +1563,11 @@ type InviteAgencyRequest struct { func (x *InviteAgencyRequest) Reset() { *x = InviteAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InviteAgencyRequest) String() string { @@ -1544,7 +1578,7 @@ func (*InviteAgencyRequest) ProtoMessage() {} func (x *InviteAgencyRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1604,9 +1638,11 @@ type InviteAgencyResponse struct { func (x *InviteAgencyResponse) Reset() { *x = InviteAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InviteAgencyResponse) String() string { @@ -1617,7 +1653,7 @@ func (*InviteAgencyResponse) ProtoMessage() {} func (x *InviteAgencyResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,9 +1688,11 @@ type InviteBDRequest struct { func (x *InviteBDRequest) Reset() { *x = InviteBDRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InviteBDRequest) String() string { @@ -1665,7 +1703,7 @@ func (*InviteBDRequest) ProtoMessage() {} func (x *InviteBDRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1718,9 +1756,11 @@ type InviteBDResponse struct { func (x *InviteBDResponse) Reset() { *x = InviteBDResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InviteBDResponse) String() string { @@ -1731,7 +1771,7 @@ func (*InviteBDResponse) ProtoMessage() {} func (x *InviteBDResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1768,9 +1808,11 @@ type ProcessRoleInvitationRequest struct { func (x *ProcessRoleInvitationRequest) Reset() { *x = ProcessRoleInvitationRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProcessRoleInvitationRequest) String() string { @@ -1781,7 +1823,7 @@ func (*ProcessRoleInvitationRequest) ProtoMessage() {} func (x *ProcessRoleInvitationRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1852,9 +1894,11 @@ type ProcessRoleInvitationResponse struct { func (x *ProcessRoleInvitationResponse) Reset() { *x = ProcessRoleInvitationResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProcessRoleInvitationResponse) String() string { @@ -1865,7 +1909,7 @@ func (*ProcessRoleInvitationResponse) ProtoMessage() {} func (x *ProcessRoleInvitationResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1926,9 +1970,11 @@ type GetHostProfileRequest struct { func (x *GetHostProfileRequest) Reset() { *x = GetHostProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetHostProfileRequest) String() string { @@ -1939,7 +1985,7 @@ func (*GetHostProfileRequest) ProtoMessage() {} func (x *GetHostProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1978,9 +2024,11 @@ type GetHostProfileResponse struct { func (x *GetHostProfileResponse) Reset() { *x = GetHostProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetHostProfileResponse) String() string { @@ -1991,7 +2039,7 @@ func (*GetHostProfileResponse) ProtoMessage() {} func (x *GetHostProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2024,9 +2072,11 @@ type GetBDProfileRequest struct { func (x *GetBDProfileRequest) Reset() { *x = GetBDProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBDProfileRequest) String() string { @@ -2037,7 +2087,7 @@ func (*GetBDProfileRequest) ProtoMessage() {} func (x *GetBDProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2076,9 +2126,11 @@ type GetBDProfileResponse struct { func (x *GetBDProfileResponse) Reset() { *x = GetBDProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBDProfileResponse) String() string { @@ -2089,7 +2141,7 @@ func (*GetBDProfileResponse) ProtoMessage() {} func (x *GetBDProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2122,9 +2174,11 @@ type GetCoinSellerProfileRequest struct { func (x *GetCoinSellerProfileRequest) Reset() { *x = GetCoinSellerProfileRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetCoinSellerProfileRequest) String() string { @@ -2135,7 +2189,7 @@ func (*GetCoinSellerProfileRequest) ProtoMessage() {} func (x *GetCoinSellerProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2174,9 +2228,11 @@ type GetCoinSellerProfileResponse struct { func (x *GetCoinSellerProfileResponse) Reset() { *x = GetCoinSellerProfileResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetCoinSellerProfileResponse) String() string { @@ -2187,7 +2243,7 @@ func (*GetCoinSellerProfileResponse) ProtoMessage() {} func (x *GetCoinSellerProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2220,9 +2276,11 @@ type GetUserRoleSummaryRequest struct { func (x *GetUserRoleSummaryRequest) Reset() { *x = GetUserRoleSummaryRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserRoleSummaryRequest) String() string { @@ -2233,7 +2291,7 @@ func (*GetUserRoleSummaryRequest) ProtoMessage() {} func (x *GetUserRoleSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2272,9 +2330,11 @@ type GetUserRoleSummaryResponse struct { func (x *GetUserRoleSummaryResponse) Reset() { *x = GetUserRoleSummaryResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserRoleSummaryResponse) String() string { @@ -2285,7 +2345,7 @@ func (*GetUserRoleSummaryResponse) ProtoMessage() {} func (x *GetUserRoleSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2319,9 +2379,11 @@ type CheckBusinessCapabilityRequest struct { func (x *CheckBusinessCapabilityRequest) Reset() { *x = CheckBusinessCapabilityRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CheckBusinessCapabilityRequest) String() string { @@ -2332,7 +2394,7 @@ func (*CheckBusinessCapabilityRequest) ProtoMessage() {} func (x *CheckBusinessCapabilityRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2379,9 +2441,11 @@ type CheckBusinessCapabilityResponse struct { func (x *CheckBusinessCapabilityResponse) Reset() { *x = CheckBusinessCapabilityResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CheckBusinessCapabilityResponse) String() string { @@ -2392,7 +2456,7 @@ func (*CheckBusinessCapabilityResponse) ProtoMessage() {} func (x *CheckBusinessCapabilityResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2433,9 +2497,11 @@ type GetAgencyMembersRequest struct { func (x *GetAgencyMembersRequest) Reset() { *x = GetAgencyMembersRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAgencyMembersRequest) String() string { @@ -2446,7 +2512,7 @@ func (*GetAgencyMembersRequest) ProtoMessage() {} func (x *GetAgencyMembersRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2492,9 +2558,11 @@ type GetAgencyMembersResponse struct { func (x *GetAgencyMembersResponse) Reset() { *x = GetAgencyMembersResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAgencyMembersResponse) String() string { @@ -2505,7 +2573,7 @@ func (*GetAgencyMembersResponse) ProtoMessage() {} func (x *GetAgencyMembersResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2539,9 +2607,11 @@ type GetAgencyApplicationsRequest struct { func (x *GetAgencyApplicationsRequest) Reset() { *x = GetAgencyApplicationsRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAgencyApplicationsRequest) String() string { @@ -2552,7 +2622,7 @@ func (*GetAgencyApplicationsRequest) ProtoMessage() {} func (x *GetAgencyApplicationsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2598,9 +2668,11 @@ type GetAgencyApplicationsResponse struct { func (x *GetAgencyApplicationsResponse) Reset() { *x = GetAgencyApplicationsResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetAgencyApplicationsResponse) String() string { @@ -2611,7 +2683,7 @@ func (*GetAgencyApplicationsResponse) ProtoMessage() {} func (x *GetAgencyApplicationsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2648,9 +2720,11 @@ type CreateBDLeaderRequest struct { func (x *CreateBDLeaderRequest) Reset() { *x = CreateBDLeaderRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateBDLeaderRequest) String() string { @@ -2661,7 +2735,7 @@ func (*CreateBDLeaderRequest) ProtoMessage() {} func (x *CreateBDLeaderRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2728,9 +2802,11 @@ type CreateBDLeaderResponse struct { func (x *CreateBDLeaderResponse) Reset() { *x = CreateBDLeaderResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateBDLeaderResponse) String() string { @@ -2741,7 +2817,7 @@ func (*CreateBDLeaderResponse) ProtoMessage() {} func (x *CreateBDLeaderResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2778,9 +2854,11 @@ type CreateBDRequest struct { func (x *CreateBDRequest) Reset() { *x = CreateBDRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateBDRequest) String() string { @@ -2791,7 +2869,7 @@ func (*CreateBDRequest) ProtoMessage() {} func (x *CreateBDRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2858,9 +2936,11 @@ type CreateBDResponse struct { func (x *CreateBDResponse) Reset() { *x = CreateBDResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateBDResponse) String() string { @@ -2871,7 +2951,7 @@ func (*CreateBDResponse) ProtoMessage() {} func (x *CreateBDResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2908,9 +2988,11 @@ type SetBDStatusRequest struct { func (x *SetBDStatusRequest) Reset() { *x = SetBDStatusRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetBDStatusRequest) String() string { @@ -2921,7 +3003,7 @@ func (*SetBDStatusRequest) ProtoMessage() {} func (x *SetBDStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2988,9 +3070,11 @@ type SetBDStatusResponse struct { func (x *SetBDStatusResponse) Reset() { *x = SetBDStatusResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetBDStatusResponse) String() string { @@ -3001,7 +3085,7 @@ func (*SetBDStatusResponse) ProtoMessage() {} func (x *SetBDStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3037,9 +3121,11 @@ type CreateCoinSellerRequest struct { func (x *CreateCoinSellerRequest) Reset() { *x = CreateCoinSellerRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateCoinSellerRequest) String() string { @@ -3050,7 +3136,7 @@ func (*CreateCoinSellerRequest) ProtoMessage() {} func (x *CreateCoinSellerRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3110,9 +3196,11 @@ type CreateCoinSellerResponse struct { func (x *CreateCoinSellerResponse) Reset() { *x = CreateCoinSellerResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateCoinSellerResponse) String() string { @@ -3123,7 +3211,7 @@ func (*CreateCoinSellerResponse) ProtoMessage() {} func (x *CreateCoinSellerResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3160,9 +3248,11 @@ type SetCoinSellerStatusRequest struct { func (x *SetCoinSellerStatusRequest) Reset() { *x = SetCoinSellerStatusRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetCoinSellerStatusRequest) String() string { @@ -3173,7 +3263,7 @@ func (*SetCoinSellerStatusRequest) ProtoMessage() {} func (x *SetCoinSellerStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3240,9 +3330,11 @@ type SetCoinSellerStatusResponse struct { func (x *SetCoinSellerStatusResponse) Reset() { *x = SetCoinSellerStatusResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetCoinSellerStatusResponse) String() string { @@ -3253,7 +3345,7 @@ func (*SetCoinSellerStatusResponse) ProtoMessage() {} func (x *SetCoinSellerStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3293,9 +3385,11 @@ type CreateAgencyRequest struct { func (x *CreateAgencyRequest) Reset() { *x = CreateAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateAgencyRequest) String() string { @@ -3306,7 +3400,7 @@ func (*CreateAgencyRequest) ProtoMessage() {} func (x *CreateAgencyRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3396,9 +3490,11 @@ type CreateAgencyResponse struct { func (x *CreateAgencyResponse) Reset() { *x = CreateAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateAgencyResponse) String() string { @@ -3409,7 +3505,7 @@ func (*CreateAgencyResponse) ProtoMessage() {} func (x *CreateAgencyResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3459,9 +3555,11 @@ type CloseAgencyRequest struct { func (x *CloseAgencyRequest) Reset() { *x = CloseAgencyRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CloseAgencyRequest) String() string { @@ -3472,7 +3570,7 @@ func (*CloseAgencyRequest) ProtoMessage() {} func (x *CloseAgencyRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3532,9 +3630,11 @@ type CloseAgencyResponse struct { func (x *CloseAgencyResponse) Reset() { *x = CloseAgencyResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CloseAgencyResponse) String() string { @@ -3545,7 +3645,7 @@ func (*CloseAgencyResponse) ProtoMessage() {} func (x *CloseAgencyResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3582,9 +3682,11 @@ type SetAgencyJoinEnabledRequest struct { func (x *SetAgencyJoinEnabledRequest) Reset() { *x = SetAgencyJoinEnabledRequest{} - mi := &file_proto_user_v1_host_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetAgencyJoinEnabledRequest) String() string { @@ -3595,7 +3697,7 @@ func (*SetAgencyJoinEnabledRequest) ProtoMessage() {} func (x *SetAgencyJoinEnabledRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3662,9 +3764,11 @@ type SetAgencyJoinEnabledResponse struct { func (x *SetAgencyJoinEnabledResponse) Reset() { *x = SetAgencyJoinEnabledResponse{} - mi := &file_proto_user_v1_host_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_host_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetAgencyJoinEnabledResponse) String() string { @@ -3675,7 +3779,7 @@ func (*SetAgencyJoinEnabledResponse) ProtoMessage() {} func (x *SetAgencyJoinEnabledResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_host_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4637,6 +4741,632 @@ func file_proto_user_v1_host_proto_init() { return } file_proto_user_v1_user_proto_init() + if !protoimpl.UnsafeEnabled { + file_proto_user_v1_host_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*HostProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*Agency); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*BDProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CoinSellerProfile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*UserRoleSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*AgencyMembership); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*AgencyApplication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*RoleInvitation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*SearchAgenciesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*SearchAgenciesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ApplyToAgencyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ApplyToAgencyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ReviewAgencyApplicationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*ReviewAgencyApplicationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*KickAgencyHostRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*KickAgencyHostResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*InviteAgencyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*InviteAgencyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*InviteBDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*InviteBDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*ProcessRoleInvitationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*ProcessRoleInvitationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*GetHostProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*GetHostProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GetBDProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*GetBDProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*GetCoinSellerProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*GetCoinSellerProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*GetUserRoleSummaryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*GetUserRoleSummaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*CheckBusinessCapabilityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*CheckBusinessCapabilityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*GetAgencyMembersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*GetAgencyMembersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*GetAgencyApplicationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*GetAgencyApplicationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*CreateBDLeaderRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*CreateBDLeaderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*CreateBDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*CreateBDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*SetBDStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[41].Exporter = func(v any, i int) any { + switch v := v.(*SetBDStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[42].Exporter = func(v any, i int) any { + switch v := v.(*CreateCoinSellerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[43].Exporter = func(v any, i int) any { + switch v := v.(*CreateCoinSellerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[44].Exporter = func(v any, i int) any { + switch v := v.(*SetCoinSellerStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*SetCoinSellerStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*CreateAgencyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*CreateAgencyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*CloseAgencyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*CloseAgencyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*SetAgencyJoinEnabledRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_host_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*SetAgencyJoinEnabledResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/api/proto/user/v1/host_grpc.pb.go b/api/proto/user/v1/host_grpc.pb.go index 4f507c9d..fffe0b16 100644 --- a/api/proto/user/v1/host_grpc.pb.go +++ b/api/proto/user/v1/host_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/user/v1/host.proto package userv1 diff --git a/api/proto/user/v1/user.pb.go b/api/proto/user/v1/user.pb.go index babcf7b9..b9cdf8ec 100644 --- a/api/proto/user/v1/user.pb.go +++ b/api/proto/user/v1/user.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/user/v1/user.proto package userv1 @@ -96,9 +96,11 @@ type RequestMeta struct { func (x *RequestMeta) Reset() { *x = RequestMeta{} - mi := &file_proto_user_v1_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RequestMeta) String() string { @@ -109,7 +111,7 @@ func (*RequestMeta) ProtoMessage() {} func (x *RequestMeta) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -233,9 +235,11 @@ type App struct { func (x *App) Reset() { *x = App{} - mi := &file_proto_user_v1_user_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *App) String() string { @@ -246,7 +250,7 @@ func (*App) ProtoMessage() {} func (x *App) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -331,9 +335,11 @@ type ResolveAppRequest struct { func (x *ResolveAppRequest) Reset() { *x = ResolveAppRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResolveAppRequest) String() string { @@ -344,7 +350,7 @@ func (*ResolveAppRequest) ProtoMessage() {} func (x *ResolveAppRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -397,9 +403,11 @@ type ResolveAppResponse struct { func (x *ResolveAppResponse) Reset() { *x = ResolveAppResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResolveAppResponse) String() string { @@ -410,7 +418,7 @@ func (*ResolveAppResponse) ProtoMessage() {} func (x *ResolveAppResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,9 +478,11 @@ type User struct { func (x *User) Reset() { *x = User{} - mi := &file_proto_user_v1_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *User) String() string { @@ -483,7 +493,7 @@ func (*User) ProtoMessage() {} func (x *User) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,9 +719,11 @@ type InviteOverview struct { func (x *InviteOverview) Reset() { *x = InviteOverview{} - mi := &file_proto_user_v1_user_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InviteOverview) String() string { @@ -722,7 +734,7 @@ func (*InviteOverview) ProtoMessage() {} func (x *InviteOverview) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -785,9 +797,11 @@ type InviteBinding struct { func (x *InviteBinding) Reset() { *x = InviteBinding{} - mi := &file_proto_user_v1_user_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *InviteBinding) String() string { @@ -798,7 +812,7 @@ func (*InviteBinding) ProtoMessage() {} func (x *InviteBinding) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,9 +866,11 @@ type UserMicLifetimeStats struct { func (x *UserMicLifetimeStats) Reset() { *x = UserMicLifetimeStats{} - mi := &file_proto_user_v1_user_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserMicLifetimeStats) String() string { @@ -865,7 +881,7 @@ func (*UserMicLifetimeStats) ProtoMessage() {} func (x *UserMicLifetimeStats) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -948,9 +964,11 @@ type GetUserMicLifetimeStatsRequest struct { func (x *GetUserMicLifetimeStatsRequest) Reset() { *x = GetUserMicLifetimeStatsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserMicLifetimeStatsRequest) String() string { @@ -961,7 +979,7 @@ func (*GetUserMicLifetimeStatsRequest) ProtoMessage() {} func (x *GetUserMicLifetimeStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1000,9 +1018,11 @@ type GetUserMicLifetimeStatsResponse struct { func (x *GetUserMicLifetimeStatsResponse) Reset() { *x = GetUserMicLifetimeStatsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserMicLifetimeStatsResponse) String() string { @@ -1013,7 +1033,7 @@ func (*GetUserMicLifetimeStatsResponse) ProtoMessage() {} func (x *GetUserMicLifetimeStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,9 +1072,11 @@ type CronBatchRequest struct { func (x *CronBatchRequest) Reset() { *x = CronBatchRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CronBatchRequest) String() string { @@ -1065,7 +1087,7 @@ func (*CronBatchRequest) ProtoMessage() {} func (x *CronBatchRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1144,9 +1166,11 @@ type CronBatchResponse struct { func (x *CronBatchResponse) Reset() { *x = CronBatchResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CronBatchResponse) String() string { @@ -1157,7 +1181,7 @@ func (*CronBatchResponse) ProtoMessage() {} func (x *CronBatchResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1230,9 +1254,11 @@ type AuthToken struct { func (x *AuthToken) Reset() { *x = AuthToken{} - mi := &file_proto_user_v1_user_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AuthToken) String() string { @@ -1243,7 +1269,7 @@ func (*AuthToken) ProtoMessage() {} func (x *AuthToken) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1361,9 +1387,11 @@ type GetUserRequest struct { func (x *GetUserRequest) Reset() { *x = GetUserRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserRequest) String() string { @@ -1374,7 +1402,7 @@ func (*GetUserRequest) ProtoMessage() {} func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1414,9 +1442,11 @@ type GetUserResponse struct { func (x *GetUserResponse) Reset() { *x = GetUserResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserResponse) String() string { @@ -1427,7 +1457,7 @@ func (*GetUserResponse) ProtoMessage() {} func (x *GetUserResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1463,9 +1493,11 @@ type BusinessUserLookupRequest struct { func (x *BusinessUserLookupRequest) Reset() { *x = BusinessUserLookupRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BusinessUserLookupRequest) String() string { @@ -1476,7 +1508,7 @@ func (*BusinessUserLookupRequest) ProtoMessage() {} func (x *BusinessUserLookupRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1543,9 +1575,11 @@ type BusinessUserLookupItem struct { func (x *BusinessUserLookupItem) Reset() { *x = BusinessUserLookupItem{} - mi := &file_proto_user_v1_user_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BusinessUserLookupItem) String() string { @@ -1556,7 +1590,7 @@ func (*BusinessUserLookupItem) ProtoMessage() {} func (x *BusinessUserLookupItem) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1637,9 +1671,11 @@ type BusinessUserLookupResponse struct { func (x *BusinessUserLookupResponse) Reset() { *x = BusinessUserLookupResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BusinessUserLookupResponse) String() string { @@ -1650,7 +1686,7 @@ func (*BusinessUserLookupResponse) ProtoMessage() {} func (x *BusinessUserLookupResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1688,9 +1724,11 @@ type UserProfileStats struct { func (x *UserProfileStats) Reset() { *x = UserProfileStats{} - mi := &file_proto_user_v1_user_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserProfileStats) String() string { @@ -1701,7 +1739,7 @@ func (*UserProfileStats) ProtoMessage() {} func (x *UserProfileStats) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1770,9 +1808,11 @@ type GetMyProfileStatsRequest struct { func (x *GetMyProfileStatsRequest) Reset() { *x = GetMyProfileStatsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetMyProfileStatsRequest) String() string { @@ -1783,7 +1823,7 @@ func (*GetMyProfileStatsRequest) ProtoMessage() {} func (x *GetMyProfileStatsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1822,9 +1862,11 @@ type GetMyProfileStatsResponse struct { func (x *GetMyProfileStatsResponse) Reset() { *x = GetMyProfileStatsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetMyProfileStatsResponse) String() string { @@ -1835,7 +1877,7 @@ func (*GetMyProfileStatsResponse) ProtoMessage() {} func (x *GetMyProfileStatsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1869,9 +1911,11 @@ type RecordProfileVisitRequest struct { func (x *RecordProfileVisitRequest) Reset() { *x = RecordProfileVisitRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RecordProfileVisitRequest) String() string { @@ -1882,7 +1926,7 @@ func (*RecordProfileVisitRequest) ProtoMessage() {} func (x *RecordProfileVisitRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1929,9 +1973,11 @@ type RecordProfileVisitResponse struct { func (x *RecordProfileVisitResponse) Reset() { *x = RecordProfileVisitResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RecordProfileVisitResponse) String() string { @@ -1942,7 +1988,7 @@ func (*RecordProfileVisitResponse) ProtoMessage() {} func (x *RecordProfileVisitResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1984,9 +2030,11 @@ type ProfileVisitRecord struct { func (x *ProfileVisitRecord) Reset() { *x = ProfileVisitRecord{} - mi := &file_proto_user_v1_user_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ProfileVisitRecord) String() string { @@ -1997,7 +2045,7 @@ func (*ProfileVisitRecord) ProtoMessage() {} func (x *ProfileVisitRecord) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2053,9 +2101,11 @@ type ListProfileVisitorsRequest struct { func (x *ListProfileVisitorsRequest) Reset() { *x = ListProfileVisitorsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListProfileVisitorsRequest) String() string { @@ -2066,7 +2116,7 @@ func (*ListProfileVisitorsRequest) ProtoMessage() {} func (x *ListProfileVisitorsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2120,9 +2170,11 @@ type ListProfileVisitorsResponse struct { func (x *ListProfileVisitorsResponse) Reset() { *x = ListProfileVisitorsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListProfileVisitorsResponse) String() string { @@ -2133,7 +2185,7 @@ func (*ListProfileVisitorsResponse) ProtoMessage() {} func (x *ListProfileVisitorsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2174,9 +2226,11 @@ type FollowUserRequest struct { func (x *FollowUserRequest) Reset() { *x = FollowUserRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FollowUserRequest) String() string { @@ -2187,7 +2241,7 @@ func (*FollowUserRequest) ProtoMessage() {} func (x *FollowUserRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2234,9 +2288,11 @@ type FollowUserResponse struct { func (x *FollowUserResponse) Reset() { *x = FollowUserResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FollowUserResponse) String() string { @@ -2247,7 +2303,7 @@ func (*FollowUserResponse) ProtoMessage() {} func (x *FollowUserResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2288,9 +2344,11 @@ type UnfollowUserRequest struct { func (x *UnfollowUserRequest) Reset() { *x = UnfollowUserRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnfollowUserRequest) String() string { @@ -2301,7 +2359,7 @@ func (*UnfollowUserRequest) ProtoMessage() {} func (x *UnfollowUserRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2348,9 +2406,11 @@ type UnfollowUserResponse struct { func (x *UnfollowUserResponse) Reset() { *x = UnfollowUserResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UnfollowUserResponse) String() string { @@ -2361,7 +2421,7 @@ func (*UnfollowUserResponse) ProtoMessage() {} func (x *UnfollowUserResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2402,9 +2462,11 @@ type FollowRecord struct { func (x *FollowRecord) Reset() { *x = FollowRecord{} - mi := &file_proto_user_v1_user_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FollowRecord) String() string { @@ -2415,7 +2477,7 @@ func (*FollowRecord) ProtoMessage() {} func (x *FollowRecord) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2467,9 +2529,11 @@ type ListFollowingRequest struct { func (x *ListFollowingRequest) Reset() { *x = ListFollowingRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListFollowingRequest) String() string { @@ -2480,7 +2544,7 @@ func (*ListFollowingRequest) ProtoMessage() {} func (x *ListFollowingRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2548,9 +2612,11 @@ type ListFollowingResponse struct { func (x *ListFollowingResponse) Reset() { *x = ListFollowingResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListFollowingResponse) String() string { @@ -2561,7 +2627,7 @@ func (*ListFollowingResponse) ProtoMessage() {} func (x *ListFollowingResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2602,9 +2668,11 @@ type ApplyFriendRequest struct { func (x *ApplyFriendRequest) Reset() { *x = ApplyFriendRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyFriendRequest) String() string { @@ -2615,7 +2683,7 @@ func (*ApplyFriendRequest) ProtoMessage() {} func (x *ApplyFriendRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2662,9 +2730,11 @@ type ApplyFriendResponse struct { func (x *ApplyFriendResponse) Reset() { *x = ApplyFriendResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyFriendResponse) String() string { @@ -2675,7 +2745,7 @@ func (*ApplyFriendResponse) ProtoMessage() {} func (x *ApplyFriendResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2716,9 +2786,11 @@ type AcceptFriendApplicationRequest struct { func (x *AcceptFriendApplicationRequest) Reset() { *x = AcceptFriendApplicationRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AcceptFriendApplicationRequest) String() string { @@ -2729,7 +2801,7 @@ func (*AcceptFriendApplicationRequest) ProtoMessage() {} func (x *AcceptFriendApplicationRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2775,9 +2847,11 @@ type AcceptFriendApplicationResponse struct { func (x *AcceptFriendApplicationResponse) Reset() { *x = AcceptFriendApplicationResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AcceptFriendApplicationResponse) String() string { @@ -2788,7 +2862,7 @@ func (*AcceptFriendApplicationResponse) ProtoMessage() {} func (x *AcceptFriendApplicationResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2822,9 +2896,11 @@ type DeleteFriendRequest struct { func (x *DeleteFriendRequest) Reset() { *x = DeleteFriendRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteFriendRequest) String() string { @@ -2835,7 +2911,7 @@ func (*DeleteFriendRequest) ProtoMessage() {} func (x *DeleteFriendRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2881,9 +2957,11 @@ type DeleteFriendResponse struct { func (x *DeleteFriendResponse) Reset() { *x = DeleteFriendResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteFriendResponse) String() string { @@ -2894,7 +2972,7 @@ func (*DeleteFriendResponse) ProtoMessage() {} func (x *DeleteFriendResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2928,9 +3006,11 @@ type FriendRecord struct { func (x *FriendRecord) Reset() { *x = FriendRecord{} - mi := &file_proto_user_v1_user_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FriendRecord) String() string { @@ -2941,7 +3021,7 @@ func (*FriendRecord) ProtoMessage() {} func (x *FriendRecord) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2993,9 +3073,11 @@ type ListFriendsRequest struct { func (x *ListFriendsRequest) Reset() { *x = ListFriendsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListFriendsRequest) String() string { @@ -3006,7 +3088,7 @@ func (*ListFriendsRequest) ProtoMessage() {} func (x *ListFriendsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3074,9 +3156,11 @@ type ListFriendsResponse struct { func (x *ListFriendsResponse) Reset() { *x = ListFriendsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListFriendsResponse) String() string { @@ -3087,7 +3171,7 @@ func (*ListFriendsResponse) ProtoMessage() {} func (x *ListFriendsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3130,9 +3214,11 @@ type FriendApplication struct { func (x *FriendApplication) Reset() { *x = FriendApplication{} - mi := &file_proto_user_v1_user_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *FriendApplication) String() string { @@ -3143,7 +3229,7 @@ func (*FriendApplication) ProtoMessage() {} func (x *FriendApplication) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3207,9 +3293,11 @@ type ListFriendApplicationsRequest struct { func (x *ListFriendApplicationsRequest) Reset() { *x = ListFriendApplicationsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListFriendApplicationsRequest) String() string { @@ -3220,7 +3308,7 @@ func (*ListFriendApplicationsRequest) ProtoMessage() {} func (x *ListFriendApplicationsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3281,9 +3369,11 @@ type ListFriendApplicationsResponse struct { func (x *ListFriendApplicationsResponse) Reset() { *x = ListFriendApplicationsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListFriendApplicationsResponse) String() string { @@ -3294,7 +3384,7 @@ func (*ListFriendApplicationsResponse) ProtoMessage() {} func (x *ListFriendApplicationsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3335,9 +3425,11 @@ type BatchGetUsersRequest struct { func (x *BatchGetUsersRequest) Reset() { *x = BatchGetUsersRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BatchGetUsersRequest) String() string { @@ -3348,7 +3440,7 @@ func (*BatchGetUsersRequest) ProtoMessage() {} func (x *BatchGetUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3388,9 +3480,11 @@ type BatchGetUsersResponse struct { func (x *BatchGetUsersResponse) Reset() { *x = BatchGetUsersResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BatchGetUsersResponse) String() string { @@ -3401,7 +3495,7 @@ func (*BatchGetUsersResponse) ProtoMessage() {} func (x *BatchGetUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3439,9 +3533,11 @@ type ListUserIDsRequest struct { func (x *ListUserIDsRequest) Reset() { *x = ListUserIDsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListUserIDsRequest) String() string { @@ -3452,7 +3548,7 @@ func (*ListUserIDsRequest) ProtoMessage() {} func (x *ListUserIDsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3522,9 +3618,11 @@ type ListUserIDsResponse struct { func (x *ListUserIDsResponse) Reset() { *x = ListUserIDsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListUserIDsResponse) String() string { @@ -3535,7 +3633,7 @@ func (*ListUserIDsResponse) ProtoMessage() {} func (x *ListUserIDsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3587,9 +3685,11 @@ type UpdateUserProfileRequest struct { func (x *UpdateUserProfileRequest) Reset() { *x = UpdateUserProfileRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateUserProfileRequest) String() string { @@ -3600,7 +3700,7 @@ func (*UpdateUserProfileRequest) ProtoMessage() {} func (x *UpdateUserProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3668,9 +3768,11 @@ type UpdateUserProfileResponse struct { func (x *UpdateUserProfileResponse) Reset() { *x = UpdateUserProfileResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateUserProfileResponse) String() string { @@ -3681,7 +3783,7 @@ func (*UpdateUserProfileResponse) ProtoMessage() {} func (x *UpdateUserProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3716,9 +3818,11 @@ type ChangeUserCountryRequest struct { func (x *ChangeUserCountryRequest) Reset() { *x = ChangeUserCountryRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChangeUserCountryRequest) String() string { @@ -3729,7 +3833,7 @@ func (*ChangeUserCountryRequest) ProtoMessage() {} func (x *ChangeUserCountryRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3780,9 +3884,11 @@ type ChangeUserCountryResponse struct { func (x *ChangeUserCountryResponse) Reset() { *x = ChangeUserCountryResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChangeUserCountryResponse) String() string { @@ -3793,7 +3899,7 @@ func (*ChangeUserCountryResponse) ProtoMessage() {} func (x *ChangeUserCountryResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3861,9 +3967,11 @@ type SetUserStatusRequest struct { func (x *SetUserStatusRequest) Reset() { *x = SetUserStatusRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetUserStatusRequest) String() string { @@ -3874,7 +3982,7 @@ func (*SetUserStatusRequest) ProtoMessage() {} func (x *SetUserStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3953,9 +4061,11 @@ type SetUserStatusResponse struct { func (x *SetUserStatusResponse) Reset() { *x = SetUserStatusResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetUserStatusResponse) String() string { @@ -3966,7 +4076,7 @@ func (*SetUserStatusResponse) ProtoMessage() {} func (x *SetUserStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4075,9 +4185,11 @@ type CompleteOnboardingRequest struct { func (x *CompleteOnboardingRequest) Reset() { *x = CompleteOnboardingRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CompleteOnboardingRequest) String() string { @@ -4088,7 +4200,7 @@ func (*CompleteOnboardingRequest) ProtoMessage() {} func (x *CompleteOnboardingRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4168,9 +4280,11 @@ type CompleteOnboardingResponse struct { func (x *CompleteOnboardingResponse) Reset() { *x = CompleteOnboardingResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CompleteOnboardingResponse) String() string { @@ -4181,7 +4295,7 @@ func (*CompleteOnboardingResponse) ProtoMessage() {} func (x *CompleteOnboardingResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[56] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4258,9 +4372,11 @@ type BindPushTokenRequest struct { func (x *BindPushTokenRequest) Reset() { *x = BindPushTokenRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BindPushTokenRequest) String() string { @@ -4271,7 +4387,7 @@ func (*BindPushTokenRequest) ProtoMessage() {} func (x *BindPushTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[57] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4360,9 +4476,11 @@ type BindPushTokenResponse struct { func (x *BindPushTokenResponse) Reset() { *x = BindPushTokenResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *BindPushTokenResponse) String() string { @@ -4373,7 +4491,7 @@ func (*BindPushTokenResponse) ProtoMessage() {} func (x *BindPushTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[58] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4417,9 +4535,11 @@ type DeletePushTokenRequest struct { func (x *DeletePushTokenRequest) Reset() { *x = DeletePushTokenRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePushTokenRequest) String() string { @@ -4430,7 +4550,7 @@ func (*DeletePushTokenRequest) ProtoMessage() {} func (x *DeletePushTokenRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[59] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4484,9 +4604,11 @@ type DeletePushTokenResponse struct { func (x *DeletePushTokenResponse) Reset() { *x = DeletePushTokenResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePushTokenResponse) String() string { @@ -4497,7 +4619,7 @@ func (*DeletePushTokenResponse) ProtoMessage() {} func (x *DeletePushTokenResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[60] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4549,9 +4671,11 @@ type Country struct { func (x *Country) Reset() { *x = Country{} - mi := &file_proto_user_v1_user_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Country) String() string { @@ -4562,7 +4686,7 @@ func (*Country) ProtoMessage() {} func (x *Country) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[61] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4687,9 +4811,11 @@ type Region struct { func (x *Region) Reset() { *x = Region{} - mi := &file_proto_user_v1_user_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Region) String() string { @@ -4700,7 +4826,7 @@ func (*Region) ProtoMessage() {} func (x *Region) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[62] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4789,9 +4915,11 @@ type ListCountriesRequest struct { func (x *ListCountriesRequest) Reset() { *x = ListCountriesRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListCountriesRequest) String() string { @@ -4802,7 +4930,7 @@ func (*ListCountriesRequest) ProtoMessage() {} func (x *ListCountriesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[63] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4841,9 +4969,11 @@ type ListCountriesResponse struct { func (x *ListCountriesResponse) Reset() { *x = ListCountriesResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListCountriesResponse) String() string { @@ -4854,7 +4984,7 @@ func (*ListCountriesResponse) ProtoMessage() {} func (x *ListCountriesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[64] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4896,9 +5026,11 @@ type UpdateCountryRequest struct { func (x *UpdateCountryRequest) Reset() { *x = UpdateCountryRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateCountryRequest) String() string { @@ -4909,7 +5041,7 @@ func (*UpdateCountryRequest) ProtoMessage() {} func (x *UpdateCountryRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[65] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5004,9 +5136,11 @@ type CountryResponse struct { func (x *CountryResponse) Reset() { *x = CountryResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CountryResponse) String() string { @@ -5017,7 +5151,7 @@ func (*CountryResponse) ProtoMessage() {} func (x *CountryResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[66] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5049,9 +5183,11 @@ type ListRegistrationCountriesRequest struct { func (x *ListRegistrationCountriesRequest) Reset() { *x = ListRegistrationCountriesRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRegistrationCountriesRequest) String() string { @@ -5062,7 +5198,7 @@ func (*ListRegistrationCountriesRequest) ProtoMessage() {} func (x *ListRegistrationCountriesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[67] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5094,9 +5230,11 @@ type ListRegistrationCountriesResponse struct { func (x *ListRegistrationCountriesResponse) Reset() { *x = ListRegistrationCountriesResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRegistrationCountriesResponse) String() string { @@ -5107,7 +5245,7 @@ func (*ListRegistrationCountriesResponse) ProtoMessage() {} func (x *ListRegistrationCountriesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[68] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5140,9 +5278,11 @@ type ListRegionsRequest struct { func (x *ListRegionsRequest) Reset() { *x = ListRegionsRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRegionsRequest) String() string { @@ -5153,7 +5293,7 @@ func (*ListRegionsRequest) ProtoMessage() {} func (x *ListRegionsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[69] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5192,9 +5332,11 @@ type ListRegionsResponse struct { func (x *ListRegionsResponse) Reset() { *x = ListRegionsResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRegionsResponse) String() string { @@ -5205,7 +5347,7 @@ func (*ListRegionsResponse) ProtoMessage() {} func (x *ListRegionsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[70] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5238,9 +5380,11 @@ type GetRegionRequest struct { func (x *GetRegionRequest) Reset() { *x = GetRegionRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRegionRequest) String() string { @@ -5251,7 +5395,7 @@ func (*GetRegionRequest) ProtoMessage() {} func (x *GetRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[71] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5296,9 +5440,11 @@ type UpdateRegionRequest struct { func (x *UpdateRegionRequest) Reset() { *x = UpdateRegionRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateRegionRequest) String() string { @@ -5309,7 +5455,7 @@ func (*UpdateRegionRequest) ProtoMessage() {} func (x *UpdateRegionRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[72] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5379,9 +5525,11 @@ type ReplaceRegionCountriesRequest struct { func (x *ReplaceRegionCountriesRequest) Reset() { *x = ReplaceRegionCountriesRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ReplaceRegionCountriesRequest) String() string { @@ -5392,7 +5540,7 @@ func (*ReplaceRegionCountriesRequest) ProtoMessage() {} func (x *ReplaceRegionCountriesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[73] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5445,9 +5593,11 @@ type RegionResponse struct { func (x *RegionResponse) Reset() { *x = RegionResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RegionResponse) String() string { @@ -5458,7 +5608,7 @@ func (*RegionResponse) ProtoMessage() {} func (x *RegionResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[74] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5497,9 +5647,11 @@ type UserIdentity struct { func (x *UserIdentity) Reset() { *x = UserIdentity{} - mi := &file_proto_user_v1_user_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserIdentity) String() string { @@ -5510,7 +5662,7 @@ func (*UserIdentity) ProtoMessage() {} func (x *UserIdentity) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[75] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5586,9 +5738,11 @@ type GetUserIdentityRequest struct { func (x *GetUserIdentityRequest) Reset() { *x = GetUserIdentityRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserIdentityRequest) String() string { @@ -5599,7 +5753,7 @@ func (*GetUserIdentityRequest) ProtoMessage() {} func (x *GetUserIdentityRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[76] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5639,9 +5793,11 @@ type GetUserIdentityResponse struct { func (x *GetUserIdentityResponse) Reset() { *x = GetUserIdentityResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserIdentityResponse) String() string { @@ -5652,7 +5808,7 @@ func (*GetUserIdentityResponse) ProtoMessage() {} func (x *GetUserIdentityResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[77] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5686,9 +5842,11 @@ type ResolveDisplayUserIDRequest struct { func (x *ResolveDisplayUserIDRequest) Reset() { *x = ResolveDisplayUserIDRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResolveDisplayUserIDRequest) String() string { @@ -5699,7 +5857,7 @@ func (*ResolveDisplayUserIDRequest) ProtoMessage() {} func (x *ResolveDisplayUserIDRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[78] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5739,9 +5897,11 @@ type ResolveDisplayUserIDResponse struct { func (x *ResolveDisplayUserIDResponse) Reset() { *x = ResolveDisplayUserIDResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResolveDisplayUserIDResponse) String() string { @@ -5752,7 +5912,7 @@ func (*ResolveDisplayUserIDResponse) ProtoMessage() {} func (x *ResolveDisplayUserIDResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[79] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5789,9 +5949,11 @@ type ChangeDisplayUserIDRequest struct { func (x *ChangeDisplayUserIDRequest) Reset() { *x = ChangeDisplayUserIDRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChangeDisplayUserIDRequest) String() string { @@ -5802,7 +5964,7 @@ func (*ChangeDisplayUserIDRequest) ProtoMessage() {} func (x *ChangeDisplayUserIDRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[80] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5863,9 +6025,11 @@ type ChangeDisplayUserIDResponse struct { func (x *ChangeDisplayUserIDResponse) Reset() { *x = ChangeDisplayUserIDResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ChangeDisplayUserIDResponse) String() string { @@ -5876,7 +6040,7 @@ func (*ChangeDisplayUserIDResponse) ProtoMessage() {} func (x *ChangeDisplayUserIDResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[81] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5913,9 +6077,11 @@ type ApplyPrettyDisplayUserIDRequest struct { func (x *ApplyPrettyDisplayUserIDRequest) Reset() { *x = ApplyPrettyDisplayUserIDRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyPrettyDisplayUserIDRequest) String() string { @@ -5926,7 +6092,7 @@ func (*ApplyPrettyDisplayUserIDRequest) ProtoMessage() {} func (x *ApplyPrettyDisplayUserIDRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[82] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5988,9 +6154,11 @@ type ApplyPrettyDisplayUserIDResponse struct { func (x *ApplyPrettyDisplayUserIDResponse) Reset() { *x = ApplyPrettyDisplayUserIDResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyPrettyDisplayUserIDResponse) String() string { @@ -6001,7 +6169,7 @@ func (*ApplyPrettyDisplayUserIDResponse) ProtoMessage() {} func (x *ApplyPrettyDisplayUserIDResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[83] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6043,9 +6211,11 @@ type ExpirePrettyDisplayUserIDRequest struct { func (x *ExpirePrettyDisplayUserIDRequest) Reset() { *x = ExpirePrettyDisplayUserIDRequest{} - mi := &file_proto_user_v1_user_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExpirePrettyDisplayUserIDRequest) String() string { @@ -6056,7 +6226,7 @@ func (*ExpirePrettyDisplayUserIDRequest) ProtoMessage() {} func (x *ExpirePrettyDisplayUserIDRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[84] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6103,9 +6273,11 @@ type ExpirePrettyDisplayUserIDResponse struct { func (x *ExpirePrettyDisplayUserIDResponse) Reset() { *x = ExpirePrettyDisplayUserIDResponse{} - mi := &file_proto_user_v1_user_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_user_v1_user_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExpirePrettyDisplayUserIDResponse) String() string { @@ -6116,7 +6288,7 @@ func (*ExpirePrettyDisplayUserIDResponse) ProtoMessage() {} func (x *ExpirePrettyDisplayUserIDResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_user_v1_user_proto_msgTypes[85] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7642,6 +7814,1040 @@ func file_proto_user_v1_user_proto_init() { if File_proto_user_v1_user_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_proto_user_v1_user_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RequestMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*App); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ResolveAppRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ResolveAppResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*InviteOverview); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*InviteBinding); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*UserMicLifetimeStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetUserMicLifetimeStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetUserMicLifetimeStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*CronBatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*CronBatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*AuthToken); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*GetUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GetUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*BusinessUserLookupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*BusinessUserLookupItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*BusinessUserLookupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*UserProfileStats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*GetMyProfileStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*GetMyProfileStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*RecordProfileVisitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*RecordProfileVisitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*ProfileVisitRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*ListProfileVisitorsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*ListProfileVisitorsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*FollowUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*FollowUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*UnfollowUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*UnfollowUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*FollowRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*ListFollowingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*ListFollowingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*ApplyFriendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*ApplyFriendResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*AcceptFriendApplicationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*AcceptFriendApplicationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*DeleteFriendRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*DeleteFriendResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*FriendRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*ListFriendsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[41].Exporter = func(v any, i int) any { + switch v := v.(*ListFriendsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[42].Exporter = func(v any, i int) any { + switch v := v.(*FriendApplication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[43].Exporter = func(v any, i int) any { + switch v := v.(*ListFriendApplicationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[44].Exporter = func(v any, i int) any { + switch v := v.(*ListFriendApplicationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*BatchGetUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*BatchGetUsersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*ListUserIDsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*ListUserIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*UpdateUserProfileRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*UpdateUserProfileResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*ChangeUserCountryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[52].Exporter = func(v any, i int) any { + switch v := v.(*ChangeUserCountryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[53].Exporter = func(v any, i int) any { + switch v := v.(*SetUserStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[54].Exporter = func(v any, i int) any { + switch v := v.(*SetUserStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[55].Exporter = func(v any, i int) any { + switch v := v.(*CompleteOnboardingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[56].Exporter = func(v any, i int) any { + switch v := v.(*CompleteOnboardingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*BindPushTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[58].Exporter = func(v any, i int) any { + switch v := v.(*BindPushTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[59].Exporter = func(v any, i int) any { + switch v := v.(*DeletePushTokenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[60].Exporter = func(v any, i int) any { + switch v := v.(*DeletePushTokenResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[61].Exporter = func(v any, i int) any { + switch v := v.(*Country); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[62].Exporter = func(v any, i int) any { + switch v := v.(*Region); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[63].Exporter = func(v any, i int) any { + switch v := v.(*ListCountriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[64].Exporter = func(v any, i int) any { + switch v := v.(*ListCountriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[65].Exporter = func(v any, i int) any { + switch v := v.(*UpdateCountryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[66].Exporter = func(v any, i int) any { + switch v := v.(*CountryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[67].Exporter = func(v any, i int) any { + switch v := v.(*ListRegistrationCountriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[68].Exporter = func(v any, i int) any { + switch v := v.(*ListRegistrationCountriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[69].Exporter = func(v any, i int) any { + switch v := v.(*ListRegionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[70].Exporter = func(v any, i int) any { + switch v := v.(*ListRegionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[71].Exporter = func(v any, i int) any { + switch v := v.(*GetRegionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[72].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRegionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[73].Exporter = func(v any, i int) any { + switch v := v.(*ReplaceRegionCountriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[74].Exporter = func(v any, i int) any { + switch v := v.(*RegionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[75].Exporter = func(v any, i int) any { + switch v := v.(*UserIdentity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[76].Exporter = func(v any, i int) any { + switch v := v.(*GetUserIdentityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[77].Exporter = func(v any, i int) any { + switch v := v.(*GetUserIdentityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[78].Exporter = func(v any, i int) any { + switch v := v.(*ResolveDisplayUserIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[79].Exporter = func(v any, i int) any { + switch v := v.(*ResolveDisplayUserIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[80].Exporter = func(v any, i int) any { + switch v := v.(*ChangeDisplayUserIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[81].Exporter = func(v any, i int) any { + switch v := v.(*ChangeDisplayUserIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[82].Exporter = func(v any, i int) any { + switch v := v.(*ApplyPrettyDisplayUserIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[83].Exporter = func(v any, i int) any { + switch v := v.(*ApplyPrettyDisplayUserIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[84].Exporter = func(v any, i int) any { + switch v := v.(*ExpirePrettyDisplayUserIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_user_v1_user_proto_msgTypes[85].Exporter = func(v any, i int) any { + switch v := v.(*ExpirePrettyDisplayUserIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_proto_user_v1_user_proto_msgTypes[49].OneofWrappers = []any{} file_proto_user_v1_user_proto_msgTypes[63].OneofWrappers = []any{} type x struct{} diff --git a/api/proto/user/v1/user_grpc.pb.go b/api/proto/user/v1/user_grpc.pb.go index 5c8369b9..e4bbf851 100644 --- a/api/proto/user/v1/user_grpc.pb.go +++ b/api/proto/user/v1/user_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/user/v1/user.proto package userv1 diff --git a/api/proto/wallet/v1/wallet.pb.go b/api/proto/wallet/v1/wallet.pb.go index 6ddeb3f2..890d2d4c 100644 --- a/api/proto/wallet/v1/wallet.pb.go +++ b/api/proto/wallet/v1/wallet.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.1 -// protoc v5.29.3 +// protoc-gen-go v1.34.2 +// protoc v5.29.2 // source: proto/wallet/v1/wallet.proto package walletv1 @@ -41,9 +41,11 @@ type DebitGiftRequest struct { func (x *DebitGiftRequest) Reset() { *x = DebitGiftRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DebitGiftRequest) String() string { @@ -54,7 +56,7 @@ func (*DebitGiftRequest) ProtoMessage() {} func (x *DebitGiftRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,9 +154,11 @@ type DebitGiftResponse struct { func (x *DebitGiftResponse) Reset() { *x = DebitGiftResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DebitGiftResponse) String() string { @@ -165,7 +169,7 @@ func (*DebitGiftResponse) ProtoMessage() {} func (x *DebitGiftResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -258,9 +262,11 @@ type AssetBalance struct { func (x *AssetBalance) Reset() { *x = AssetBalance{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AssetBalance) String() string { @@ -271,7 +277,7 @@ func (*AssetBalance) ProtoMessage() {} func (x *AssetBalance) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -335,9 +341,11 @@ type GetBalancesRequest struct { func (x *GetBalancesRequest) Reset() { *x = GetBalancesRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBalancesRequest) String() string { @@ -348,7 +356,7 @@ func (*GetBalancesRequest) ProtoMessage() {} func (x *GetBalancesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -401,9 +409,11 @@ type GetBalancesResponse struct { func (x *GetBalancesResponse) Reset() { *x = GetBalancesResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetBalancesResponse) String() string { @@ -414,7 +424,7 @@ func (*GetBalancesResponse) ProtoMessage() {} func (x *GetBalancesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -454,9 +464,11 @@ type AdminCreditAssetRequest struct { func (x *AdminCreditAssetRequest) Reset() { *x = AdminCreditAssetRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AdminCreditAssetRequest) String() string { @@ -467,7 +479,7 @@ func (*AdminCreditAssetRequest) ProtoMessage() {} func (x *AdminCreditAssetRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -549,9 +561,11 @@ type AdminCreditAssetResponse struct { func (x *AdminCreditAssetResponse) Reset() { *x = AdminCreditAssetResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AdminCreditAssetResponse) String() string { @@ -562,7 +576,7 @@ func (*AdminCreditAssetResponse) ProtoMessage() {} func (x *AdminCreditAssetResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -612,9 +626,11 @@ type AdminCreditCoinSellerStockRequest struct { func (x *AdminCreditCoinSellerStockRequest) Reset() { *x = AdminCreditCoinSellerStockRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AdminCreditCoinSellerStockRequest) String() string { @@ -625,7 +641,7 @@ func (*AdminCreditCoinSellerStockRequest) ProtoMessage() {} func (x *AdminCreditCoinSellerStockRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -735,9 +751,11 @@ type AdminCreditCoinSellerStockResponse struct { func (x *AdminCreditCoinSellerStockResponse) Reset() { *x = AdminCreditCoinSellerStockResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AdminCreditCoinSellerStockResponse) String() string { @@ -748,7 +766,7 @@ func (*AdminCreditCoinSellerStockResponse) ProtoMessage() {} func (x *AdminCreditCoinSellerStockResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -845,9 +863,11 @@ type TransferCoinFromSellerRequest struct { func (x *TransferCoinFromSellerRequest) Reset() { *x = TransferCoinFromSellerRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TransferCoinFromSellerRequest) String() string { @@ -858,7 +878,7 @@ func (*TransferCoinFromSellerRequest) ProtoMessage() {} func (x *TransferCoinFromSellerRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -949,9 +969,11 @@ type TransferCoinFromSellerResponse struct { func (x *TransferCoinFromSellerResponse) Reset() { *x = TransferCoinFromSellerResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TransferCoinFromSellerResponse) String() string { @@ -962,7 +984,7 @@ func (*TransferCoinFromSellerResponse) ProtoMessage() {} func (x *TransferCoinFromSellerResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1078,9 +1100,11 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Resource) String() string { @@ -1091,7 +1115,7 @@ func (*Resource) ProtoMessage() {} func (x *Resource) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1274,9 +1298,11 @@ type ResourceGroupItem struct { func (x *ResourceGroupItem) Reset() { *x = ResourceGroupItem{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGroupItem) String() string { @@ -1287,7 +1313,7 @@ func (*ResourceGroupItem) ProtoMessage() {} func (x *ResourceGroupItem) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1407,9 +1433,11 @@ type ResourceGroup struct { func (x *ResourceGroup) Reset() { *x = ResourceGroup{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGroup) String() string { @@ -1420,7 +1448,7 @@ func (*ResourceGroup) ProtoMessage() {} func (x *ResourceGroup) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1550,9 +1578,11 @@ type GiftConfig struct { func (x *GiftConfig) Reset() { *x = GiftConfig{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GiftConfig) String() string { @@ -1563,7 +1593,7 @@ func (*GiftConfig) ProtoMessage() {} func (x *GiftConfig) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1754,9 +1784,11 @@ type UserResourceEntitlement struct { func (x *UserResourceEntitlement) Reset() { *x = UserResourceEntitlement{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserResourceEntitlement) String() string { @@ -1767,7 +1799,7 @@ func (*UserResourceEntitlement) ProtoMessage() {} func (x *UserResourceEntitlement) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1892,9 +1924,11 @@ type ResourceGrantItem struct { func (x *ResourceGrantItem) Reset() { *x = ResourceGrantItem{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGrantItem) String() string { @@ -1905,7 +1939,7 @@ func (*ResourceGrantItem) ProtoMessage() {} func (x *ResourceGrantItem) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2012,9 +2046,11 @@ type ResourceGrant struct { func (x *ResourceGrant) Reset() { *x = ResourceGrant{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGrant) String() string { @@ -2025,7 +2061,7 @@ func (*ResourceGrant) ProtoMessage() {} func (x *ResourceGrant) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2147,9 +2183,11 @@ type ResourceGroupItemInput struct { func (x *ResourceGroupItemInput) Reset() { *x = ResourceGroupItemInput{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGroupItemInput) String() string { @@ -2160,7 +2198,7 @@ func (*ResourceGroupItemInput) ProtoMessage() {} func (x *ResourceGroupItemInput) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2242,9 +2280,11 @@ type ListResourcesRequest struct { func (x *ListResourcesRequest) Reset() { *x = ListResourcesRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListResourcesRequest) String() string { @@ -2255,7 +2295,7 @@ func (*ListResourcesRequest) ProtoMessage() {} func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2344,9 +2384,11 @@ type ListResourcesResponse struct { func (x *ListResourcesResponse) Reset() { *x = ListResourcesResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListResourcesResponse) String() string { @@ -2357,7 +2399,7 @@ func (*ListResourcesResponse) ProtoMessage() {} func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2398,9 +2440,11 @@ type GetResourceRequest struct { func (x *GetResourceRequest) Reset() { *x = GetResourceRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetResourceRequest) String() string { @@ -2411,7 +2455,7 @@ func (*GetResourceRequest) ProtoMessage() {} func (x *GetResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2457,9 +2501,11 @@ type GetResourceResponse struct { func (x *GetResourceResponse) Reset() { *x = GetResourceResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetResourceResponse) String() string { @@ -2470,7 +2516,7 @@ func (*GetResourceResponse) ProtoMessage() {} func (x *GetResourceResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2519,9 +2565,11 @@ type CreateResourceRequest struct { func (x *CreateResourceRequest) Reset() { *x = CreateResourceRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateResourceRequest) String() string { @@ -2532,7 +2580,7 @@ func (*CreateResourceRequest) ProtoMessage() {} func (x *CreateResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2701,9 +2749,11 @@ type UpdateResourceRequest struct { func (x *UpdateResourceRequest) Reset() { *x = UpdateResourceRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateResourceRequest) String() string { @@ -2714,7 +2764,7 @@ func (*UpdateResourceRequest) ProtoMessage() {} func (x *UpdateResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2876,9 +2926,11 @@ type SetResourceStatusRequest struct { func (x *SetResourceStatusRequest) Reset() { *x = SetResourceStatusRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetResourceStatusRequest) String() string { @@ -2889,7 +2941,7 @@ func (*SetResourceStatusRequest) ProtoMessage() {} func (x *SetResourceStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2949,9 +3001,11 @@ type ResourceResponse struct { func (x *ResourceResponse) Reset() { *x = ResourceResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceResponse) String() string { @@ -2962,7 +3016,7 @@ func (*ResourceResponse) ProtoMessage() {} func (x *ResourceResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3000,9 +3054,11 @@ type ListResourceGroupsRequest struct { func (x *ListResourceGroupsRequest) Reset() { *x = ListResourceGroupsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListResourceGroupsRequest) String() string { @@ -3013,7 +3069,7 @@ func (*ListResourceGroupsRequest) ProtoMessage() {} func (x *ListResourceGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3088,9 +3144,11 @@ type ListResourceGroupsResponse struct { func (x *ListResourceGroupsResponse) Reset() { *x = ListResourceGroupsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListResourceGroupsResponse) String() string { @@ -3101,7 +3159,7 @@ func (*ListResourceGroupsResponse) ProtoMessage() {} func (x *ListResourceGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3142,9 +3200,11 @@ type GetResourceGroupRequest struct { func (x *GetResourceGroupRequest) Reset() { *x = GetResourceGroupRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetResourceGroupRequest) String() string { @@ -3155,7 +3215,7 @@ func (*GetResourceGroupRequest) ProtoMessage() {} func (x *GetResourceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3201,9 +3261,11 @@ type GetResourceGroupResponse struct { func (x *GetResourceGroupResponse) Reset() { *x = GetResourceGroupResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetResourceGroupResponse) String() string { @@ -3214,7 +3276,7 @@ func (*GetResourceGroupResponse) ProtoMessage() {} func (x *GetResourceGroupResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3254,9 +3316,11 @@ type CreateResourceGroupRequest struct { func (x *CreateResourceGroupRequest) Reset() { *x = CreateResourceGroupRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateResourceGroupRequest) String() string { @@ -3267,7 +3331,7 @@ func (*CreateResourceGroupRequest) ProtoMessage() {} func (x *CreateResourceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3364,9 +3428,11 @@ type UpdateResourceGroupRequest struct { func (x *UpdateResourceGroupRequest) Reset() { *x = UpdateResourceGroupRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateResourceGroupRequest) String() string { @@ -3377,7 +3443,7 @@ func (*UpdateResourceGroupRequest) ProtoMessage() {} func (x *UpdateResourceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3476,9 +3542,11 @@ type SetResourceGroupStatusRequest struct { func (x *SetResourceGroupStatusRequest) Reset() { *x = SetResourceGroupStatusRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetResourceGroupStatusRequest) String() string { @@ -3489,7 +3557,7 @@ func (*SetResourceGroupStatusRequest) ProtoMessage() {} func (x *SetResourceGroupStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3549,9 +3617,11 @@ type ResourceGroupResponse struct { func (x *ResourceGroupResponse) Reset() { *x = ResourceGroupResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGroupResponse) String() string { @@ -3562,7 +3632,7 @@ func (*ResourceGroupResponse) ProtoMessage() {} func (x *ResourceGroupResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3602,9 +3672,11 @@ type ListGiftConfigsRequest struct { func (x *ListGiftConfigsRequest) Reset() { *x = ListGiftConfigsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListGiftConfigsRequest) String() string { @@ -3615,7 +3687,7 @@ func (*ListGiftConfigsRequest) ProtoMessage() {} func (x *ListGiftConfigsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3704,9 +3776,11 @@ type ListGiftConfigsResponse struct { func (x *ListGiftConfigsResponse) Reset() { *x = ListGiftConfigsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListGiftConfigsResponse) String() string { @@ -3717,7 +3791,7 @@ func (*ListGiftConfigsResponse) ProtoMessage() {} func (x *ListGiftConfigsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[36] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3775,9 +3849,11 @@ type CreateGiftConfigRequest struct { func (x *CreateGiftConfigRequest) Reset() { *x = CreateGiftConfigRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateGiftConfigRequest) String() string { @@ -3788,7 +3864,7 @@ func (*CreateGiftConfigRequest) ProtoMessage() {} func (x *CreateGiftConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[37] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3972,9 +4048,11 @@ type UpdateGiftConfigRequest struct { func (x *UpdateGiftConfigRequest) Reset() { *x = UpdateGiftConfigRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateGiftConfigRequest) String() string { @@ -3985,7 +4063,7 @@ func (*UpdateGiftConfigRequest) ProtoMessage() {} func (x *UpdateGiftConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[38] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4154,9 +4232,11 @@ type SetGiftConfigStatusRequest struct { func (x *SetGiftConfigStatusRequest) Reset() { *x = SetGiftConfigStatusRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetGiftConfigStatusRequest) String() string { @@ -4167,7 +4247,7 @@ func (*SetGiftConfigStatusRequest) ProtoMessage() {} func (x *SetGiftConfigStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[39] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4227,9 +4307,11 @@ type GiftConfigResponse struct { func (x *GiftConfigResponse) Reset() { *x = GiftConfigResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GiftConfigResponse) String() string { @@ -4240,7 +4322,7 @@ func (*GiftConfigResponse) ProtoMessage() {} func (x *GiftConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[40] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4280,9 +4362,11 @@ type GrantResourceRequest struct { func (x *GrantResourceRequest) Reset() { *x = GrantResourceRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GrantResourceRequest) String() string { @@ -4293,7 +4377,7 @@ func (*GrantResourceRequest) ProtoMessage() {} func (x *GrantResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[41] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4387,9 +4471,11 @@ type GrantResourceGroupRequest struct { func (x *GrantResourceGroupRequest) Reset() { *x = GrantResourceGroupRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GrantResourceGroupRequest) String() string { @@ -4400,7 +4486,7 @@ func (*GrantResourceGroupRequest) ProtoMessage() {} func (x *GrantResourceGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[42] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4474,9 +4560,11 @@ type ResourceGrantResponse struct { func (x *ResourceGrantResponse) Reset() { *x = ResourceGrantResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ResourceGrantResponse) String() string { @@ -4487,7 +4575,7 @@ func (*ResourceGrantResponse) ProtoMessage() {} func (x *ResourceGrantResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[43] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4523,9 +4611,11 @@ type ListUserResourcesRequest struct { func (x *ListUserResourcesRequest) Reset() { *x = ListUserResourcesRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListUserResourcesRequest) String() string { @@ -4536,7 +4626,7 @@ func (*ListUserResourcesRequest) ProtoMessage() {} func (x *ListUserResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[44] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4596,9 +4686,11 @@ type ListUserResourcesResponse struct { func (x *ListUserResourcesResponse) Reset() { *x = ListUserResourcesResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListUserResourcesResponse) String() string { @@ -4609,7 +4701,7 @@ func (*ListUserResourcesResponse) ProtoMessage() {} func (x *ListUserResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[45] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4645,9 +4737,11 @@ type EquipUserResourceRequest struct { func (x *EquipUserResourceRequest) Reset() { *x = EquipUserResourceRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EquipUserResourceRequest) String() string { @@ -4658,7 +4752,7 @@ func (*EquipUserResourceRequest) ProtoMessage() {} func (x *EquipUserResourceRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[46] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4718,9 +4812,11 @@ type EquipUserResourceResponse struct { func (x *EquipUserResourceResponse) Reset() { *x = EquipUserResourceResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *EquipUserResourceResponse) String() string { @@ -4731,7 +4827,7 @@ func (*EquipUserResourceResponse) ProtoMessage() {} func (x *EquipUserResourceResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[47] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4768,9 +4864,11 @@ type ListResourceGrantsRequest struct { func (x *ListResourceGrantsRequest) Reset() { *x = ListResourceGrantsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListResourceGrantsRequest) String() string { @@ -4781,7 +4879,7 @@ func (*ListResourceGrantsRequest) ProtoMessage() {} func (x *ListResourceGrantsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[48] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4849,9 +4947,11 @@ type ListResourceGrantsResponse struct { func (x *ListResourceGrantsResponse) Reset() { *x = ListResourceGrantsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListResourceGrantsResponse) String() string { @@ -4862,7 +4962,7 @@ func (*ListResourceGrantsResponse) ProtoMessage() {} func (x *ListResourceGrantsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[49] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -4918,9 +5018,11 @@ type RechargeBill struct { func (x *RechargeBill) Reset() { *x = RechargeBill{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RechargeBill) String() string { @@ -4931,7 +5033,7 @@ func (*RechargeBill) ProtoMessage() {} func (x *RechargeBill) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[50] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5093,9 +5195,11 @@ type ListRechargeBillsRequest struct { func (x *ListRechargeBillsRequest) Reset() { *x = ListRechargeBillsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRechargeBillsRequest) String() string { @@ -5106,7 +5210,7 @@ func (*ListRechargeBillsRequest) ProtoMessage() {} func (x *ListRechargeBillsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[51] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5216,9 +5320,11 @@ type ListRechargeBillsResponse struct { func (x *ListRechargeBillsResponse) Reset() { *x = ListRechargeBillsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRechargeBillsResponse) String() string { @@ -5229,7 +5335,7 @@ func (*ListRechargeBillsResponse) ProtoMessage() {} func (x *ListRechargeBillsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[52] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5271,9 +5377,11 @@ type WalletFeatureFlags struct { func (x *WalletFeatureFlags) Reset() { *x = WalletFeatureFlags{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WalletFeatureFlags) String() string { @@ -5284,7 +5392,7 @@ func (*WalletFeatureFlags) ProtoMessage() {} func (x *WalletFeatureFlags) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[53] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5332,9 +5440,11 @@ type GetWalletOverviewRequest struct { func (x *GetWalletOverviewRequest) Reset() { *x = GetWalletOverviewRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetWalletOverviewRequest) String() string { @@ -5345,7 +5455,7 @@ func (*GetWalletOverviewRequest) ProtoMessage() {} func (x *GetWalletOverviewRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[54] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5392,9 +5502,11 @@ type GetWalletOverviewResponse struct { func (x *GetWalletOverviewResponse) Reset() { *x = GetWalletOverviewResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetWalletOverviewResponse) String() string { @@ -5405,7 +5517,7 @@ func (*GetWalletOverviewResponse) ProtoMessage() {} func (x *GetWalletOverviewResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[55] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5446,9 +5558,11 @@ type WalletValueSummary struct { func (x *WalletValueSummary) Reset() { *x = WalletValueSummary{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WalletValueSummary) String() string { @@ -5459,7 +5573,7 @@ func (*WalletValueSummary) ProtoMessage() {} func (x *WalletValueSummary) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[56] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5500,9 +5614,11 @@ type GetWalletValueSummaryRequest struct { func (x *GetWalletValueSummaryRequest) Reset() { *x = GetWalletValueSummaryRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetWalletValueSummaryRequest) String() string { @@ -5513,7 +5629,7 @@ func (*GetWalletValueSummaryRequest) ProtoMessage() {} func (x *GetWalletValueSummaryRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[57] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5559,9 +5675,11 @@ type GetWalletValueSummaryResponse struct { func (x *GetWalletValueSummaryResponse) Reset() { *x = GetWalletValueSummaryResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetWalletValueSummaryResponse) String() string { @@ -5572,7 +5690,7 @@ func (*GetWalletValueSummaryResponse) ProtoMessage() {} func (x *GetWalletValueSummaryResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[58] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5622,9 +5740,11 @@ type GiftWallItem struct { func (x *GiftWallItem) Reset() { *x = GiftWallItem{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GiftWallItem) String() string { @@ -5635,7 +5755,7 @@ func (*GiftWallItem) ProtoMessage() {} func (x *GiftWallItem) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[59] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5788,9 +5908,11 @@ type GetUserGiftWallRequest struct { func (x *GetUserGiftWallRequest) Reset() { *x = GetUserGiftWallRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserGiftWallRequest) String() string { @@ -5801,7 +5923,7 @@ func (*GetUserGiftWallRequest) ProtoMessage() {} func (x *GetUserGiftWallRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[60] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5854,9 +5976,11 @@ type GetUserGiftWallResponse struct { func (x *GetUserGiftWallResponse) Reset() { *x = GetUserGiftWallResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserGiftWallResponse) String() string { @@ -5867,7 +5991,7 @@ func (*GetUserGiftWallResponse) ProtoMessage() {} func (x *GetUserGiftWallResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[61] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -5969,9 +6093,11 @@ type RechargeProduct struct { func (x *RechargeProduct) Reset() { *x = RechargeProduct{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RechargeProduct) String() string { @@ -5982,7 +6108,7 @@ func (*RechargeProduct) ProtoMessage() {} func (x *RechargeProduct) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[62] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6159,9 +6285,11 @@ type ListRechargeProductsRequest struct { func (x *ListRechargeProductsRequest) Reset() { *x = ListRechargeProductsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRechargeProductsRequest) String() string { @@ -6172,7 +6300,7 @@ func (*ListRechargeProductsRequest) ProtoMessage() {} func (x *ListRechargeProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[63] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6233,9 +6361,11 @@ type ListRechargeProductsResponse struct { func (x *ListRechargeProductsResponse) Reset() { *x = ListRechargeProductsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRechargeProductsResponse) String() string { @@ -6246,7 +6376,7 @@ func (*ListRechargeProductsResponse) ProtoMessage() {} func (x *ListRechargeProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[64] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6293,9 +6423,11 @@ type ListAdminRechargeProductsRequest struct { func (x *ListAdminRechargeProductsRequest) Reset() { *x = ListAdminRechargeProductsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListAdminRechargeProductsRequest) String() string { @@ -6306,7 +6438,7 @@ func (*ListAdminRechargeProductsRequest) ProtoMessage() {} func (x *ListAdminRechargeProductsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[65] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6388,9 +6520,11 @@ type ListAdminRechargeProductsResponse struct { func (x *ListAdminRechargeProductsResponse) Reset() { *x = ListAdminRechargeProductsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListAdminRechargeProductsResponse) String() string { @@ -6401,7 +6535,7 @@ func (*ListAdminRechargeProductsResponse) ProtoMessage() {} func (x *ListAdminRechargeProductsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[66] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6450,9 +6584,11 @@ type CreateRechargeProductRequest struct { func (x *CreateRechargeProductRequest) Reset() { *x = CreateRechargeProductRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateRechargeProductRequest) String() string { @@ -6463,7 +6599,7 @@ func (*CreateRechargeProductRequest) ProtoMessage() {} func (x *CreateRechargeProductRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[67] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6568,9 +6704,11 @@ type UpdateRechargeProductRequest struct { func (x *UpdateRechargeProductRequest) Reset() { *x = UpdateRechargeProductRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateRechargeProductRequest) String() string { @@ -6581,7 +6719,7 @@ func (*UpdateRechargeProductRequest) ProtoMessage() {} func (x *UpdateRechargeProductRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[68] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6686,9 +6824,11 @@ type DeleteRechargeProductRequest struct { func (x *DeleteRechargeProductRequest) Reset() { *x = DeleteRechargeProductRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteRechargeProductRequest) String() string { @@ -6699,7 +6839,7 @@ func (*DeleteRechargeProductRequest) ProtoMessage() {} func (x *DeleteRechargeProductRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[69] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6752,9 +6892,11 @@ type RechargeProductResponse struct { func (x *RechargeProductResponse) Reset() { *x = RechargeProductResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RechargeProductResponse) String() string { @@ -6765,7 +6907,7 @@ func (*RechargeProductResponse) ProtoMessage() {} func (x *RechargeProductResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[70] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6797,9 +6939,11 @@ type DeleteRechargeProductResponse struct { func (x *DeleteRechargeProductResponse) Reset() { *x = DeleteRechargeProductResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteRechargeProductResponse) String() string { @@ -6810,7 +6954,7 @@ func (*DeleteRechargeProductResponse) ProtoMessage() {} func (x *DeleteRechargeProductResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[71] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6847,9 +6991,11 @@ type DiamondExchangeRule struct { func (x *DiamondExchangeRule) Reset() { *x = DiamondExchangeRule{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DiamondExchangeRule) String() string { @@ -6860,7 +7006,7 @@ func (*DiamondExchangeRule) ProtoMessage() {} func (x *DiamondExchangeRule) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[72] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6929,9 +7075,11 @@ type GetDiamondExchangeConfigRequest struct { func (x *GetDiamondExchangeConfigRequest) Reset() { *x = GetDiamondExchangeConfigRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetDiamondExchangeConfigRequest) String() string { @@ -6942,7 +7090,7 @@ func (*GetDiamondExchangeConfigRequest) ProtoMessage() {} func (x *GetDiamondExchangeConfigRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[73] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -6988,9 +7136,11 @@ type GetDiamondExchangeConfigResponse struct { func (x *GetDiamondExchangeConfigResponse) Reset() { *x = GetDiamondExchangeConfigResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetDiamondExchangeConfigResponse) String() string { @@ -7001,7 +7151,7 @@ func (*GetDiamondExchangeConfigResponse) ProtoMessage() {} func (x *GetDiamondExchangeConfigResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[74] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7044,9 +7194,11 @@ type WalletTransaction struct { func (x *WalletTransaction) Reset() { *x = WalletTransaction{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WalletTransaction) String() string { @@ -7057,7 +7209,7 @@ func (*WalletTransaction) ProtoMessage() {} func (x *WalletTransaction) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[75] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7164,9 +7316,11 @@ type ListWalletTransactionsRequest struct { func (x *ListWalletTransactionsRequest) Reset() { *x = ListWalletTransactionsRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListWalletTransactionsRequest) String() string { @@ -7177,7 +7331,7 @@ func (*ListWalletTransactionsRequest) ProtoMessage() {} func (x *ListWalletTransactionsRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[76] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7245,9 +7399,11 @@ type ListWalletTransactionsResponse struct { func (x *ListWalletTransactionsResponse) Reset() { *x = ListWalletTransactionsResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListWalletTransactionsResponse) String() string { @@ -7258,7 +7414,7 @@ func (*ListWalletTransactionsResponse) ProtoMessage() {} func (x *ListWalletTransactionsResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[77] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7305,9 +7461,11 @@ type WithdrawalRequest struct { func (x *WithdrawalRequest) Reset() { *x = WithdrawalRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WithdrawalRequest) String() string { @@ -7318,7 +7476,7 @@ func (*WithdrawalRequest) ProtoMessage() {} func (x *WithdrawalRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[78] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7411,9 +7569,11 @@ type ApplyWithdrawalRequest struct { func (x *ApplyWithdrawalRequest) Reset() { *x = ApplyWithdrawalRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyWithdrawalRequest) String() string { @@ -7424,7 +7584,7 @@ func (*ApplyWithdrawalRequest) ProtoMessage() {} func (x *ApplyWithdrawalRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[79] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7492,9 +7652,11 @@ type ApplyWithdrawalResponse struct { func (x *ApplyWithdrawalResponse) Reset() { *x = ApplyWithdrawalResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyWithdrawalResponse) String() string { @@ -7505,7 +7667,7 @@ func (*ApplyWithdrawalResponse) ProtoMessage() {} func (x *ApplyWithdrawalResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[80] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7549,9 +7711,11 @@ type VipRewardItem struct { func (x *VipRewardItem) Reset() { *x = VipRewardItem{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VipRewardItem) String() string { @@ -7562,7 +7726,7 @@ func (*VipRewardItem) ProtoMessage() {} func (x *VipRewardItem) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[81] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7637,9 +7801,11 @@ type VipLevel struct { func (x *VipLevel) Reset() { *x = VipLevel{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *VipLevel) String() string { @@ -7650,7 +7816,7 @@ func (*VipLevel) ProtoMessage() {} func (x *VipLevel) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[82] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7744,9 +7910,11 @@ type UserVip struct { func (x *UserVip) Reset() { *x = UserVip{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserVip) String() string { @@ -7757,7 +7925,7 @@ func (*UserVip) ProtoMessage() {} func (x *UserVip) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[83] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7833,9 +8001,11 @@ type ListVipPackagesRequest struct { func (x *ListVipPackagesRequest) Reset() { *x = ListVipPackagesRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListVipPackagesRequest) String() string { @@ -7846,7 +8016,7 @@ func (*ListVipPackagesRequest) ProtoMessage() {} func (x *ListVipPackagesRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[84] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7893,9 +8063,11 @@ type ListVipPackagesResponse struct { func (x *ListVipPackagesResponse) Reset() { *x = ListVipPackagesResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListVipPackagesResponse) String() string { @@ -7906,7 +8078,7 @@ func (*ListVipPackagesResponse) ProtoMessage() {} func (x *ListVipPackagesResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[85] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -7947,9 +8119,11 @@ type GetMyVipRequest struct { func (x *GetMyVipRequest) Reset() { *x = GetMyVipRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetMyVipRequest) String() string { @@ -7960,7 +8134,7 @@ func (*GetMyVipRequest) ProtoMessage() {} func (x *GetMyVipRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[86] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8006,9 +8180,11 @@ type GetMyVipResponse struct { func (x *GetMyVipResponse) Reset() { *x = GetMyVipResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetMyVipResponse) String() string { @@ -8019,7 +8195,7 @@ func (*GetMyVipResponse) ProtoMessage() {} func (x *GetMyVipResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[87] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8054,9 +8230,11 @@ type PurchaseVipRequest struct { func (x *PurchaseVipRequest) Reset() { *x = PurchaseVipRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PurchaseVipRequest) String() string { @@ -8067,7 +8245,7 @@ func (*PurchaseVipRequest) ProtoMessage() {} func (x *PurchaseVipRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[88] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8125,9 +8303,11 @@ type PurchaseVipResponse struct { func (x *PurchaseVipResponse) Reset() { *x = PurchaseVipResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PurchaseVipResponse) String() string { @@ -8138,7 +8318,7 @@ func (*PurchaseVipResponse) ProtoMessage() {} func (x *PurchaseVipResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[89] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8213,9 +8393,11 @@ type CreditTaskRewardRequest struct { func (x *CreditTaskRewardRequest) Reset() { *x = CreditTaskRewardRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreditTaskRewardRequest) String() string { @@ -8226,7 +8408,7 @@ func (*CreditTaskRewardRequest) ProtoMessage() {} func (x *CreditTaskRewardRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[90] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8311,9 +8493,11 @@ type CreditTaskRewardResponse struct { func (x *CreditTaskRewardResponse) Reset() { *x = CreditTaskRewardResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreditTaskRewardResponse) String() string { @@ -8324,7 +8508,7 @@ func (*CreditTaskRewardResponse) ProtoMessage() {} func (x *CreditTaskRewardResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[91] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8389,9 +8573,11 @@ type ApplyGameCoinChangeRequest struct { func (x *ApplyGameCoinChangeRequest) Reset() { *x = ApplyGameCoinChangeRequest{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyGameCoinChangeRequest) String() string { @@ -8402,7 +8588,7 @@ func (*ApplyGameCoinChangeRequest) ProtoMessage() {} func (x *ApplyGameCoinChangeRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[92] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -8514,9 +8700,11 @@ type ApplyGameCoinChangeResponse struct { func (x *ApplyGameCoinChangeResponse) Reset() { *x = ApplyGameCoinChangeResponse{} - mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApplyGameCoinChangeResponse) String() string { @@ -8527,7 +8715,7 @@ func (*ApplyGameCoinChangeResponse) ProtoMessage() {} func (x *ApplyGameCoinChangeResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_wallet_v1_wallet_proto_msgTypes[93] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -10631,6 +10819,1136 @@ func file_proto_wallet_v1_wallet_proto_init() { if File_proto_wallet_v1_wallet_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_proto_wallet_v1_wallet_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*DebitGiftRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DebitGiftResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*AssetBalance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetBalancesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetBalancesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*AdminCreditAssetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*AdminCreditAssetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*AdminCreditCoinSellerStockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*AdminCreditCoinSellerStockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*TransferCoinFromSellerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*TransferCoinFromSellerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGroupItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GiftConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*UserResourceEntitlement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGrantItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGrant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGroupItemInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*ListResourcesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*ListResourcesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*GetResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*GetResourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*CreateResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*UpdateResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*SetResourceStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ResourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*ListResourceGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ListResourceGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*GetResourceGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*GetResourceGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*CreateResourceGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*UpdateResourceGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*SetResourceGroupStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGroupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*ListGiftConfigsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[36].Exporter = func(v any, i int) any { + switch v := v.(*ListGiftConfigsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[37].Exporter = func(v any, i int) any { + switch v := v.(*CreateGiftConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[38].Exporter = func(v any, i int) any { + switch v := v.(*UpdateGiftConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[39].Exporter = func(v any, i int) any { + switch v := v.(*SetGiftConfigStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[40].Exporter = func(v any, i int) any { + switch v := v.(*GiftConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[41].Exporter = func(v any, i int) any { + switch v := v.(*GrantResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[42].Exporter = func(v any, i int) any { + switch v := v.(*GrantResourceGroupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[43].Exporter = func(v any, i int) any { + switch v := v.(*ResourceGrantResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[44].Exporter = func(v any, i int) any { + switch v := v.(*ListUserResourcesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*ListUserResourcesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*EquipUserResourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*EquipUserResourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*ListResourceGrantsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*ListResourceGrantsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*RechargeBill); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*ListRechargeBillsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[52].Exporter = func(v any, i int) any { + switch v := v.(*ListRechargeBillsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[53].Exporter = func(v any, i int) any { + switch v := v.(*WalletFeatureFlags); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[54].Exporter = func(v any, i int) any { + switch v := v.(*GetWalletOverviewRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[55].Exporter = func(v any, i int) any { + switch v := v.(*GetWalletOverviewResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[56].Exporter = func(v any, i int) any { + switch v := v.(*WalletValueSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*GetWalletValueSummaryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[58].Exporter = func(v any, i int) any { + switch v := v.(*GetWalletValueSummaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[59].Exporter = func(v any, i int) any { + switch v := v.(*GiftWallItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[60].Exporter = func(v any, i int) any { + switch v := v.(*GetUserGiftWallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[61].Exporter = func(v any, i int) any { + switch v := v.(*GetUserGiftWallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[62].Exporter = func(v any, i int) any { + switch v := v.(*RechargeProduct); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[63].Exporter = func(v any, i int) any { + switch v := v.(*ListRechargeProductsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[64].Exporter = func(v any, i int) any { + switch v := v.(*ListRechargeProductsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[65].Exporter = func(v any, i int) any { + switch v := v.(*ListAdminRechargeProductsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[66].Exporter = func(v any, i int) any { + switch v := v.(*ListAdminRechargeProductsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[67].Exporter = func(v any, i int) any { + switch v := v.(*CreateRechargeProductRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[68].Exporter = func(v any, i int) any { + switch v := v.(*UpdateRechargeProductRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[69].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRechargeProductRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[70].Exporter = func(v any, i int) any { + switch v := v.(*RechargeProductResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[71].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRechargeProductResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[72].Exporter = func(v any, i int) any { + switch v := v.(*DiamondExchangeRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[73].Exporter = func(v any, i int) any { + switch v := v.(*GetDiamondExchangeConfigRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[74].Exporter = func(v any, i int) any { + switch v := v.(*GetDiamondExchangeConfigResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[75].Exporter = func(v any, i int) any { + switch v := v.(*WalletTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[76].Exporter = func(v any, i int) any { + switch v := v.(*ListWalletTransactionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[77].Exporter = func(v any, i int) any { + switch v := v.(*ListWalletTransactionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[78].Exporter = func(v any, i int) any { + switch v := v.(*WithdrawalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[79].Exporter = func(v any, i int) any { + switch v := v.(*ApplyWithdrawalRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[80].Exporter = func(v any, i int) any { + switch v := v.(*ApplyWithdrawalResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[81].Exporter = func(v any, i int) any { + switch v := v.(*VipRewardItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[82].Exporter = func(v any, i int) any { + switch v := v.(*VipLevel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[83].Exporter = func(v any, i int) any { + switch v := v.(*UserVip); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[84].Exporter = func(v any, i int) any { + switch v := v.(*ListVipPackagesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[85].Exporter = func(v any, i int) any { + switch v := v.(*ListVipPackagesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[86].Exporter = func(v any, i int) any { + switch v := v.(*GetMyVipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[87].Exporter = func(v any, i int) any { + switch v := v.(*GetMyVipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[88].Exporter = func(v any, i int) any { + switch v := v.(*PurchaseVipRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[89].Exporter = func(v any, i int) any { + switch v := v.(*PurchaseVipResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[90].Exporter = func(v any, i int) any { + switch v := v.(*CreditTaskRewardRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[91].Exporter = func(v any, i int) any { + switch v := v.(*CreditTaskRewardResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[92].Exporter = func(v any, i int) any { + switch v := v.(*ApplyGameCoinChangeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_wallet_v1_wallet_proto_msgTypes[93].Exporter = func(v any, i int) any { + switch v := v.(*ApplyGameCoinChangeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_proto_wallet_v1_wallet_proto_msgTypes[23].OneofWrappers = []any{} file_proto_wallet_v1_wallet_proto_msgTypes[24].OneofWrappers = []any{} type x struct{} diff --git a/api/proto/wallet/v1/wallet_grpc.pb.go b/api/proto/wallet/v1/wallet_grpc.pb.go index 81a3519f..aa89b485 100644 --- a/api/proto/wallet/v1/wallet_grpc.pb.go +++ b/api/proto/wallet/v1/wallet_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v5.29.2 // source: proto/wallet/v1/wallet.proto package walletv1 diff --git a/docs/flutter对接/房间关注接口Flutter对接.md b/docs/flutter对接/房间关注接口Flutter对接.md new file mode 100644 index 00000000..cbdca4b9 --- /dev/null +++ b/docs/flutter对接/房间关注接口Flutter对接.md @@ -0,0 +1,125 @@ +# 房间关注接口 Flutter 对接 + +## 接口地址 + +`POST /api/v1/rooms/{room_id}/follow` + +`DELETE /api/v1/rooms/{room_id}/follow` + +本地开发地址: + +```text +http://127.0.0.1:13000 +``` + +## 请求方法 + +| 方法 | 说明 | +| --- | --- | +| `POST` | 关注房间 | +| `DELETE` | 取消关注房间 | + +## 请求头 + +| Header | 必填 | 模拟值 | 说明 | +| --- | --- | --- | --- | +| `Authorization` | 是 | `Bearer ` | 登录 access token;服务端从 token 读取当前用户 ID。 | +| `X-App-Code` | 否 | `lalu` | App 编码;登录态接口最终以 token 内的 `app_code` 为准。 | + +## 参数 + +Path 参数: + +| 参数 | 必填 | 类型 | 模拟值 | 说明 | +| --- | --- | --- | --- | --- | +| `room_id` | 是 | string | `room_10001` | 房间 ID;只允许字母、数字、下划线、短横线,最长 48 位。 | + +Query 参数:无。 + +请求体:无。不要传 `user_id`,服务端只使用 token 中的当前用户。 + +关注请求示例: + +```http +POST /api/v1/rooms/room_10001/follow +Authorization: Bearer +X-App-Code: lalu +``` + +取消关注请求示例: + +```http +DELETE /api/v1/rooms/room_10001/follow +Authorization: Bearer +X-App-Code: lalu +``` + +## 返回体模拟数据 + +关注成功: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "room_id": "room_10001", + "is_followed": true, + "followed_at_ms": 1710000000123, + "server_time_ms": 1710000000456 + } +} +``` + +取消关注成功: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "room_id": "room_10001", + "is_followed": false, + "server_time_ms": 1710000000789 + } +} +``` + +字段说明: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `room_id` | string | 本次操作的房间 ID。 | +| `is_followed` | bool | 当前登录用户是否已关注该房间。 | +| `followed_at_ms` | int64 | 关注成功时间,Unix epoch milliseconds;取消关注返回体不带该字段。 | +| `server_time_ms` | int64 | 服务端当前时间,Unix epoch milliseconds。 | + +## 错误处理 + +失败返回仍使用统一 envelope: + +```json +{ + "code": "INVALID_ARGUMENT", + "message": "invalid argument", + "request_id": "req_abc" +} +``` + +| HTTP 状态码 | `code` | 处理方式 | +| --- | --- | --- | +| `400` | `INVALID_ARGUMENT` | `room_id` 为空或格式非法,客户端不要重试,检查传参。 | +| `401` | `UNAUTHORIZED` | token 缺失、无效、过期或会话失效,重新登录。 | +| `403` | `PROFILE_REQUIRED` | 用户资料未完成,跳转资料补全流程。 | +| `404` | `NOT_FOUND` | 关注时房间不存在,刷新房间状态或退出当前房间页。 | +| `409` | `ROOM_CLOSED` | 关注时房间已关闭,刷新房间状态或退出当前房间页。 | +| `502` | `UPSTREAM_ERROR` | 内部服务暂不可用,可提示稍后重试。 | + +幂等规则: + +| 场景 | 返回 | +| --- | --- | +| 重复关注已关注房间 | `200 OK`,`is_followed=true`,不刷新原 `followed_at_ms`。 | +| 取消未关注房间 | `200 OK`,`is_followed=false`。 | diff --git a/docs/flutter对接/房间踢人接口Flutter对接.md b/docs/flutter对接/房间踢人接口Flutter对接.md new file mode 100644 index 00000000..a3abb8b4 --- /dev/null +++ b/docs/flutter对接/房间踢人接口Flutter对接.md @@ -0,0 +1,322 @@ +# 房间踢人接口 Flutter 对接 + +本文描述 Flutter App 对接房间踢人能力的 HTTP 接口,以及踢人后腾讯 IM 和腾讯 RTC 的客户端处理方式。踢人事实由 `room-service` Room Cell 提交;客户端不能只靠本地 UI 状态判断用户是否仍在房间。 + +## 接口地址 + +`POST /api/v1/rooms/user/kick` + +`POST /api/v1/rooms/user/unban` + +本地开发地址: + +```text +http://127.0.0.1:13000 +``` + +## 请求方法 + +| 方法 | 接口 | 说明 | +| --- | --- | --- | +| `POST` | `/api/v1/rooms/user/kick` | 踢出房间用户,并写入房间 ban 集合。 | +| `POST` | `/api/v1/rooms/user/unban` | 解除房间 ban,允许用户后续重新 JoinRoom。 | + +## 请求头 + +| Header | 必填 | 模拟值 | 说明 | +| --- | --- | --- | --- | +| `Authorization` | 是 | `Bearer ` | 登录 access token;服务端从 token 读取当前用户 ID。 | +| `X-App-Code` | 否 | `lalu` | App 编码;登录态接口最终以 token 内的 `app_code` 为准。 | + +## 踢出房间用户 + +房主可以踢出房间内用户。当前后端权限矩阵也允许房管管理普通用户;端上如果只开放房主入口,后端仍兼容。 + +请求体: + +| 字段 | 必填 | 类型 | 模拟值 | 说明 | +| --- | --- | --- | --- | --- | +| `room_id` | 是 | string | `room_10001` | 房间 ID。 | +| `command_id` | 是 | string | `cmd_kick_room_10001_20001_1710000000` | 房间命令幂等键;同一次踢人重试必须复用。 | +| `target_user_id` | 是 | int64 | `20001` | 被踢用户长 ID。 | + +请求示例: + +```http +POST /api/v1/rooms/user/kick +Authorization: Bearer +X-App-Code: lalu +Content-Type: application/json + +{ + "room_id": "room_10001", + "command_id": "cmd_kick_room_10001_20001_1710000000", + "target_user_id": 20001 +} +``` + +成功响应: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "result": { + "applied": true, + "room_version": 18, + "server_time_ms": 1710000000456 + }, + "room": { + "room_id": "room_10001", + "status": "active", + "ban_user_ids": [20001], + "online_users": [], + "mic_seats": [], + "version": 18 + }, + "rtc_kicked": true, + "rtc_kick_error": "" + } +} +``` + +字段说明: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `data.result.applied` | bool | 本次命令是否产生状态变更;重复踢已 ban 且无残留状态的用户可能为 `false`。 | +| `data.room.ban_user_ids` | int64[] | 当前房间 ban 用户集合;被踢用户会进入该集合。 | +| `data.room.online_users` | array | 当前业务 presence;被踢用户会被移除。 | +| `data.room.mic_seats` | array | 如果被踢用户在麦上,对应麦位会被释放。 | +| `data.rtc_kicked` | bool | 服务端是否已调用 TRTC `RemoveUserByStrRoomId` 移除目标用户。 | +| `data.rtc_kick_error` | string | TRTC 服务端踢人失败原因;踢人事实已生效,客户端仍按被踢处理。 | + +## 解除房间 ban + +解除 ban 只恢复用户后续重新进房资格,不恢复历史 presence、麦位、管理员身份或 RTC 连接。 + +请求示例: + +```http +POST /api/v1/rooms/user/unban +Authorization: Bearer +X-App-Code: lalu +Content-Type: application/json + +{ + "room_id": "room_10001", + "command_id": "cmd_unban_room_10001_20001_1710000100", + "target_user_id": 20001 +} +``` + +成功响应字段和踢人一致,`room.ban_user_ids` 中不再包含目标用户。 + +## IM 和 RTC 交互 + +踢人成功后有三层效果,客户端都要按幂等方式处理: + +| 层 | 服务端行为 | Flutter 处理 | +| --- | --- | --- | +| room-service | 移除目标 presence、释放麦位、写入 ban,后续 JoinRoom、RTC token、IM 进群和发言守卫都会拒绝目标用户。 | 被踢用户所有房间接口如果返回 `PERMISSION_DENIED`,立即退出房间页并清理房间态。 | +| 腾讯 IM 群 | room-service outbox worker 先调用 IM REST 把目标用户移出房间群,再发布 `room_user_kicked` 系统消息给房间内其他用户。 | 普通成员收到 `room_user_kicked` 后刷新在线列表和麦位;被踢用户要监听 IM 群被移除或退群回调作为主要退出信号。 | +| 腾讯 IM 单聊 | notice-service 监听 `room_outbox.RoomUserKicked`,给被踢用户发送 C2C `room_notice` 私有通知。 | 被踢用户收到 `room_notice` 时执行同一套本地退出逻辑;按 `event_id` 去重,避免和群消息或接口 403 重复弹窗。 | +| 腾讯 RTC | room-service 在踢人事实提交后尽力调用 TRTC `RemoveUserByStrRoomId`。 | 被踢用户收到 RTC 退房或连接断开回调时调用同一套本地退出逻辑;如果先收到 IM 回调,也要主动 `exitRoom`。 | + +客户端退出房间的本地动作必须可重复调用: + +1. 停止本地音频上行。 +2. 调用 TRTC `exitRoom`。 +3. 退出或清理当前房间 IM 群会话。 +4. 停止房间 heartbeat。 +5. 清空当前房间页状态,回到房间列表或 Mine 页面。 +6. 弹出被踢提示。 + +被踢用户不一定能收到房间群里的 `room_user_kicked` 自定义消息,因为服务端会优先把他移出 IM 群。端上必须同时处理 notice-service 的 C2C `room_notice`、IM SDK 的群移除回调、RTC 退房回调和后续接口 403。 + +## IM 自定义消息 + +房间内其他用户会收到群 `TIMCustomElem`,核心字段如下: + +```json +{ + "event_id": "evt_abc", + "room_id": "room_10001", + "event_type": "room_user_kicked", + "actor_user_id": 10001, + "target_user_id": 20001, + "room_version": 18, + "attributes": {} +} +``` + +处理规则: + +| 字段 | 说明 | +| --- | --- | +| `event_type` | 固定 `room_user_kicked`。 | +| `actor_user_id` | 操作者用户 ID;系统驱逐时可能为 `0`。 | +| `target_user_id` | 被踢用户 ID。 | +| `room_version` | 房间版本;本地已有更高版本时丢弃旧消息。 | + +如果 `target_user_id` 是当前登录用户,直接执行本地退出房间动作;如果不是当前用户,只刷新在线列表、麦位和管理面 UI。 + +被踢用户会收到 notice-service 发送的 C2C `TIMCustomElem`,`Ext=room_notice`,核心字段如下: + +```json +{ + "event_id": "evt_abc", + "event_type": "room_user_kicked", + "source_event_type": "RoomUserKicked", + "app_code": "lalu", + "room_id": "room_10001", + "room_version": 18, + "actor_user_id": 10001, + "target_user_id": 20001, + "occurred_at_ms": 1710000000456, + "source_created_at_ms": 1710000000456 +} +``` + +C2C 通知和房间群消息使用同一个 `event_id`。Flutter 侧把 `room_user_kicked`、IM 群移除、RTC 退房和接口 403 都归一到同一个 `handleKickedFromRoom(roomId, eventId)` 流程;同一个 `event_id` 或同一个房间的短时间重复退出信号只处理一次。 + +## 错误处理 + +失败返回仍使用统一 envelope: + +```json +{ + "code": "PERMISSION_DENIED", + "message": "permission denied", + "request_id": "req_abc" +} +``` + +| HTTP 状态码 | `code` | 典型场景 | 处理方式 | +| --- | --- | --- | --- | +| `400` | `INVALID_ARGUMENT` | `room_id`、`command_id` 或 `target_user_id` 缺失;操作者踢自己。 | 客户端修正参数,不自动重试。 | +| `401` | `UNAUTHORIZED` | token 缺失、无效、过期或会话失效。 | 重新登录。 | +| `403` | `PROFILE_REQUIRED` | 用户资料未完成。 | 跳转资料补全流程。 | +| `403` | `PERMISSION_DENIED` | 非管理角色踢人;房管踢房主;操作者不在房间。 | 隐藏入口或提示无权限。 | +| `404` | `NOT_FOUND` | 房间不存在。 | 刷新列表或退出房间页。 | +| `409` | `ROOM_CLOSED` | 房间已关闭。 | 刷新列表或退出房间页。 | +| `409` | `CONFLICT` | 同一个 `command_id` 被不同请求体复用。 | 为新的用户动作生成新的 `command_id`。 | +| `502` | `UPSTREAM_ERROR` | 内部服务暂不可用。 | 可提示稍后重试。 | + +幂等规则: + +| 场景 | 返回 | +| --- | --- | +| 同一个 `command_id` 重试同一次踢人 | 返回同一命令结果,不重复变更房间。 | +| 同一个 `command_id` 换另一个 `target_user_id` | `409 CONFLICT`。 | +| 重复踢已 ban 且无残留状态的用户 | `200 OK`,`applied=false`。 | +| 解封未 ban 用户 | `200 OK`,`applied=false`。 | + +## Flutter 解析示例 + +```dart +class RoomCommandResult { + RoomCommandResult({ + required this.applied, + required this.roomVersion, + required this.serverTimeMs, + }); + + final bool applied; + final int roomVersion; + final int serverTimeMs; + + factory RoomCommandResult.fromJson(Map json) { + return RoomCommandResult( + applied: json['applied'] as bool? ?? false, + roomVersion: (json['room_version'] as num?)?.toInt() ?? 0, + serverTimeMs: (json['server_time_ms'] as num?)?.toInt() ?? 0, + ); + } +} + +class KickUserResult { + KickUserResult({ + required this.result, + required this.rtcKicked, + required this.rtcKickError, + required this.banUserIds, + }); + + final RoomCommandResult result; + final bool rtcKicked; + final String rtcKickError; + final List banUserIds; + + factory KickUserResult.fromJson(Map json) { + final room = json['room'] as Map? ?? const {}; + return KickUserResult( + result: RoomCommandResult.fromJson( + json['result'] as Map? ?? const {}, + ), + rtcKicked: json['rtc_kicked'] as bool? ?? false, + rtcKickError: json['rtc_kick_error'] as String? ?? '', + banUserIds: (room['ban_user_ids'] as List? ?? const []) + .map((value) => (value as num).toInt()) + .toList(), + ); + } +} + +class RoomKickedEvent { + RoomKickedEvent({ + required this.roomId, + required this.actorUserId, + required this.targetUserId, + required this.roomVersion, + }); + + final String roomId; + final int actorUserId; + final int targetUserId; + final int roomVersion; + + bool isSelf(int currentUserId) => targetUserId == currentUserId; + + factory RoomKickedEvent.fromJson(Map json) { + return RoomKickedEvent( + roomId: json['room_id'] as String? ?? '', + actorUserId: (json['actor_user_id'] as num?)?.toInt() ?? 0, + targetUserId: (json['target_user_id'] as num?)?.toInt() ?? 0, + roomVersion: (json['room_version'] as num?)?.toInt() ?? 0, + ); + } +} + +class RoomKickNotice { + RoomKickNotice({ + required this.eventId, + required this.roomId, + required this.actorUserId, + required this.targetUserId, + required this.roomVersion, + }); + + final String eventId; + final String roomId; + final int actorUserId; + final int targetUserId; + final int roomVersion; + + factory RoomKickNotice.fromJson(Map json) { + return RoomKickNotice( + eventId: json['event_id'] as String? ?? '', + roomId: json['room_id'] as String? ?? '', + actorUserId: (json['actor_user_id'] as num?)?.toInt() ?? 0, + targetUserId: (json['target_user_id'] as num?)?.toInt() ?? 0, + roomVersion: (json['room_version'] as num?)?.toInt() ?? 0, + ); + } +} +``` + +调用 HTTP 接口时先解析外层 envelope:只有 `code == "OK"` 时读取 `data`;其他 `code` 按登录态、参数错误、权限错误或服务错误处理,并把 `request_id` 写入客户端日志。 + +客户端生成 `command_id` 时按一次用户动作生成一次,同一次 HTTP 重试复用原 `command_id`;用户再次点击踢人时生成新的 `command_id`。 diff --git a/docs/flutter对接/房间锁房接口Flutter对接.md b/docs/flutter对接/房间锁房接口Flutter对接.md new file mode 100644 index 00000000..9b6f7d6a --- /dev/null +++ b/docs/flutter对接/房间锁房接口Flutter对接.md @@ -0,0 +1,383 @@ +# 房间锁房接口 Flutter 对接 + +本文描述 Flutter App 对接房间锁房能力的 HTTP 接口。房间密码由 `room-service` 只保存 bcrypt 哈希;客户端只提交明文用于本次设置或进房校验,任何列表、搜索、详情、房间消息和响应体都不会返回明文或哈希。 + +## 接口地址 + +`POST /api/v1/rooms/password` + +`POST /api/v1/rooms/join` + +`GET /api/v1/rooms` + +`GET /api/v1/rooms/feeds` + +本地开发地址: + +```text +http://127.0.0.1:13000 +``` + +## 请求方法 + +| 方法 | 接口 | 说明 | +| --- | --- | --- | +| `POST` | `/api/v1/rooms/password` | 房主设置或清空房间入房密码。 | +| `POST` | `/api/v1/rooms/join` | 进入房间;带锁房间需要传 `password`。 | +| `GET` | `/api/v1/rooms` | 公共房间列表和搜索;房间卡片返回 `locked`。 | +| `GET` | `/api/v1/rooms/feeds` | Mine 页房间流;房间卡片返回 `locked`。 | + +## 请求头 + +| Header | 必填 | 模拟值 | 说明 | +| --- | --- | --- | --- | +| `Authorization` | 是 | `Bearer ` | 登录 access token;服务端从 token 读取当前用户 ID。 | +| `X-App-Code` | 否 | `lalu` | App 编码;登录态接口最终以 token 内的 `app_code` 为准。 | + +## 设置或清空房间密码 + +只有房主可以调用。房管、主持人和普通观众调用会返回 `PERMISSION_DENIED`。 + +请求体: + +| 字段 | 必填 | 类型 | 模拟值 | 说明 | +| --- | --- | --- | --- | --- | +| `room_id` | 是 | string | `room_10001` | 房间 ID。 | +| `command_id` | 是 | string | `cmd_room_password_room_10001_1710000000` | 房间命令幂等键;同一次点击重试必须复用。 | +| `locked` | 是 | bool | `true` | `true` 表示设置密码,`false` 表示清空密码。 | +| `password` | `locked=true` 时必填 | string | `1234` | 入房密码;服务端 trim 后最长 64 个字符。`locked=false` 时忽略。 | + +设置密码请求示例: + +```http +POST /api/v1/rooms/password +Authorization: Bearer +X-App-Code: lalu +Content-Type: application/json + +{ + "room_id": "room_10001", + "command_id": "cmd_room_password_room_10001_1710000000", + "locked": true, + "password": "1234" +} +``` + +清空密码请求示例: + +```http +POST /api/v1/rooms/password +Authorization: Bearer +X-App-Code: lalu +Content-Type: application/json + +{ + "room_id": "room_10001", + "command_id": "cmd_room_password_room_10001_1710000100", + "locked": false +} +``` + +成功响应: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "result": { + "applied": true, + "room_version": 12, + "server_time_ms": 1710000000456 + }, + "room": { + "room_id": "room_10001", + "im_group_id": "room_10001", + "room_short_id": "100001", + "title": "Live Room", + "cover_url": "https://cdn.example/room.png", + "owner_user_id": "10001", + "mode": "voice", + "status": "active", + "chat_enabled": true, + "locked": true, + "heat": 1000, + "online_count": 12, + "seat_count": 15, + "occupied_seat_count": 2, + "version": 12 + }, + "seats": [], + "server_time_ms": 1710000000456 + } +} +``` + +字段说明: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `data.result.applied` | bool | 本次命令是否产生状态变更;重复提交相同命令可能为 `false`。 | +| `data.result.room_version` | int64 | 命令完成后房间版本。 | +| `data.room.locked` | bool | 最新锁房状态;`true` 表示后续新用户进房需要密码。 | +| `data.room.version` | int64 | 最新房间快照版本;客户端本地房间状态以更大版本覆盖旧状态。 | +| `data.seats` | array | 当前座位列表;锁房接口成功后可直接复用该房间快照刷新页面。 | + +## 带密码进入房间 + +客户端进入房间前先看房间卡片或详情里的 `locked`: + +| `locked` | 客户端行为 | +| --- | --- | +| `false` | 直接调用 JoinRoom,`password` 可不传或传空字符串。 | +| `true` | 先弹出密码输入,再调用 JoinRoom 并传 `password`。 | + +请求体: + +| 字段 | 必填 | 类型 | 模拟值 | 说明 | +| --- | --- | --- | --- | --- | +| `room_id` | 是 | string | `room_10001` | 房间 ID。 | +| `command_id` | 是 | string | `cmd_join_room_10001_20001_1710000000` | 进房命令幂等键;同一次进房重试必须复用。 | +| `role` | 否 | string | `audience` | 当前固定传 `audience`。 | +| `password` | 锁房时必填 | string | `1234` | 只用于本次进房校验,服务端不保存明文。 | + +请求示例: + +```http +POST /api/v1/rooms/join +Authorization: Bearer +X-App-Code: lalu +Content-Type: application/json + +{ + "room_id": "room_10001", + "command_id": "cmd_join_room_10001_20001_1710000000", + "role": "audience", + "password": "1234" +} +``` + +成功响应只展示锁房相关字段: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "result": { + "applied": true, + "room_version": 13, + "server_time_ms": 1710000001456 + }, + "room": { + "room_id": "room_10001", + "im_group_id": "room_10001", + "locked": true, + "version": 13 + }, + "viewer": { + "user_id": "20001", + "role": "audience", + "joined_at_ms": 1710000001456, + "last_seen_at_ms": 1710000001456 + }, + "im": { + "group_id": "room_10001", + "need_join_group": true + }, + "rtc": { + "need_token": true, + "available": true + }, + "server_time_ms": 1710000001456 + } +} +``` + +进房规则: + +| 场景 | 结果 | +| --- | --- | +| 房间未锁 | 不校验 `password`。 | +| 房间已锁且密码正确 | JoinRoom 成功,客户端再调用腾讯 IM `joinGroup` 和 RTC `enterRoom`。 | +| 房间已锁且密码错误或缺失 | 返回 `403 PERMISSION_DENIED`,不会创建 presence,不会返回 RTC token。 | +| 房主进入自己的房间 | 不需要密码。 | +| 用户已经在房间内 | 再次 JoinRoom 按幂等恢复当前房间态,不会因为后续锁房被踢出。 | + +## 房间列表和搜索 locked 字段 + +公共列表和搜索使用同一个接口: + +```http +GET /api/v1/rooms?tab=hot&query=100001 +Authorization: Bearer +X-App-Code: lalu +``` + +Mine 页房间流: + +```http +GET /api/v1/rooms/feeds?tab=followed +Authorization: Bearer +X-App-Code: lalu +``` + +列表响应示例: + +```json +{ + "code": "OK", + "message": "ok", + "request_id": "req_abc", + "data": { + "rooms": [ + { + "room_id": "room_10001", + "im_group_id": "room_10001", + "owner_user_id": "10001", + "title": "Live Room", + "cover_url": "https://cdn.example/room.png", + "mode": "voice", + "status": "active", + "locked": true, + "heat": 1000, + "online_count": 12, + "seat_count": 15, + "occupied_seat_count": 2, + "visible_region_id": 1, + "app_code": "lalu", + "room_short_id": "100001" + } + ], + "next_cursor": "" + } +} +``` + +字段说明: + +| 字段 | 类型 | 说明 | +| --- | --- | --- | +| `rooms[].locked` | bool | 房间是否需要入房密码;搜索结果和普通列表一致。 | +| `rooms[].im_group_id` | string | 腾讯 IM 群 ID;只用于 JoinRoom 成功后的 `joinGroup`,不能绕过 JoinRoom。 | +| `next_cursor` | string | 下一页游标;为空表示没有下一页。 | + +## 错误处理 + +失败返回仍使用统一 envelope: + +```json +{ + "code": "PERMISSION_DENIED", + "message": "permission denied", + "request_id": "req_abc" +} +``` + +| HTTP 状态码 | `code` | 典型场景 | 处理方式 | +| --- | --- | --- | --- | +| `400` | `INVALID_ARGUMENT` | `room_id`、`command_id` 缺失;设置锁房时 `password` 为空或超过 64 字符。 | 客户端修正参数,不自动重试。 | +| `401` | `UNAUTHORIZED` | token 缺失、无效、过期或会话失效。 | 重新登录。 | +| `403` | `PROFILE_REQUIRED` | 用户资料未完成。 | 跳转资料补全流程。 | +| `403` | `PERMISSION_DENIED` | 非房主设置密码;进锁房密码错误;用户被 ban。 | 设置密码时隐藏入口或提示无权限;进房时提示密码错误。 | +| `404` | `NOT_FOUND` | 房间不存在。 | 刷新列表或退出房间页。 | +| `409` | `ROOM_CLOSED` | 房间已关闭。 | 刷新列表或退出房间页。 | +| `409` | `CONFLICT` | 同一个 `command_id` 被不同请求体复用。 | 为新的用户动作生成新的 `command_id`。 | +| `502` | `UPSTREAM_ERROR` | 内部服务暂不可用。 | 可提示稍后重试。 | + +幂等规则: + +| 场景 | 返回 | +| --- | --- | +| 同一个 `command_id` 重试同一次设置密码 | 返回同一命令结果,不重复变更房间。 | +| 同一个 `command_id` 换另一个密码 | `409 CONFLICT`。 | +| 重复清空已解锁房间 | `200 OK`,`data.room.locked=false`。 | +| 同一个用户重复 JoinRoom | 返回当前房间首屏数据,不重复创建 presence。 | + +## Flutter 解析示例 + +```dart +class RoomCommandResult { + RoomCommandResult({ + required this.applied, + required this.roomVersion, + required this.serverTimeMs, + }); + + final bool applied; + final int roomVersion; + final int serverTimeMs; + + factory RoomCommandResult.fromJson(Map json) { + return RoomCommandResult( + applied: json['applied'] as bool? ?? false, + roomVersion: (json['room_version'] as num?)?.toInt() ?? 0, + serverTimeMs: (json['server_time_ms'] as num?)?.toInt() ?? 0, + ); + } +} + +class RoomCard { + RoomCard({ + required this.roomId, + required this.imGroupId, + required this.title, + required this.locked, + required this.onlineCount, + }); + + final String roomId; + final String imGroupId; + final String title; + final bool locked; + final int onlineCount; + + factory RoomCard.fromJson(Map json) { + return RoomCard( + roomId: json['room_id'] as String? ?? '', + imGroupId: json['im_group_id'] as String? ?? '', + title: json['title'] as String? ?? '', + locked: json['locked'] as bool? ?? false, + onlineCount: (json['online_count'] as num?)?.toInt() ?? 0, + ); + } +} + +class RoomLockResult { + RoomLockResult({ + required this.result, + required this.room, + required this.serverTimeMs, + }); + + final RoomCommandResult result; + final RoomCard room; + final int serverTimeMs; + + factory RoomLockResult.fromJson(Map json) { + return RoomLockResult( + result: RoomCommandResult.fromJson( + json['result'] as Map? ?? const {}, + ), + room: RoomCard.fromJson( + json['room'] as Map? ?? const {}, + ), + serverTimeMs: (json['server_time_ms'] as num?)?.toInt() ?? 0, + ); + } +} +``` + +调用时先解析外层 envelope:只有 `code == "OK"` 时读取 `data`;其他 `code` 按登录态、参数错误、权限错误或服务错误处理,并把 `request_id` 写入客户端日志。 + +客户端生成 `command_id` 时按一次用户动作生成一次,例如: + +```dart +String newRoomCommandId(String action, String roomId, String userId) { + return 'cmd_${action}_${roomId}_${userId}_${DateTime.now().millisecondsSinceEpoch}'; +} +``` + +同一次 HTTP 重试复用原 `command_id`;用户重新输入密码或再次点击设置按钮时生成新的 `command_id`。 diff --git a/docs/notice-service架构.md b/docs/notice-service架构.md index e1afb821..cda4d362 100644 --- a/docs/notice-service架构.md +++ b/docs/notice-service架构.md @@ -4,12 +4,13 @@ `notice-service` 是外部通知投递服务,不是新的业务状态 owner。它从各 owner service 的 outbox 或只读事件源读取已经提交的事实,再投递到用户私有实时通道、后续 push 或站内 inbox。 -当前已实现的第一条链路是: +当前已实现的链路是: - `wallet-service` 在同一账务事务里写 `wallet_outbox.WalletBalanceChanged`。 - `notice-service` 抢占该事件,写自己的 `notice_delivery_events` 投递位点。 - `notice-service` 通过腾讯云 IM C2C `TIMCustomElem` 给用户发送 `wallet_notice`。 - 客户端收到通知后按 `asset_type + balance_version` 更新本地余额;乱序或重复事件直接丢弃。 +- `room-service` 写 `room_outbox.RoomUserKicked` 后,`notice-service` 只给被踢用户发送 `room_notice` C2C 私有通知;房间群系统消息和 IM 群成员移除仍由 room-service 的房间 IM bridge 负责。 ## 服务边界 @@ -17,12 +18,17 @@ | --- | --- | | `wallet-service` | 余额、流水、交易幂等、`wallet_outbox` 事实源;不调用 IM、不关心客户端在线状态 | | `notice-service` | 通知投递位点、抢占锁、退避重试、死信、腾讯云 IM 单聊投递 | -| `room-service` | 房间状态和房间群系统消息 outbox;不发送钱包私有余额 | +| `room-service` | 房间状态、房间群系统消息 outbox、腾讯 IM 群组/成员桥接;不直接发送用户私有通知 | | `activity-service` | 活动、任务、系统消息业务事实;后续可新增 activity notice 模块 | | 腾讯云 IM | 客户端长连接、单聊/群消息、离线/漫游投递 | `notice-service` 不直接修改钱包、房间、用户或活动业务表。它只读取 owner outbox,并写自己的投递状态表。 +房间 IM 被拆成两种通道: + +- 房间群通道:`RoomCreated` 建群、`RoomUserKicked` 移除群成员、`room_user_kicked` 群系统消息由 room-service outbox worker 投递。它依赖房间群生命周期和群成员控制,不进入 notice-service。 +- 用户私有通道:被踢本人可能已经先被移出 IM 群,不能保证收到群消息;因此 notice-service 监听同一条 `RoomUserKicked` 事实,发送 C2C `room_notice` 给 `target_user_id`。 + ## 当前目录结构 ```text @@ -32,6 +38,7 @@ services/notice-service/ deploy/mysql/initdb/ notice-service 自己的库表 internal/app/ 进程装配、health、worker 生命周期 internal/config/ 配置解析和默认值 + internal/modules/roomnotice/ 房间私有通知模块 internal/modules/walletnotice/ 钱包余额通知模块 internal/platform/mysql/ notice-service MySQL 连接池 ``` @@ -76,6 +83,34 @@ sequenceDiagram 主请求链路只等待钱包扣费和房间状态提交,不等待腾讯云 IM 私有通知。因此送礼请求不会因为 IM 抖动变慢。IM 投递失败时,用户仍可以通过钱包接口拉取最终余额;notice worker 会按退避策略补偿。 +## 房间踢人私有通知链路 + +```mermaid +sequenceDiagram + participant Owner as Room Owner App + participant Gateway as gateway-service + participant Room as room-service + participant RoomDB as hyapp_room + participant Notice as notice-service + participant NoticeDB as hyapp_notice + participant TencentIM as Tencent IM + participant Target as Kicked User App + + Owner->>Gateway: POST /api/v1/rooms/user/kick + Gateway->>Room: KickUser(command_id, target_user_id) + Room->>Room: remove presence, release mic, write ban + Room->>RoomDB: command log + snapshot + room_outbox.RoomUserKicked + Room-->>Gateway: success + Room-->>TencentIM: room outbox worker deletes group member and sends group event + Notice->>RoomDB: claim RoomUserKicked + Notice->>NoticeDB: notice_delivery_events=delivering + Notice->>TencentIM: C2C TIMCustomElem(room_notice) + TencentIM-->>Target: private kicked notice + Notice->>NoticeDB: delivered / retryable / failed +``` + +房间群消息和 C2C 私有通知使用同一个 `event_id`,客户端按 `event_id` 去重即可。notice-service 不修改 `room_outbox.status`,它只用 `notice_delivery_events` 记录自己的 C2C 投递状态,避免和 room-service 群消息 worker 互相覆盖。 + ## Payload 约定 `WalletBalanceChanged` 发送给客户端的核心字段: @@ -126,16 +161,25 @@ sequenceDiagram 本地默认关闭 worker,避免误发真实腾讯云 IM: ```yaml +wallet_database: "hyapp_wallet" +room_database: "hyapp_room" + tencent_im: enabled: false wallet_notice_worker: enabled: false + +room_notice_worker: + enabled: false ``` -线上启用钱包余额通知必须同时开启: +线上启用私有通知必须同时开启腾讯云 IM,并配置对应 owner outbox 所在库名: ```yaml +wallet_database: "hyapp_wallet" +room_database: "hyapp_room" + tencent_im: enabled: true sdk_app_id: 1400000000 @@ -148,6 +192,13 @@ wallet_notice_worker: batch_size: 100 lock_ttl: 30s max_retry_count: 10 + +room_notice_worker: + enabled: true + poll_interval: 500ms + batch_size: 100 + lock_ttl: 30s + max_retry_count: 10 ``` `notice-service` 使用 `13009` 作为 gRPC health 端口,`13109` 作为 HTTP health 端口。 @@ -155,10 +206,11 @@ wallet_notice_worker: ## 后续扩展顺序 1. 钱包余额通知:已按 `walletnotice` 模块落地。 -2. 幸运礼物中奖:仍由 `wallet-service` 写余额 outbox;notice 不需要新增特殊账务逻辑,只要客户端按 `balance_version` 更新。 -3. 活动/系统私有通知:新增 `activitynotice` 模块,读取 activity outbox,复用 `notice_delivery_events` 或新增同语义位点表。 -4. 站内 inbox:新增 inbox 模块,写 notice-service 自己的 inbox 表,再按客户端分页接口读取。 -5. Push:新增 push 模块,和 IM 投递使用不同 `channel`,独立重试和死信。 +2. 房间踢人私有通知:已按 `roomnotice` 模块落地,只消费 `RoomUserKicked` 的 C2C 通知。 +3. 幸运礼物中奖:仍由 `wallet-service` 写余额 outbox;notice 不需要新增特殊账务逻辑,只要客户端按 `balance_version` 更新。 +4. 活动/系统私有通知:新增 `activitynotice` 模块,读取 activity outbox,复用 `notice_delivery_events` 或新增同语义位点表。 +5. 站内 inbox:新增 inbox 模块,写 notice-service 自己的 inbox 表,再按客户端分页接口读取。 +6. Push:新增 push 模块,和 IM 投递使用不同 `channel`,独立重试和死信。 ## 真实库验证 diff --git a/docs/openapi/gateway.swagger.yaml b/docs/openapi/gateway.swagger.yaml index 0b320cab..a0398997 100644 --- a/docs/openapi/gateway.swagger.yaml +++ b/docs/openapi/gateway.swagger.yaml @@ -959,7 +959,7 @@ paths: - rooms summary: Mine 房间关系流 operationId: listRoomFeeds - description: 查询 Mine 页下方 Visited/Friend/Following 房间流;`visited` 读取 JoinRoom 写入的房间访问索引,`friend/following` 由 gateway 先读取 user-service 关系事实,再让 room-service 返回这些关系用户的 active 房间卡片和 `im_group_id`,不作为公共房间发现列表。 + description: 查询 Mine 页下方 Visited/Friend/Following/Followed 房间流;`visited` 读取 JoinRoom 写入的房间访问索引,`friend/following` 由 gateway 先读取 user-service 关系事实,`followed` 读取 room-service 房间关注关系,再让 room-service 返回 active 房间卡片和 `im_group_id`,不作为公共房间发现列表。 security: - BearerAuth: [] parameters: @@ -971,6 +971,7 @@ paths: - visited - friend - following + - followed - name: cursor in: query required: false @@ -982,7 +983,7 @@ paths: format: int32 responses: "200": - description: 查询成功;`visited` 由 JoinRoom 成功写入,`friend/following` 同步使用 user-service 好友/关注关系,不依赖 Redis 缓存命中。 + description: 查询成功;`visited` 由 JoinRoom 成功写入,`friend/following` 同步使用 user-service 好友/关注关系,`followed` 同步使用 room-service 房间关注关系,不依赖 Redis 缓存命中。 schema: $ref: "#/definitions/RoomListEnvelope" "400": @@ -1068,6 +1069,63 @@ paths: $ref: "#/responses/Conflict" "502": $ref: "#/responses/UpstreamError" + /api/v1/rooms/{room_id}/follow: + post: + tags: + - rooms + summary: 关注房间 + operationId: followRoom + description: 使用 access token user_id 建立当前用户对房间的关注关系;重复关注幂等,`followed_at_ms` 不因重复点击刷新。 + security: + - BearerAuth: [] + parameters: + - name: room_id + in: path + required: true + type: string + pattern: "^[A-Za-z0-9_-]{1,48}$" + maxLength: 48 + responses: + "200": + description: 关注成功,`data.is_followed=true`。 + schema: + $ref: "#/definitions/RoomFollowEnvelope" + "400": + $ref: "#/responses/BadRequest" + "401": + $ref: "#/responses/Unauthorized" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "502": + $ref: "#/responses/UpstreamError" + delete: + tags: + - rooms + summary: 取消关注房间 + operationId: unfollowRoom + description: 使用 access token user_id 取消当前用户对房间的关注关系;未关注时按幂等成功返回 `is_followed=false`。 + security: + - BearerAuth: [] + parameters: + - name: room_id + in: path + required: true + type: string + pattern: "^[A-Za-z0-9_-]{1,48}$" + maxLength: 48 + responses: + "200": + description: 取消成功,`data.is_followed=false`。 + schema: + $ref: "#/definitions/RoomFollowEnvelope" + "400": + $ref: "#/responses/BadRequest" + "401": + $ref: "#/responses/Unauthorized" + "502": + $ref: "#/responses/UpstreamError" /api/v1/rooms/create: post: tags: @@ -1435,6 +1493,40 @@ paths: $ref: "#/responses/Internal" "502": $ref: "#/responses/UpstreamError" + /api/v1/rooms/password: + post: + tags: + - rooms + summary: 设置或清空房间密码 + operationId: setRoomPassword + description: 仅房主可调用。`locked=true` 时 `password` 必须非空;`locked=false` 清空密码并解除锁房。 + security: + - BearerAuth: [] + parameters: + - name: body + in: body + required: true + schema: + $ref: "#/definitions/SetRoomPasswordRequest" + responses: + "200": + description: 密码状态修改成功,`data.room.locked` 返回最新锁房标识。 + schema: + $ref: "#/definitions/SetRoomPasswordEnvelope" + "400": + $ref: "#/responses/BadRequest" + "401": + $ref: "#/responses/Unauthorized" + "403": + $ref: "#/responses/Forbidden" + "404": + $ref: "#/responses/NotFound" + "409": + $ref: "#/responses/Conflict" + "500": + $ref: "#/responses/Internal" + "502": + $ref: "#/responses/UpstreamError" /api/v1/rooms/admin/set: post: tags: @@ -3771,6 +3863,13 @@ definitions: description: 房间命令幂等键;客户端按用户动作生成,同一动作的 HTTP 重试必须复用。 role: type: string + enum: + - audience + description: 首版固定 audience;上麦成功后客户端再切换发布角色。 + password: + type: string + maxLength: 64 + description: 锁房时必填;只用于本次 JoinRoom 校验,服务端不保存明文。 RoomHeartbeatRequest: type: object required: @@ -3879,6 +3978,19 @@ definitions: description: 房间命令幂等键;客户端按用户动作生成,同一动作的 HTTP 重试必须复用。 enabled: type: boolean + SetRoomPasswordRequest: + type: object + properties: + room_id: + type: string + command_id: + type: string + description: 房间命令幂等键;客户端按用户动作生成,同一动作的 HTTP 重试必须复用。 + locked: + type: boolean + password: + type: string + description: "`locked=true` 时必填;`locked=false` 时忽略。" SetRoomAdminRequest: type: object properties: @@ -4030,6 +4142,8 @@ definitions: type: string chat_enabled: type: boolean + locked: + type: boolean mic_seats: type: array items: @@ -4089,6 +4203,9 @@ definitions: type: string status: type: string + locked: + type: boolean + description: true 表示该房间需要入房密码;列表和搜索只返回标识,不返回密码。 heat: type: integer format: int64 @@ -4160,6 +4277,9 @@ definitions: type: string chat_enabled: type: boolean + locked: + type: boolean + description: true 表示该房间需要入房密码。 heat: type: integer format: int64 @@ -4303,6 +4423,27 @@ definitions: properties: room: $ref: "#/definitions/RoomSnapshot" + is_followed: + type: boolean + description: 当前 token 用户是否已关注该房间;来自 room-service 房间关注关系,不属于 Room Cell 核心状态。 + server_time_ms: + type: integer + format: int64 + RoomFollowData: + type: object + required: + - room_id + - is_followed + - server_time_ms + properties: + room_id: + type: string + is_followed: + type: boolean + followed_at_ms: + type: integer + format: int64 + description: POST 关注成功时返回;DELETE 取消关注时省略。 server_time_ms: type: integer format: int64 @@ -4465,6 +4606,12 @@ definitions: $ref: "#/definitions/CommandResult" room: $ref: "#/definitions/RoomSnapshot" + rtc_kicked: + type: boolean + description: room-service 是否已通过 TRTC 服务端接口移除目标用户;失败不回滚踢人事实。 + rtc_kick_error: + type: string + description: TRTC 服务端踢人失败原因,仅用于排障和告警。 UnbanUserResponse: type: object properties: @@ -4747,6 +4894,13 @@ definitions: properties: data: $ref: "#/definitions/RoomSnapshotData" + RoomFollowEnvelope: + allOf: + - $ref: "#/definitions/GatewayOKEnvelopeBase" + - type: object + properties: + data: + $ref: "#/definitions/RoomFollowData" JoinRoomEnvelope: allOf: - $ref: "#/definitions/GatewayOKEnvelopeBase" @@ -4810,6 +4964,13 @@ definitions: properties: data: $ref: "#/definitions/SetChatEnabledResponse" + SetRoomPasswordEnvelope: + allOf: + - $ref: "#/definitions/GatewayOKEnvelopeBase" + - type: object + properties: + data: + $ref: "#/definitions/UpdateRoomProfileResponse" SetRoomAdminEnvelope: allOf: - $ref: "#/definitions/GatewayOKEnvelopeBase" diff --git a/docs/房间区域置顶.md b/docs/房间区域置顶.md new file mode 100644 index 00000000..d6fc1fed --- /dev/null +++ b/docs/房间区域置顶.md @@ -0,0 +1,46 @@ +# 房间区域置顶 + +房间置顶是公共房间发现列表的运营排序能力。房间列表按 `visible_region_id` 隔离,所以置顶也按区域生效:后台选择一个房间后,后端使用该房间当前 `visible_region_id` 建立 `room_region_pins` 记录。 + +## 边界 + +- `room-service` 仍然是房间状态 owner;置顶不进入 Room Cell、snapshot 或 command log。 +- 置顶只影响 `GET /api/v1/rooms?tab=hot/new` 的排序,不影响进房权限。 +- 有效置顶条件为 `status=active` 且 `expires_at_ms > now_ms`。 +- 房间改区域后,旧区域置顶不会自动迁移到新区域;后台需要取消旧置顶并在新区域重新置顶。 + +## 排序 + +同一区域公共列表排序: + +1. 有效置顶房间排在普通房间之前。 +2. 置顶房间按 `weight DESC, expires_at_ms DESC, room_id ASC`。 +3. 非置顶房间保留原排序:`hot` 按 `sort_score DESC`,`new` 按 `created_at_ms DESC`。 + +列表 cursor 包含置顶分区、权重、过期时间和原列表排序键,跨页时不会重复返回置顶房间。 + +## 后台接口 + +后台接口使用后台登录 token 和 `/api/v1` 前缀。 + +| 方法 | 路径 | 权限 | 说明 | +| --- | --- | --- | --- | +| `GET` | `/api/v1/admin/rooms/pins` | `room-pin:view` | 查询房间置顶列表,默认只返回有效置顶 | +| `POST` | `/api/v1/admin/rooms/pins` | `room-pin:create` | 新增或恢复房间置顶 | +| `DELETE` | `/api/v1/admin/rooms/pins/{pin_id}` | `room-pin:cancel` | 取消房间置顶 | + +创建请求: + +```json +{ + "roomId": "room_123", + "weight": 100, + "durationDays": 30 +} +``` + +- `roomId` 可以是长房间 ID 或短房间 ID,最终落库使用长房间 ID。 +- `durationDays` 不传时默认 30 天。 +- 只能置顶当前 `active` 房间。 + +列表返回的 `room` 包含房间长短 ID、昵称、头像和区域;`user` 包含房主头像、长短 ID 和昵称;`remainingMs` 是当前 UTC 业务时间下的剩余毫秒数。 diff --git a/docs/接口清单.md b/docs/接口清单.md index 1e264e5a..9c8fcd6c 100644 --- a/docs/接口清单.md +++ b/docs/接口清单.md @@ -54,12 +54,14 @@ | DELETE | `/api/v1/users/{user_id}/friend` | users | `deleteFriend` | 双向删除好友关系 | | GET | `/api/v1/rooms` | rooms | `listRooms` | 房间发现列表,支持 `tab=hot/new`,卡片返回 `im_group_id` | | GET | `/api/v1/rooms/me` | rooms | `getMyRoom` | 查询 Mine 顶部我的房间卡片 | -| GET | `/api/v1/rooms/feeds` | rooms | `listRoomFeeds` | Mine 页 Visited/Friend/Following 房间流 | +| GET | `/api/v1/rooms/feeds` | rooms | `listRoomFeeds` | Mine 页 Visited/Friend/Following/Followed 房间流 | | GET | `/api/v1/rooms/current` | rooms | `getCurrentRoom` | 查询当前可恢复房间 | | GET | `/api/v1/rooms/snapshot` | rooms | `getRoomSnapshot` | 查询房间完整快照 | | GET | `/api/v1/rooms/{room_id}/detail` | rooms | `getRoomDetail` | 查询房间详情页首屏聚合包 | | GET | `/api/v1/rooms/{room_id}/online-users` | rooms | `listRoomOnlineUsers` | 分页查询房间在线用户 | | GET | `/api/v1/rooms/{room_id}/gift-panel` | rooms | `getRoomGiftPanel` | 查询房间礼物面板初始化数据 | +| POST | `/api/v1/rooms/{room_id}/follow` | rooms | `followRoom` | 关注房间 | +| DELETE | `/api/v1/rooms/{room_id}/follow` | rooms | `unfollowRoom` | 取消关注房间 | | POST | `/api/v1/rooms/create` | rooms | `createRoom` | 创建房间 | | POST | `/api/v1/rooms/profile/update` | rooms | `updateRoomProfile` | 修改房间资料和座位数 | | POST | `/api/v1/rooms/join` | rooms | `joinRoom` | 加入房间并返回首屏数据和 RTC token | @@ -73,6 +75,7 @@ | POST | `/api/v1/rooms/mic/mute` | rooms | `setMicMute` | 设置服务端可见麦克风静音状态 | | POST | `/api/v1/rooms/mic/lock` | rooms | `setMicSeatLock` | 锁定或解锁麦位 | | POST | `/api/v1/rooms/chat/enabled` | rooms | `setChatEnabled` | 开启或关闭房间公屏 | +| POST | `/api/v1/rooms/password` | rooms | `setRoomPassword` | 房主设置或清空房间入房密码 | | POST | `/api/v1/rooms/admin/set` | rooms | `setRoomAdmin` | 添加或移除房间管理员 | | POST | `/api/v1/rooms/user/mute` | rooms | `muteUser` | 设置房间内禁言 | | POST | `/api/v1/rooms/user/kick` | rooms | `kickUser` | 踢出房间用户 | @@ -177,6 +180,9 @@ | POST | `/api/v1/admin/resources/{resource_id}/disable` | admin | `disableResource` | disableResource | | POST | `/api/v1/admin/resources/{resource_id}/enable` | admin | `enableResource` | enableResource | | GET | `/api/v1/admin/rooms` | admin | `listRooms` | listRooms | +| GET | `/api/v1/admin/rooms/pins` | admin | `listRoomPins` | 查询房间区域置顶列表 | +| POST | `/api/v1/admin/rooms/pins` | admin | `createRoomPin` | 新增或恢复房间区域置顶 | +| DELETE | `/api/v1/admin/rooms/pins/{pin_id}` | admin | `cancelRoomPin` | 取消房间区域置顶 | | DELETE | `/api/v1/admin/rooms/{room_id}` | admin | `deleteRoom` | deleteRoom | | PATCH | `/api/v1/admin/rooms/{room_id}` | admin | `updateRoom` | updateRoom | | GET | `/api/v1/app/users` | admin | `appListUsers` | appListUsers | @@ -292,6 +298,8 @@ | POST | `/hyapp.room.v1.RoomCommandService/KickUser` | room-command | `roomKickUser` | 踢出房间用户 | | POST | `/hyapp.room.v1.RoomCommandService/UnbanUser` | room-command | `roomUnbanUser` | 解除房间 ban | | POST | `/hyapp.room.v1.RoomCommandService/SendGift` | room-command | `roomSendGift` | 发送礼物 | +| POST | `/hyapp.room.v1.RoomCommandService/FollowRoom` | room-command | `roomFollowRoom` | 建立用户对房间的关注关系 | +| POST | `/hyapp.room.v1.RoomCommandService/UnfollowRoom` | room-command | `roomUnfollowRoom` | 取消用户对房间的关注关系 | | POST | `/hyapp.room.v1.RoomGuardService/CheckSpeakPermission` | room-guard | `roomCheckSpeakPermission` | 发言前守卫 | | POST | `/hyapp.room.v1.RoomGuardService/VerifyRoomPresence` | room-guard | `roomVerifyRoomPresence` | 入群前 presence 守卫 | | POST | `/hyapp.room.v1.RoomQueryService/GetCurrentRoom` | room-query | `roomGetCurrentRoom` | 查询用户当前可恢复房间 | diff --git a/docs/社交关系接口.md b/docs/社交关系接口.md index f7aceb28..2c1153e7 100644 --- a/docs/社交关系接口.md +++ b/docs/社交关系接口.md @@ -110,7 +110,8 @@ sequenceDiagram - `GET /api/v1/rooms/feeds?tab=visited` 是房间访问历史,只由 JoinRoom 成功后写入 room-service 的房间 feed 索引;不要使用 `/users/{user_id}/visit` 用户主页访问记录填充。 - `GET /api/v1/rooms/feeds?tab=following` 由 gateway 调用 `ListFollowing` 读取关注用户,再把关系用户和 `followed_at_ms` 传给 room-service 查询 active 房间卡片。 - `GET /api/v1/rooms/feeds?tab=friend` 由 gateway 调用 `ListFriends` 读取好友用户,再把关系用户和 `friended_at_ms` 传给 room-service 查询 active 房间卡片。 -- 好友/关注关系事实仍归 user-service;room-service 只拥有房间状态和房间列表卡片,不保存好友/关注关系作为事实。 +- `GET /api/v1/rooms/feeds?tab=followed` 是房间关注列表,只读取 room-service 的 `room_follows` 用户-房间关系,再 join active 房间卡片。 +- 好友/用户关注关系事实仍归 user-service;房间关注关系事实归 room-service,不能用 user-service 的用户关注表替代。 ## App Notes diff --git a/docs/语音房区域房间列表架构.md b/docs/语音房区域房间列表架构.md index 9b5688c1..56e9b6f8 100644 --- a/docs/语音房区域房间列表架构.md +++ b/docs/语音房区域房间列表架构.md @@ -93,7 +93,7 @@ sequenceDiagram G->>U: GetUser(user_id) U-->>G: region_id G->>R: ListRooms(region_id, tab, cursor, limit) - R->>S: Read room_list_entries or Redis ZSET + R->>S: Read room_list_entries + active room_region_pins S-->>R: RoomListItem[] R-->>G: ListRoomsResponse G-->>C: {code,message,request_id,data} @@ -107,6 +107,14 @@ gateway -> room-service.JoinRoom -> Tencent IM join group callback guard 因此列表允许秒级最终一致;真正能否进入房间由 `JoinRoom` 和 IM 守卫决定。 +区域置顶只影响当前 `visible_region_id` 的公共发现列表排序。`room_region_pins` 保存 `app_code + visible_region_id + room_id` 的运营置顶关系;查询时只 join `status=active` 且 `expires_at_ms > now_ms` 的记录,排序优先级为: + +1. 有效区域置顶在普通房间之前。 +2. 置顶房间按 `weight DESC, expires_at_ms DESC, room_id ASC`。 +3. 普通房间继续按 `hot` 的 `sort_score DESC` 或 `new` 的 `created_at_ms DESC`。 + +置顶不进入 Room Cell、command log 或 snapshot;它是房间列表读模型的运营控制面。房间改区域后,旧区域置顶不会自动跨区域生效,后台需要在新区域重新建立置顶。 + ## Room Region Ownership ### CreateRoom @@ -194,6 +202,7 @@ CREATE TABLE IF NOT EXISTS room_list_entries ( cover_url VARCHAR(512) NOT NULL DEFAULT '', mode VARCHAR(64) NOT NULL, status VARCHAR(32) NOT NULL, + locked BOOLEAN NOT NULL DEFAULT FALSE, heat BIGINT NOT NULL DEFAULT 0, online_count INT NOT NULL DEFAULT 0, seat_count INT NOT NULL DEFAULT 0, @@ -222,6 +231,7 @@ CREATE TABLE IF NOT EXISTS room_list_entries ( | `cover_url` | `RoomState.RoomExt["cover_url"]` | 创建房间 | | `mode` | RoomMeta/RoomState | 创建房间或模式变更 | | `status` | RoomState | 创建、关闭、封禁、恢复 | +| `locked` | `RoomState.RoomPasswordHash != ""` | SetRoomPassword | | `heat` | RoomState | SendGift、热度刷新 | | `online_count` | RoomState presence | JoinRoom、LeaveRoom、stale cleanup | | `occupied_seat_count` | RoomState mic seats | MicUp、MicDown、ChangeMicSeat | @@ -348,6 +358,7 @@ message RoomListItem { int64 visible_region_id = 12; string app_code = 13; string room_short_id = 14; + bool locked = 15; } message ListRoomsResponse { @@ -384,6 +395,7 @@ message ListRoomsResponse { - 命令成功提交后调用 `RoomListProjector` 更新 MySQL 投影。 - 投影更新失败时写 `room_outbox` 或独立 `room_projection_tasks` 等待补偿。 - 列表查询只读 `room_list_entries`,不直接读取 Room Cell 内存。 +- 公共列表和带 `query` 的搜索列表都从同一投影读取 `locked`;它只表达是否需要入房密码,不携带密码明文或哈希。 ## Consistency Model @@ -453,7 +465,7 @@ JoinRoom(room_id, user_id) 1. 新增管理端房间区域迁移命令。 2. 新增区域迁移审计表。 -3. 支持按区域隐藏、封禁或置顶房间。 +3. 支持按区域隐藏、封禁或置顶房间;置顶由 `room_region_pins` 按区域独立维护。 ## Tests @@ -468,6 +480,7 @@ JoinRoom(room_id, user_id) | 创建房间 | 写 `rooms.visible_region_id` 和 `room_list_entries` | | 房主改国家 | 已创建房间列表区域不变 | | Join/Leave | 列表在线人数最终更新 | +| 区域置顶 | 置顶房间排在同区域普通房间前,翻页不重复 | | SendGift | 热度和排序分更新 | | Redis miss | MySQL 回源成功 | | 列表房间已关闭 | `JoinRoom` 拒绝,客户端刷新 | diff --git a/docs/语音房基础闭环实现.md b/docs/语音房基础闭环实现.md index 61de7060..f5736f57 100644 --- a/docs/语音房基础闭环实现.md +++ b/docs/语音房基础闭环实现.md @@ -251,7 +251,7 @@ return snapshot ## Tencent IM Message Contract -room-service 发给腾讯云 IM 的房间系统消息使用 `TIMCustomElem`。 +room-service 发给腾讯云 IM 群的房间系统消息使用 `TIMCustomElem`。给单个用户的私有通知不从这个 bridge 发,统一由 notice-service 读取 owner outbox 后走腾讯云 IM C2C。 客户端只依赖以下稳定字段: @@ -290,6 +290,8 @@ room-service 发给腾讯云 IM 的房间系统消息使用 `TIMCustomElem`。 | `room_user_kicked` | `RoomUserKicked` | | `room_gift_sent` | `RoomGiftSent` | +`room_user_kicked` 还会由 notice-service 读取同一条 `RoomUserKicked` 事实,给被踢用户发送 C2C `room_notice`。room-service 仍负责把目标用户移出腾讯 IM 群;notice-service 不处理建群、退群或群成员权限。 + ## Recovery Rules 节点重启或接管时: diff --git a/docs/语音房客户端接口流程.md b/docs/语音房客户端接口流程.md index 09e5eac8..d5550376 100644 --- a/docs/语音房客户端接口流程.md +++ b/docs/语音房客户端接口流程.md @@ -7,7 +7,7 @@ | Area | Owner | Rule | | --- | --- | --- | | HTTP 入口 | `gateway-service` | 鉴权、profile gate、协议转换、腾讯 IM/RTC token 签发 | -| 房间业务状态 | `room-service` | Room Cell、presence、麦位、房管、snapshot、outbox | +| 房间业务状态 | `room-service` | Room Cell、presence、麦位、房管、snapshot、outbox、房间关注关系 | | 房间长连接和公屏 | 腾讯云 IM SDK | 客户端登录、房间群、公屏、系统消息接收 | | 真实音频频道 | 腾讯云 RTC SDK | 进 RTC 房、切换 audience/anchor、发音频 | | 用户主数据 | `user-service` | 登录、资料完成状态、用户区域、push token | @@ -40,7 +40,7 @@ sequenceDiagram R-->>G: owner room card from rooms + snapshot G-->>C: has_room + room card + im_group_id - C->>G: GET /api/v1/rooms/feeds?tab=visited|friend|following + C->>G: GET /api/v1/rooms/feeds?tab=visited|friend|following|followed opt tab=friend|following G->>U: ListFriends/ListFollowing(cursor) U-->>G: related user ids + relation times @@ -64,7 +64,14 @@ sequenceDiagram G-->>C: optional active-room resync C->>G: GET /api/v1/rooms/{room_id}/detail - G-->>C: render-ready room detail package + G-->>C: render-ready room detail package + is_followed + + opt user toggles room follow + C->>G: POST|DELETE /api/v1/rooms/{room_id}/follow + G->>R: FollowRoom|UnfollowRoom(user_id from token) + R-->>G: current follow state + G-->>C: is_followed + end loop while room page is active C->>G: POST /api/v1/rooms/heartbeat @@ -78,32 +85,48 @@ sequenceDiagram | 1 | `GET /api/v1/im/usersig` | yes | 用户级 IM 登录票据,可在 App 启动后预取并按 TTL 复用 | | 2 | Tencent IM SDK `login` | yes | 客户端先建立 IM 身份,房间群仍等 JoinRoom 成功后再进 | | 3 | `GET /api/v1/rooms/me` | yes for Mine top card | 直接读取 owner 房间权威元数据,不依赖发现页投影 | -| 4 | `GET /api/v1/rooms/feeds?tab=visited\|friend\|following` | yes for Mine lists | Mine 列表 tab;`visited` 由 JoinRoom 成功写入,`friend/following` 由 gateway 先查 user-service 关系,再让 room-service 返回这些关系用户的 active 房间卡片 | +| 4 | `GET /api/v1/rooms/feeds?tab=visited\|friend\|following\|followed` | yes for Mine lists | Mine 列表 tab;`visited` 由 JoinRoom 成功写入,`friend/following` 由 gateway 先查 user-service 关系,`followed` 直接读取 room-service 的房间关注关系 | | 5 | `POST /api/v1/rooms/join` | yes | 建立业务 presence,并返回首屏房间数据和内嵌 RTC token | | 6 | Tencent IM SDK `joinGroup(im_group_id)` | yes | 必须在 JoinRoom 成功后执行,IM 回调守卫会校验 room-service presence | | 7 | Tencent RTC SDK `enterRoom` | yes for voice room audio | 使用 JoinRoom 响应里的 `rtc.token` 进入真实音频频道旁听 | | 8 | `POST /api/v1/rooms/heartbeat` | yes | 刷新业务 presence,避免 stale timeout | -| 9 | `GET /api/v1/rooms/{room_id}/detail` | optional after join/restore | 详情页聚合包;用于 JoinRoom 后补偿刷新、回前台、设计稿首屏重绘 | -| 10 | `GET /api/v1/rooms/{room_id}/gift-panel` | lazy on gift button | 打开礼物面板时再拉,不放进房间首屏 | -| 11 | `GET /api/v1/rooms/{room_id}/online-users` | lazy on online count | 点击右上角在线人数时分页拉取 | +| 9 | `GET /api/v1/rooms/{room_id}/detail` | optional after join/restore | 详情页聚合包;返回 `is_followed`,用于关注按钮初始状态 | +| 10 | `POST /api/v1/rooms/{room_id}/follow` / `DELETE /api/v1/rooms/{room_id}/follow` | user action | 建立或取消当前用户对房间的关注关系;gateway 只使用 token user_id | +| 11 | `GET /api/v1/rooms/{room_id}/gift-panel` | lazy on gift button | 打开礼物面板时再拉,不放进房间首屏 | +| 12 | `GET /api/v1/rooms/{room_id}/online-users` | lazy on online count | 点击右上角在线人数时分页拉取 | 如果 JoinRoom 响应里的 `rtc.available=false`,客户端可以先展示房间页并重试 `POST /api/v1/rtc/token`;RTC 失败不能回滚已经成功的业务 presence。 ### Mine Feed Cache Boundary -当前 `friend/following` 不强制加 Redis。原因是关注、取关、同意好友和删除好友都要求列表立即反映关系事实;首版直接读 user-service MySQL 关系表,再查 room-service active 房间卡片,正确性更直接。 +当前 `friend/following/followed` 不强制加 Redis。原因是关注、取关、同意好友和删除好友都要求列表立即反映关系事实;`friend/following` 直接读 user-service MySQL 关系表,`followed` 直接读 room-service 的 `room_follows`,再查 active 房间卡片,正确性更直接。 后续可以加 Redis 的位置: - `hot/new` 公共列表:room-service 用 Redis ZSET 缓存排序 room_id,miss 后回源 `room_list_entries`。 - 房间卡片短 TTL 缓存:key 可按 `app_code + region_id + room_id`,但 MySQL `room_list_entries` 仍是事实来源。 - `friend/following` 关系 ID 短 TTL 缓存:只能放在 gateway 或 user-service 读优化层,`follow/unfollow/accept/delete` 成功后必须主动失效。 +- `followed` 房间 ID 短 TTL 缓存:只能放在 room-service 读优化层,`FollowRoom/UnfollowRoom` 成功后必须主动失效。 - `visited` room_id 列表缓存:可以由 JoinRoom 成功后刷新,Redis 写失败不能影响 JoinRoom。 -不建议首版缓存 `friend/following` 完整房间卡片列表。这个列表同时依赖 user-service 关系事实、room-service 房间 active 状态、区域过滤和搜索条件,失效面较大;先保持同步查询,等 QPS 或延迟数据证明需要缓存再加。 +不建议首版缓存 `friend/following/followed` 完整房间卡片列表。这个列表同时依赖关系事实、room-service 房间 active 状态、区域过滤和搜索条件,失效面较大;先保持同步查询,等 QPS 或延迟数据证明需要缓存再加。 ## Core Interfaces +### Room List Cards + +```http +GET /api/v1/rooms?tab=hot&query=100001 +GET /api/v1/rooms/feeds?tab=followed +Authorization: Bearer +``` + +Rules: + +- 公共发现列表、房间搜索和 Mine 页房间流都返回同一套房间卡片字段。 +- `locked=true` 表示 JoinRoom 需要 `password`;列表和搜索只返回锁房标识,不返回明文或哈希。 +- `im_group_id` 只代表腾讯 IM 目标群,不能绕过 JoinRoom 的锁房、ban 和 presence 校验。 + ### Join Room ```http @@ -118,7 +141,8 @@ Request: { "room_id": "lalu_xxx", "command_id": "cmd_join___", - "role": "audience" + "role": "audience", + "password": "1234" } ``` @@ -143,6 +167,7 @@ Response `data`: "mode": "voice", "status": "active", "chat_enabled": true, + "locked": true, "heat": 1000, "online_count": 26, "seat_count": 15, @@ -209,6 +234,8 @@ Rules: - `room_id` 必须来自房间列表、分享或恢复接口,不能由客户端拼业务含义。 - `command_id` 由客户端按用户动作生成,用于房间命令幂等;重试同一次进房必须复用同一个值。 - `role` 只作为展示默认值,不能通过自报 `admin/host/owner` 获得权限。 +- 带锁房间的新进入用户必须传正确 `password`;密码错误返回 403,不创建 presence,不签发 RTC token。 +- 房主不需要密码进入自己的房间;已在房内的用户不会因为房主重新设置密码被挤出。 - `im.group_id` 当前等于 `room_id`,但客户端必须使用服务端返回值,不能硬编码映射规则。 - JoinRoom 成功后才能调用腾讯 IM SDK `joinGroup`;列表里的 `im_group_id` 只用于准备,不代表入群授权。 - JoinRoom 会尝试内嵌签发 RTC token;签发失败时返回 `rtc.available=false`,客户端可以继续展示房间并单独重试 `/api/v1/rtc/token`。 @@ -229,6 +256,7 @@ Response `data`: "seats": [], "rank_top": [], "online_count": 30, + "is_followed": true, "permissions": {}, "profiles": [], "im": {}, @@ -240,9 +268,35 @@ Rules: - `detail` 只读 Room Cell/snapshot,不刷新 heartbeat,不隐式进房。 - viewer 必须仍在 room-service presence 内;未进房、被踢或被 ban 返回 `PERMISSION_DENIED`。 +- `is_followed` 来自 room-service 的 `room_follows` 关系表,只表达当前 token 用户是否关注该房间,不写入 Room Cell 快照。 - `permissions.can_close_room` 表示设计稿右上角电源按钮可用,但当前语义是“退出房间”,不是关闭房间生命周期。 - `profiles` 只返回首屏需要的 owner、host、viewer、麦位用户和榜单 top 用户。完整在线用户资料走在线用户分页或 `users/room-display-profiles:batch`。 +### Follow Room + +```http +POST /api/v1/rooms/{room_id}/follow +DELETE /api/v1/rooms/{room_id}/follow +Authorization: Bearer +``` + +Response `data`: + +```json +{ + "room_id": "lalu_xxx", + "is_followed": true, + "followed_at_ms": 1700000000123, + "server_time_ms": 1700000000123 +} +``` + +Rules: + +- POST 重复关注保持幂等;已 active 的关注不会刷新 `followed_at_ms`,避免列表排序被重复点击打乱。 +- DELETE 未关注或历史关系已取消时按幂等成功返回 `is_followed=false`。 +- 关注列表走 `GET /api/v1/rooms/feeds?tab=followed`,只返回当前仍 active 且命中 viewer 区域桶的房间卡片。 + ### Online Users ```http @@ -638,6 +692,7 @@ Rules: | `POST /api/v1/rooms/mic/lock` | `room_id, command_id, seat_no, locked` | 锁/解锁麦位 | | `POST /api/v1/rooms/mic/mute` | `room_id, command_id, target_user_id, muted` | 修改麦克风静音状态;该状态会同步给房间其他用户 | | `POST /api/v1/rooms/chat/enabled` | `room_id, command_id, enabled` | 开/关公屏,影响发言守卫 | +| `POST /api/v1/rooms/password` | `room_id, command_id, locked, password` | 房主设置或清空入房密码;成功后房间快照、列表和搜索的 `locked` 同步刷新 | | `POST /api/v1/rooms/admin/set` | `room_id, command_id, target_user_id, is_admin` | 设置或取消房管 | | `POST /api/v1/rooms/host/transfer` | `room_id, command_id, target_user_id` | 转移主持人 | | `POST /api/v1/rooms/user/mute` | `room_id, command_id, target_user_id, muted, reason` | 禁言或解禁 | @@ -648,7 +703,10 @@ Rules: Management event handling: - 管理动作成功后,room-service 写 command log、snapshot 和 outbox。 -- 客户端应通过腾讯云 IM 房间系统消息更新 UI。 +- 踢人成功后 room-service 会移除业务 presence、释放麦位、写入房间 ban,并通过 room-service 房间 IM bridge 补偿移出腾讯 IM 房间群。 +- 被踢本人私有通知由 notice-service 监听 `room_outbox.RoomUserKicked` 后发送 C2C `room_notice`;notice-service 不负责建群、踢群成员或房间群系统消息。 +- 踢人成功后 room-service 会尽力调用 TRTC `RemoveUserByStrRoomId` 移出 RTC 房间;失败不回滚踢人事实,客户端仍必须按 IM/RTC 回调和后续 403 兜底清理。 +- 客户端应通过腾讯云 IM 房间系统消息、notice-service C2C 私有通知、IM 群成员移除回调和 RTC 退房回调更新 UI。 - 如果本地 UI 状态和系统消息冲突,以最新 room snapshot 和 `room_version` 为准。 ## Gift And Interaction diff --git a/server/admin/docs/权限管理.md b/server/admin/docs/权限管理.md index e1a27af1..a9f3c323 100644 --- a/server/admin/docs/权限管理.md +++ b/server/admin/docs/权限管理.md @@ -244,6 +244,9 @@ | `room:view` | `menu` | 房间列表、详情、房间状态 | | `room:update` | `button` | 后台修改房间展示资料、模式、状态、区域 | | `room:delete` | `button` | 后台删除房间 | +| `room-pin:view` | `menu` | 房间置顶菜单、置顶列表 | +| `room-pin:create` | `button` | 新增或恢复区域房间置顶 | +| `room-pin:cancel` | `button` | 取消区域房间置顶 | | `room-config:view` | `menu` | 房间配置页面、读取座位数配置 | | `room-config:update` | `button` | 保存启用座位数和默认座位数 | | `room:create` | `button` | 后台创建房间 | diff --git a/server/admin/internal/modules/roomadmin/handler.go b/server/admin/internal/modules/roomadmin/handler.go index a0a8147d..800817bb 100644 --- a/server/admin/internal/modules/roomadmin/handler.go +++ b/server/admin/internal/modules/roomadmin/handler.go @@ -34,6 +34,48 @@ func (h *Handler) ListRooms(c *gin.Context) { response.OK(c, response.Page{Items: items, Page: query.Page, PageSize: query.PageSize, Total: total}) } +func (h *Handler) ListRoomPins(c *gin.Context) { + query, ok := parseRoomPinListQuery(c) + if !ok { + return + } + items, total, err := h.service.ListRoomPins(c.Request.Context(), query) + if err != nil { + response.ServerError(c, "获取房间置顶列表失败") + return + } + response.OK(c, response.Page{Items: items, Page: query.Page, PageSize: query.PageSize, Total: total}) +} + +func (h *Handler) CreateRoomPin(c *gin.Context) { + var req createRoomPinRequest + if err := c.ShouldBindJSON(&req); err != nil { + response.BadRequest(c, "房间置顶参数不正确") + return + } + pin, err := h.service.CreateRoomPin(c.Request.Context(), req, shared.ActorFromContext(c).UserID) + if err != nil { + writeMutationError(c, err, "新增房间置顶失败") + return + } + writeRoomAuditLog(c, h.audit, "create-room-pin", "room_region_pins", pin.Room.RoomID, "success", "create regional room pin") + response.Created(c, pin) +} + +func (h *Handler) CancelRoomPin(c *gin.Context) { + pinID, ok := parseRoomPinID(c) + if !ok { + return + } + pin, err := h.service.CancelRoomPin(c.Request.Context(), pinID, shared.ActorFromContext(c).UserID) + if err != nil { + writeMutationError(c, err, "取消房间置顶失败") + return + } + writeRoomAuditLog(c, h.audit, "cancel-room-pin", "room_region_pins", strconv.FormatInt(pinID, 10), "success", "cancel regional room pin") + response.OK(c, pin) +} + func (h *Handler) GetRoomConfig(c *gin.Context) { config, err := h.service.GetRoomConfig(c.Request.Context()) if err != nil { @@ -108,6 +150,21 @@ func parseListQuery(c *gin.Context) (listQuery, bool) { return normalizeListQuery(query), true } +func parseRoomPinListQuery(c *gin.Context) (roomPinListQuery, bool) { + options := shared.ListOptions(c) + regionID, ok := parseOptionalInt64Query(c, "regionId", "region_id") + if !ok { + return roomPinListQuery{}, false + } + return normalizeRoomPinListQuery(roomPinListQuery{ + Keyword: options.Keyword, + Page: options.Page, + PageSize: options.PageSize, + RegionID: regionID, + Status: options.Status, + }), true +} + func firstQueryValue(c *gin.Context, names ...string) string { for _, name := range names { if value := strings.TrimSpace(c.Query(name)); value != "" { @@ -142,6 +199,16 @@ func parseRoomID(c *gin.Context) (string, bool) { return roomID, true } +func parseRoomPinID(c *gin.Context) (int64, bool) { + raw := strings.TrimSpace(c.Param("pin_id")) + id, err := strconv.ParseInt(raw, 10, 64) + if err != nil || id <= 0 { + response.BadRequest(c, "置顶 ID 参数不正确") + return 0, false + } + return id, true +} + func writeMutationError(c *gin.Context, err error, fallback string) { if errors.Is(err, ErrNotFound) { response.NotFound(c, "房间不存在") diff --git a/server/admin/internal/modules/roomadmin/pin.go b/server/admin/internal/modules/roomadmin/pin.go new file mode 100644 index 00000000..ca8c63ab --- /dev/null +++ b/server/admin/internal/modules/roomadmin/pin.go @@ -0,0 +1,409 @@ +package roomadmin + +import ( + "context" + "database/sql" + "errors" + "fmt" + "strconv" + "strings" + "time" + + "hyapp-admin-server/internal/appctx" +) + +const ( + roomPinStatusActive = "active" + roomPinStatusCancelled = "cancelled" + roomPinStatusExpired = "expired" + roomPinStatusAll = "all" + defaultRoomPinDays = int64(30) + maxRoomPinDays = int64(3650) + roomPinDayMillis = int64(24 * 60 * 60 * 1000) +) + +type RoomPinRoom struct { + CoverURL string `json:"coverUrl"` + RegionName string `json:"regionName"` + RoomID string `json:"roomId"` + RoomShortID string `json:"roomShortId"` + Status string `json:"status"` + Title string `json:"title"` + VisibleRegionID int64 `json:"visibleRegionId"` +} + +type RoomPin struct { + CancelledAtMS int64 `json:"cancelledAtMs"` + CancelledByAdminID uint `json:"cancelledByAdminId"` + CreatedAtMS int64 `json:"createdAtMs"` + CreatedByAdminID uint `json:"createdByAdminId"` + ExpiresAtMS int64 `json:"expiresAtMs"` + ID int64 `json:"id"` + PinnedAtMS int64 `json:"pinnedAtMs"` + RemainingMS int64 `json:"remainingMs"` + Room RoomPinRoom `json:"room"` + Status string `json:"status"` + UpdatedAtMS int64 `json:"updatedAtMs"` + User RoomOwner `json:"user"` + Weight int64 `json:"weight"` +} + +func (s *Service) ListRoomPins(ctx context.Context, query roomPinListQuery) ([]RoomPin, int64, error) { + if s.db == nil { + return nil, 0, fmt.Errorf("room mysql is not configured") + } + query = normalizeRoomPinListQuery(query) + whereSQL, args := roomPinListWhere(ctx, query, time.Now().UTC().UnixMilli()) + total, err := countRows(ctx, s.db, whereSQL, args...) + if err != nil { + return nil, 0, err + } + + rows, err := s.db.QueryContext(ctx, ` + SELECT p.id, + p.visible_region_id, + p.room_id, + p.weight, + p.status, + p.pinned_at_ms, + p.expires_at_ms, + p.cancelled_at_ms, + p.created_by_admin_id, + p.cancelled_by_admin_id, + p.created_at_ms, + p.updated_at_ms, + r.room_short_id, + r.title, + r.cover_url, + r.owner_user_id, + r.status + `+whereSQL+` + ORDER BY p.weight DESC, p.expires_at_ms DESC, p.id DESC + LIMIT ? OFFSET ? + `, append(args, query.PageSize, offset(query.Page, query.PageSize))...) + if err != nil { + return nil, 0, err + } + defer rows.Close() + + items := make([]RoomPin, 0, query.PageSize) + for rows.Next() { + item, err := scanRoomPin(rows) + if err != nil { + return nil, 0, err + } + items = append(items, item) + } + if err := rows.Err(); err != nil { + return nil, 0, err + } + if err := s.fillRoomPinDetails(ctx, items); err != nil { + return nil, 0, err + } + return items, total, nil +} + +func (s *Service) CreateRoomPin(ctx context.Context, req createRoomPinRequest, actorID uint) (RoomPin, error) { + if s.db == nil { + return RoomPin{}, fmt.Errorf("room mysql is not configured") + } + input, err := normalizeCreateRoomPinRequest(req) + if err != nil { + return RoomPin{}, err + } + + room, _, err := s.getRoomForPin(ctx, input.RoomID) + if err != nil { + return RoomPin{}, err + } + if room.Status != "active" { + return RoomPin{}, fmt.Errorf("%w: 只能置顶正常状态房间", ErrInvalidArgument) + } + + nowMS := time.Now().UTC().UnixMilli() + expiresAtMS := nowMS + input.DurationDays*roomPinDayMillis + appCode := appctx.FromContext(ctx) + if _, err := s.db.ExecContext(ctx, ` + INSERT INTO room_region_pins ( + app_code, visible_region_id, room_id, weight, status, pinned_at_ms, expires_at_ms, + cancelled_at_ms, created_by_admin_id, cancelled_by_admin_id, created_at_ms, updated_at_ms + ) VALUES (?, ?, ?, ?, ?, ?, ?, 0, ?, 0, ?, ?) + ON DUPLICATE KEY UPDATE + weight = VALUES(weight), + status = VALUES(status), + pinned_at_ms = VALUES(pinned_at_ms), + expires_at_ms = VALUES(expires_at_ms), + cancelled_at_ms = 0, + created_by_admin_id = VALUES(created_by_admin_id), + cancelled_by_admin_id = 0, + created_at_ms = VALUES(created_at_ms), + updated_at_ms = VALUES(updated_at_ms) + `, appCode, room.VisibleRegionID, room.RoomID, input.Weight, roomPinStatusActive, nowMS, expiresAtMS, actorID, nowMS, nowMS); err != nil { + return RoomPin{}, err + } + + pin, err := s.getRoomPinByRoom(ctx, room.VisibleRegionID, room.RoomID) + if err != nil { + return RoomPin{}, err + } + return pin, nil +} + +func (s *Service) CancelRoomPin(ctx context.Context, pinID int64, actorID uint) (RoomPin, error) { + if s.db == nil { + return RoomPin{}, fmt.Errorf("room mysql is not configured") + } + if pinID <= 0 { + return RoomPin{}, fmt.Errorf("%w: 置顶 ID 不正确", ErrInvalidArgument) + } + + nowMS := time.Now().UTC().UnixMilli() + appCode := appctx.FromContext(ctx) + result, err := s.db.ExecContext(ctx, ` + UPDATE room_region_pins + SET status = ?, cancelled_at_ms = ?, cancelled_by_admin_id = ?, updated_at_ms = ? + WHERE app_code = ? AND id = ? AND status <> ? + `, roomPinStatusCancelled, nowMS, actorID, nowMS, appCode, pinID, roomPinStatusCancelled) + if err != nil { + return RoomPin{}, err + } + if affected, err := result.RowsAffected(); err == nil && affected == 0 { + if _, err := s.getRoomPinByID(ctx, pinID); errors.Is(err, ErrNotFound) { + return RoomPin{}, ErrNotFound + } + } + return s.getRoomPinByID(ctx, pinID) +} + +func (s *Service) getRoomForPin(ctx context.Context, roomID string) (RoomPinRoom, int64, error) { + appCode := appctx.FromContext(ctx) + row := s.db.QueryRowContext(ctx, ` + SELECT room_id, + room_short_id, + visible_region_id, + owner_user_id, + title, + cover_url, + status + FROM room_list_entries + WHERE app_code = ? AND (room_id = ? OR room_short_id = ?) + LIMIT 1 + `, appCode, roomID, roomID) + + var room RoomPinRoom + var ownerUserID int64 + if err := row.Scan(&room.RoomID, &room.RoomShortID, &room.VisibleRegionID, &ownerUserID, &room.Title, &room.CoverURL, &room.Status); err != nil { + if errors.Is(err, sql.ErrNoRows) { + return RoomPinRoom{}, 0, ErrNotFound + } + return RoomPinRoom{}, 0, err + } + if room.Status != "active" { + room.Status = "closed" + } + return room, ownerUserID, nil +} + +func (s *Service) getRoomPinByRoom(ctx context.Context, regionID int64, roomID string) (RoomPin, error) { + return s.getRoomPin(ctx, ` + WHERE p.app_code = ? AND p.visible_region_id = ? AND p.room_id = ? + `, appctx.FromContext(ctx), regionID, roomID) +} + +func (s *Service) getRoomPinByID(ctx context.Context, pinID int64) (RoomPin, error) { + return s.getRoomPin(ctx, ` + WHERE p.app_code = ? AND p.id = ? + `, appctx.FromContext(ctx), pinID) +} + +func (s *Service) getRoomPin(ctx context.Context, whereSQL string, args ...any) (RoomPin, error) { + row := s.db.QueryRowContext(ctx, ` + SELECT p.id, + p.visible_region_id, + p.room_id, + p.weight, + p.status, + p.pinned_at_ms, + p.expires_at_ms, + p.cancelled_at_ms, + p.created_by_admin_id, + p.cancelled_by_admin_id, + p.created_at_ms, + p.updated_at_ms, + r.room_short_id, + r.title, + r.cover_url, + r.owner_user_id, + r.status + FROM room_region_pins p + JOIN room_list_entries r ON r.app_code = p.app_code AND r.room_id = p.room_id + `+whereSQL+` + LIMIT 1 + `, args...) + item, err := scanRoomPin(row) + if errors.Is(err, sql.ErrNoRows) { + return RoomPin{}, ErrNotFound + } + if err != nil { + return RoomPin{}, err + } + items := []RoomPin{item} + if err := s.fillRoomPinDetails(ctx, items); err != nil { + return RoomPin{}, err + } + return items[0], nil +} + +func roomPinListWhere(ctx context.Context, query roomPinListQuery, nowMS int64) (string, []any) { + where := []string{"p.app_code = ?"} + args := []any{appctx.FromContext(ctx)} + switch query.Status { + case roomPinStatusActive: + where = append(where, "p.status = ?", "p.expires_at_ms > ?") + args = append(args, roomPinStatusActive, nowMS) + case roomPinStatusExpired: + where = append(where, "p.status = ?", "p.expires_at_ms <= ?") + args = append(args, roomPinStatusActive, nowMS) + case roomPinStatusCancelled: + where = append(where, "p.status = ?") + args = append(args, roomPinStatusCancelled) + } + if query.RegionID > 0 { + where = append(where, "p.visible_region_id = ?") + args = append(args, query.RegionID) + } + if query.Keyword != "" { + like := "%" + query.Keyword + "%" + where = append(where, "(p.room_id LIKE ? OR r.room_short_id LIKE ? OR r.title LIKE ? OR CAST(r.owner_user_id AS CHAR) LIKE ?)") + args = append(args, like, like, like, like) + } + return ` + FROM room_region_pins p + JOIN room_list_entries r ON r.app_code = p.app_code AND r.room_id = p.room_id + WHERE ` + strings.Join(where, " AND "), args +} + +func normalizeRoomPinListQuery(query roomPinListQuery) roomPinListQuery { + if query.Page < 1 { + query.Page = 1 + } + if query.PageSize < 1 { + query.PageSize = 20 + } + if query.PageSize > 100 { + query.PageSize = 100 + } + query.Keyword = strings.TrimSpace(query.Keyword) + query.Status = normalizeRoomPinStatus(query.Status) + if query.RegionID < 0 { + query.RegionID = 0 + } + return query +} + +func normalizeRoomPinStatus(status string) string { + switch strings.ToLower(strings.TrimSpace(status)) { + case "", roomPinStatusActive: + return roomPinStatusActive + case roomPinStatusExpired: + return roomPinStatusExpired + case roomPinStatusCancelled: + return roomPinStatusCancelled + case roomPinStatusAll: + return roomPinStatusAll + default: + return roomPinStatusActive + } +} + +func normalizeCreateRoomPinRequest(req createRoomPinRequest) (createRoomPinRequest, error) { + req.RoomID = strings.TrimSpace(req.RoomID) + if req.RoomID == "" || len(req.RoomID) > 64 { + return req, fmt.Errorf("%w: 请选择房间", ErrInvalidArgument) + } + if req.Weight < 0 { + return req, fmt.Errorf("%w: 权重不能小于 0", ErrInvalidArgument) + } + if req.DurationDays == 0 { + req.DurationDays = defaultRoomPinDays + } + if req.DurationDays < 0 || req.DurationDays > maxRoomPinDays { + return req, fmt.Errorf("%w: 置顶时间必须在 1 到 3650 天之间", ErrInvalidArgument) + } + return req, nil +} + +type roomPinScanner interface { + Scan(dest ...any) error +} + +func scanRoomPin(row roomPinScanner) (RoomPin, error) { + var item RoomPin + var ownerUserID int64 + err := row.Scan( + &item.ID, + &item.Room.VisibleRegionID, + &item.Room.RoomID, + &item.Weight, + &item.Status, + &item.PinnedAtMS, + &item.ExpiresAtMS, + &item.CancelledAtMS, + &item.CreatedByAdminID, + &item.CancelledByAdminID, + &item.CreatedAtMS, + &item.UpdatedAtMS, + &item.Room.RoomShortID, + &item.Room.Title, + &item.Room.CoverURL, + &ownerUserID, + &item.Room.Status, + ) + item.User = RoomOwner{UserID: strconv.FormatInt(ownerUserID, 10)} + item.RemainingMS = item.ExpiresAtMS - time.Now().UTC().UnixMilli() + if item.RemainingMS < 0 { + item.RemainingMS = 0 + } + if item.Room.Status != "active" { + item.Room.Status = "closed" + } + return item, err +} + +func (s *Service) fillRoomPinDetails(ctx context.Context, items []RoomPin) error { + if s.userDB == nil || len(items) == 0 { + return nil + } + + ownerIDs := make([]int64, 0, len(items)) + regionIDs := make([]int64, 0, len(items)) + for _, item := range items { + if ownerID, err := strconv.ParseInt(item.User.UserID, 10, 64); err == nil && ownerID > 0 { + ownerIDs = append(ownerIDs, ownerID) + } + if item.Room.VisibleRegionID > 0 { + regionIDs = append(regionIDs, item.Room.VisibleRegionID) + } + } + + owners, err := s.queryRoomOwners(ctx, uniqueInt64s(ownerIDs)) + if err != nil { + return err + } + regions, err := s.queryRegionNames(ctx, uniqueInt64s(regionIDs)) + if err != nil { + return err + } + + for index := range items { + if ownerID, err := strconv.ParseInt(items[index].User.UserID, 10, 64); err == nil { + if owner, ok := owners[ownerID]; ok { + items[index].User = owner + } + } + if name, ok := regions[items[index].Room.VisibleRegionID]; ok { + items[index].Room.RegionName = name + } + } + return nil +} diff --git a/server/admin/internal/modules/roomadmin/pin_test.go b/server/admin/internal/modules/roomadmin/pin_test.go new file mode 100644 index 00000000..563c8860 --- /dev/null +++ b/server/admin/internal/modules/roomadmin/pin_test.go @@ -0,0 +1,46 @@ +package roomadmin + +import ( + "errors" + "testing" +) + +func TestNormalizeRoomPinListQueryDefaultsToActive(t *testing.T) { + query := normalizeRoomPinListQuery(roomPinListQuery{Page: -1, PageSize: 200, Status: "unknown", RegionID: -10, Keyword: " 123 "}) + if query.Page != 1 || query.PageSize != 100 { + t.Fatalf("pagination normalization mismatch: %+v", query) + } + if query.Status != roomPinStatusActive || query.RegionID != 0 || query.Keyword != "123" { + t.Fatalf("filter normalization mismatch: %+v", query) + } +} + +func TestNormalizeCreateRoomPinRequestDefaultsDuration(t *testing.T) { + req, err := normalizeCreateRoomPinRequest(createRoomPinRequest{RoomID: " room-1 ", Weight: 10}) + if err != nil { + t.Fatalf("normalize create pin failed: %v", err) + } + if req.RoomID != "room-1" || req.DurationDays != defaultRoomPinDays || req.Weight != 10 { + t.Fatalf("create pin normalization mismatch: %+v", req) + } +} + +func TestNormalizeCreateRoomPinRequestRejectsInvalidInput(t *testing.T) { + tests := []struct { + name string + req createRoomPinRequest + }{ + {name: "empty_room", req: createRoomPinRequest{Weight: 1, DurationDays: 30}}, + {name: "negative_weight", req: createRoomPinRequest{RoomID: "room-1", Weight: -1, DurationDays: 30}}, + {name: "duration_too_large", req: createRoomPinRequest{RoomID: "room-1", Weight: 1, DurationDays: maxRoomPinDays + 1}}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + _, err := normalizeCreateRoomPinRequest(test.req) + if !errors.Is(err, ErrInvalidArgument) { + t.Fatalf("expected ErrInvalidArgument, got %v", err) + } + }) + } +} diff --git a/server/admin/internal/modules/roomadmin/request.go b/server/admin/internal/modules/roomadmin/request.go index 67ad51dc..5d1f64c6 100644 --- a/server/admin/internal/modules/roomadmin/request.go +++ b/server/admin/internal/modules/roomadmin/request.go @@ -10,6 +10,20 @@ type listQuery struct { SortDirection string } +type roomPinListQuery struct { + Keyword string + Page int + PageSize int + RegionID int64 + Status string +} + +type createRoomPinRequest struct { + DurationDays int64 `json:"durationDays"` + RoomID string `json:"roomId"` + Weight int64 `json:"weight"` +} + type updateRoomRequest struct { CoverURL *string `json:"coverUrl"` Description *string `json:"description"` diff --git a/server/admin/internal/modules/roomadmin/routes.go b/server/admin/internal/modules/roomadmin/routes.go index 6e04366a..fa38f28e 100644 --- a/server/admin/internal/modules/roomadmin/routes.go +++ b/server/admin/internal/modules/roomadmin/routes.go @@ -12,6 +12,9 @@ func RegisterRoutes(protected *gin.RouterGroup, h *Handler) { } protected.GET("/admin/rooms", middleware.RequirePermission("room:view"), h.ListRooms) + protected.GET("/admin/rooms/pins", middleware.RequirePermission("room-pin:view"), h.ListRoomPins) + protected.POST("/admin/rooms/pins", middleware.RequirePermission("room-pin:create"), h.CreateRoomPin) + protected.DELETE("/admin/rooms/pins/:pin_id", middleware.RequirePermission("room-pin:cancel"), h.CancelRoomPin) protected.GET("/admin/rooms/config", middleware.RequirePermission("room-config:view"), h.GetRoomConfig) protected.PUT("/admin/rooms/config", middleware.RequirePermission("room-config:update"), h.UpdateRoomConfig) protected.PATCH("/admin/rooms/:room_id", middleware.RequirePermission("room:update"), h.UpdateRoom) diff --git a/server/admin/internal/modules/roomadmin/service.go b/server/admin/internal/modules/roomadmin/service.go index 52c0f6bc..735266d5 100644 --- a/server/admin/internal/modules/roomadmin/service.go +++ b/server/admin/internal/modules/roomadmin/service.go @@ -42,6 +42,7 @@ type Room struct { OwnerUserID string `json:"ownerUserId"` RegionName string `json:"regionName"` RoomID string `json:"roomId"` + RoomShortID string `json:"roomShortId"` RoomContribution int64 `json:"roomContribution"` SeatCount int32 `json:"seatCount"` SortScore int64 `json:"sortScore"` @@ -76,8 +77,8 @@ func (s *Service) ListRooms(ctx context.Context, query listQuery) ([]Room, int64 } if query.Keyword != "" { like := "%" + query.Keyword + "%" - whereSQL += " AND (rle.room_id LIKE ? OR rle.title LIKE ? OR CAST(rle.owner_user_id AS CHAR) LIKE ?)" - args = append(args, like, like, like) + whereSQL += " AND (rle.room_id LIKE ? OR rle.room_short_id LIKE ? OR rle.title LIKE ? OR CAST(rle.owner_user_id AS CHAR) LIKE ?)" + args = append(args, like, like, like, like) } total, err := countRows(ctx, s.db, whereSQL, args...) if err != nil { @@ -85,6 +86,7 @@ func (s *Service) ListRooms(ctx context.Context, query listQuery) ([]Room, int64 } rows, err := s.db.QueryContext(ctx, fmt.Sprintf(` SELECT rle.room_id, + rle.room_short_id, rle.visible_region_id, rle.owner_user_id, rle.title, @@ -131,6 +133,7 @@ func (s *Service) GetRoom(ctx context.Context, roomID string) (Room, error) { appCode := appctx.FromContext(ctx) row := s.db.QueryRowContext(ctx, ` SELECT room_id, + room_short_id, visible_region_id, owner_user_id, title, @@ -389,6 +392,7 @@ func scanRoom(row roomScanner) (Room, error) { var ownerUserID int64 err := row.Scan( &item.RoomID, + &item.RoomShortID, &item.VisibleRegionID, &ownerUserID, &item.Title, diff --git a/server/admin/internal/repository/seed.go b/server/admin/internal/repository/seed.go index 7b011c64..2c9816ec 100644 --- a/server/admin/internal/repository/seed.go +++ b/server/admin/internal/repository/seed.go @@ -23,6 +23,9 @@ var defaultPermissions = []model.Permission{ {Name: "房间查看", Code: "room:view", Kind: "menu"}, {Name: "房间更新", Code: "room:update", Kind: "button"}, {Name: "房间删除", Code: "room:delete", Kind: "button"}, + {Name: "房间置顶查看", Code: "room-pin:view", Kind: "menu"}, + {Name: "房间置顶创建", Code: "room-pin:create", Kind: "button"}, + {Name: "房间置顶取消", Code: "room-pin:cancel", Kind: "button"}, {Name: "房间配置查看", Code: "room-config:view", Kind: "menu"}, {Name: "房间配置更新", Code: "room-config:update", Kind: "button"}, {Name: "APP 配置查看", Code: "app-config:view", Kind: "menu"}, @@ -192,7 +195,8 @@ func (s *Store) seedMenus() error { {ParentID: &appUsersID, Title: "封禁列表", Code: "app-user-bans", Path: "/app/users/bans", Icon: "block", PermissionCode: "app-user:view", Sort: 61, Visible: true}, {ParentID: &appUsersID, Title: "登录日志", Code: "app-user-login-logs", Path: "/app/users/login-logs", Icon: "login", PermissionCode: "app-user:view", Sort: 62, Visible: true}, {ParentID: &roomsID, Title: "房间列表", Code: "room-list", Path: "/rooms", Icon: "room", PermissionCode: "room:view", Sort: 65, Visible: true}, - {ParentID: &roomsID, Title: "房间配置", Code: "room-config", Path: "/rooms/config", Icon: "settings", PermissionCode: "room-config:view", Sort: 66, Visible: true}, + {ParentID: &roomsID, Title: "房间置顶", Code: "room-pins", Path: "/rooms/pins", Icon: "push_pin", PermissionCode: "room-pin:view", Sort: 66, Visible: true}, + {ParentID: &roomsID, Title: "房间配置", Code: "room-config", Path: "/rooms/config", Icon: "settings", PermissionCode: "room-config:view", Sort: 67, Visible: true}, {ParentID: &appConfigID, Title: "H5配置", Code: "app-config-h5", Path: "/app-config/h5", Icon: "settings", PermissionCode: "app-config:view", Sort: 66, Visible: true}, {ParentID: &appConfigID, Title: "BANNER配置", Code: "app-config-banners", Path: "/app-config/banners", Icon: "image", PermissionCode: "app-config:view", Sort: 67, Visible: true}, {ParentID: &appConfigID, Title: "内购配置", Code: "payment-recharge-products", Path: "/app-config/recharge-products", Icon: "wallet", PermissionCode: "payment-product:view", Sort: 68, Visible: true}, @@ -423,7 +427,7 @@ func defaultRolePermissionCodes(code string) []string { "overview:view", "user:view", "user:status", "app-user:view", "app-user:update", "app-user:status", "app-user:password", - "room:view", "room:update", "room:delete", "room-config:view", "room-config:update", + "room:view", "room:update", "room:delete", "room-pin:view", "room-pin:create", "room-pin:cancel", "room-config:view", "room-config:update", "app-config:view", "app-config:update", "app-version:view", "app-version:create", "app-version:update", "app-version:delete", "resource:view", "resource:create", "resource:update", @@ -444,13 +448,14 @@ func defaultRolePermissionCodes(code string) []string { "upload:create", } case "auditor": - return []string{"overview:view", "log:view", "user:view", "app-user:view", "room:view", "room-config:view", "app-config:view", "app-version:view", "resource:view", "resource-group:view", "resource-grant:view", "gift:view", "coin-ledger:view", "payment-bill:view", "payment-product:view", "game:view", "daily-task:view", "role:view", "permission:view", "job:view"} + return []string{"overview:view", "log:view", "user:view", "app-user:view", "room:view", "room-pin:view", "room-config:view", "app-config:view", "app-version:view", "resource:view", "resource-group:view", "resource-grant:view", "gift:view", "coin-ledger:view", "payment-bill:view", "payment-product:view", "game:view", "daily-task:view", "role:view", "permission:view", "job:view"} case "readonly": return []string{ "overview:view", "user:view", "app-user:view", "room:view", + "room-pin:view", "room-config:view", "app-config:view", "app-version:view", @@ -485,7 +490,7 @@ func defaultRolePermissionMigrationCodes(code string) []string { case "ops-admin": return []string{ "app-user:update", "app-user:status", "app-user:password", - "room:view", "room:update", "room:delete", "room-config:view", "room-config:update", + "room:view", "room:update", "room:delete", "room-pin:view", "room-pin:create", "room-pin:cancel", "room-config:view", "room-config:update", "app-config:view", "app-config:update", "app-version:view", "app-version:create", "app-version:update", "app-version:delete", "resource:view", "resource:create", "resource:update", @@ -501,7 +506,7 @@ func defaultRolePermissionMigrationCodes(code string) []string { "daily-task:view", "daily-task:create", "daily-task:update", "daily-task:status", } case "auditor", "readonly": - return []string{"room:view", "room-config:view", "app-config:view", "app-version:view", "resource:view", "resource-group:view", "resource-grant:view", "gift:view", "coin-seller:view", "coin-ledger:view", "payment-bill:view", "payment-product:view", "game:view", "daily-task:view"} + return []string{"room:view", "room-pin:view", "room-config:view", "app-config:view", "app-version:view", "resource:view", "resource-group:view", "resource-grant:view", "gift:view", "coin-seller:view", "coin-ledger:view", "payment-bill:view", "payment-product:view", "game:view", "daily-task:view"} default: return nil } diff --git a/services/gateway-service/internal/client/room_client.go b/services/gateway-service/internal/client/room_client.go index a41aa291..584de4cc 100644 --- a/services/gateway-service/internal/client/room_client.go +++ b/services/gateway-service/internal/client/room_client.go @@ -22,11 +22,14 @@ type RoomClient interface { ApplyRTCEvent(ctx context.Context, req *roomv1.ApplyRTCEventRequest) (*roomv1.ApplyRTCEventResponse, error) SetMicSeatLock(ctx context.Context, req *roomv1.SetMicSeatLockRequest) (*roomv1.SetMicSeatLockResponse, error) SetChatEnabled(ctx context.Context, req *roomv1.SetChatEnabledRequest) (*roomv1.SetChatEnabledResponse, error) + SetRoomPassword(ctx context.Context, req *roomv1.SetRoomPasswordRequest) (*roomv1.SetRoomPasswordResponse, error) SetRoomAdmin(ctx context.Context, req *roomv1.SetRoomAdminRequest) (*roomv1.SetRoomAdminResponse, error) MuteUser(ctx context.Context, req *roomv1.MuteUserRequest) (*roomv1.MuteUserResponse, error) KickUser(ctx context.Context, req *roomv1.KickUserRequest) (*roomv1.KickUserResponse, error) UnbanUser(ctx context.Context, req *roomv1.UnbanUserRequest) (*roomv1.UnbanUserResponse, error) SendGift(ctx context.Context, req *roomv1.SendGiftRequest) (*roomv1.SendGiftResponse, error) + FollowRoom(ctx context.Context, req *roomv1.FollowRoomRequest) (*roomv1.FollowRoomResponse, error) + UnfollowRoom(ctx context.Context, req *roomv1.UnfollowRoomRequest) (*roomv1.UnfollowRoomResponse, error) } // RoomGuardClient 抽象 gateway 对 room-service 实时守卫 RPC 的依赖。 @@ -131,6 +134,10 @@ func (c *grpcRoomClient) SetChatEnabled(ctx context.Context, req *roomv1.SetChat return c.client.SetChatEnabled(ctx, req) } +func (c *grpcRoomClient) SetRoomPassword(ctx context.Context, req *roomv1.SetRoomPasswordRequest) (*roomv1.SetRoomPasswordResponse, error) { + return c.client.SetRoomPassword(ctx, req) +} + func (c *grpcRoomClient) SetRoomAdmin(ctx context.Context, req *roomv1.SetRoomAdminRequest) (*roomv1.SetRoomAdminResponse, error) { return c.client.SetRoomAdmin(ctx, req) } @@ -151,6 +158,14 @@ func (c *grpcRoomClient) SendGift(ctx context.Context, req *roomv1.SendGiftReque return c.client.SendGift(ctx, req) } +func (c *grpcRoomClient) FollowRoom(ctx context.Context, req *roomv1.FollowRoomRequest) (*roomv1.FollowRoomResponse, error) { + return c.client.FollowRoom(ctx, req) +} + +func (c *grpcRoomClient) UnfollowRoom(ctx context.Context, req *roomv1.UnfollowRoomRequest) (*roomv1.UnfollowRoomResponse, error) { + return c.client.UnfollowRoom(ctx, req) +} + func (c *grpcRoomGuardClient) CheckSpeakPermission(ctx context.Context, req *roomv1.CheckSpeakPermissionRequest) (*roomv1.CheckSpeakPermissionResponse, error) { return c.client.CheckSpeakPermission(ctx, req) } diff --git a/services/gateway-service/internal/transport/http/activityapi/handler.go b/services/gateway-service/internal/transport/http/activityapi/handler.go new file mode 100644 index 00000000..bbec015f --- /dev/null +++ b/services/gateway-service/internal/transport/http/activityapi/handler.go @@ -0,0 +1,33 @@ +package activityapi + +import ( + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns activity-facing HTTP endpoints. +// It keeps task and registration reward reads/writes behind activity-service, with gateway only adding auth context. +type Handler struct { + taskClient client.TaskClient + registrationReward client.RegistrationRewardClient +} + +type Config struct { + TaskClient client.TaskClient + RegistrationReward client.RegistrationRewardClient +} + +func New(config Config) *Handler { + return &Handler{ + taskClient: config.TaskClient, + registrationReward: config.RegistrationReward, + } +} + +func (h *Handler) TaskHandlers() httproutes.TaskHandlers { + return httproutes.TaskHandlers{ + ListTaskTabs: h.listTaskTabs, + ClaimTaskReward: h.claimTaskReward, + GetRegistrationRewardEligibility: h.getRegistrationRewardEligibility, + } +} diff --git a/services/gateway-service/internal/transport/http/registration_reward_handler.go b/services/gateway-service/internal/transport/http/activityapi/registration_reward_handler.go similarity index 97% rename from services/gateway-service/internal/transport/http/registration_reward_handler.go rename to services/gateway-service/internal/transport/http/activityapi/registration_reward_handler.go index 474c107c..c69f790a 100644 --- a/services/gateway-service/internal/transport/http/registration_reward_handler.go +++ b/services/gateway-service/internal/transport/http/activityapi/registration_reward_handler.go @@ -1,4 +1,4 @@ -package http +package activityapi import ( "net/http" @@ -29,7 +29,7 @@ func (h *Handler) getRegistrationRewardEligibility(writer http.ResponseWriter, r return } resp, err := h.registrationReward.GetRegistrationRewardEligibility(request.Context(), &activityv1.GetRegistrationRewardEligibilityRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { diff --git a/services/gateway-service/internal/transport/http/task_handler.go b/services/gateway-service/internal/transport/http/activityapi/task_handler.go similarity index 95% rename from services/gateway-service/internal/transport/http/task_handler.go rename to services/gateway-service/internal/transport/http/activityapi/task_handler.go index 681fa8b8..4f8e8bbc 100644 --- a/services/gateway-service/internal/transport/http/task_handler.go +++ b/services/gateway-service/internal/transport/http/activityapi/task_handler.go @@ -1,4 +1,4 @@ -package http +package activityapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -94,7 +94,7 @@ func (h *Handler) listTaskTabs(writer http.ResponseWriter, request *http.Request return } resp, err := h.taskClient.ListUserTasks(request.Context(), &activityv1.ListUserTasksRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -128,19 +128,20 @@ func (h *Handler) claimTaskReward(writer http.ResponseWriter, request *http.Requ return } var body taskClaimRequestBody - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } taskID := body.normalizedTaskID() taskType := body.normalizedTaskType() taskDay := body.normalizedTaskDay() - commandID := normalizeCommandID(body.normalizedCommandID()) + // command_id 是客户端动作的幂等锚点,gateway 只裁剪空白,不替客户端补值。 + commandID := strings.TrimSpace(body.normalizedCommandID()) if commandID == "" || taskID == "" || taskType == "" || taskDay == "" { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return } resp, err := h.taskClient.ClaimTaskReward(request.Context(), &activityv1.ClaimTaskRewardRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), TaskId: taskID, TaskType: taskType, diff --git a/services/gateway-service/internal/transport/http/app_config_handler.go b/services/gateway-service/internal/transport/http/appapi/app_config_handler.go similarity index 86% rename from services/gateway-service/internal/transport/http/app_config_handler.go rename to services/gateway-service/internal/transport/http/appapi/app_config_handler.go index d9fd4965..8a381170 100644 --- a/services/gateway-service/internal/transport/http/app_config_handler.go +++ b/services/gateway-service/internal/transport/http/appapi/app_config_handler.go @@ -1,7 +1,6 @@ -package http +package appapi import ( - "context" "net/http" "strconv" "strings" @@ -12,13 +11,6 @@ import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" ) -// appConfigReader 是 gateway 对后台 App 配置的只读依赖。 -type appConfigReader interface { - ListH5Links(ctx context.Context) ([]appconfig.H5Link, error) - ListBanners(ctx context.Context, query appconfig.BannerQuery) ([]appconfig.Banner, error) - LatestVersion(ctx context.Context, query appconfig.VersionQuery) (appconfig.Version, error) -} - type appBootstrapBottomTab struct { Key string `json:"key"` Title string `json:"title"` @@ -111,9 +103,9 @@ func (h *Handler) listAppBanners(writer http.ResponseWriter, request *http.Reque items, err := h.appConfigReader.ListBanners(request.Context(), appconfig.BannerQuery{ AppCode: appcode.FromContext(request.Context()), - Platform: firstQueryOrHeader(request, "platform", "X-App-Platform", "X-Platform"), + Platform: httpkit.FirstQueryOrHeader(request, "platform", "X-App-Platform", "X-Platform"), RegionID: optionalInt64Query(request, "region_id"), - Country: firstQueryOrHeader(request, "country", "X-Country-Code", "X-App-Country"), + Country: httpkit.FirstQueryOrHeader(request, "country", "X-Country-Code", "X-App-Country"), }) if err != nil { httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") @@ -129,7 +121,7 @@ func (h *Handler) getAppVersion(writer http.ResponseWriter, request *http.Reques httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") return } - platform := normalizeAppPlatform(firstQueryOrHeader(request, "platform", "X-App-Platform", "X-Platform")) + platform := normalizeAppPlatform(httpkit.FirstQueryOrHeader(request, "platform", "X-App-Platform", "X-Platform")) if platform != "android" && platform != "ios" { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "platform is invalid") return @@ -160,15 +152,8 @@ func (h *Handler) getAppVersion(writer http.ResponseWriter, request *http.Reques }) } -func firstQueryOrHeader(request *http.Request, queryKey string, headerNames ...string) string { - if value := strings.TrimSpace(request.URL.Query().Get(queryKey)); value != "" { - return value - } - return firstHeader(request, headerNames...) -} - func optionalInt64QueryOrHeader(request *http.Request, queryKey string, headerNames ...string) int64 { - value := firstQueryOrHeader(request, queryKey, headerNames...) + value := httpkit.FirstQueryOrHeader(request, queryKey, headerNames...) if value == "" { return 0 } diff --git a/services/gateway-service/internal/transport/http/device_handler.go b/services/gateway-service/internal/transport/http/appapi/device_handler.go similarity index 91% rename from services/gateway-service/internal/transport/http/device_handler.go rename to services/gateway-service/internal/transport/http/appapi/device_handler.go index 166284fc..b22abb7d 100644 --- a/services/gateway-service/internal/transport/http/device_handler.go +++ b/services/gateway-service/internal/transport/http/appapi/device_handler.go @@ -1,4 +1,4 @@ -package http +package appapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -37,14 +37,14 @@ func (h *Handler) bindPushToken(writer http.ResponseWriter, request *http.Reques Language string `json:"language"` Timezone string `json:"timezone"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } body.DeviceID = pushDeviceID(request, body.DeviceID) body.Platform = pushPlatform(request, body.Platform) resp, err := h.userDeviceClient.BindPushToken(request.Context(), &userv1.BindPushTokenRequest{ - Meta: authRequestMeta(request, body.DeviceID), + Meta: httpkit.UserMeta(request, body.DeviceID), UserId: auth.UserIDFromContext(request.Context()), DeviceId: body.DeviceID, PushToken: strings.TrimSpace(body.PushToken), @@ -71,13 +71,13 @@ func (h *Handler) deletePushToken(writer http.ResponseWriter, request *http.Requ DeviceID string `json:"device_id"` PushToken string `json:"push_token"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } body.DeviceID = pushDeviceID(request, body.DeviceID) resp, err := h.userDeviceClient.DeletePushToken(request.Context(), &userv1.DeletePushTokenRequest{ - Meta: authRequestMeta(request, body.DeviceID), + Meta: httpkit.UserMeta(request, body.DeviceID), UserId: auth.UserIDFromContext(request.Context()), DeviceId: body.DeviceID, PushToken: strings.TrimSpace(body.PushToken), @@ -120,12 +120,12 @@ func pushDeviceID(request *http.Request, bodyValue string) string { if value := strings.TrimSpace(bodyValue); value != "" { return value } - return firstHeader(request, "X-Device-ID", "X-HY-Device-ID") + return httpkit.FirstHeader(request, "X-Device-ID", "X-HY-Device-ID") } func pushPlatform(request *http.Request, bodyValue string) string { if value := strings.TrimSpace(bodyValue); value != "" { return value } - return firstHeader(request, "X-App-Platform", "X-Platform") + return httpkit.FirstHeader(request, "X-App-Platform", "X-Platform") } diff --git a/services/gateway-service/internal/transport/http/appapi/handler.go b/services/gateway-service/internal/transport/http/appapi/handler.go new file mode 100644 index 00000000..58d0c9d4 --- /dev/null +++ b/services/gateway-service/internal/transport/http/appapi/handler.go @@ -0,0 +1,72 @@ +package appapi + +import ( + "context" + "io" + "net/http" + + "hyapp/services/gateway-service/internal/appconfig" + "hyapp/services/gateway-service/internal/client" +) + +// ConfigReader 是 gateway 对后台 App 配置的只读依赖。 +type ConfigReader interface { + ListH5Links(ctx context.Context) ([]appconfig.H5Link, error) + ListBanners(ctx context.Context, query appconfig.BannerQuery) ([]appconfig.Banner, error) + LatestVersion(ctx context.Context, query appconfig.VersionQuery) (appconfig.Version, error) +} + +// ObjectUploader 是 gateway 上传接口依赖的对象存储最小能力。 +type ObjectUploader interface { + PutObject(ctx context.Context, key string, reader io.Reader, sizeBytes int64, contentType string) (string, error) +} + +// Handler owns app platform endpoints such as bootstrap, config, upload and device token binding. +// It does not own user identity or resource semantics; those remain in their owner services/packages. +type Handler struct { + appConfigReader ConfigReader + userDeviceClient client.UserDeviceClient + objectUploader ObjectUploader +} + +type Config struct { + AppConfigReader ConfigReader + UserDeviceClient client.UserDeviceClient + ObjectUploader ObjectUploader +} + +func New(config Config) *Handler { + return &Handler{ + appConfigReader: config.AppConfigReader, + userDeviceClient: config.UserDeviceClient, + objectUploader: config.ObjectUploader, + } +} + +func (h *Handler) GetAppBootstrap(writer http.ResponseWriter, request *http.Request) { + h.getAppBootstrap(writer, request) +} + +func (h *Handler) ListH5Links(writer http.ResponseWriter, request *http.Request) { + h.listH5Links(writer, request) +} + +func (h *Handler) ListAppBanners(writer http.ResponseWriter, request *http.Request) { + h.listAppBanners(writer, request) +} + +func (h *Handler) GetAppVersion(writer http.ResponseWriter, request *http.Request) { + h.getAppVersion(writer, request) +} + +func (h *Handler) UploadFile(writer http.ResponseWriter, request *http.Request) { + h.uploadFile(writer, request) +} + +func (h *Handler) UploadAvatar(writer http.ResponseWriter, request *http.Request) { + h.uploadAvatar(writer, request) +} + +func (h *Handler) HandlePushToken(writer http.ResponseWriter, request *http.Request) { + h.handlePushToken(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/upload_handler.go b/services/gateway-service/internal/transport/http/appapi/upload_handler.go similarity index 98% rename from services/gateway-service/internal/transport/http/upload_handler.go rename to services/gateway-service/internal/transport/http/appapi/upload_handler.go index 1f738a19..6fc6e6a7 100644 --- a/services/gateway-service/internal/transport/http/upload_handler.go +++ b/services/gateway-service/internal/transport/http/appapi/upload_handler.go @@ -1,4 +1,4 @@ -package http +package appapi import ( "bytes" @@ -106,7 +106,7 @@ func (h *Handler) uploadObject(writer http.ResponseWriter, request *http.Request return } - objectKey := buildUploadObjectKey(policy, auth.UserIDFromContext(request.Context()), header.Filename, contentType, timeNow()) + objectKey := buildUploadObjectKey(policy, auth.UserIDFromContext(request.Context()), header.Filename, contentType, time.Now().UTC()) objectURL, err := h.objectUploader.PutObject(request.Context(), objectKey, io.MultiReader(bytes.NewReader(head), file), header.Size, contentType) if err != nil { httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") diff --git a/services/gateway-service/internal/transport/http/auth_handler.go b/services/gateway-service/internal/transport/http/auth_handler.go index 65b21fcc..3ab2d62d 100644 --- a/services/gateway-service/internal/transport/http/auth_handler.go +++ b/services/gateway-service/internal/transport/http/auth_handler.go @@ -276,7 +276,7 @@ func authData(token *userv1.AuthToken, isNewUser *bool) authTokenData { } return authTokenData{ - UserID: userIDString(token.GetUserId()), + UserID: httpkit.UserIDString(token.GetUserId()), AppCode: token.GetAppCode(), DisplayUserID: token.GetDisplayUserId(), DefaultDisplayUserID: token.GetDefaultDisplayUserId(), diff --git a/services/gateway-service/internal/transport/http/callbackapi/handler.go b/services/gateway-service/internal/transport/http/callbackapi/handler.go new file mode 100644 index 00000000..bc700443 --- /dev/null +++ b/services/gateway-service/internal/transport/http/callbackapi/handler.go @@ -0,0 +1,58 @@ +package callbackapi + +import ( + "net/http" + "time" + + "hyapp/services/gateway-service/internal/client" +) + +// TencentIMConfig 是腾讯云 IM 服务端回调校验需要的最小配置。 +type TencentIMConfig struct { + SDKAppID int64 + AdminIdentifier string + CallbackAuthToken string +} + +// TencentRTCConfig 是腾讯云 RTC 服务端回调校验需要的最小配置。 +type TencentRTCConfig struct { + SDKAppID int64 + CallbackSignKey string + UserSigTTL time.Duration +} + +// Handler owns external Tencent callback endpoints. +// Tencent callback responses intentionally bypass gateway envelope because Tencent only accepts provider-native shapes. +type Handler struct { + roomClient client.RoomClient + roomGuardClient client.RoomGuardClient + userProfileClient client.UserProfileClient + tencentIM TencentIMConfig + tencentRTC TencentRTCConfig +} + +type Config struct { + RoomClient client.RoomClient + RoomGuardClient client.RoomGuardClient + UserProfileClient client.UserProfileClient + TencentIM TencentIMConfig + TencentRTC TencentRTCConfig +} + +func New(config Config) *Handler { + return &Handler{ + roomClient: config.RoomClient, + roomGuardClient: config.RoomGuardClient, + userProfileClient: config.UserProfileClient, + tencentIM: config.TencentIM, + tencentRTC: config.TencentRTC, + } +} + +func (h *Handler) HandleTencentIMCallback(writer http.ResponseWriter, request *http.Request) { + h.handleTencentIMCallback(writer, request) +} + +func (h *Handler) HandleTencentRTCCallback(writer http.ResponseWriter, request *http.Request) { + h.handleTencentRTCCallback(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/tencent_im_callback.go b/services/gateway-service/internal/transport/http/callbackapi/tencent_im_callback.go similarity index 99% rename from services/gateway-service/internal/transport/http/tencent_im_callback.go rename to services/gateway-service/internal/transport/http/callbackapi/tencent_im_callback.go index e4c29335..3292efd1 100644 --- a/services/gateway-service/internal/transport/http/tencent_im_callback.go +++ b/services/gateway-service/internal/transport/http/callbackapi/tencent_im_callback.go @@ -1,4 +1,4 @@ -package http +package callbackapi import ( "encoding/json" diff --git a/services/gateway-service/internal/transport/http/tencent_rtc_callback.go b/services/gateway-service/internal/transport/http/callbackapi/tencent_rtc_callback.go similarity index 99% rename from services/gateway-service/internal/transport/http/tencent_rtc_callback.go rename to services/gateway-service/internal/transport/http/callbackapi/tencent_rtc_callback.go index 3a9e61be..abc20f9f 100644 --- a/services/gateway-service/internal/transport/http/tencent_rtc_callback.go +++ b/services/gateway-service/internal/transport/http/callbackapi/tencent_rtc_callback.go @@ -1,4 +1,4 @@ -package http +package callbackapi import ( "bytes" diff --git a/services/gateway-service/internal/transport/http/game_handler.go b/services/gateway-service/internal/transport/http/gameapi/game_handler.go similarity index 91% rename from services/gateway-service/internal/transport/http/game_handler.go rename to services/gateway-service/internal/transport/http/gameapi/game_handler.go index 00cee693..2bb89511 100644 --- a/services/gateway-service/internal/transport/http/game_handler.go +++ b/services/gateway-service/internal/transport/http/gameapi/game_handler.go @@ -1,4 +1,4 @@ -package http +package gameapi import ( "io" @@ -21,7 +21,7 @@ func (h *Handler) listGames(writer http.ResponseWriter, request *http.Request) { } userID := auth.UserIDFromContext(request.Context()) userResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: userID, }) if err != nil { @@ -35,9 +35,9 @@ func (h *Handler) listGames(writer http.ResponseWriter, request *http.Request) { RoomId: strings.TrimSpace(request.URL.Query().Get("room_id")), RegionId: userResp.GetUser().GetRegionId(), Language: requestLanguage(request), - ClientPlatform: firstHeader(request, "X-App-Platform", "X-Platform"), + ClientPlatform: httpkit.FirstHeader(request, "X-App-Platform", "X-Platform"), }) - write(writer, request, gameListDataFromProto(resp), err) + httpkit.Write(writer, request, gameListDataFromProto(resp), err) } func (h *Handler) launchGame(writer http.ResponseWriter, request *http.Request) { @@ -54,12 +54,12 @@ func (h *Handler) launchGame(writer http.ResponseWriter, request *http.Request) Scene string `json:"scene"` RoomID string `json:"room_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } userID := auth.UserIDFromContext(request.Context()) userResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: userID, }) if err != nil { @@ -74,7 +74,7 @@ func (h *Handler) launchGame(writer http.ResponseWriter, request *http.Request) Scene: body.Scene, RoomId: body.RoomID, }) - write(writer, request, gameLaunchDataFromProto(resp), err) + httpkit.Write(writer, request, gameLaunchDataFromProto(resp), err) } func (h *Handler) handleGameCallback(writer http.ResponseWriter, request *http.Request) { @@ -122,7 +122,7 @@ func gameMeta(request *http.Request) *gamev1.RequestMeta { } func requestLanguage(request *http.Request) string { - value := firstHeader(request, "X-App-Language", "X-Language") + value := httpkit.FirstHeader(request, "X-App-Language", "X-Language") if value == "" { value = request.Header.Get("Accept-Language") } diff --git a/services/gateway-service/internal/transport/http/game_view.go b/services/gateway-service/internal/transport/http/gameapi/game_view.go similarity index 99% rename from services/gateway-service/internal/transport/http/game_view.go rename to services/gateway-service/internal/transport/http/gameapi/game_view.go index 8fe0b717..66f648b3 100644 --- a/services/gateway-service/internal/transport/http/game_view.go +++ b/services/gateway-service/internal/transport/http/gameapi/game_view.go @@ -1,4 +1,4 @@ -package http +package gameapi import gamev1 "hyapp.local/api/proto/game/v1" diff --git a/services/gateway-service/internal/transport/http/gameapi/handler.go b/services/gateway-service/internal/transport/http/gameapi/handler.go new file mode 100644 index 00000000..517029a0 --- /dev/null +++ b/services/gateway-service/internal/transport/http/gameapi/handler.go @@ -0,0 +1,47 @@ +package gameapi + +import ( + "net/http" + + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns game-facing HTTP endpoints. +// gateway only translates app/user context into game-service RPCs; game session state stays in game-service. +type Handler struct { + gameClient client.GameClient + userProfileClient client.UserProfileClient +} + +type Config struct { + GameClient client.GameClient + UserProfileClient client.UserProfileClient +} + +func New(config Config) *Handler { + return &Handler{ + gameClient: config.GameClient, + userProfileClient: config.UserProfileClient, + } +} + +func (h *Handler) Handlers() httproutes.GameHandlers { + return httproutes.GameHandlers{ + ListGames: h.listGames, + LaunchGame: h.launchGame, + HandleCallback: h.handleGameCallback, + } +} + +func (h *Handler) ListGames(writer http.ResponseWriter, request *http.Request) { + h.listGames(writer, request) +} + +func (h *Handler) LaunchGame(writer http.ResponseWriter, request *http.Request) { + h.launchGame(writer, request) +} + +func (h *Handler) HandleCallback(writer http.ResponseWriter, request *http.Request) { + h.handleGameCallback(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/handler.go b/services/gateway-service/internal/transport/http/handler.go index bf6c3a8e..b177b77a 100644 --- a/services/gateway-service/internal/transport/http/handler.go +++ b/services/gateway-service/internal/transport/http/handler.go @@ -9,13 +9,12 @@ import ( "time" "hyapp/pkg/appcode" - "hyapp/pkg/idgen" "hyapp/pkg/imgroup" "hyapp/pkg/tencentim" "hyapp/services/gateway-service/internal/auth" "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/appapi" - roomv1 "hyapp.local/api/proto/room/v1" userv1 "hyapp.local/api/proto/user/v1" ) @@ -39,7 +38,7 @@ type Handler struct { registrationReward client.RegistrationRewardClient broadcastClient client.BroadcastClient gameClient client.GameClient - appConfigReader appConfigReader + appConfigReader appapi.ConfigReader tencentIM TencentIMConfig tencentRTC TencentRTCConfig objectUploader ObjectUploader @@ -190,25 +189,10 @@ func (h *Handler) SetGameClient(gameClient client.GameClient) { } // SetAppConfigReader 注入后台 App 配置读取依赖。 -func (h *Handler) SetAppConfigReader(reader appConfigReader) { +func (h *Handler) SetAppConfigReader(reader appapi.ConfigReader) { h.appConfigReader = reader } -// meta 把外部 HTTP 请求上下文转换成 room-service 命令元信息。 -// request_id 只做链路追踪;command_id 才是 room-service command log 使用的幂等键。 -func meta(request *http.Request, roomID string, commandID string) *roomv1.RequestMeta { - return &roomv1.RequestMeta{ - RequestId: httpkit.RequestIDFromContext(request.Context()), - CommandId: normalizeCommandID(commandID), - ActorUserId: auth.UserIDFromContext(request.Context()), - RoomId: roomID, - AppCode: appcode.FromContext(request.Context()), - GatewayNodeId: "gateway-local", - SessionId: idgen.New("sess"), - SentAtMs: time.Now().UnixMilli(), - } -} - func normalizeCommandID(commandID string) string { // command_id 是客户端按用户动作生成的写命令幂等键;gateway 只裁剪空白,不自动补值。 return strings.TrimSpace(commandID) diff --git a/services/gateway-service/internal/transport/http/httpkit/response.go b/services/gateway-service/internal/transport/http/httpkit/response.go index 0a24e57e..570649a9 100644 --- a/services/gateway-service/internal/transport/http/httpkit/response.go +++ b/services/gateway-service/internal/transport/http/httpkit/response.go @@ -4,14 +4,22 @@ import ( "context" "encoding/json" "io" + "net" "net/http" + "net/netip" "strconv" "strings" + "time" "google.golang.org/grpc/status" + "hyapp/pkg/appcode" "hyapp/pkg/idgen" "hyapp/pkg/xerr" "hyapp/services/gateway-service/internal/auth" + + activityv1 "hyapp.local/api/proto/activity/v1" + roomv1 "hyapp.local/api/proto/room/v1" + userv1 "hyapp.local/api/proto/user/v1" ) type requestIDContextKey struct{} @@ -67,6 +75,17 @@ func DecodeJSON(reader io.Reader, out any) error { return json.NewDecoder(reader).Decode(out) } +// Decode 统一处理 HTTP JSON 入参解析失败分支。 +// gateway 在这里拒绝非法 JSON,不把脏请求继续透传到内部 gRPC。 +func Decode(writer http.ResponseWriter, request *http.Request, out any) bool { + if err := DecodeJSON(request.Body, out); err != nil { + WriteError(writer, request, http.StatusBadRequest, CodeInvalidJSON, "invalid request body") + return false + } + + return true +} + // WriteOK 写成功 envelope。 func WriteOK(writer http.ResponseWriter, request *http.Request, data any) { WriteEnvelope(writer, http.StatusOK, ResponseEnvelope{ @@ -102,6 +121,16 @@ func WriteRPCError(writer http.ResponseWriter, request *http.Request, err error) WriteError(writer, request, statusCode, code, message) } +// Write 统一把内部 gRPC 调用结果转换为 HTTP JSON 响应。 +func Write(writer http.ResponseWriter, request *http.Request, body any, err error) { + if err != nil { + WriteRPCError(writer, request, err) + return + } + + WriteOK(writer, request, body) +} + func MapReasonToHTTP(reason xerr.Code) (int, string, string) { spec := xerr.SpecOf(reason) return spec.HTTPStatus, spec.PublicCode, spec.PublicMessage @@ -129,6 +158,41 @@ func PositiveInt64PathValue(request *http.Request, name string) (int64, bool) { return value, err == nil && value > 0 } +func UserIDString(userID int64) string { + if userID > 0 { + return strconv.FormatInt(userID, 10) + } + return "" +} + +func PositiveInt32Query(request *http.Request, name string, fallback int32) (int32, bool) { + raw := strings.TrimSpace(request.URL.Query().Get(name)) + if raw == "" { + return fallback, true + } + value, err := strconv.ParseInt(raw, 10, 32) + if err != nil || value <= 0 { + return 0, false + } + return int32(value), true +} + +func FirstQueryOrHeader(request *http.Request, queryKey string, headerNames ...string) string { + if value := strings.TrimSpace(request.URL.Query().Get(queryKey)); value != "" { + return value + } + return FirstHeader(request, headerNames...) +} + +func FirstHeader(request *http.Request, headerNames ...string) string { + for _, name := range headerNames { + if value := strings.TrimSpace(request.Header.Get(name)); value != "" { + return value + } + } + return "" +} + // RequireMethod 在业务 handler 之前固定 HTTP method,避免 path-only mux 让错误 method 进入命令链路。 func RequireMethod(method string, next http.HandlerFunc) http.HandlerFunc { return func(writer http.ResponseWriter, request *http.Request) { @@ -153,3 +217,121 @@ func RequireCompletedProfile(next http.HandlerFunc) http.HandlerFunc { next.ServeHTTP(writer, request) } } + +// RoomMeta 把外部 HTTP 请求上下文转换成 room-service 命令元信息。 +// request_id 只做链路追踪;command_id 必须来自客户端用户动作,gateway 只裁剪空白。 +func RoomMeta(request *http.Request, roomID string, commandID string) *roomv1.RequestMeta { + return &roomv1.RequestMeta{ + RequestId: RequestIDFromContext(request.Context()), + CommandId: strings.TrimSpace(commandID), + ActorUserId: auth.UserIDFromContext(request.Context()), + RoomId: roomID, + AppCode: appcode.FromContext(request.Context()), + GatewayNodeId: "gateway-local", + SessionId: idgen.New("sess"), + SentAtMs: time.Now().UnixMilli(), + } +} + +// UserMeta 生成 user-service RPC 的统一追踪和审计元信息。 +func UserMeta(request *http.Request, deviceID string) *userv1.RequestMeta { + return UserMetaWithLoginContext(request, deviceID, "", "", "") +} + +func UserMetaWithLoginContext(request *http.Request, deviceID string, platform string, language string, timezone string) *userv1.RequestMeta { + return &userv1.RequestMeta{ + RequestId: RequestIDFromContext(request.Context()), + Caller: "gateway-service", + GatewayNodeId: "gateway-local", + SentAtMs: time.Now().UnixMilli(), + DeviceId: deviceID, + ClientIp: ClientIP(request), + UserAgent: request.UserAgent(), + CountryByIp: CountryByIP(request), + SessionId: auth.SessionIDFromContext(request.Context()), + AppCode: appcode.FromContext(request.Context()), + Platform: strings.ToLower(strings.TrimSpace(platform)), + Language: strings.TrimSpace(language), + Timezone: strings.TrimSpace(timezone), + } +} + +// ActivityMeta 生成 activity-service RPC 的统一追踪元信息。 +// 业务 actor 仍由各请求显式传 user_id,meta 只承载链路和租户上下文。 +func ActivityMeta(request *http.Request) *activityv1.RequestMeta { + return &activityv1.RequestMeta{ + RequestId: RequestIDFromContext(request.Context()), + Caller: "gateway-service", + GatewayNodeId: "gateway-local", + SentAtMs: time.Now().UnixMilli(), + AppCode: appcode.FromContext(request.Context()), + } +} + +// ClientIP 提取 gateway 看到的客户端地址。 +func ClientIP(request *http.Request) string { + for _, header := range []string{"X-Trusted-Client-IP", "X-Real-IP"} { + if ip := NormalizeIP(request.Header.Get(header)); ip != "" { + return ip + } + } + forwarded := strings.TrimSpace(request.Header.Get("X-Forwarded-For")) + if forwarded != "" { + for part := range strings.SplitSeq(forwarded, ",") { + ip := NormalizeIP(part) + if ip == "" { + continue + } + if addr, err := netip.ParseAddr(ip); err == nil && isPublicClientAddr(addr) { + return ip + } + } + } + + host, _, err := net.SplitHostPort(request.RemoteAddr) + if err != nil { + return NormalizeIP(request.RemoteAddr) + } + + return host +} + +func NormalizeIP(value string) string { + value = strings.TrimSpace(value) + if value == "" { + return "" + } + if host, _, err := net.SplitHostPort(value); err == nil { + value = host + } + if addr, err := netip.ParseAddr(value); err == nil { + return addr.String() + } + return value +} + +func isPublicClientAddr(addr netip.Addr) bool { + return addr.IsValid() && + addr.IsGlobalUnicast() && + !addr.IsPrivate() && + !addr.IsLoopback() && + !addr.IsLinkLocalUnicast() && + !addr.IsLinkLocalMulticast() && + !addr.IsMulticast() && + !addr.IsUnspecified() +} + +func CountryByIP(request *http.Request) string { + // country_by_ip 不接受 JSON body;只采信 gateway/边缘层写入的地域头。 + for _, header := range []string{"CF-IPCountry", "CloudFront-Viewer-Country", "X-Vercel-IP-Country", "X-AppEngine-Country", "X-Country-Code"} { + country := strings.ToUpper(strings.TrimSpace(request.Header.Get(header))) + if country == "" || country == "XX" || country == "UNKNOWN" { + continue + } + if len(country) >= 2 && len(country) <= 3 { + return country + } + } + + return "" +} diff --git a/services/gateway-service/internal/transport/http/httproutes/router.go b/services/gateway-service/internal/transport/http/httproutes/router.go index 1bfda595..da024cfb 100644 --- a/services/gateway-service/internal/transport/http/httproutes/router.go +++ b/services/gateway-service/internal/transport/http/httproutes/router.go @@ -91,6 +91,7 @@ type RoomHandlers struct { GetRoomDetail http.HandlerFunc ListRoomOnlineUsers http.HandlerFunc GetRoomGiftPanel http.HandlerFunc + FollowRoom http.HandlerFunc CreateRoom http.HandlerFunc UpdateRoomProfile http.HandlerFunc JoinRoom http.HandlerFunc @@ -104,6 +105,7 @@ type RoomHandlers struct { SetMicMute http.HandlerFunc SetMicSeatLock http.HandlerFunc SetChatEnabled http.HandlerFunc + SetRoomPassword http.HandlerFunc SetRoomAdmin http.HandlerFunc MuteUser http.HandlerFunc KickUser http.HandlerFunc @@ -263,6 +265,7 @@ func (r routes) registerRoomRoutes() { r.profile("/rooms/{room_id}/detail", http.MethodGet, h.GetRoomDetail) r.profile("/rooms/{room_id}/online-users", http.MethodGet, h.ListRoomOnlineUsers) r.profile("/rooms/{room_id}/gift-panel", http.MethodGet, h.GetRoomGiftPanel) + r.profile("/rooms/{room_id}/follow", "", h.FollowRoom) r.profile("/rooms/create", http.MethodPost, h.CreateRoom) r.profile("/rooms/profile/update", http.MethodPost, h.UpdateRoomProfile) r.profile("/rooms/join", http.MethodPost, h.JoinRoom) @@ -276,6 +279,7 @@ func (r routes) registerRoomRoutes() { r.profile("/rooms/mic/mute", http.MethodPost, h.SetMicMute) r.profile("/rooms/mic/lock", http.MethodPost, h.SetMicSeatLock) r.profile("/rooms/chat/enabled", http.MethodPost, h.SetChatEnabled) + r.profile("/rooms/password", http.MethodPost, h.SetRoomPassword) r.profile("/rooms/admin/set", http.MethodPost, h.SetRoomAdmin) r.profile("/rooms/user/mute", http.MethodPost, h.MuteUser) r.profile("/rooms/user/kick", http.MethodPost, h.KickUser) diff --git a/services/gateway-service/internal/transport/http/manager_center_handler_test.go b/services/gateway-service/internal/transport/http/manager_center_handler_test.go index a141a598..8835cb40 100644 --- a/services/gateway-service/internal/transport/http/manager_center_handler_test.go +++ b/services/gateway-service/internal/transport/http/manager_center_handler_test.go @@ -50,7 +50,7 @@ func TestListManagerGrantResourcesChecksCapabilityAndFiltersWalletRequest(t *tes if recorder.Code != http.StatusOK { t.Fatalf("status mismatch: got %d body=%s", recorder.Code, recorder.Body.String()) } - if hostClient.lastCapability == nil || hostClient.lastCapability.GetActorUserId() != 42 || hostClient.lastCapability.GetCapability() != managerResourceGrantCapability { + if hostClient.lastCapability == nil || hostClient.lastCapability.GetActorUserId() != 42 || hostClient.lastCapability.GetCapability() != "manager_resource_grant" { t.Fatalf("manager capability request mismatch: %+v", hostClient.lastCapability) } if walletClient.lastListResources == nil { @@ -65,10 +65,13 @@ func TestListManagerGrantResourcesChecksCapabilityAndFiltersWalletRequest(t *tes Code string `json:"code"` RequestID string `json:"request_id"` Data struct { - Items []managerGrantResourceData `json:"items"` - Total int64 `json:"total"` - Page int32 `json:"page"` - PageSize int32 `json:"page_size"` + Items []struct { + ResourceID string `json:"resource_id"` + Name string `json:"name"` + } `json:"items"` + Total int64 `json:"total"` + Page int32 `json:"page"` + PageSize int32 `json:"page_size"` } `json:"data"` } if err := json.NewDecoder(recorder.Body).Decode(&envelope); err != nil { @@ -124,8 +127,11 @@ func TestBusinessUserLookupForwardsSceneAndActor(t *testing.T) { var envelope struct { Code string `json:"code"` Data struct { - Items []businessUserLookupData `json:"items"` - Total int `json:"total"` + Items []struct { + UserID string `json:"user_id"` + Status string `json:"status"` + } `json:"items"` + Total int `json:"total"` } `json:"data"` } if err := json.NewDecoder(recorder.Body).Decode(&envelope); err != nil { diff --git a/services/gateway-service/internal/transport/http/managerapi/handler.go b/services/gateway-service/internal/transport/http/managerapi/handler.go new file mode 100644 index 00000000..798384f8 --- /dev/null +++ b/services/gateway-service/internal/transport/http/managerapi/handler.go @@ -0,0 +1,36 @@ +package managerapi + +import ( + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns manager-center HTTP endpoints that are still part of the app gateway. +// Capability checks stay in user-service, and resource grants stay in wallet-service. +type Handler struct { + walletClient client.WalletClient + userHostClient client.UserHostClient + userProfileClient client.UserProfileClient +} + +type Config struct { + WalletClient client.WalletClient + UserHostClient client.UserHostClient + UserProfileClient client.UserProfileClient +} + +func New(config Config) *Handler { + return &Handler{ + walletClient: config.WalletClient, + userHostClient: config.UserHostClient, + userProfileClient: config.UserProfileClient, + } +} + +func (h *Handler) ManagerHandlers() httproutes.ManagerHandlers { + return httproutes.ManagerHandlers{ + ListManagerGrantResources: h.listManagerGrantResources, + GrantManagerResource: h.grantManagerResource, + LookupBusinessUsers: h.lookupBusinessUsers, + } +} diff --git a/services/gateway-service/internal/transport/http/manager_center_handler.go b/services/gateway-service/internal/transport/http/managerapi/manager_center_handler.go similarity index 91% rename from services/gateway-service/internal/transport/http/manager_center_handler.go rename to services/gateway-service/internal/transport/http/managerapi/manager_center_handler.go index f498ec24..af901009 100644 --- a/services/gateway-service/internal/transport/http/manager_center_handler.go +++ b/services/gateway-service/internal/transport/http/managerapi/manager_center_handler.go @@ -1,4 +1,4 @@ -package http +package managerapi import ( "encoding/json" @@ -88,7 +88,7 @@ func (h *Handler) lookupBusinessUsers(writer http.ResponseWriter, request *http. httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") return } - pageSize, ok := parsePositiveInt32Query(request, "page_size", 20) + pageSize, ok := httpkit.PositiveInt32Query(request, "page_size", 20) if !ok { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return @@ -97,7 +97,7 @@ func (h *Handler) lookupBusinessUsers(writer http.ResponseWriter, request *http. pageSize = 20 } resp, err := h.userProfileClient.BusinessUserLookup(request.Context(), &userv1.BusinessUserLookupRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), ActorUserId: auth.UserIDFromContext(request.Context()), Scene: strings.TrimSpace(request.URL.Query().Get("scene")), Keyword: strings.TrimSpace(request.URL.Query().Get("keyword")), @@ -131,7 +131,7 @@ func (h *Handler) grantManagerResource(writer http.ResponseWriter, request *http DurationMS *int64 `json:"duration_ms"` DurationMSAlt *int64 `json:"durationMs"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if body.Quantity != nil || body.DurationMS != nil || body.DurationMSAlt != nil { @@ -152,7 +152,7 @@ func (h *Handler) grantManagerResource(writer http.ResponseWriter, request *http return } targetResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: targetUserID, }) if err != nil { @@ -201,7 +201,7 @@ func (h *Handler) grantManagerResource(writer http.ResponseWriter, request *http func (h *Handler) requireManagerResourceGrantCapability(writer http.ResponseWriter, request *http.Request) bool { resp, err := h.userHostClient.CheckBusinessCapability(request.Context(), &userv1.CheckBusinessCapabilityRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), ActorUserId: auth.UserIDFromContext(request.Context()), Capability: managerResourceGrantCapability, }) @@ -221,7 +221,7 @@ func managerGrantResourceFromProto(resource *walletv1.Resource) managerGrantReso return managerGrantResourceData{} } return managerGrantResourceData{ - ResourceID: userIDString(resource.GetResourceId()), + ResourceID: httpkit.UserIDString(resource.GetResourceId()), ResourceType: resource.GetResourceType(), Name: resource.GetName(), AssetURL: resource.GetAssetUrl(), @@ -237,7 +237,7 @@ func businessUserLookupFromProto(user *userv1.BusinessUserLookupItem) businessUs return businessUserLookupData{} } return businessUserLookupData{ - UserID: userIDString(user.GetUserId()), + UserID: httpkit.UserIDString(user.GetUserId()), DisplayUserID: user.GetDisplayUserId(), Username: user.GetUsername(), Avatar: user.GetAvatar(), @@ -254,25 +254,36 @@ func managerResourceGrantFromProto(grant *walletv1.ResourceGrant) managerResourc } resourceID := grant.GetGrantSubjectId() if len(grant.GetItems()) > 0 && grant.GetItems()[0].GetResourceId() > 0 { - resourceID = userIDString(grant.GetItems()[0].GetResourceId()) + resourceID = httpkit.UserIDString(grant.GetItems()[0].GetResourceId()) } return managerResourceGrantData{ GrantID: grant.GetGrantId(), CommandID: grant.GetCommandId(), - TargetUserID: userIDString(grant.GetTargetUserId()), + TargetUserID: httpkit.UserIDString(grant.GetTargetUserId()), ResourceID: resourceID, Status: grant.GetStatus(), GrantSource: grant.GetGrantSource(), - OperatorUserID: userIDString(grant.GetOperatorUserId()), + OperatorUserID: httpkit.UserIDString(grant.GetOperatorUserId()), CreatedAtMS: grant.GetCreatedAtMs(), } } func managerPage(request *http.Request) (int32, int32, bool) { - page, pageSize, ok := resourcePage(request) + page, ok := httpkit.PositiveInt32Query(request, "page", 1) if !ok { return 0, 0, false } + pageSize, ok := httpkit.PositiveInt32Query(request, "page_size", 20) + if !ok { + return 0, 0, false + } + if raw := strings.TrimSpace(request.URL.Query().Get("pageSize")); raw != "" { + parsed, err := strconv.Atoi(raw) + if err != nil || parsed <= 0 { + return 0, 0, false + } + pageSize = int32(parsed) + } if pageSize > 20 { pageSize = 20 } diff --git a/services/gateway-service/internal/transport/http/messageapi/handler.go b/services/gateway-service/internal/transport/http/messageapi/handler.go new file mode 100644 index 00000000..fe83e6e5 --- /dev/null +++ b/services/gateway-service/internal/transport/http/messageapi/handler.go @@ -0,0 +1,41 @@ +package messageapi + +import ( + "net/http" + + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns message inbox endpoints and safe profile batches used by Tencent IM conversation UI. +// Private chat delivery remains Tencent IM owned; these handlers only expose backend-owned system inbox facts. +type Handler struct { + messageClient client.MessageInboxClient + userProfileClient client.UserProfileClient +} + +type Config struct { + MessageClient client.MessageInboxClient + UserProfileClient client.UserProfileClient +} + +func New(config Config) *Handler { + return &Handler{ + messageClient: config.MessageClient, + userProfileClient: config.UserProfileClient, + } +} + +func (h *Handler) MessageHandlers() httproutes.MessageHandlers { + return httproutes.MessageHandlers{ + ListMessageTabs: h.listMessageTabs, + MarkInboxSectionRead: h.markInboxSectionRead, + MarkInboxMessageReadPath: h.markInboxMessageReadByPath, + DeleteInboxMessagePath: h.deleteInboxMessageByPath, + ListInboxMessages: h.listInboxMessages, + } +} + +func (h *Handler) BatchUserProfiles(writer http.ResponseWriter, request *http.Request) { + h.batchUserProfiles(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/message_handler.go b/services/gateway-service/internal/transport/http/messageapi/message_handler.go similarity index 93% rename from services/gateway-service/internal/transport/http/message_handler.go rename to services/gateway-service/internal/transport/http/messageapi/message_handler.go index 4d1ba61c..56da0f0f 100644 --- a/services/gateway-service/internal/transport/http/message_handler.go +++ b/services/gateway-service/internal/transport/http/messageapi/message_handler.go @@ -1,16 +1,14 @@ -package http +package messageapi import ( - "hyapp/services/gateway-service/internal/transport/http/httpkit" "net/http" "strconv" "strings" - "time" activityv1 "hyapp.local/api/proto/activity/v1" userv1 "hyapp.local/api/proto/user/v1" - "hyapp/pkg/appcode" "hyapp/services/gateway-service/internal/auth" + "hyapp/services/gateway-service/internal/transport/http/httpkit" ) type messageTabSectionData struct { @@ -51,7 +49,7 @@ func (h *Handler) listMessageTabs(writer http.ResponseWriter, request *http.Requ return } resp, err := h.messageClient.ListMessageTabs(request.Context(), &activityv1.ListMessageTabsRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -83,7 +81,7 @@ func (h *Handler) listInboxMessages(writer http.ResponseWriter, request *http.Re } section := strings.TrimSpace(request.URL.Query().Get("section")) resp, err := h.messageClient.ListInboxMessages(request.Context(), &activityv1.ListInboxMessagesRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), Section: section, PageSize: pageSize, @@ -120,11 +118,11 @@ func (h *Handler) markInboxSectionRead(writer http.ResponseWriter, request *http var body struct { Section string `json:"section"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.messageClient.MarkInboxSectionRead(request.Context(), &activityv1.MarkInboxSectionReadRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), Section: body.Section, }) @@ -173,7 +171,7 @@ func (h *Handler) markInboxMessageRead(writer http.ResponseWriter, request *http return } resp, err := h.messageClient.MarkInboxMessageRead(request.Context(), &activityv1.MarkInboxMessageReadRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), MessageId: messageID, }) @@ -186,7 +184,7 @@ func (h *Handler) markInboxMessageRead(writer http.ResponseWriter, request *http func (h *Handler) deleteInboxMessage(writer http.ResponseWriter, request *http.Request, messageID string) { resp, err := h.messageClient.DeleteInboxMessage(request.Context(), &activityv1.DeleteInboxMessageRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: auth.UserIDFromContext(request.Context()), MessageId: messageID, }) @@ -209,7 +207,7 @@ func (h *Handler) batchUserProfiles(writer http.ResponseWriter, request *http.Re return } resp, err := h.userProfileClient.BatchGetUsers(request.Context(), &userv1.BatchGetUsersRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserIds: userIDs, }) if err != nil { @@ -234,16 +232,6 @@ func (h *Handler) batchUserProfiles(writer http.ResponseWriter, request *http.Re httpkit.WriteOK(writer, request, map[string]any{"profiles": items}) } -func activityMeta(request *http.Request) *activityv1.RequestMeta { - return &activityv1.RequestMeta{ - RequestId: httpkit.RequestIDFromContext(request.Context()), - Caller: "gateway-service", - GatewayNodeId: "gateway-local", - SentAtMs: time.Now().UnixMilli(), - AppCode: appcode.FromContext(request.Context()), - } -} - func parseMessagePageSize(raw string) (int32, bool) { raw = strings.TrimSpace(raw) if raw == "" { diff --git a/services/gateway-service/internal/transport/http/resourceapi/handler.go b/services/gateway-service/internal/transport/http/resourceapi/handler.go new file mode 100644 index 00000000..0b92f16a --- /dev/null +++ b/services/gateway-service/internal/transport/http/resourceapi/handler.go @@ -0,0 +1,41 @@ +package resourceapi + +import ( + "net/http" + + "hyapp/services/gateway-service/internal/client" +) + +// Handler owns public resource catalog and current-user resource inventory endpoints. +// Wallet-service remains the owner for entitlement and grant semantics. +type Handler struct { + walletClient client.WalletClient +} + +type Config struct { + WalletClient client.WalletClient +} + +func New(config Config) *Handler { + return &Handler{walletClient: config.WalletClient} +} + +func (h *Handler) ListResources(writer http.ResponseWriter, request *http.Request) { + h.listResources(writer, request) +} + +func (h *Handler) GetResourceGroup(writer http.ResponseWriter, request *http.Request) { + h.getResourceGroup(writer, request) +} + +func (h *Handler) ListGifts(writer http.ResponseWriter, request *http.Request) { + h.listGifts(writer, request) +} + +func (h *Handler) ListMyResources(writer http.ResponseWriter, request *http.Request) { + h.listMyResources(writer, request) +} + +func (h *Handler) EquipMyResource(writer http.ResponseWriter, request *http.Request) { + h.equipMyResource(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/resource_handler.go b/services/gateway-service/internal/transport/http/resourceapi/resource_handler.go similarity index 96% rename from services/gateway-service/internal/transport/http/resource_handler.go rename to services/gateway-service/internal/transport/http/resourceapi/resource_handler.go index 198ac9f3..48518796 100644 --- a/services/gateway-service/internal/transport/http/resource_handler.go +++ b/services/gateway-service/internal/transport/http/resourceapi/resource_handler.go @@ -1,4 +1,4 @@ -package http +package resourceapi import ( "errors" @@ -357,11 +357,11 @@ func userResourceFromProto(item *walletv1.UserResourceEntitlement) userResourceD } func resourcePage(request *http.Request) (int32, int32, bool) { - page, ok := parsePositiveInt32Query(request, "page", 1) + page, ok := httpkit.PositiveInt32Query(request, "page", 1) if !ok { return 0, 0, false } - pageSize, ok := parsePositiveInt32Query(request, "page_size", 20) + pageSize, ok := httpkit.PositiveInt32Query(request, "page_size", 20) if !ok { return 0, 0, false } @@ -375,18 +375,6 @@ func resourcePage(request *http.Request) (int32, int32, bool) { return page, pageSize, true } -func parsePositiveInt32Query(request *http.Request, name string, fallback int32) (int32, bool) { - raw := strings.TrimSpace(request.URL.Query().Get(name)) - if raw == "" { - return fallback, true - } - value, err := strconv.Atoi(raw) - if err != nil || value <= 0 { - return 0, false - } - return int32(value), true -} - func optionalNonNegativeInt64Query(request *http.Request, name string) (int64, bool, bool) { raw := strings.TrimSpace(request.URL.Query().Get(name)) if raw == "" { diff --git a/services/gateway-service/internal/transport/http/response_test.go b/services/gateway-service/internal/transport/http/response_test.go index 56989f18..299b120f 100644 --- a/services/gateway-service/internal/transport/http/response_test.go +++ b/services/gateway-service/internal/transport/http/response_test.go @@ -9,6 +9,7 @@ import ( "encoding/json" "errors" "hyapp/services/gateway-service/internal/transport/http/httpkit" + "hyapp/services/gateway-service/internal/transport/http/roomapi" "io" "mime/multipart" "net/http" @@ -45,11 +46,14 @@ type fakeRoomClient struct { lastRTCEvent *roomv1.ApplyRTCEventRequest lastMicSeatLock *roomv1.SetMicSeatLockRequest lastChatEnabled *roomv1.SetChatEnabledRequest + lastRoomPassword *roomv1.SetRoomPasswordRequest lastSetAdmin *roomv1.SetRoomAdminRequest lastMute *roomv1.MuteUserRequest lastKick *roomv1.KickUserRequest lastUnban *roomv1.UnbanUserRequest lastGift *roomv1.SendGiftRequest + lastFollowRoom *roomv1.FollowRoomRequest + lastUnfollowRoom *roomv1.UnfollowRoomRequest createErr error updateProfileErr error joinErr error @@ -175,6 +179,24 @@ func (f *fakeRoomClient) SetChatEnabled(_ context.Context, req *roomv1.SetChatEn return &roomv1.SetChatEnabledResponse{Result: &roomv1.CommandResult{Applied: true, RoomVersion: 8}}, nil } +func (f *fakeRoomClient) SetRoomPassword(_ context.Context, req *roomv1.SetRoomPasswordRequest) (*roomv1.SetRoomPasswordResponse, error) { + f.lastRoomPassword = req + return &roomv1.SetRoomPasswordResponse{ + Result: &roomv1.CommandResult{Applied: true, RoomVersion: 9, ServerTimeMs: 1_700_000_000_009}, + Room: &roomv1.RoomSnapshot{ + RoomId: req.GetMeta().GetRoomId(), + OwnerUserId: req.GetMeta().GetActorUserId(), + Mode: "voice", + Status: "active", + ChatEnabled: true, + Locked: req.GetLocked(), + MicSeats: []*roomv1.SeatState{{SeatNo: 1}, {SeatNo: 2}}, + RoomExt: map[string]string{"title": "Room"}, + Version: 9, + }, + }, nil +} + func (f *fakeRoomClient) SetRoomAdmin(_ context.Context, req *roomv1.SetRoomAdminRequest) (*roomv1.SetRoomAdminResponse, error) { f.lastSetAdmin = req return &roomv1.SetRoomAdminResponse{Result: &roomv1.CommandResult{Applied: true, RoomVersion: 9}}, nil @@ -200,6 +222,16 @@ func (f *fakeRoomClient) SendGift(_ context.Context, req *roomv1.SendGiftRequest return &roomv1.SendGiftResponse{Result: &roomv1.CommandResult{Applied: true, RoomVersion: 14}}, nil } +func (f *fakeRoomClient) FollowRoom(_ context.Context, req *roomv1.FollowRoomRequest) (*roomv1.FollowRoomResponse, error) { + f.lastFollowRoom = req + return &roomv1.FollowRoomResponse{RoomId: req.GetRoomId(), Followed: true, FollowedAtMs: 1_700_000_000_123, ServerTimeMs: 1_700_000_000_123}, nil +} + +func (f *fakeRoomClient) UnfollowRoom(_ context.Context, req *roomv1.UnfollowRoomRequest) (*roomv1.UnfollowRoomResponse, error) { + f.lastUnfollowRoom = req + return &roomv1.UnfollowRoomResponse{RoomId: req.GetRoomId(), Followed: false, ServerTimeMs: 1_700_000_000_124}, nil +} + type fakeUserAuthClient struct { lastLoginThirdParty *userv1.LoginThirdPartyRequest lastLoginPassword *userv1.LoginPasswordRequest @@ -1242,6 +1274,15 @@ func TestRoomCommandsPropagateClientCommandID(t *testing.T) { return client.lastChatEnabled.GetMeta() }, }, + { + name: "room_password", + path: "/api/v1/rooms/password", + body: `{"room_id":"room-1","command_id":"cmd-room-password-1","locked":true,"password":"1234"}`, + commandID: "cmd-room-password-1", + extractMeta: func(client *fakeRoomClient) *roomv1.RequestMeta { + return client.lastRoomPassword.GetMeta() + }, + }, { name: "set_admin", path: "/api/v1/rooms/admin/set", @@ -1323,9 +1364,9 @@ func TestRoomCommandsPropagateClientCommandID(t *testing.T) { } func TestJoinRoomReturnsInitialDataWithIMGroupRTCTokenAndProfiles(t *testing.T) { - previousNow := timeNow - timeNow = func() time.Time { return time.Unix(1_700_000_000, 0) } - defer func() { timeNow = previousNow }() + previousNow := roomapi.TimeNow + roomapi.TimeNow = func() time.Time { return time.Unix(1_700_000_000, 0) } + defer func() { roomapi.TimeNow = previousNow }() roomClient := &fakeRoomClient{joinResp: &roomv1.JoinRoomResponse{ Result: &roomv1.CommandResult{Applied: true, RoomVersion: 7, ServerTimeMs: 1_700_000_000_123}, @@ -1336,6 +1377,7 @@ func TestJoinRoomReturnsInitialDataWithIMGroupRTCTokenAndProfiles(t *testing.T) Mode: "voice", Status: "active", ChatEnabled: true, + Locked: true, MicSeats: []*roomv1.SeatState{{SeatNo: 1, UserId: 102, PublishState: "publishing", MicSessionId: "mic-102"}, {SeatNo: 2, Locked: true}}, OnlineUsers: []*roomv1.RoomUser{{UserId: 42, Role: "audience"}, {UserId: 102, Role: "admin"}}, GiftRank: []*roomv1.RankItem{{UserId: 301, Score: 900, GiftValue: 900}}, @@ -1356,7 +1398,7 @@ func TestJoinRoomReturnsInitialDataWithIMGroupRTCTokenAndProfiles(t *testing.T) AppScene: "voice_chat_room", }) router := handler.Routes(auth.NewVerifier("secret")) - request := httptest.NewRequest(http.MethodPost, "/api/v1/rooms/join", bytes.NewReader([]byte(`{"room_id":"room_1001","command_id":"cmd-join","role":"audience"}`))) + request := httptest.NewRequest(http.MethodPost, "/api/v1/rooms/join", bytes.NewReader([]byte(`{"room_id":"room_1001","command_id":"cmd-join","role":"audience","password":"1234"}`))) request.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) request.Header.Set("X-Request-ID", "req-join-initial") recorder := httptest.NewRecorder() @@ -1372,9 +1414,12 @@ func TestJoinRoomReturnsInitialDataWithIMGroupRTCTokenAndProfiles(t *testing.T) } data := response.Data.(map[string]any) room := data["room"].(map[string]any) - if room["room_id"] != "room_1001" || room["im_group_id"] != "room_1001" || room["title"] != "Live Room" || room["online_count"].(float64) != 2 { + if room["room_id"] != "room_1001" || room["im_group_id"] != "room_1001" || room["title"] != "Live Room" || room["online_count"].(float64) != 2 || room["locked"] != true { t.Fatalf("unexpected initial room data: %+v", room) } + if roomClient.lastJoin == nil || roomClient.lastJoin.GetPassword() != "1234" { + t.Fatalf("join must forward room password to room-service: %+v", roomClient.lastJoin) + } seats := data["seats"].([]any) if len(seats) != 2 || seats[0].(map[string]any)["user_id"] != "102" { t.Fatalf("join response must include first-screen seats: %+v", seats) @@ -1401,7 +1446,7 @@ func TestListRoomsUsesUserRegionFromUserService(t *testing.T) { profileClient := &fakeUserProfileClient{regionID: 1001} queryClient := &fakeRoomQueryClient{resp: &roomv1.ListRoomsResponse{ Rooms: []*roomv1.RoomListItem{ - {RoomId: "room-1", VisibleRegionId: 1001, Heat: 90}, + {RoomId: "room-1", VisibleRegionId: 1001, Heat: 90, Locked: true}, }, NextCursor: "cursor-2", }} @@ -1437,13 +1482,43 @@ func TestListRoomsUsesUserRegionFromUserService(t *testing.T) { data := response.Data.(map[string]any) rooms := data["rooms"].([]any) first := rooms[0].(map[string]any) - if first["im_group_id"] != "room-1" { + if first["im_group_id"] != "room-1" || first["locked"] != true { t.Fatalf("room list must expose room IM group id: %+v", first) } } +func TestSetRoomPasswordForwardsPasswordAndReturnsLockedState(t *testing.T) { + client := &fakeRoomClient{} + router := NewHandlerWithClients(client, nil, nil, &fakeUserProfileClient{}).Routes(auth.NewVerifier("secret")) + request := httptest.NewRequest(http.MethodPost, "/api/v1/rooms/password", bytes.NewReader([]byte(`{"room_id":"room-1","command_id":"cmd-password","locked":true,"password":" 1234 "}`))) + request.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) + request.Header.Set("X-Request-ID", "req-password") + recorder := httptest.NewRecorder() + + router.ServeHTTP(recorder, request) + + if recorder.Code != http.StatusOK { + t.Fatalf("status mismatch: got %d body=%s", recorder.Code, recorder.Body.String()) + } + if client.lastRoomPassword == nil || !client.lastRoomPassword.GetLocked() || client.lastRoomPassword.GetPassword() != "1234" { + t.Fatalf("room password request was not normalized and forwarded: %+v", client.lastRoomPassword) + } + if strings.Contains(recorder.Body.String(), "password_hash") || strings.Contains(recorder.Body.String(), "room_password_hash") { + t.Fatalf("set password response must not expose password hash: %s", recorder.Body.String()) + } + var response httpkit.ResponseEnvelope + if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil { + t.Fatalf("decode room password response failed: %v", err) + } + data := response.Data.(map[string]any) + room := data["room"].(map[string]any) + if room["locked"] != true { + t.Fatalf("set password response must expose locked state: %+v", room) + } +} + func TestListRoomsRejectsMineFeedTabs(t *testing.T) { - for _, tab := range []string{"visited", "friend", "following", "me"} { + for _, tab := range []string{"visited", "friend", "following", "followed", "me"} { t.Run(tab, func(t *testing.T) { queryClient := &fakeRoomQueryClient{} handler := NewHandlerWithClients(&fakeRoomClient{}, nil, nil, &fakeUserProfileClient{regionID: 1001}) @@ -1466,7 +1541,7 @@ func TestListRoomsRejectsMineFeedTabs(t *testing.T) { } func TestListRoomFeedsSupportsMineFeedTabs(t *testing.T) { - for _, tab := range []string{"visited", "friend", "following"} { + for _, tab := range []string{"visited", "friend", "following", "followed"} { t.Run(tab, func(t *testing.T) { profileClient := &fakeUserProfileClient{regionID: 1001} socialClient := &fakeUserSocialClient{} @@ -1475,7 +1550,7 @@ func TestListRoomFeedsSupportsMineFeedTabs(t *testing.T) { }} handler := NewHandlerWithClients(&fakeRoomClient{}, nil, nil, profileClient) handler.SetRoomQueryClient(queryClient) - if tab != "visited" { + if tab == "friend" || tab == "following" { handler.SetUserSocialClient(socialClient) } router := handler.Routes(auth.NewVerifier("secret")) @@ -1493,9 +1568,9 @@ func TestListRoomFeedsSupportsMineFeedTabs(t *testing.T) { t.Fatalf("feed tab was not forwarded with authenticated user and region: %+v", queryClient.lastFeeds) } switch tab { - case "visited": + case "visited", "followed": if len(queryClient.lastFeeds.GetRelatedUsers()) != 0 || socialClient.lastFollowing != nil || socialClient.lastFriends != nil { - t.Fatalf("visited feed must not load social relations: feeds=%+v social=%+v/%+v", queryClient.lastFeeds, socialClient.lastFollowing, socialClient.lastFriends) + t.Fatalf("%s feed must not load social relations: feeds=%+v social=%+v/%+v", tab, queryClient.lastFeeds, socialClient.lastFollowing, socialClient.lastFriends) } case "following": if socialClient.lastFollowing == nil || socialClient.lastFollowing.GetUserId() != 42 { @@ -1524,12 +1599,12 @@ func TestListRoomFeedsRelationCursorContinuesUserSocialScan(t *testing.T) { handler.SetRoomQueryClient(queryClient) handler.SetUserSocialClient(socialClient) router := handler.Routes(auth.NewVerifier("secret")) - cursorPayload, _ := json.Marshal(roomFeedRelationCursor{ - Tab: "following", - Query: "music", - UpdatedAtMS: 8000, - SubjectUserID: 10002, - RoomID: "room-feed", + cursorPayload, _ := json.Marshal(map[string]any{ + "tab": "following", + "query": "music", + "updated_at_ms": int64(8000), + "subject_user_id": int64(10002), + "room_id": "room-feed", }) cursor := base64.RawURLEncoding.EncodeToString(cursorPayload) request := httptest.NewRequest(http.MethodGet, "/api/v1/rooms/feeds?tab=following&q=music&cursor="+cursor, nil) @@ -1546,6 +1621,52 @@ func TestListRoomFeedsRelationCursorContinuesUserSocialScan(t *testing.T) { } } +func TestRoomFollowActionsUseAuthenticatedUser(t *testing.T) { + for _, test := range []struct { + name string + method string + }{ + {name: "follow", method: http.MethodPost}, + {name: "unfollow", method: http.MethodDelete}, + } { + t.Run(test.name, func(t *testing.T) { + roomClient := &fakeRoomClient{} + router := NewHandler(roomClient).Routes(auth.NewVerifier("secret")) + request := httptest.NewRequest(test.method, "/api/v1/rooms/room-follow/follow", nil) + request.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) + request.Header.Set("X-Request-ID", "req-room-"+test.name) + recorder := httptest.NewRecorder() + + router.ServeHTTP(recorder, request) + + if recorder.Code != http.StatusOK { + t.Fatalf("status mismatch: got %d body=%s", recorder.Code, recorder.Body.String()) + } + var response httpkit.ResponseEnvelope + if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil { + t.Fatalf("decode room follow response failed: %v", err) + } + data := response.Data.(map[string]any) + switch test.method { + case http.MethodPost: + if roomClient.lastFollowRoom == nil || roomClient.lastFollowRoom.GetUserId() != 42 || roomClient.lastFollowRoom.GetRoomId() != "room-follow" { + t.Fatalf("follow room request must use authenticated user and path room: %+v", roomClient.lastFollowRoom) + } + if data["is_followed"] != true || data["room_id"] != "room-follow" { + t.Fatalf("follow response mismatch: %+v", data) + } + case http.MethodDelete: + if roomClient.lastUnfollowRoom == nil || roomClient.lastUnfollowRoom.GetUserId() != 42 || roomClient.lastUnfollowRoom.GetRoomId() != "room-follow" { + t.Fatalf("unfollow room request must use authenticated user and path room: %+v", roomClient.lastUnfollowRoom) + } + if data["is_followed"] != false || data["room_id"] != "room-follow" { + t.Fatalf("unfollow response mismatch: %+v", data) + } + } + }) + } +} + func TestGetMyRoomUsesAuthenticatedOwnerAndReturnsIMGroup(t *testing.T) { queryClient := &fakeRoomQueryClient{myRoomResp: &roomv1.GetMyRoomResponse{ HasRoom: true, @@ -1755,6 +1876,52 @@ func TestGetRoomSnapshotUsesAuthenticatedUser(t *testing.T) { if !ok || len(seats) != 2 { t.Fatalf("snapshot DTO must include seat list: %+v", data["seats"]) } + if data["is_followed"] != false { + t.Fatalf("snapshot DTO must expose is_followed=false explicitly: %+v", data) + } +} + +func TestGetRoomDetailIncludesFollowState(t *testing.T) { + queryClient := &fakeRoomQueryClient{snapshotResp: &roomv1.GetRoomSnapshotResponse{ + Room: &roomv1.RoomSnapshot{ + RoomId: "room-detail", + OwnerUserId: 1001, + Status: "active", + ChatEnabled: true, + Version: 9, + MicSeats: []*roomv1.SeatState{{SeatNo: 1, UserId: 42}}, + OnlineUsers: []*roomv1.RoomUser{ + {UserId: 42, Role: "audience", JoinedAtMs: 1000, LastSeenAtMs: 2000}, + }, + RoomExt: map[string]string{"title": "Detail Room"}, + }, + ServerTimeMs: 123456, + IsFollowed: true, + }} + handler := NewHandlerWithClients(&fakeRoomClient{}, nil, nil, &fakeUserProfileClient{}) + handler.SetRoomQueryClient(queryClient) + router := handler.Routes(auth.NewVerifier("secret")) + request := httptest.NewRequest(http.MethodGet, "/api/v1/rooms/room-detail/detail", nil) + request.Header.Set("Authorization", "Bearer "+signGatewayToken(t, "secret", 42)) + request.Header.Set("X-Request-ID", "req-room-detail") + recorder := httptest.NewRecorder() + + router.ServeHTTP(recorder, request) + + if recorder.Code != http.StatusOK { + t.Fatalf("status mismatch: got %d body=%s", recorder.Code, recorder.Body.String()) + } + if queryClient.lastSnapshot == nil || queryClient.lastSnapshot.GetViewerUserId() != 42 || queryClient.lastSnapshot.GetRoomId() != "room-detail" { + t.Fatalf("detail must read snapshot with authenticated viewer: %+v", queryClient.lastSnapshot) + } + var response httpkit.ResponseEnvelope + if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil { + t.Fatalf("decode detail response failed: %v", err) + } + data := response.Data.(map[string]any) + if data["is_followed"] != true { + t.Fatalf("detail response must expose room follow state: %+v", data) + } } func TestGetRoomSnapshotRejectsInvalidRoomIDBeforeGRPC(t *testing.T) { @@ -3481,9 +3648,9 @@ func TestTencentIMUserSigUsesAuthenticatedUserIDAndFailsClosed(t *testing.T) { } func TestTencentRTCTokenUsesPresenceGuardAndInternalUserID(t *testing.T) { - previousNow := timeNow - timeNow = func() time.Time { return time.Unix(1_700_000_000, 0) } - defer func() { timeNow = previousNow }() + previousNow := roomapi.TimeNow + roomapi.TimeNow = func() time.Time { return time.Unix(1_700_000_000, 0) } + defer func() { roomapi.TimeNow = previousNow }() guard := &fakeRoomGuardClient{presenceResp: &roomv1.VerifyRoomPresenceResponse{Present: true, RoomVersion: 9}} handler := NewHandlerWithConfig(&fakeRoomClient{}, guard, nil, nil, TencentIMConfig{}) @@ -3856,7 +4023,11 @@ func assertTencentCallback(t *testing.T, recorder *httptest.ResponseRecorder, st t.Fatalf("status mismatch: got %d want %d body=%s", recorder.Code, statusCode, recorder.Body.String()) } - var response tencentIMCallbackResponse + var response struct { + ActionStatus string `json:"ActionStatus"` + ErrorInfo string `json:"ErrorInfo"` + ErrorCode int `json:"ErrorCode"` + } if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil { t.Fatalf("decode tencent callback response failed: %v", err) } @@ -3872,7 +4043,10 @@ func assertTencentRTCCallback(t *testing.T, recorder *httptest.ResponseRecorder, t.Fatalf("status mismatch: got %d want %d body=%s", recorder.Code, statusCode, recorder.Body.String()) } - var response tencentRTCCallbackResponse + var response struct { + Code int `json:"code"` + Message string `json:"message,omitempty"` + } if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil { t.Fatalf("decode tencent rtc callback response failed: %v", err) } diff --git a/services/gateway-service/internal/transport/http/roomapi/gift_view.go b/services/gateway-service/internal/transport/http/roomapi/gift_view.go new file mode 100644 index 00000000..7bdd73e2 --- /dev/null +++ b/services/gateway-service/internal/transport/http/roomapi/gift_view.go @@ -0,0 +1,97 @@ +package roomapi + +import walletv1 "hyapp.local/api/proto/wallet/v1" + +type resourceData struct { + ResourceID int64 `json:"resource_id"` + ResourceCode string `json:"resource_code"` + ResourceType string `json:"resource_type"` + Name string `json:"name"` + Status string `json:"status"` + Grantable bool `json:"grantable"` + GrantStrategy string `json:"grant_strategy"` + WalletAssetType string `json:"wallet_asset_type,omitempty"` + WalletAssetAmount int64 `json:"wallet_asset_amount,omitempty"` + UsageScopes []string `json:"usage_scopes"` + AssetURL string `json:"asset_url"` + PreviewURL string `json:"preview_url"` + AnimationURL string `json:"animation_url"` + MetadataJSON string `json:"metadata_json"` + SortOrder int32 `json:"sort_order"` + CreatedAtMS int64 `json:"created_at_ms"` + UpdatedAtMS int64 `json:"updated_at_ms"` +} + +type giftConfigData struct { + GiftID string `json:"gift_id"` + ResourceID int64 `json:"resource_id"` + Resource resourceData `json:"resource"` + Status string `json:"status"` + Name string `json:"name"` + SortOrder int32 `json:"sort_order"` + PresentationJSON string `json:"presentation_json"` + PriceVersion string `json:"price_version"` + GiftTypeCode string `json:"gift_type_code"` + ChargeAssetType string `json:"charge_asset_type"` + CoinPrice int64 `json:"coin_price"` + GiftPointAmount int64 `json:"gift_point_amount"` + HeatValue int64 `json:"heat_value"` + EffectiveFromMS int64 `json:"effective_from_ms"` + EffectiveToMS int64 `json:"effective_to_ms"` + EffectTypes []string `json:"effect_types"` + CreatedAtMS int64 `json:"created_at_ms"` + UpdatedAtMS int64 `json:"updated_at_ms"` + RegionIDs []int64 `json:"region_ids"` +} + +func giftFromProto(gift *walletv1.GiftConfig) giftConfigData { + if gift == nil { + return giftConfigData{} + } + return giftConfigData{ + GiftID: gift.GetGiftId(), + ResourceID: gift.GetResourceId(), + Resource: resourceFromProto(gift.GetResource()), + Status: gift.GetStatus(), + Name: gift.GetName(), + SortOrder: gift.GetSortOrder(), + PresentationJSON: gift.GetPresentationJson(), + PriceVersion: gift.GetPriceVersion(), + GiftTypeCode: gift.GetGiftTypeCode(), + ChargeAssetType: gift.GetChargeAssetType(), + CoinPrice: gift.GetCoinPrice(), + GiftPointAmount: gift.GetGiftPointAmount(), + HeatValue: gift.GetHeatValue(), + EffectiveFromMS: gift.GetEffectiveFromMs(), + EffectiveToMS: gift.GetEffectiveToMs(), + EffectTypes: gift.GetEffectTypes(), + CreatedAtMS: gift.GetCreatedAtMs(), + UpdatedAtMS: gift.GetUpdatedAtMs(), + RegionIDs: gift.GetRegionIds(), + } +} + +func resourceFromProto(item *walletv1.Resource) resourceData { + if item == nil { + return resourceData{} + } + return resourceData{ + ResourceID: item.GetResourceId(), + ResourceCode: item.GetResourceCode(), + ResourceType: item.GetResourceType(), + Name: item.GetName(), + Status: item.GetStatus(), + Grantable: item.GetGrantable(), + GrantStrategy: item.GetGrantStrategy(), + WalletAssetType: item.GetWalletAssetType(), + WalletAssetAmount: item.GetWalletAssetAmount(), + UsageScopes: item.GetUsageScopes(), + AssetURL: item.GetAssetUrl(), + PreviewURL: item.GetPreviewUrl(), + AnimationURL: item.GetAnimationUrl(), + MetadataJSON: item.GetMetadataJson(), + SortOrder: item.GetSortOrder(), + CreatedAtMS: item.GetCreatedAtMs(), + UpdatedAtMS: item.GetUpdatedAtMs(), + } +} diff --git a/services/gateway-service/internal/transport/http/roomapi/handler.go b/services/gateway-service/internal/transport/http/roomapi/handler.go new file mode 100644 index 00000000..3c6a0e03 --- /dev/null +++ b/services/gateway-service/internal/transport/http/roomapi/handler.go @@ -0,0 +1,84 @@ +package roomapi + +import ( + "net/http" + + "hyapp/pkg/tencentrtc" + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns room-facing HTTP endpoints in gateway. +// It keeps gateway as protocol adapter only: room state still belongs to room-service. +type Handler struct { + roomClient client.RoomClient + roomGuardClient client.RoomGuardClient + roomQueryClient client.RoomQueryClient + userProfileClient client.UserProfileClient + userSocialClient client.UserSocialClient + walletClient client.WalletClient + rtcTokenConfig tencentrtc.TokenConfig +} + +type Config struct { + RoomClient client.RoomClient + RoomGuardClient client.RoomGuardClient + RoomQueryClient client.RoomQueryClient + UserProfileClient client.UserProfileClient + UserSocialClient client.UserSocialClient + WalletClient client.WalletClient + RTCTokenConfig tencentrtc.TokenConfig +} + +func New(config Config) *Handler { + return &Handler{ + roomClient: config.RoomClient, + roomGuardClient: config.RoomGuardClient, + roomQueryClient: config.RoomQueryClient, + userProfileClient: config.UserProfileClient, + userSocialClient: config.UserSocialClient, + walletClient: config.WalletClient, + rtcTokenConfig: config.RTCTokenConfig, + } +} + +func (h *Handler) RoomHandlers() httproutes.RoomHandlers { + return httproutes.RoomHandlers{ + GetMyRoom: h.getMyRoom, + ListRoomFeeds: h.listRoomFeeds, + ListRooms: h.listRooms, + GetCurrentRoom: h.getCurrentRoom, + GetRoomSnapshot: h.getRoomSnapshot, + GetRoomDetail: h.getRoomDetail, + ListRoomOnlineUsers: h.listRoomOnlineUsers, + GetRoomGiftPanel: h.getRoomGiftPanel, + FollowRoom: h.handleRoomFollow, + CreateRoom: h.createRoom, + UpdateRoomProfile: h.updateRoomProfile, + JoinRoom: h.joinRoom, + RoomHeartbeat: h.roomHeartbeat, + LeaveRoom: h.leaveRoom, + CloseRoom: h.closeRoom, + MicUp: h.micUp, + MicDown: h.micDown, + ChangeMicSeat: h.changeMicSeat, + ConfirmMicPublishing: h.confirmMicPublishing, + SetMicMute: h.setMicMute, + SetMicSeatLock: h.setMicSeatLock, + SetChatEnabled: h.setChatEnabled, + SetRoomPassword: h.setRoomPassword, + SetRoomAdmin: h.setRoomAdmin, + MuteUser: h.muteUser, + KickUser: h.kickUser, + UnbanUser: h.unbanUser, + SendGift: h.sendGift, + } +} + +func (h *Handler) IssueTencentRTCToken(writer http.ResponseWriter, request *http.Request) { + h.issueTencentRTCToken(writer, request) +} + +func (h *Handler) BatchRoomDisplayProfiles(writer http.ResponseWriter, request *http.Request) { + h.batchRoomDisplayProfiles(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/room_handler.go b/services/gateway-service/internal/transport/http/roomapi/room_handler.go similarity index 83% rename from services/gateway-service/internal/transport/http/room_handler.go rename to services/gateway-service/internal/transport/http/roomapi/room_handler.go index 5329dac5..88b89c0f 100644 --- a/services/gateway-service/internal/transport/http/room_handler.go +++ b/services/gateway-service/internal/transport/http/roomapi/room_handler.go @@ -1,4 +1,4 @@ -package http +package roomapi import ( "encoding/base64" @@ -8,13 +8,14 @@ import ( "strconv" "strings" - roomv1 "hyapp.local/api/proto/room/v1" - userv1 "hyapp.local/api/proto/user/v1" - walletv1 "hyapp.local/api/proto/wallet/v1" "hyapp/pkg/appcode" "hyapp/pkg/roomid" "hyapp/pkg/xerr" "hyapp/services/gateway-service/internal/auth" + + roomv1 "hyapp.local/api/proto/room/v1" + userv1 "hyapp.local/api/proto/user/v1" + walletv1 "hyapp.local/api/proto/wallet/v1" ) const ( @@ -51,7 +52,7 @@ func (h *Handler) listRooms(writer http.ResponseWriter, request *http.Request) { viewerUserID := auth.UserIDFromContext(request.Context()) userResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: viewerUserID, }) if err != nil { @@ -61,7 +62,7 @@ func (h *Handler) listRooms(writer http.ResponseWriter, request *http.Request) { } resp, err := h.roomQueryClient.ListRooms(request.Context(), &roomv1.ListRoomsRequest{ - Meta: meta(request, "", ""), + Meta: httpkit.RoomMeta(request, "", ""), ViewerUserId: viewerUserID, VisibleRegionId: userResp.GetUser().GetRegionId(), Tab: tab, @@ -76,7 +77,7 @@ func (h *Handler) listRooms(writer http.ResponseWriter, request *http.Request) { httpkit.WriteOK(writer, request, roomListDataFromProto(resp)) } -// listRoomFeeds 查询 Mine 页 visited/friend/following 用户房间流。 +// listRoomFeeds 查询 Mine 页 visited/friend/following/followed 房间流。 func (h *Handler) listRoomFeeds(writer http.ResponseWriter, request *http.Request) { if h.userProfileClient == nil || h.roomQueryClient == nil { // feed 同样需要 user-service 区域归属,避免跨区域露出用户关系流房间。 @@ -97,7 +98,7 @@ func (h *Handler) listRoomFeeds(writer http.ResponseWriter, request *http.Reques viewerUserID := auth.UserIDFromContext(request.Context()) userResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: viewerUserID, }) if err != nil { @@ -116,7 +117,7 @@ func (h *Handler) listRoomFeeds(writer http.ResponseWriter, request *http.Reques } resp, err := h.roomQueryClient.ListRoomFeeds(request.Context(), &roomv1.ListRoomFeedsRequest{ - Meta: meta(request, "", ""), + Meta: httpkit.RoomMeta(request, "", ""), ViewerUserId: viewerUserID, VisibleRegionId: userResp.GetUser().GetRegionId(), Tab: tab, @@ -133,7 +134,7 @@ func (h *Handler) listRoomFeeds(writer http.ResponseWriter, request *http.Reques } func (h *Handler) roomFeedRelatedUsers(request *http.Request, tab string, query string, rawCursor string) ([]*roomv1.RoomFeedRelatedUser, bool, error) { - if tab == "visited" { + if tab == "visited" || tab == "followed" { return nil, true, nil } if h.userSocialClient == nil { @@ -165,7 +166,7 @@ func (h *Handler) roomFeedRelatedUserBatch(request *http.Request, tab string, vi switch tab { case "following": resp, err := h.userSocialClient.ListFollowing(request.Context(), &userv1.ListFollowingRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: viewerUserID, Page: 1, PageSize: defaultRoomFeedRelationPageSize, @@ -187,7 +188,7 @@ func (h *Handler) roomFeedRelatedUserBatch(request *http.Request, tab string, vi return relatedUsers, cursor, nil case "friend": resp, err := h.userSocialClient.ListFriends(request.Context(), &userv1.ListFriendsRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: viewerUserID, Page: 1, PageSize: defaultRoomFeedRelationPageSize, @@ -250,6 +251,8 @@ func parseRoomFeedTab(raw string) (string, bool) { return "friend", true case "following": return "following", true + case "followed": + return "followed", true default: return "", false } @@ -288,7 +291,7 @@ func (h *Handler) getMyRoom(writer http.ResponseWriter, request *http.Request) { } resp, err := h.roomQueryClient.GetMyRoom(request.Context(), &roomv1.GetMyRoomRequest{ - Meta: meta(request, "", ""), + Meta: httpkit.RoomMeta(request, "", ""), OwnerUserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -307,7 +310,7 @@ func (h *Handler) getCurrentRoom(writer http.ResponseWriter, request *http.Reque } resp, err := h.roomQueryClient.GetCurrentRoom(request.Context(), &roomv1.GetCurrentRoomRequest{ - Meta: meta(request, "", ""), + Meta: httpkit.RoomMeta(request, "", ""), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -363,11 +366,11 @@ func (h *Handler) getRoomSnapshot(writer http.ResponseWriter, request *http.Requ } resp, err := h.roomQueryClient.GetRoomSnapshot(request.Context(), &roomv1.GetRoomSnapshotRequest{ - Meta: meta(request, roomID, ""), + Meta: httpkit.RoomMeta(request, roomID, ""), RoomId: roomID, ViewerUserId: auth.UserIDFromContext(request.Context()), }) - write(writer, request, roomSnapshotDataFromProto(resp), err) + httpkit.Write(writer, request, roomSnapshotDataFromProto(resp), err) } // getRoomDetail 返回语音房详情页首屏可直接渲染的数据。 @@ -385,7 +388,7 @@ func (h *Handler) getRoomDetail(writer http.ResponseWriter, request *http.Reques viewerUserID := auth.UserIDFromContext(request.Context()) resp, err := h.roomQueryClient.GetRoomSnapshot(request.Context(), &roomv1.GetRoomSnapshotRequest{ - Meta: meta(request, roomID, ""), + Meta: httpkit.RoomMeta(request, roomID, ""), RoomId: roomID, ViewerUserId: viewerUserID, }) @@ -408,19 +411,19 @@ func (h *Handler) listRoomOnlineUsers(writer http.ResponseWriter, request *http. httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return } - page, ok := parsePositiveInt32Query(request, "page", 1) + page, ok := httpkit.PositiveInt32Query(request, "page", 1) if !ok { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return } - pageSize, ok := parsePositiveInt32Query(request, "page_size", 50) + pageSize, ok := httpkit.PositiveInt32Query(request, "page_size", 50) if !ok { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return } resp, err := h.roomQueryClient.ListRoomOnlineUsers(request.Context(), &roomv1.ListRoomOnlineUsersRequest{ - Meta: meta(request, roomID, ""), + Meta: httpkit.RoomMeta(request, roomID, ""), RoomId: roomID, ViewerUserId: auth.UserIDFromContext(request.Context()), Page: page, @@ -451,7 +454,7 @@ func (h *Handler) getRoomGiftPanel(writer http.ResponseWriter, request *http.Req viewerUserID := auth.UserIDFromContext(request.Context()) snapshotResp, err := h.roomQueryClient.GetRoomSnapshot(request.Context(), &roomv1.GetRoomSnapshotRequest{ - Meta: meta(request, roomID, ""), + Meta: httpkit.RoomMeta(request, roomID, ""), RoomId: roomID, ViewerUserId: viewerUserID, }) @@ -497,6 +500,48 @@ func (h *Handler) getRoomGiftPanel(writer http.ResponseWriter, request *http.Req }) } +// handleRoomFollow 建立或取消当前用户对房间的关注关系。 +// 关注关系由 room-service 保存,gateway 只负责鉴权用户和 path room_id 的协议转换。 +func (h *Handler) handleRoomFollow(writer http.ResponseWriter, request *http.Request) { + if h.roomClient == nil { + httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") + return + } + roomID := strings.TrimSpace(request.PathValue("room_id")) + if !roomid.ValidStringID(roomID) { + httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") + return + } + + viewerUserID := auth.UserIDFromContext(request.Context()) + switch request.Method { + case http.MethodPost: + resp, err := h.roomClient.FollowRoom(request.Context(), &roomv1.FollowRoomRequest{ + Meta: httpkit.RoomMeta(request, roomID, ""), + RoomId: roomID, + UserId: viewerUserID, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, roomFollowDataFromProto(resp)) + case http.MethodDelete: + resp, err := h.roomClient.UnfollowRoom(request.Context(), &roomv1.UnfollowRoomRequest{ + Meta: httpkit.RoomMeta(request, roomID, ""), + RoomId: roomID, + UserId: viewerUserID, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, roomUnfollowDataFromProto(resp)) + default: + httpkit.WriteError(writer, request, http.StatusMethodNotAllowed, httpkit.CodeInvalidArgument, "invalid argument") + } +} + // createRoom 把创建房间 HTTP JSON 请求转换为 room-service CreateRoom 命令。 func (h *Handler) createRoom(writer http.ResponseWriter, request *http.Request) { var body struct { @@ -508,7 +553,7 @@ func (h *Handler) createRoom(writer http.ResponseWriter, request *http.Request) RoomDescription string `json:"room_description"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } body.CommandID = strings.TrimSpace(body.CommandID) @@ -527,7 +572,7 @@ func (h *Handler) createRoom(writer http.ResponseWriter, request *http.Request) return } userResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -538,7 +583,7 @@ func (h *Handler) createRoom(writer http.ResponseWriter, request *http.Request) roomID := appcode.NewScopedID(appcode.FromContext(request.Context())) roomShortID := userResp.GetUser().GetDisplayUserId() resp, err := h.roomClient.CreateRoom(request.Context(), &roomv1.CreateRoomRequest{ - Meta: meta(request, roomID, body.CommandID), + Meta: httpkit.RoomMeta(request, roomID, body.CommandID), SeatCount: body.SeatCount, Mode: body.Mode, VisibleRegionId: userResp.GetUser().GetRegionId(), @@ -547,7 +592,7 @@ func (h *Handler) createRoom(writer http.ResponseWriter, request *http.Request) RoomDescription: body.RoomDescription, RoomShortId: roomShortID, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // updateRoomProfile 把 App 房间资料编辑请求转换为 room-service UpdateRoomProfile 命令。 @@ -561,7 +606,7 @@ func (h *Handler) updateRoomProfile(writer http.ResponseWriter, request *http.Re SeatCount *int32 `json:"seat_count"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } body.RoomID = strings.TrimSpace(body.RoomID) @@ -571,7 +616,7 @@ func (h *Handler) updateRoomProfile(writer http.ResponseWriter, request *http.Re trimOptionalString(body.RoomDescription) resp, err := h.roomClient.UpdateRoomProfile(request.Context(), &roomv1.UpdateRoomProfileRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), RoomName: body.RoomName, RoomAvatar: body.RoomAvatar, RoomDescription: body.RoomDescription, @@ -597,15 +642,17 @@ func (h *Handler) joinRoom(writer http.ResponseWriter, request *http.Request) { RoomID string `json:"room_id"` CommandID string `json:"command_id"` Role string `json:"role"` + Password string `json:"password"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.JoinRoom(request.Context(), &roomv1.JoinRoomRequest{ - Meta: meta(request, body.RoomID, body.CommandID), - Role: body.Role, + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), + Role: body.Role, + Password: body.Password, }) if err != nil { httpkit.WriteRPCError(writer, request, err) @@ -662,7 +709,7 @@ func (h *Handler) roomInitialProfiles(request *http.Request, snapshot *roomv1.Ro return nil } resp, err := h.userProfileClient.BatchGetUsers(request.Context(), &userv1.BatchGetUsersRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserIds: userIDs, }) if err != nil { @@ -693,14 +740,14 @@ func (h *Handler) roomHeartbeat(writer http.ResponseWriter, request *http.Reques CommandID string `json:"command_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.RoomHeartbeat(request.Context(), &roomv1.RoomHeartbeatRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // leaveRoom 把退房 HTTP JSON 请求转换为 room-service LeaveRoom 命令。 @@ -710,14 +757,14 @@ func (h *Handler) leaveRoom(writer http.ResponseWriter, request *http.Request) { CommandID string `json:"command_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.LeaveRoom(request.Context(), &roomv1.LeaveRoomRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // closeRoom 是设计稿右上角电源按钮入口:这里只退出当前用户,不关闭房间生命周期。 @@ -733,15 +780,15 @@ func (h *Handler) micUp(writer http.ResponseWriter, request *http.Request) { SeatNo int32 `json:"seat_no"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.MicUp(request.Context(), &roomv1.MicUpRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), SeatNo: body.SeatNo, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // micDown 把下麦 HTTP JSON 请求转换为 room-service MicDown 命令。 @@ -753,16 +800,16 @@ func (h *Handler) micDown(writer http.ResponseWriter, request *http.Request) { Reason string `json:"reason"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.MicDown(request.Context(), &roomv1.MicDownRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, Reason: body.Reason, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // changeMicSeat 把换麦位 HTTP JSON 请求转换为 room-service ChangeMicSeat 命令。 @@ -774,16 +821,16 @@ func (h *Handler) changeMicSeat(writer http.ResponseWriter, request *http.Reques SeatNo int32 `json:"seat_no"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.ChangeMicSeat(request.Context(), &roomv1.ChangeMicSeatRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, SeatNo: body.SeatNo, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // confirmMicPublishing 把客户端 SDK 发流成功回调转换为 room-service 发流确认命令。 @@ -798,19 +845,19 @@ func (h *Handler) confirmMicPublishing(writer http.ResponseWriter, request *http Source string `json:"source"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.ConfirmMicPublishing(request.Context(), &roomv1.ConfirmMicPublishingRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, MicSessionId: body.MicSessionID, RoomVersion: body.RoomVersion, EventTimeMs: body.EventTimeMS, Source: body.Source, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // setMicMute 把麦克风静音 HTTP 请求转换为 room-service SetMicMute 命令。 @@ -822,16 +869,16 @@ func (h *Handler) setMicMute(writer http.ResponseWriter, request *http.Request) Muted bool `json:"muted"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.SetMicMute(request.Context(), &roomv1.SetMicMuteRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, Muted: body.Muted, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // setMicSeatLock 把锁麦 HTTP JSON 请求转换为 room-service SetMicSeatLock 命令。 @@ -843,16 +890,16 @@ func (h *Handler) setMicSeatLock(writer http.ResponseWriter, request *http.Reque Locked bool `json:"locked"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.SetMicSeatLock(request.Context(), &roomv1.SetMicSeatLockRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), SeatNo: body.SeatNo, Locked: body.Locked, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // setChatEnabled 把公屏开关 HTTP JSON 请求转换为 room-service SetChatEnabled 命令。 @@ -863,15 +910,46 @@ func (h *Handler) setChatEnabled(writer http.ResponseWriter, request *http.Reque Enabled bool `json:"enabled"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.SetChatEnabled(request.Context(), &roomv1.SetChatEnabledRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), Enabled: body.Enabled, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) +} + +// setRoomPassword 把房主锁房 HTTP JSON 请求转换为 room-service SetRoomPassword 命令。 +func (h *Handler) setRoomPassword(writer http.ResponseWriter, request *http.Request) { + var body struct { + RoomID string `json:"room_id"` + CommandID string `json:"command_id"` + Locked bool `json:"locked"` + Password string `json:"password"` + } + + if !httpkit.Decode(writer, request, &body) { + return + } + body.RoomID = strings.TrimSpace(body.RoomID) + body.CommandID = strings.TrimSpace(body.CommandID) + body.Password = strings.TrimSpace(body.Password) + + resp, err := h.roomClient.SetRoomPassword(request.Context(), &roomv1.SetRoomPasswordRequest{ + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), + Locked: body.Locked, + Password: body.Password, + }) + if err != nil { + httpkit.WriteRPCError(writer, request, err) + return + } + httpkit.WriteOK(writer, request, updateRoomProfileDataFromProto(&roomv1.UpdateRoomProfileResponse{ + Result: resp.GetResult(), + Room: resp.GetRoom(), + })) } // setRoomAdmin 把管理员增删 HTTP JSON 请求转换为 room-service SetRoomAdmin 命令。 @@ -883,16 +961,16 @@ func (h *Handler) setRoomAdmin(writer http.ResponseWriter, request *http.Request Enabled bool `json:"enabled"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.SetRoomAdmin(request.Context(), &roomv1.SetRoomAdminRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, Enabled: body.Enabled, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // muteUser 把禁言 HTTP JSON 请求转换为 room-service MuteUser 命令。 @@ -904,16 +982,16 @@ func (h *Handler) muteUser(writer http.ResponseWriter, request *http.Request) { Muted bool `json:"muted"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.MuteUser(request.Context(), &roomv1.MuteUserRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, Muted: body.Muted, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // kickUser 把踢人 HTTP JSON 请求转换为 room-service KickUser 命令。 @@ -924,15 +1002,15 @@ func (h *Handler) kickUser(writer http.ResponseWriter, request *http.Request) { TargetUserID int64 `json:"target_user_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.KickUser(request.Context(), &roomv1.KickUserRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // unbanUser 把解封 HTTP JSON 请求转换为 room-service UnbanUser 命令。 @@ -943,15 +1021,15 @@ func (h *Handler) unbanUser(writer http.ResponseWriter, request *http.Request) { TargetUserID int64 `json:"target_user_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } resp, err := h.roomClient.UnbanUser(request.Context(), &roomv1.UnbanUserRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetUserId: body.TargetUserID, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // sendGift 把送礼 HTTP JSON 请求转换为 room-service SendGift 命令。 @@ -967,7 +1045,7 @@ func (h *Handler) sendGift(writer http.ResponseWriter, request *http.Request) { GiftCount int32 `json:"gift_count"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } targetType := strings.TrimSpace(body.TargetType) @@ -981,14 +1059,14 @@ func (h *Handler) sendGift(writer http.ResponseWriter, request *http.Request) { } resp, err := h.roomClient.SendGift(request.Context(), &roomv1.SendGiftRequest{ - Meta: meta(request, body.RoomID, body.CommandID), + Meta: httpkit.RoomMeta(request, body.RoomID, body.CommandID), TargetType: targetType, TargetUserIds: targetUserIDs, TargetUserId: firstUserID(targetUserIDs), GiftId: body.GiftID, GiftCount: body.GiftCount, }) - write(writer, request, resp, err) + httpkit.Write(writer, request, resp, err) } // batchRoomDisplayProfiles 返回房间和公屏专用展示资料。 @@ -1005,6 +1083,31 @@ func (h *Handler) batchRoomDisplayProfiles(writer http.ResponseWriter, request * httpkit.WriteOK(writer, request, map[string]any{"profiles": h.roomDisplayProfiles(request, userIDs)}) } +func parseBatchUserIDs(request *http.Request) ([]int64, bool) { + rawValues := append([]string(nil), request.URL.Query()["user_ids"]...) + rawValues = append(rawValues, request.URL.Query()["user_id"]...) + seen := make(map[int64]bool) + result := make([]int64, 0, len(rawValues)) + for _, raw := range rawValues { + for piece := range strings.SplitSeq(raw, ",") { + piece = strings.TrimSpace(piece) + if piece == "" { + continue + } + userID, err := strconv.ParseInt(piece, 10, 64) + if err != nil || userID <= 0 { + return nil, false + } + if seen[userID] { + continue + } + seen[userID] = true + result = append(result, userID) + } + } + return result, len(result) > 0 +} + func (h *Handler) roomDisplayProfiles(request *http.Request, userIDs []int64) []roomDisplayProfileData { profileMap := h.roomDisplayProfileMap(request, userIDs) profiles := make([]roomDisplayProfileData, 0, len(userIDs)) @@ -1025,7 +1128,7 @@ func (h *Handler) roomDisplayProfileMap(request *http.Request, userIDs []int64) return nil } resp, err := h.userProfileClient.BatchGetUsers(request.Context(), &userv1.BatchGetUsersRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserIds: userIDs, }) if err != nil { diff --git a/services/gateway-service/internal/transport/http/room_view.go b/services/gateway-service/internal/transport/http/roomapi/room_view.go similarity index 93% rename from services/gateway-service/internal/transport/http/room_view.go rename to services/gateway-service/internal/transport/http/roomapi/room_view.go index 09bcdb12..71388a50 100644 --- a/services/gateway-service/internal/transport/http/room_view.go +++ b/services/gateway-service/internal/transport/http/roomapi/room_view.go @@ -1,4 +1,4 @@ -package http +package roomapi import ( "strconv" @@ -29,6 +29,7 @@ type roomListItemData struct { CoverURL string `json:"cover_url,omitempty"` Mode string `json:"mode,omitempty"` Status string `json:"status,omitempty"` + Locked bool `json:"locked"` Heat int64 `json:"heat"` OnlineCount int32 `json:"online_count"` SeatCount int32 `json:"seat_count"` @@ -53,6 +54,7 @@ type joinRoomData struct { type roomDetailData struct { Room roomInitialData `json:"room"` Viewer roomViewerData `json:"viewer"` + IsFollowed bool `json:"is_followed"` Seats []roomSeatData `json:"seats"` RankTop []roomRankItemData `json:"rank_top"` OnlineCount int32 `json:"online_count"` @@ -137,9 +139,17 @@ type roomSnapshotData struct { Room roomInitialData `json:"room"` Seats []roomSeatData `json:"seats"` ContributionRank []roomRankItemData `json:"contribution_rank"` + IsFollowed bool `json:"is_followed"` ServerTimeMS int64 `json:"server_time_ms"` } +type roomFollowData struct { + RoomID string `json:"room_id"` + IsFollowed bool `json:"is_followed"` + FollowedAtMS int64 `json:"followed_at_ms,omitempty"` + ServerTimeMS int64 `json:"server_time_ms"` +} + type roomCommandResultData struct { Applied bool `json:"applied"` RoomVersion int64 `json:"room_version"` @@ -157,6 +167,7 @@ type roomInitialData struct { Mode string `json:"mode,omitempty"` Status string `json:"status,omitempty"` ChatEnabled bool `json:"chat_enabled"` + Locked bool `json:"locked"` Heat int64 `json:"heat"` OnlineCount int32 `json:"online_count"` SeatCount int32 `json:"seat_count"` @@ -244,6 +255,7 @@ func roomListItemDataFromProto(room *roomv1.RoomListItem) roomListItemData { CoverURL: room.GetCoverUrl(), Mode: room.GetMode(), Status: room.GetStatus(), + Locked: room.GetLocked(), Heat: room.GetHeat(), OnlineCount: room.GetOnlineCount(), SeatCount: room.GetSeatCount(), @@ -287,6 +299,7 @@ func roomSnapshotDataFromProto(resp *roomv1.GetRoomSnapshotResponse) roomSnapsho Room: roomInitialRoomDataFromSnapshot(snapshot, snapshot.GetRoomId()), Seats: roomSeatDataFromSnapshot(snapshot), ContributionRank: roomRankDataFromSnapshot(snapshot, 0), + IsFollowed: resp.GetIsFollowed(), ServerTimeMS: resp.GetServerTimeMs(), } } @@ -315,6 +328,7 @@ func roomInitialRoomDataFromSnapshot(snapshot *roomv1.RoomSnapshot, roomID strin Mode: snapshot.GetMode(), Status: snapshot.GetStatus(), ChatEnabled: snapshot.GetChatEnabled(), + Locked: snapshot.GetLocked(), Heat: snapshot.GetHeat(), OnlineCount: int32(len(snapshot.GetOnlineUsers())), SeatCount: seatCount, @@ -364,6 +378,7 @@ func roomDetailDataFromSnapshot(resp *roomv1.GetRoomSnapshotResponse, viewerUser return roomDetailData{ Room: roomInitialRoomDataFromSnapshot(snapshot, roomID), Viewer: roomViewerDataFromProto(viewer, viewerUserID), + IsFollowed: resp.GetIsFollowed(), Seats: roomSeatDataFromSnapshot(snapshot), RankTop: roomRankDataFromSnapshot(snapshot, joinRoomContributionRankLimit), OnlineCount: int32(len(snapshot.GetOnlineUsers())), @@ -375,6 +390,29 @@ func roomDetailDataFromSnapshot(resp *roomv1.GetRoomSnapshotResponse, viewerUser } } +func roomFollowDataFromProto(resp *roomv1.FollowRoomResponse) roomFollowData { + if resp == nil { + return roomFollowData{} + } + return roomFollowData{ + RoomID: resp.GetRoomId(), + IsFollowed: resp.GetFollowed(), + FollowedAtMS: resp.GetFollowedAtMs(), + ServerTimeMS: resp.GetServerTimeMs(), + } +} + +func roomUnfollowDataFromProto(resp *roomv1.UnfollowRoomResponse) roomFollowData { + if resp == nil { + return roomFollowData{} + } + return roomFollowData{ + RoomID: resp.GetRoomId(), + IsFollowed: resp.GetFollowed(), + ServerTimeMS: resp.GetServerTimeMs(), + } +} + func roomPermissionsFromSnapshot(snapshot *roomv1.RoomSnapshot, viewerUserID int64) roomPermissionsData { if snapshot == nil || viewerUserID <= 0 { return roomPermissionsData{} diff --git a/services/gateway-service/internal/transport/http/rtc_handler.go b/services/gateway-service/internal/transport/http/roomapi/rtc_handler.go similarity index 92% rename from services/gateway-service/internal/transport/http/rtc_handler.go rename to services/gateway-service/internal/transport/http/roomapi/rtc_handler.go index d38972a4..8112aebe 100644 --- a/services/gateway-service/internal/transport/http/rtc_handler.go +++ b/services/gateway-service/internal/transport/http/roomapi/rtc_handler.go @@ -1,4 +1,4 @@ -package http +package roomapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -21,7 +21,7 @@ func (h *Handler) issueTencentRTCToken(writer http.ResponseWriter, request *http RoomID string `json:"room_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if !roomid.ValidStringID(body.RoomID) { @@ -105,24 +105,17 @@ func (h *Handler) writeRTCPresenceDenied(writer http.ResponseWriter, request *ht httpkit.WriteError(writer, request, http.StatusForbidden, httpkit.CodePermissionDenied, "permission denied") } -var timeNow = defaultTimeNow +var TimeNow = defaultTimeNow func defaultTimeNow() time.Time { return time.Now().UTC() } func (h *Handler) tencentRTCTokenConfig() tencentrtc.TokenConfig { - return tencentrtc.TokenConfig{ - Enabled: h.tencentRTC.Enabled, - SDKAppID: h.tencentRTC.SDKAppID, - SecretKey: h.tencentRTC.SecretKey, - TTL: h.tencentRTC.UserSigTTL, - RoomIDType: h.tencentRTC.RoomIDType, - AppScene: h.tencentRTC.AppScene, - } + return h.rtcTokenConfig } func (h *Handler) generateTencentRTCToken(userID int64, roomID string) (tencentrtc.TokenResult, error) { // JoinRoom 内嵌签发和独立 /rtc/token 使用同一套签名策略,避免两条入口出现 RTC 身份漂移。 - return tencentrtc.GenerateToken(h.tencentRTCTokenConfig(), userID, roomID, timeNow()) + return tencentrtc.GenerateToken(h.tencentRTCTokenConfig(), userID, roomID, TimeNow()) } diff --git a/services/gateway-service/internal/transport/http/router.go b/services/gateway-service/internal/transport/http/router.go index 621deb55..0e4ef98c 100644 --- a/services/gateway-service/internal/transport/http/router.go +++ b/services/gateway-service/internal/transport/http/router.go @@ -3,13 +3,102 @@ package http import ( "net/http" + "hyapp/pkg/tencentrtc" "hyapp/services/gateway-service/internal/auth" + "hyapp/services/gateway-service/internal/transport/http/activityapi" + "hyapp/services/gateway-service/internal/transport/http/appapi" + "hyapp/services/gateway-service/internal/transport/http/callbackapi" + "hyapp/services/gateway-service/internal/transport/http/gameapi" "hyapp/services/gateway-service/internal/transport/http/httproutes" + "hyapp/services/gateway-service/internal/transport/http/managerapi" + "hyapp/services/gateway-service/internal/transport/http/messageapi" + "hyapp/services/gateway-service/internal/transport/http/resourceapi" + "hyapp/services/gateway-service/internal/transport/http/roomapi" + "hyapp/services/gateway-service/internal/transport/http/userapi" + "hyapp/services/gateway-service/internal/transport/http/walletapi" ) // Routes 把 Handler 的私有方法适配成独立路由包需要的显式 handler 表。 // 路径注册集中在 httproutes,gateway 依赖装配和鉴权 wrapper 仍留在 transport 入口层。 func (h *Handler) Routes(jwtVerifier *auth.Verifier) http.Handler { + roomAPI := roomapi.New(roomapi.Config{ + RoomClient: h.roomClient, + RoomGuardClient: h.roomGuardClient, + RoomQueryClient: h.roomQueryClient, + UserProfileClient: h.userProfileClient, + UserSocialClient: h.userSocialClient, + WalletClient: h.walletClient, + RTCTokenConfig: tencentrtc.TokenConfig{ + Enabled: h.tencentRTC.Enabled, + SDKAppID: h.tencentRTC.SDKAppID, + SecretKey: h.tencentRTC.SecretKey, + TTL: h.tencentRTC.UserSigTTL, + RoomIDType: h.tencentRTC.RoomIDType, + AppScene: h.tencentRTC.AppScene, + }, + }) + walletAPI := walletapi.New(walletapi.Config{ + WalletClient: h.walletClient, + UserIdentityClient: h.userIdentityClient, + UserProfileClient: h.userProfileClient, + UserHostClient: h.userHostClient, + }) + userAPI := userapi.New(userapi.Config{ + UserIdentityClient: h.userIdentityClient, + UserProfileClient: h.userProfileClient, + UserSocialClient: h.userSocialClient, + UserCountryClient: h.userCountryClient, + UserHostClient: h.userHostClient, + WalletClient: h.walletClient, + BroadcastClient: h.broadcastClient, + }) + messageAPI := messageapi.New(messageapi.Config{ + MessageClient: h.messageClient, + UserProfileClient: h.userProfileClient, + }) + activityAPI := activityapi.New(activityapi.Config{ + TaskClient: h.taskClient, + RegistrationReward: h.registrationReward, + }) + gameAPI := gameapi.New(gameapi.Config{ + GameClient: h.gameClient, + UserProfileClient: h.userProfileClient, + }) + resourceAPI := resourceapi.New(resourceapi.Config{ + WalletClient: h.walletClient, + }) + managerAPI := managerapi.New(managerapi.Config{ + WalletClient: h.walletClient, + UserHostClient: h.userHostClient, + UserProfileClient: h.userProfileClient, + }) + appAPI := appapi.New(appapi.Config{ + AppConfigReader: h.appConfigReader, + UserDeviceClient: h.userDeviceClient, + ObjectUploader: h.objectUploader, + }) + callbackAPI := callbackapi.New(callbackapi.Config{ + RoomClient: h.roomClient, + RoomGuardClient: h.roomGuardClient, + UserProfileClient: h.userProfileClient, + TencentIM: callbackapi.TencentIMConfig{ + SDKAppID: h.tencentIM.SDKAppID, + AdminIdentifier: h.tencentIM.AdminIdentifier, + CallbackAuthToken: h.tencentIM.CallbackAuthToken, + }, + TencentRTC: callbackapi.TencentRTCConfig{ + SDKAppID: h.tencentRTC.SDKAppID, + CallbackSignKey: h.tencentRTC.CallbackSignKey, + UserSigTTL: h.tencentRTC.UserSigTTL, + }, + }) + userHandlers := userAPI.UserHandlers() + userHandlers.BatchUserProfiles = messageAPI.BatchUserProfiles + userHandlers.BatchRoomDisplayProfiles = roomAPI.BatchRoomDisplayProfiles + userHandlers.GetMyGiftWall = walletAPI.GetMyGiftWall + userHandlers.ListMyResources = resourceAPI.ListMyResources + userHandlers.EquipMyResource = resourceAPI.EquipMyResource + return httproutes.New(httproutes.Config{ PublicWrap: h.publicAPIHandler, AuthWrap: func(handler http.HandlerFunc) http.Handler { @@ -26,109 +115,29 @@ func (h *Handler) Routes(jwtVerifier *auth.Verifier) http.Handler { Logout: h.logout, }, App: httproutes.AppHandlers{ - ListRegistrationCountries: h.listRegistrationCountries, - GetAppBootstrap: h.getAppBootstrap, - ListH5Links: h.listH5Links, - ListAppBanners: h.listAppBanners, - GetAppVersion: h.getAppVersion, - ListResources: h.listResources, - GetResourceGroup: h.getResourceGroup, - ListGifts: h.listGifts, + ListRegistrationCountries: userAPI.ListRegistrationCountries, + GetAppBootstrap: appAPI.GetAppBootstrap, + ListH5Links: appAPI.ListH5Links, + ListAppBanners: appAPI.ListAppBanners, + GetAppVersion: appAPI.GetAppVersion, + ListResources: resourceAPI.ListResources, + GetResourceGroup: resourceAPI.GetResourceGroup, + ListGifts: resourceAPI.ListGifts, IssueTencentIMUserSig: h.issueTencentIMUserSig, - IssueTencentRTCToken: h.issueTencentRTCToken, - HandleTencentIMCallback: h.handleTencentIMCallback, - HandleTencentRTCCallback: h.handleTencentRTCCallback, - UploadFile: h.uploadFile, - UploadAvatar: h.uploadAvatar, - HandlePushToken: h.handlePushToken, - }, - User: httproutes.UserHandlers{ - ResolveDisplayUserID: h.resolveDisplayUserID, - BatchUserProfiles: h.batchUserProfiles, - BatchRoomDisplayProfiles: h.batchRoomDisplayProfiles, - GetMyOverview: h.getMyOverview, - GetMyGiftWall: h.getMyGiftWall, - GetMyIdentity: h.getMyIdentity, - GetMyHostIdentity: h.getMyHostIdentity, - GetMyRoleSummary: h.getMyRoleSummary, - CompleteMyOnboarding: h.completeMyOnboarding, - UpdateMyProfile: h.updateMyProfile, - ChangeMyCountry: h.changeMyCountry, - ChangeMyDisplayUserID: h.changeMyDisplayUserID, - ApplyMyPrettyDisplayUserID: h.applyMyPrettyDisplayUserID, - ListMyProfileVisitors: h.listMyProfileVisitors, - ListMyFollowing: h.listMyFollowing, - ListMyFriends: h.listMyFriends, - ListMyFriendApplications: h.listMyFriendApplications, - GetMyProfile: h.getMyProfile, - ListMyResources: h.listMyResources, - EquipMyResource: h.equipMyResource, - UserSocialAction: h.userSocialAction, - }, - Manager: httproutes.ManagerHandlers{ - ListManagerGrantResources: h.listManagerGrantResources, - GrantManagerResource: h.grantManagerResource, - LookupBusinessUsers: h.lookupBusinessUsers, - }, - Room: httproutes.RoomHandlers{ - GetMyRoom: h.getMyRoom, - ListRoomFeeds: h.listRoomFeeds, - ListRooms: h.listRooms, - GetCurrentRoom: h.getCurrentRoom, - GetRoomSnapshot: h.getRoomSnapshot, - GetRoomDetail: h.getRoomDetail, - ListRoomOnlineUsers: h.listRoomOnlineUsers, - GetRoomGiftPanel: h.getRoomGiftPanel, - CreateRoom: h.createRoom, - UpdateRoomProfile: h.updateRoomProfile, - JoinRoom: h.joinRoom, - RoomHeartbeat: h.roomHeartbeat, - LeaveRoom: h.leaveRoom, - CloseRoom: h.closeRoom, - MicUp: h.micUp, - MicDown: h.micDown, - ChangeMicSeat: h.changeMicSeat, - ConfirmMicPublishing: h.confirmMicPublishing, - SetMicMute: h.setMicMute, - SetMicSeatLock: h.setMicSeatLock, - SetChatEnabled: h.setChatEnabled, - SetRoomAdmin: h.setRoomAdmin, - MuteUser: h.muteUser, - KickUser: h.kickUser, - UnbanUser: h.unbanUser, - SendGift: h.sendGift, - }, - Message: httproutes.MessageHandlers{ - ListMessageTabs: h.listMessageTabs, - MarkInboxSectionRead: h.markInboxSectionRead, - MarkInboxMessageReadPath: h.markInboxMessageReadByPath, - DeleteInboxMessagePath: h.deleteInboxMessageByPath, - ListInboxMessages: h.listInboxMessages, - }, - Task: httproutes.TaskHandlers{ - ListTaskTabs: h.listTaskTabs, - ClaimTaskReward: h.claimTaskReward, - GetRegistrationRewardEligibility: h.getRegistrationRewardEligibility, - }, - Wallet: httproutes.WalletHandlers{ - GetWalletOverview: h.getWalletOverview, - GetMyBalances: h.getMyBalances, - ListRechargeProducts: h.listRechargeProducts, - GetDiamondExchangeConfig: h.getDiamondExchangeConfig, - ApplyWithdrawal: h.applyWithdrawal, - ListCoinTransactions: h.listCoinTransactions, - ListWalletTransactions: h.listWalletTransactions, - TransferCoinFromSeller: h.transferCoinFromSeller, - }, - VIP: httproutes.VIPHandlers{ - GetMyVIP: h.getMyVIP, - ListVIPPackages: h.listVIPPackages, - PurchaseVIP: h.purchaseVIP, - }, - Game: httproutes.GameHandlers{ - ListGames: h.listGames, - LaunchGame: h.launchGame, - HandleCallback: h.handleGameCallback, + IssueTencentRTCToken: roomAPI.IssueTencentRTCToken, + HandleTencentIMCallback: callbackAPI.HandleTencentIMCallback, + HandleTencentRTCCallback: callbackAPI.HandleTencentRTCCallback, + UploadFile: appAPI.UploadFile, + UploadAvatar: appAPI.UploadAvatar, + HandlePushToken: appAPI.HandlePushToken, }, + User: userHandlers, + Manager: managerAPI.ManagerHandlers(), + Room: roomAPI.RoomHandlers(), + Message: messageAPI.MessageHandlers(), + Task: activityAPI.TaskHandlers(), + Wallet: walletAPI.WalletHandlers(), + VIP: walletAPI.VIPHandlers(), + Game: gameAPI.Handlers(), }) } diff --git a/services/gateway-service/internal/transport/http/userapi/auth_view.go b/services/gateway-service/internal/transport/http/userapi/auth_view.go new file mode 100644 index 00000000..7b3795a5 --- /dev/null +++ b/services/gateway-service/internal/transport/http/userapi/auth_view.go @@ -0,0 +1,45 @@ +package userapi + +import userv1 "hyapp.local/api/proto/user/v1" + +// authTokenData 是完整资料补齐后返回给客户端替换 access token 的扁平格式。 +// 字段保持和登录接口一致,避免客户端在 onboarding 后解析两套 token 结构。 +type authTokenData struct { + AppCode string `json:"app_code"` + UserID string `json:"user_id,omitempty"` + DisplayUserID string `json:"display_user_id,omitempty"` + DefaultDisplayUserID string `json:"default_display_user_id,omitempty"` + DisplayUserIDKind string `json:"display_user_id_kind,omitempty"` + DisplayUserIDExpiresAtMs int64 `json:"display_user_id_expires_at_ms"` + SessionID string `json:"session_id"` + AccessToken string `json:"access_token"` + RefreshToken string `json:"refresh_token,omitempty"` + ExpiresInSec int64 `json:"expires_in_sec"` + TokenType string `json:"token_type"` + IsNewUser *bool `json:"is_new_user,omitempty"` + ProfileCompleted bool `json:"profile_completed"` + OnboardingStatus string `json:"onboarding_status,omitempty"` +} + +func authData(token *userv1.AuthToken, isNewUser *bool) authTokenData { + if token == nil { + return authTokenData{IsNewUser: isNewUser} + } + + return authTokenData{ + UserID: userIDString(token.GetUserId()), + AppCode: token.GetAppCode(), + DisplayUserID: token.GetDisplayUserId(), + DefaultDisplayUserID: token.GetDefaultDisplayUserId(), + DisplayUserIDKind: token.GetDisplayUserIdKind(), + DisplayUserIDExpiresAtMs: token.GetDisplayUserIdExpiresAtMs(), + SessionID: token.GetSessionId(), + AccessToken: token.GetAccessToken(), + RefreshToken: token.GetRefreshToken(), + ExpiresInSec: token.GetExpiresInSec(), + TokenType: token.GetTokenType(), + IsNewUser: isNewUser, + ProfileCompleted: token.GetProfileCompleted(), + OnboardingStatus: token.GetOnboardingStatus(), + } +} diff --git a/services/gateway-service/internal/transport/http/userapi/handler.go b/services/gateway-service/internal/transport/http/userapi/handler.go new file mode 100644 index 00000000..4f95b0a8 --- /dev/null +++ b/services/gateway-service/internal/transport/http/userapi/handler.go @@ -0,0 +1,67 @@ +package userapi + +import ( + "net/http" + + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns user-facing HTTP endpoints and relationship endpoints. +// It delegates user facts to user-service and only translates HTTP protocol shape. +type Handler struct { + userIdentityClient client.UserIdentityClient + userProfileClient client.UserProfileClient + userSocialClient client.UserSocialClient + userCountryClient client.UserCountryQueryClient + userHostClient client.UserHostClient + walletClient client.WalletClient + broadcastClient client.BroadcastClient +} + +type Config struct { + UserIdentityClient client.UserIdentityClient + UserProfileClient client.UserProfileClient + UserSocialClient client.UserSocialClient + UserCountryClient client.UserCountryQueryClient + UserHostClient client.UserHostClient + WalletClient client.WalletClient + BroadcastClient client.BroadcastClient +} + +func New(config Config) *Handler { + return &Handler{ + userIdentityClient: config.UserIdentityClient, + userProfileClient: config.UserProfileClient, + userSocialClient: config.UserSocialClient, + userCountryClient: config.UserCountryClient, + userHostClient: config.UserHostClient, + walletClient: config.WalletClient, + broadcastClient: config.BroadcastClient, + } +} + +func (h *Handler) UserHandlers() httproutes.UserHandlers { + return httproutes.UserHandlers{ + ResolveDisplayUserID: h.resolveDisplayUserID, + GetMyOverview: h.getMyOverview, + GetMyIdentity: h.getMyIdentity, + GetMyHostIdentity: h.getMyHostIdentity, + GetMyRoleSummary: h.getMyRoleSummary, + CompleteMyOnboarding: h.completeMyOnboarding, + UpdateMyProfile: h.updateMyProfile, + ChangeMyCountry: h.changeMyCountry, + ChangeMyDisplayUserID: h.changeMyDisplayUserID, + ApplyMyPrettyDisplayUserID: h.applyMyPrettyDisplayUserID, + ListMyProfileVisitors: h.listMyProfileVisitors, + ListMyFollowing: h.listMyFollowing, + ListMyFriends: h.listMyFriends, + ListMyFriendApplications: h.listMyFriendApplications, + GetMyProfile: h.getMyProfile, + UserSocialAction: h.userSocialAction, + } +} + +func (h *Handler) ListRegistrationCountries(writer http.ResponseWriter, request *http.Request) { + h.listRegistrationCountries(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/host_identity_handler.go b/services/gateway-service/internal/transport/http/userapi/host_identity_handler.go similarity index 96% rename from services/gateway-service/internal/transport/http/host_identity_handler.go rename to services/gateway-service/internal/transport/http/userapi/host_identity_handler.go index 7f83d2cf..d265e5e4 100644 --- a/services/gateway-service/internal/transport/http/host_identity_handler.go +++ b/services/gateway-service/internal/transport/http/userapi/host_identity_handler.go @@ -1,4 +1,4 @@ -package http +package userapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -37,7 +37,7 @@ func (h *Handler) getMyHostIdentity(writer http.ResponseWriter, request *http.Re identity := userHostIdentityData{} hostResp, err := h.userHostClient.GetHostProfile(request.Context(), &userv1.GetHostProfileRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: userID, }) if err != nil { @@ -50,7 +50,7 @@ func (h *Handler) getMyHostIdentity(writer http.ResponseWriter, request *http.Re } bdResp, err := h.userHostClient.GetBDProfile(request.Context(), &userv1.GetBDProfileRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: userID, }) if err != nil { @@ -63,7 +63,7 @@ func (h *Handler) getMyHostIdentity(writer http.ResponseWriter, request *http.Re } coinSellerResp, err := h.userHostClient.GetCoinSellerProfile(request.Context(), &userv1.GetCoinSellerProfileRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: userID, }) if err != nil { @@ -85,7 +85,7 @@ func (h *Handler) getMyRoleSummary(writer http.ResponseWriter, request *http.Req return } resp, err := h.userHostClient.GetUserRoleSummary(request.Context(), &userv1.GetUserRoleSummaryRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { diff --git a/services/gateway-service/internal/transport/http/my_page_overview_handler.go b/services/gateway-service/internal/transport/http/userapi/my_page_overview_handler.go similarity index 97% rename from services/gateway-service/internal/transport/http/my_page_overview_handler.go rename to services/gateway-service/internal/transport/http/userapi/my_page_overview_handler.go index 472a0d8c..522e8473 100644 --- a/services/gateway-service/internal/transport/http/my_page_overview_handler.go +++ b/services/gateway-service/internal/transport/http/userapi/my_page_overview_handler.go @@ -1,4 +1,4 @@ -package http +package userapi import ( "context" @@ -91,7 +91,7 @@ func (h *Handler) getMyOverview(writer http.ResponseWriter, request *http.Reques var profileErr error wg.Go(func() { profileResp, profileErr = h.userProfileClient.GetUser(ctx, &userv1.GetUserRequest{ - Meta: authRequestMeta(request.WithContext(ctx), ""), + Meta: httpkit.UserMeta(request.WithContext(ctx), ""), UserId: userID, }) }) @@ -134,7 +134,7 @@ func (h *Handler) getMyOverview(writer http.ResponseWriter, request *http.Reques var statsErr error wg.Go(func() { statsResp, statsErr = h.userProfileClient.GetMyProfileStats(ctx, &userv1.GetMyProfileStatsRequest{ - Meta: authRequestMeta(request.WithContext(ctx), ""), + Meta: httpkit.UserMeta(request.WithContext(ctx), ""), UserId: userID, }) }) @@ -173,7 +173,7 @@ func (h *Handler) getOverviewRoles(ctx context.Context, request *http.Request, u } resp, err := h.userHostClient.GetUserRoleSummary(ctx, &userv1.GetUserRoleSummaryRequest{ - Meta: authRequestMeta(request.WithContext(ctx), ""), + Meta: httpkit.UserMeta(request.WithContext(ctx), ""), UserId: userID, }) if err != nil { diff --git a/services/gateway-service/internal/transport/http/social_handler.go b/services/gateway-service/internal/transport/http/userapi/social_handler.go similarity index 95% rename from services/gateway-service/internal/transport/http/social_handler.go rename to services/gateway-service/internal/transport/http/userapi/social_handler.go index fe1104e0..c8c634a8 100644 --- a/services/gateway-service/internal/transport/http/social_handler.go +++ b/services/gateway-service/internal/transport/http/userapi/social_handler.go @@ -1,4 +1,4 @@ -package http +package userapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -48,7 +48,7 @@ func (h *Handler) listMyProfileVisitors(writer http.ResponseWriter, request *htt return } resp, err := h.userSocialClient.ListProfileVisitors(request.Context(), &userv1.ListProfileVisitorsRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Page: page, PageSize: pageSize, @@ -76,7 +76,7 @@ func (h *Handler) listMyFollowing(writer http.ResponseWriter, request *http.Requ return } resp, err := h.userSocialClient.ListFollowing(request.Context(), &userv1.ListFollowingRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Page: page, PageSize: pageSize, @@ -104,7 +104,7 @@ func (h *Handler) listMyFriends(writer http.ResponseWriter, request *http.Reques return } resp, err := h.userSocialClient.ListFriends(request.Context(), &userv1.ListFriendsRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Page: page, PageSize: pageSize, @@ -132,7 +132,7 @@ func (h *Handler) listMyFriendApplications(writer http.ResponseWriter, request * return } resp, err := h.userSocialClient.ListFriendApplications(request.Context(), &userv1.ListFriendApplicationsRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Direction: strings.TrimSpace(request.URL.Query().Get("direction")), Page: page, @@ -184,7 +184,7 @@ func (h *Handler) recordProfileVisit(writer http.ResponseWriter, request *http.R return } resp, err := h.userSocialClient.RecordProfileVisit(request.Context(), &userv1.RecordProfileVisitRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), VisitorUserId: auth.UserIDFromContext(request.Context()), TargetUserId: targetUserID, }) @@ -200,7 +200,7 @@ func (h *Handler) handleFollowAction(writer http.ResponseWriter, request *http.R switch request.Method { case http.MethodPost: resp, err := h.userSocialClient.FollowUser(request.Context(), &userv1.FollowUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), FollowerUserId: userID, FolloweeUserId: followeeUserID, }) @@ -211,7 +211,7 @@ func (h *Handler) handleFollowAction(writer http.ResponseWriter, request *http.R httpkit.WriteOK(writer, request, map[string]any{"following": resp.GetFollowing(), "follower_stats": overviewStatsFromProto(resp.GetFollowerStats())}) case http.MethodDelete: resp, err := h.userSocialClient.UnfollowUser(request.Context(), &userv1.UnfollowUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), FollowerUserId: userID, FolloweeUserId: followeeUserID, }) @@ -231,7 +231,7 @@ func (h *Handler) applyFriend(writer http.ResponseWriter, request *http.Request, return } resp, err := h.userSocialClient.ApplyFriend(request.Context(), &userv1.ApplyFriendRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), RequesterUserId: auth.UserIDFromContext(request.Context()), TargetUserId: targetUserID, }) @@ -248,7 +248,7 @@ func (h *Handler) acceptFriendApplication(writer http.ResponseWriter, request *h return } resp, err := h.userSocialClient.AcceptFriendApplication(request.Context(), &userv1.AcceptFriendApplicationRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), AccepterUserId: auth.UserIDFromContext(request.Context()), RequesterUserId: requesterUserID, }) @@ -265,7 +265,7 @@ func (h *Handler) deleteFriend(writer http.ResponseWriter, request *http.Request return } resp, err := h.userSocialClient.DeleteFriend(request.Context(), &userv1.DeleteFriendRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), FriendUserId: friendUserID, }) @@ -277,11 +277,11 @@ func (h *Handler) deleteFriend(writer http.ResponseWriter, request *http.Request } func socialPage(request *http.Request) (int32, int32, bool) { - page, ok := parsePositiveInt32Query(request, "page", 1) + page, ok := httpkit.PositiveInt32Query(request, "page", 1) if !ok { return 0, 0, false } - pageSize, ok := parsePositiveInt32Query(request, "page_size", 20) + pageSize, ok := httpkit.PositiveInt32Query(request, "page_size", 20) if !ok { return 0, 0, false } diff --git a/services/gateway-service/internal/transport/http/user_handler.go b/services/gateway-service/internal/transport/http/userapi/user_handler.go similarity index 95% rename from services/gateway-service/internal/transport/http/user_handler.go rename to services/gateway-service/internal/transport/http/userapi/user_handler.go index cd58e3bd..f4be72f8 100644 --- a/services/gateway-service/internal/transport/http/user_handler.go +++ b/services/gateway-service/internal/transport/http/userapi/user_handler.go @@ -1,7 +1,6 @@ -package http +package userapi import ( - "hyapp/services/gateway-service/internal/transport/http/httpkit" "log/slog" "net/http" "strconv" @@ -11,6 +10,7 @@ import ( userv1 "hyapp.local/api/proto/user/v1" "hyapp/pkg/logx" "hyapp/services/gateway-service/internal/auth" + "hyapp/services/gateway-service/internal/transport/http/httpkit" ) // userIdentityData 是 gateway 对外返回的当前短号投影。 @@ -93,7 +93,7 @@ func (h *Handler) listRegistrationCountries(writer http.ResponseWriter, request } resp, err := h.userCountryClient.ListRegistrationCountries(request.Context(), &userv1.ListRegistrationCountriesRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), }) if err != nil { httpkit.WriteRPCError(writer, request, err) @@ -115,7 +115,7 @@ func (h *Handler) getMyIdentity(writer http.ResponseWriter, request *http.Reques } resp, err := h.userIdentityClient.GetUserIdentity(request.Context(), &userv1.GetUserIdentityRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -139,7 +139,7 @@ func (h *Handler) resolveDisplayUserID(writer http.ResponseWriter, request *http return } resp, err := h.userIdentityClient.ResolveDisplayUserID(request.Context(), &userv1.ResolveDisplayUserIDRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), DisplayUserId: displayUserID, }) if err != nil { @@ -160,7 +160,7 @@ func (h *Handler) completeMyOnboarding(writer http.ResponseWriter, request *http Country string `json:"country"` InviteCode string `json:"invite_code"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if h.userProfileClient == nil { @@ -169,7 +169,7 @@ func (h *Handler) completeMyOnboarding(writer http.ResponseWriter, request *http } resp, err := h.userProfileClient.CompleteOnboarding(request.Context(), &userv1.CompleteOnboardingRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Username: body.Username, Avatar: body.Avatar, @@ -197,7 +197,7 @@ func (h *Handler) getMyProfile(writer http.ResponseWriter, request *http.Request } resp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), }) if err != nil { @@ -216,7 +216,7 @@ func (h *Handler) updateMyProfile(writer http.ResponseWriter, request *http.Requ Gender *string `json:"gender"` Birth *string `json:"birth"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if h.userProfileClient == nil { @@ -225,7 +225,7 @@ func (h *Handler) updateMyProfile(writer http.ResponseWriter, request *http.Requ } resp, err := h.userProfileClient.UpdateUserProfile(request.Context(), &userv1.UpdateUserProfileRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Username: body.Username, Avatar: body.Avatar, @@ -245,7 +245,7 @@ func (h *Handler) changeMyCountry(writer http.ResponseWriter, request *http.Requ var body struct { Country string `json:"country"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if h.userProfileClient == nil { @@ -254,7 +254,7 @@ func (h *Handler) changeMyCountry(writer http.ResponseWriter, request *http.Requ } resp, err := h.userProfileClient.ChangeUserCountry(request.Context(), &userv1.ChangeUserCountryRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), Country: body.Country, }) @@ -272,7 +272,7 @@ func (h *Handler) removeOldRegionBroadcastMemberBestEffort(request *http.Request return } resp, err := h.broadcastClient.RemoveRegionBroadcastMember(request.Context(), &activityv1.RemoveRegionBroadcastMemberRequest{ - Meta: activityMeta(request), + Meta: httpkit.ActivityMeta(request), UserId: userID, RegionId: oldRegionID, Reason: reason, @@ -303,7 +303,7 @@ func (h *Handler) changeMyDisplayUserID(writer http.ResponseWriter, request *htt NewDisplayUserID string `json:"new_display_user_id"` Reason string `json:"reason"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if h.userIdentityClient == nil { @@ -312,7 +312,7 @@ func (h *Handler) changeMyDisplayUserID(writer http.ResponseWriter, request *htt } resp, err := h.userIdentityClient.ChangeDisplayUserID(request.Context(), &userv1.ChangeDisplayUserIDRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), NewDisplayUserId: body.NewDisplayUserID, Reason: body.Reason, @@ -333,7 +333,7 @@ func (h *Handler) applyMyPrettyDisplayUserID(writer http.ResponseWriter, request LeaseDurationMs int64 `json:"lease_duration_ms"` PaymentReceiptID string `json:"payment_receipt_id"` } - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } if h.userIdentityClient == nil { @@ -342,7 +342,7 @@ func (h *Handler) applyMyPrettyDisplayUserID(writer http.ResponseWriter, request } resp, err := h.userIdentityClient.ApplyPrettyDisplayUserID(request.Context(), &userv1.ApplyPrettyDisplayUserIDRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: auth.UserIDFromContext(request.Context()), PrettyDisplayUserId: body.PrettyDisplayUserID, LeaseDurationMs: body.LeaseDurationMs, diff --git a/services/gateway-service/internal/transport/http/app_wallet_handler.go b/services/gateway-service/internal/transport/http/walletapi/app_wallet_handler.go similarity index 98% rename from services/gateway-service/internal/transport/http/app_wallet_handler.go rename to services/gateway-service/internal/transport/http/walletapi/app_wallet_handler.go index 1151963f..b08b3c7b 100644 --- a/services/gateway-service/internal/transport/http/app_wallet_handler.go +++ b/services/gateway-service/internal/transport/http/walletapi/app_wallet_handler.go @@ -1,4 +1,4 @@ -package http +package walletapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -170,7 +170,7 @@ func (h *Handler) listRechargeProducts(writer http.ResponseWriter, request *http } userID := auth.UserIDFromContext(request.Context()) profileResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: userID, }) if err != nil { @@ -182,7 +182,7 @@ func (h *Handler) listRechargeProducts(writer http.ResponseWriter, request *http AppCode: appcode.FromContext(request.Context()), UserId: userID, RegionId: profileResp.GetUser().GetRegionId(), - Platform: firstQueryOrHeader(request, "platform", "X-App-Platform", "X-Platform"), + Platform: httpkit.FirstQueryOrHeader(request, "platform", "X-App-Platform", "X-Platform"), }) if err != nil { httpkit.WriteRPCError(writer, request, err) @@ -250,12 +250,12 @@ func (h *Handler) listWalletTransactionsByAsset(writer http.ResponseWriter, requ httpkit.WriteError(writer, request, http.StatusBadGateway, httpkit.CodeUpstreamError, "upstream service error") return } - page, ok := parsePositiveInt32Query(request, "page", 1) + page, ok := httpkit.PositiveInt32Query(request, "page", 1) if !ok { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return } - pageSize, ok := parsePositiveInt32Query(request, "page_size", defaultPageSize) + pageSize, ok := httpkit.PositiveInt32Query(request, "page_size", defaultPageSize) if !ok { httpkit.WriteError(writer, request, http.StatusBadRequest, httpkit.CodeInvalidArgument, "invalid argument") return @@ -286,7 +286,7 @@ func (h *Handler) applyWithdrawal(writer http.ResponseWriter, request *http.Requ return } var body withdrawalApplyRequestBody - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } commandID := strings.TrimSpace(body.CommandID) diff --git a/services/gateway-service/internal/transport/http/walletapi/handler.go b/services/gateway-service/internal/transport/http/walletapi/handler.go new file mode 100644 index 00000000..0702ee84 --- /dev/null +++ b/services/gateway-service/internal/transport/http/walletapi/handler.go @@ -0,0 +1,58 @@ +package walletapi + +import ( + "net/http" + + "hyapp/services/gateway-service/internal/client" + "hyapp/services/gateway-service/internal/transport/http/httproutes" +) + +// Handler owns wallet-facing HTTP endpoints. +// It keeps wallet semantics behind wallet-service and only handles HTTP protocol conversion. +type Handler struct { + walletClient client.WalletClient + userIdentityClient client.UserIdentityClient + userProfileClient client.UserProfileClient + userHostClient client.UserHostClient +} + +type Config struct { + WalletClient client.WalletClient + UserIdentityClient client.UserIdentityClient + UserProfileClient client.UserProfileClient + UserHostClient client.UserHostClient +} + +func New(config Config) *Handler { + return &Handler{ + walletClient: config.WalletClient, + userIdentityClient: config.UserIdentityClient, + userProfileClient: config.UserProfileClient, + userHostClient: config.UserHostClient, + } +} + +func (h *Handler) WalletHandlers() httproutes.WalletHandlers { + return httproutes.WalletHandlers{ + GetWalletOverview: h.getWalletOverview, + GetMyBalances: h.getMyBalances, + ListRechargeProducts: h.listRechargeProducts, + GetDiamondExchangeConfig: h.getDiamondExchangeConfig, + ApplyWithdrawal: h.applyWithdrawal, + ListCoinTransactions: h.listCoinTransactions, + ListWalletTransactions: h.listWalletTransactions, + TransferCoinFromSeller: h.transferCoinFromSeller, + } +} + +func (h *Handler) VIPHandlers() httproutes.VIPHandlers { + return httproutes.VIPHandlers{ + GetMyVIP: h.getMyVIP, + ListVIPPackages: h.listVIPPackages, + PurchaseVIP: h.purchaseVIP, + } +} + +func (h *Handler) GetMyGiftWall(writer http.ResponseWriter, request *http.Request) { + h.getMyGiftWall(writer, request) +} diff --git a/services/gateway-service/internal/transport/http/walletapi/view_shared.go b/services/gateway-service/internal/transport/http/walletapi/view_shared.go new file mode 100644 index 00000000..da67e6c6 --- /dev/null +++ b/services/gateway-service/internal/transport/http/walletapi/view_shared.go @@ -0,0 +1,65 @@ +package walletapi + +import walletv1 "hyapp.local/api/proto/wallet/v1" + +type overviewVIPData struct { + Level int32 `json:"level"` + Name string `json:"name"` + Active bool `json:"active"` + StartedAtMS int64 `json:"started_at_ms"` + ExpiresAtMS int64 `json:"expires_at_ms"` + Unavailable bool `json:"unavailable,omitempty"` +} + +type resourceData struct { + ResourceID int64 `json:"resource_id"` + ResourceCode string `json:"resource_code"` + ResourceType string `json:"resource_type"` + Name string `json:"name"` + Status string `json:"status"` + Grantable bool `json:"grantable"` + GrantStrategy string `json:"grant_strategy"` + WalletAssetType string `json:"wallet_asset_type,omitempty"` + WalletAssetAmount int64 `json:"wallet_asset_amount,omitempty"` + UsageScopes []string `json:"usage_scopes"` + AssetURL string `json:"asset_url"` + PreviewURL string `json:"preview_url"` + AnimationURL string `json:"animation_url"` + MetadataJSON string `json:"metadata_json"` + SortOrder int32 `json:"sort_order"` + CreatedAtMS int64 `json:"created_at_ms"` + UpdatedAtMS int64 `json:"updated_at_ms"` +} + +func resourcePointerFromProto(item *walletv1.Resource) *resourceData { + if item == nil { + return nil + } + data := resourceFromProto(item) + return &data +} + +func resourceFromProto(item *walletv1.Resource) resourceData { + if item == nil { + return resourceData{} + } + return resourceData{ + ResourceID: item.GetResourceId(), + ResourceCode: item.GetResourceCode(), + ResourceType: item.GetResourceType(), + Name: item.GetName(), + Status: item.GetStatus(), + Grantable: item.GetGrantable(), + GrantStrategy: item.GetGrantStrategy(), + WalletAssetType: item.GetWalletAssetType(), + WalletAssetAmount: item.GetWalletAssetAmount(), + UsageScopes: item.GetUsageScopes(), + AssetURL: item.GetAssetUrl(), + PreviewURL: item.GetPreviewUrl(), + AnimationURL: item.GetAnimationUrl(), + MetadataJSON: item.GetMetadataJson(), + SortOrder: item.GetSortOrder(), + CreatedAtMS: item.GetCreatedAtMs(), + UpdatedAtMS: item.GetUpdatedAtMs(), + } +} diff --git a/services/gateway-service/internal/transport/http/vip_handler.go b/services/gateway-service/internal/transport/http/walletapi/vip_handler.go similarity index 98% rename from services/gateway-service/internal/transport/http/vip_handler.go rename to services/gateway-service/internal/transport/http/walletapi/vip_handler.go index 716fac74..a3e8ec35 100644 --- a/services/gateway-service/internal/transport/http/vip_handler.go +++ b/services/gateway-service/internal/transport/http/walletapi/vip_handler.go @@ -1,4 +1,4 @@ -package http +package walletapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -57,7 +57,7 @@ func (h *Handler) purchaseVIP(writer http.ResponseWriter, request *http.Request) return } var body vipPurchaseRequestBody - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } commandID := strings.TrimSpace(body.CommandID) diff --git a/services/gateway-service/internal/transport/http/wallet_handler.go b/services/gateway-service/internal/transport/http/walletapi/wallet_handler.go similarity index 97% rename from services/gateway-service/internal/transport/http/wallet_handler.go rename to services/gateway-service/internal/transport/http/walletapi/wallet_handler.go index 916c3d73..c98f3965 100644 --- a/services/gateway-service/internal/transport/http/wallet_handler.go +++ b/services/gateway-service/internal/transport/http/walletapi/wallet_handler.go @@ -1,4 +1,4 @@ -package http +package walletapi import ( "hyapp/services/gateway-service/internal/transport/http/httpkit" @@ -104,7 +104,7 @@ func (h *Handler) transferCoinFromSeller(writer http.ResponseWriter, request *ht return } var body coinSellerTransferRequestBody - if !decode(writer, request, &body) { + if !httpkit.Decode(writer, request, &body) { return } commandID := body.normalizedCommandID() @@ -117,7 +117,7 @@ func (h *Handler) transferCoinFromSeller(writer http.ResponseWriter, request *ht sellerUserID := auth.UserIDFromContext(request.Context()) profileResp, err := h.userHostClient.GetCoinSellerProfile(request.Context(), &userv1.GetCoinSellerProfileRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: sellerUserID, }) if err != nil { @@ -168,7 +168,7 @@ func (h *Handler) transferCoinFromSeller(writer http.ResponseWriter, request *ht func (h *Handler) resolveCoinSellerTransferTargetUserID(writer http.ResponseWriter, request *http.Request, targetDisplayUserID string) (int64, bool) { resp, err := h.userIdentityClient.ResolveDisplayUserID(request.Context(), &userv1.ResolveDisplayUserIDRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), DisplayUserId: targetDisplayUserID, }) if err != nil { @@ -186,7 +186,7 @@ func (h *Handler) resolveCoinSellerTransferTargetUserID(writer http.ResponseWrit func (h *Handler) coinSellerTransferRegions(writer http.ResponseWriter, request *http.Request, sellerUserID int64, targetUserID int64) (int64, int64, bool) { sellerResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: sellerUserID, }) if err != nil { @@ -194,7 +194,7 @@ func (h *Handler) coinSellerTransferRegions(writer http.ResponseWriter, request return 0, 0, false } targetResp, err := h.userProfileClient.GetUser(request.Context(), &userv1.GetUserRequest{ - Meta: authRequestMeta(request, ""), + Meta: httpkit.UserMeta(request, ""), UserId: targetUserID, }) if err != nil { diff --git a/services/notice-service/configs/config.docker.yaml b/services/notice-service/configs/config.docker.yaml index f0ef23a2..1e8e7efd 100644 --- a/services/notice-service/configs/config.docker.yaml +++ b/services/notice-service/configs/config.docker.yaml @@ -5,6 +5,7 @@ grpc_addr: ":13009" health_http_addr: ":13109" mysql_dsn: "hyapp:hyapp@tcp(mysql:3306)/hyapp_notice?parseTime=true&charset=utf8mb4&loc=UTC" wallet_database: "hyapp_wallet" +room_database: "hyapp_room" mysql_auto_migrate: false tencent_im: @@ -26,6 +27,16 @@ wallet_notice_worker: initial_backoff: 5s max_backoff: 5m +room_notice_worker: + enabled: false + poll_interval: 1s + batch_size: 100 + lock_ttl: 30s + publish_timeout: 3s + max_retry_count: 10 + initial_backoff: 5s + max_backoff: 5m + log: level: info format: json diff --git a/services/notice-service/configs/config.tencent.example.yaml b/services/notice-service/configs/config.tencent.example.yaml index e0ded1a1..36b69b0a 100644 --- a/services/notice-service/configs/config.tencent.example.yaml +++ b/services/notice-service/configs/config.tencent.example.yaml @@ -5,6 +5,7 @@ grpc_addr: ":13009" health_http_addr: ":13109" mysql_dsn: "hyapp:${MYSQL_PASSWORD}@tcp(${MYSQL_HOST}:3306)/hyapp_notice?parseTime=true&charset=utf8mb4&loc=UTC" wallet_database: "hyapp_wallet" +room_database: "hyapp_room" mysql_auto_migrate: false tencent_im: @@ -26,6 +27,16 @@ wallet_notice_worker: initial_backoff: 5s max_backoff: 5m +room_notice_worker: + enabled: true + poll_interval: 500ms + batch_size: 100 + lock_ttl: 30s + publish_timeout: 3s + max_retry_count: 10 + initial_backoff: 5s + max_backoff: 5m + log: level: info format: json diff --git a/services/notice-service/configs/config.yaml b/services/notice-service/configs/config.yaml index e2966828..fc5200e3 100644 --- a/services/notice-service/configs/config.yaml +++ b/services/notice-service/configs/config.yaml @@ -5,6 +5,7 @@ grpc_addr: ":13009" health_http_addr: ":13109" mysql_dsn: "hyapp:hyapp@tcp(127.0.0.1:23306)/hyapp_notice?parseTime=true&charset=utf8mb4&loc=UTC" wallet_database: "hyapp_wallet" +room_database: "hyapp_room" mysql_auto_migrate: false tencent_im: @@ -26,6 +27,16 @@ wallet_notice_worker: initial_backoff: 5s max_backoff: 5m +room_notice_worker: + enabled: false + poll_interval: 1s + batch_size: 100 + lock_ttl: 30s + publish_timeout: 3s + max_retry_count: 10 + initial_backoff: 5s + max_backoff: 5m + log: level: info format: json diff --git a/services/notice-service/internal/app/app.go b/services/notice-service/internal/app/app.go index 69becec5..800f8cb8 100644 --- a/services/notice-service/internal/app/app.go +++ b/services/notice-service/internal/app/app.go @@ -16,6 +16,7 @@ import ( "hyapp/pkg/logx" "hyapp/pkg/tencentim" "hyapp/services/notice-service/internal/config" + "hyapp/services/notice-service/internal/modules/roomnotice" "hyapp/services/notice-service/internal/modules/walletnotice" mysqlplatform "hyapp/services/notice-service/internal/platform/mysql" ) @@ -30,6 +31,9 @@ type App struct { walletNoticeService *walletnotice.Service walletWorkerOptions walletnotice.WalletNoticeWorkerOptions walletWorkerEnabled bool + roomNoticeService *roomnotice.Service + roomWorkerOptions roomnotice.RoomNoticeWorkerOptions + roomWorkerEnabled bool workerCtx context.Context workerCancel context.CancelFunc workerWG sync.WaitGroup @@ -57,6 +61,12 @@ func New(cfg config.Config) (*App, error) { _ = store.Close() return nil, err } + roomRepo, err := roomnotice.NewMySQLRepository(store.DB, cfg.RoomDatabase) + if err != nil { + _ = listener.Close() + _ = store.Close() + return nil, err + } var publisher walletnotice.UserMessagePublisher if cfg.TencentIM.Enabled { tencentClient, err := tencentim.NewRESTClient(cfg.TencentIM.RESTConfig()) @@ -72,6 +82,11 @@ func New(cfg config.Config) (*App, error) { _ = store.Close() return nil, errors.New("wallet notice worker requires tencent_im.enabled") } + if cfg.RoomNoticeWorker.Enabled && publisher == nil { + _ = listener.Close() + _ = store.Close() + return nil, errors.New("room notice worker requires tencent_im.enabled") + } server := grpc.NewServer(grpc.UnaryInterceptor(logx.UnaryServerInterceptor("notice-service"))) health := grpchealth.NewServingChecker("notice-service", grpchealth.Dependency{ @@ -96,6 +111,9 @@ func New(cfg config.Config) (*App, error) { walletNoticeService: walletnotice.New(walletnotice.Config{NodeID: cfg.NodeID}, walletRepo, publisher), walletWorkerOptions: walletNoticeWorkerOptions(cfg.WalletNoticeWorker), walletWorkerEnabled: cfg.WalletNoticeWorker.Enabled, + roomNoticeService: roomnotice.New(roomnotice.Config{NodeID: cfg.NodeID}, roomRepo, publisher), + roomWorkerOptions: roomNoticeWorkerOptions(cfg.RoomNoticeWorker), + roomWorkerEnabled: cfg.RoomNoticeWorker.Enabled, workerCtx: workerCtx, workerCancel: workerCancel, }, nil @@ -117,6 +135,11 @@ func (a *App) Run() error { a.walletNoticeService.RunWalletBalanceWorker(a.workerCtx, a.walletWorkerOptions) }) } + if a.roomWorkerEnabled && a.roomNoticeService != nil { + a.workerWG.Go(func() { + a.roomNoticeService.RunRoomKickWorker(a.workerCtx, a.roomWorkerOptions) + }) + } err := a.server.Serve(a.listener) if errors.Is(err, grpc.ErrServerStopped) { return nil @@ -171,3 +194,15 @@ func walletNoticeWorkerOptions(cfg config.WalletNoticeWorkerConfig) walletnotice MaxBackoff: cfg.MaxBackoff, } } + +func roomNoticeWorkerOptions(cfg config.WalletNoticeWorkerConfig) roomnotice.RoomNoticeWorkerOptions { + return roomnotice.RoomNoticeWorkerOptions{ + PollInterval: cfg.PollInterval, + BatchSize: cfg.BatchSize, + LockTTL: cfg.LockTTL, + PublishTimeout: cfg.PublishTimeout, + MaxRetryCount: cfg.MaxRetryCount, + InitialBackoff: cfg.InitialBackoff, + MaxBackoff: cfg.MaxBackoff, + } +} diff --git a/services/notice-service/internal/config/config.go b/services/notice-service/internal/config/config.go index e18d51e7..dcfcb388 100644 --- a/services/notice-service/internal/config/config.go +++ b/services/notice-service/internal/config/config.go @@ -22,12 +22,16 @@ type Config struct { MySQLDSN string `yaml:"mysql_dsn"` // WalletDatabase 是 wallet_outbox 所在库名;notice 只把它当 append-only 事实源读取。 WalletDatabase string `yaml:"wallet_database"` + // RoomDatabase 是 room_outbox 所在库名;notice 只读取需要私有通知的房间事实。 + RoomDatabase string `yaml:"room_database"` // TencentIM 是私有 IM 投递通道配置;本地默认关闭,避免误发真实消息。 TencentIM TencentIMConfig `yaml:"tencent_im"` // WalletNoticeWorker 消费 wallet_outbox 中的 WalletBalanceChanged 事件。 WalletNoticeWorker WalletNoticeWorkerConfig `yaml:"wallet_notice_worker"` - MySQLAutoMigrate bool `yaml:"mysql_auto_migrate"` - Log logx.Config `yaml:"log"` + // RoomNoticeWorker 消费 room_outbox 中需要给单个用户发送的房间通知。 + RoomNoticeWorker WalletNoticeWorkerConfig `yaml:"room_notice_worker"` + MySQLAutoMigrate bool `yaml:"mysql_auto_migrate"` + Log logx.Config `yaml:"log"` } // TencentIMConfig 描述服务端调用腾讯云 IM REST API 的配置。 @@ -79,6 +83,7 @@ func Default() Config { HealthHTTPAddr: ":13109", MySQLDSN: "hyapp:hyapp@tcp(127.0.0.1:23306)/hyapp_notice?parseTime=true&charset=utf8mb4&loc=UTC", WalletDatabase: "hyapp_wallet", + RoomDatabase: "hyapp_room", MySQLAutoMigrate: false, TencentIM: TencentIMConfig{ Enabled: false, @@ -97,6 +102,16 @@ func Default() Config { InitialBackoff: 5 * time.Second, MaxBackoff: 5 * time.Minute, }, + RoomNoticeWorker: WalletNoticeWorkerConfig{ + Enabled: false, + PollInterval: time.Second, + BatchSize: 100, + LockTTL: 30 * time.Second, + PublishTimeout: 3 * time.Second, + MaxRetryCount: 10, + InitialBackoff: 5 * time.Second, + MaxBackoff: 5 * time.Minute, + }, Log: logx.Config{ Level: "info", Format: "json", @@ -138,7 +153,12 @@ func Load(path string) (Config, error) { if cfg.WalletDatabase == "" { cfg.WalletDatabase = "hyapp_wallet" } + cfg.RoomDatabase = strings.TrimSpace(cfg.RoomDatabase) + if cfg.RoomDatabase == "" { + cfg.RoomDatabase = "hyapp_room" + } cfg.WalletNoticeWorker = normalizeWalletNoticeWorker(cfg.WalletNoticeWorker) + cfg.RoomNoticeWorker = normalizeWalletNoticeWorker(cfg.RoomNoticeWorker) if strings.TrimSpace(cfg.TencentIM.AdminIdentifier) == "" { cfg.TencentIM.AdminIdentifier = "administrator" } diff --git a/services/notice-service/internal/modules/roomnotice/mysql_integration_test.go b/services/notice-service/internal/modules/roomnotice/mysql_integration_test.go new file mode 100644 index 00000000..fd1c0d65 --- /dev/null +++ b/services/notice-service/internal/modules/roomnotice/mysql_integration_test.go @@ -0,0 +1,174 @@ +package roomnotice + +import ( + "context" + "database/sql" + "encoding/json" + "fmt" + "os" + "strings" + "testing" + "time" + + "google.golang.org/protobuf/proto" + roomeventsv1 "hyapp.local/api/proto/events/room/v1" + + _ "github.com/go-sql-driver/mysql" +) + +func TestMySQLRepositoryProcessesRealRoomKickOutbox(t *testing.T) { + dsn := strings.TrimSpace(os.Getenv("NOTICE_REAL_MYSQL_DSN")) + if dsn == "" { + t.Skip("set NOTICE_REAL_MYSQL_DSN to run real MySQL notice validation") + } + db, err := sql.Open("mysql", dsn) + if err != nil { + t.Fatalf("open mysql: %v", err) + } + defer db.Close() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + if err := db.PingContext(ctx); err != nil { + t.Fatalf("ping mysql: %v", err) + } + + suffix := fmt.Sprintf("%d", time.Now().UnixNano()) + roomDatabase := strings.TrimSpace(os.Getenv("NOTICE_REAL_ROOM_DATABASE")) + if roomDatabase == "" { + roomDatabase = "hyapp_room_notice_test_" + suffix + if _, err := db.ExecContext(ctx, fmt.Sprintf(`CREATE DATABASE %s DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci`, quoteDB(roomDatabase))); err != nil { + t.Fatalf("create room test database: %v", err) + } + t.Cleanup(func() { + _, _ = db.ExecContext(context.Background(), fmt.Sprintf(`DROP DATABASE %s`, quoteDB(roomDatabase))) + }) + } + if err := ensureRoomOutboxTable(ctx, db, roomDatabase); err != nil { + t.Fatalf("ensure room_outbox table: %v", err) + } + + repository, err := NewMySQLRepository(db, roomDatabase) + if err != nil { + t.Fatalf("NewMySQLRepository: %v", err) + } + appCode := "notice_real" + roomID := "notice_real_room_" + suffix + eventID := "notice_real_room_evt_" + suffix + actorUserID := int64(990000001) + targetUserID := int64(990000002) + nowMS := time.Now().UnixMilli() + + body, err := proto.Marshal(&roomeventsv1.RoomUserKicked{ + ActorUserId: actorUserID, + TargetUserId: targetUserID, + }) + if err != nil { + t.Fatalf("marshal body: %v", err) + } + envelope, err := proto.Marshal(&roomeventsv1.EventEnvelope{ + EventId: eventID, + RoomId: roomID, + EventType: "RoomUserKicked", + RoomVersion: 12, + OccurredAtMs: nowMS, + AppCode: appCode, + Body: body, + }) + if err != nil { + t.Fatalf("marshal envelope: %v", err) + } + + if _, err := db.ExecContext(ctx, fmt.Sprintf(` + INSERT INTO %s.room_outbox ( + app_code, event_id, event_type, room_id, status, worker_id, lock_until_ms, + envelope, created_at_ms, retry_count, next_retry_at_ms, last_error, updated_at_ms + ) VALUES (?, ?, 'RoomUserKicked', ?, 'delivered', '', 0, ?, ?, 0, 0, '', ?)`, + quoteDB(roomDatabase), + ), appCode, eventID, roomID, envelope, nowMS, nowMS); err != nil { + t.Fatalf("insert room_outbox: %v", err) + } + if !keepRealRows() { + t.Cleanup(func() { + _, _ = db.ExecContext(context.Background(), `DELETE FROM notice_delivery_events WHERE app_code = ? AND source_event_id = ?`, appCode, eventID) + _, _ = db.ExecContext(context.Background(), fmt.Sprintf(`DELETE FROM %s.room_outbox WHERE app_code = ? AND event_id = ?`, quoteDB(roomDatabase)), appCode, eventID) + }) + } + + publisher := &fakePublisher{} + service := New(Config{NodeID: "notice-real-test"}, repository, publisher) + processed, err := service.ProcessRoomKickNotices(ctx, RoomNoticeWorkerOptions{ + WorkerID: "notice-real-room-test-worker", + BatchSize: 1, + LockTTL: 30 * time.Second, + PublishTimeout: time.Second, + MaxRetryCount: 3, + }) + if err != nil { + t.Fatalf("ProcessRoomKickNotices: %v", err) + } + if processed != 1 || len(publisher.messages) != 1 { + t.Fatalf("unexpected process result: processed=%d messages=%d", processed, len(publisher.messages)) + } + if publisher.messages[0].ToAccount != "990000002" || publisher.messages[0].Ext != "room_notice" { + t.Fatalf("unexpected private message: %+v", publisher.messages[0]) + } + + var noticeStatus string + var deliveredAtMS int64 + var storedPayload string + if err := db.QueryRowContext(ctx, ` + SELECT status, delivered_at_ms, COALESCE(CAST(payload_json AS CHAR), '{}') + FROM notice_delivery_events + WHERE source_name = 'room_outbox' AND app_code = ? AND source_event_id = ? AND channel = 'tencent_im_c2c'`, + appCode, eventID, + ).Scan(¬iceStatus, &deliveredAtMS, &storedPayload); err != nil { + t.Fatalf("query notice_delivery_events: %v", err) + } + if noticeStatus != "delivered" || deliveredAtMS <= 0 { + t.Fatalf("unexpected delivery marker: status=%s delivered_at_ms=%d payload=%s", noticeStatus, deliveredAtMS, storedPayload) + } + var noticePayload map[string]any + if err := json.Unmarshal([]byte(storedPayload), ¬icePayload); err != nil { + t.Fatalf("decode stored notice payload: %v", err) + } + if noticePayload["event_id"] != eventID || noticePayload["room_id"] != roomID || noticePayload["event_type"] != "room_user_kicked" { + t.Fatalf("unexpected stored notice payload: %+v", noticePayload) + } + if noticePayload["target_user_id"].(float64) != float64(targetUserID) || noticePayload["actor_user_id"].(float64) != float64(actorUserID) { + t.Fatalf("unexpected stored user payload: %+v", noticePayload) + } + t.Logf("real room notice validation event_id=%s status=%s delivered_at_ms=%d", eventID, noticeStatus, deliveredAtMS) +} + +func keepRealRows() bool { + value := strings.ToLower(strings.TrimSpace(os.Getenv("NOTICE_REAL_MYSQL_KEEP_ROWS"))) + return value == "1" || value == "true" || value == "yes" +} + +func quoteDB(value string) string { + return "`" + strings.ReplaceAll(value, "`", "``") + "`" +} + +func ensureRoomOutboxTable(ctx context.Context, db *sql.DB, roomDatabase string) error { + _, err := db.ExecContext(ctx, fmt.Sprintf(` + CREATE TABLE IF NOT EXISTS %s.room_outbox ( + app_code VARCHAR(32) NOT NULL, + event_id VARCHAR(128) NOT NULL, + event_type VARCHAR(64) NOT NULL, + room_id VARCHAR(64) NOT NULL, + status VARCHAR(32) NOT NULL, + worker_id VARCHAR(128) NOT NULL DEFAULT '', + lock_until_ms BIGINT NULL, + envelope LONGBLOB NOT NULL, + created_at_ms BIGINT NOT NULL, + retry_count INT NOT NULL DEFAULT 0, + next_retry_at_ms BIGINT NOT NULL DEFAULT 0, + last_error TEXT NULL, + updated_at_ms BIGINT NOT NULL, + PRIMARY KEY (app_code, event_id), + KEY idx_room_outbox_notice (app_code, event_type, created_at_ms) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`, + quoteDB(roomDatabase), + )) + return err +} diff --git a/services/notice-service/internal/modules/roomnotice/mysql_repository.go b/services/notice-service/internal/modules/roomnotice/mysql_repository.go new file mode 100644 index 00000000..ad979b12 --- /dev/null +++ b/services/notice-service/internal/modules/roomnotice/mysql_repository.go @@ -0,0 +1,382 @@ +package roomnotice + +import ( + "context" + "database/sql" + "errors" + "fmt" + "strings" + "time" + "unicode" + + "google.golang.org/protobuf/proto" + roomeventsv1 "hyapp.local/api/proto/events/room/v1" + "hyapp/pkg/appcode" + "hyapp/pkg/xerr" +) + +const ( + sourceRoomOutbox = "room_outbox" + channelTencentIMC2C = "tencent_im_c2c" + eventRoomUserKicked = "RoomUserKicked" + deliveryStatusDelivering = "delivering" + deliveryStatusDelivered = "delivered" + deliveryStatusRetryable = "retryable" + deliveryStatusFailed = "failed" +) + +// MySQLRepository 只读取 room_outbox 事实,并把 notice 自己的消费位点写入 notice_delivery_events。 +type MySQLRepository struct { + db *sql.DB + roomOutboxTable string +} + +// RoomKickEvent 是 notice-service 从 room_outbox 认领的一条踢人私有通知事实。 +type RoomKickEvent struct { + AppCode string + EventID string + EventType string + RoomID string + RoomVersion int64 + ActorUserID int64 + TargetUserID int64 + OccurredAtMS int64 + CreatedAtMS int64 + RetryCount int +} + +// NewMySQLRepository 创建房间私有通知仓储;room_outbox 被视作 append-only 事实源。 +func NewMySQLRepository(db *sql.DB, roomDatabase string) (*MySQLRepository, error) { + if db == nil { + return nil, xerr.New(xerr.Unavailable, "mysql db is not configured") + } + roomDatabase = normalizeDatabaseName(roomDatabase) + if roomDatabase == "" { + return nil, xerr.New(xerr.InvalidArgument, "room_database is invalid") + } + return &MySQLRepository{ + db: db, + roomOutboxTable: fmt.Sprintf("`%s`.`room_outbox`", roomDatabase), + }, nil +} + +// ClaimRoomKickEvents 抢占待投递给被踢用户的私有 C2C 通知。 +// room_outbox 的 pending/delivered 状态属于房间群消息 bridge;这里不能修改它,避免多消费者互相覆盖。 +func (r *MySQLRepository) ClaimRoomKickEvents(ctx context.Context, workerID string, limit int, lockTTL time.Duration) ([]RoomKickEvent, error) { + if r == nil || r.db == nil { + return nil, xerr.New(xerr.Unavailable, "notice repository is not configured") + } + workerID = strings.TrimSpace(workerID) + if workerID == "" { + return nil, xerr.New(xerr.InvalidArgument, "worker_id is required") + } + if limit <= 0 { + limit = 100 + } + if limit > 500 { + limit = 500 + } + if lockTTL <= 0 { + lockTTL = 30 * time.Second + } + + candidates, err := r.listRoomKickCandidates(ctx, limit, time.Now().UnixMilli()) + if err != nil { + return nil, err + } + claimed := make([]RoomKickEvent, 0, len(candidates)) + for _, candidate := range candidates { + event, ok, err := r.claimRoomKickCandidate(ctx, candidate, workerID, lockTTL) + if err != nil { + return claimed, err + } + if ok { + claimed = append(claimed, event) + } + } + return claimed, nil +} + +type roomKickCandidate struct { + AppCode string + EventID string +} + +func (r *MySQLRepository) listRoomKickCandidates(ctx context.Context, limit int, nowMs int64) ([]roomKickCandidate, error) { + query := fmt.Sprintf(` + SELECT ro.app_code, ro.event_id + FROM %s ro + LEFT JOIN notice_delivery_events nde + ON nde.source_name = ? AND nde.app_code = ro.app_code AND nde.source_event_id = ro.event_id AND nde.channel = ? + WHERE ro.event_type = ? + AND ( + nde.source_event_id IS NULL + OR (nde.status = ? AND nde.next_retry_at_ms <= ?) + OR (nde.status = ? AND nde.lock_until_ms <= ?) + ) + ORDER BY ro.created_at_ms ASC, ro.event_id ASC + LIMIT ?`, r.roomOutboxTable) + rows, err := r.db.QueryContext(ctx, query, + sourceRoomOutbox, + channelTencentIMC2C, + eventRoomUserKicked, + deliveryStatusRetryable, + nowMs, + deliveryStatusDelivering, + nowMs, + limit, + ) + if err != nil { + return nil, err + } + defer rows.Close() + + candidates := make([]roomKickCandidate, 0, limit) + for rows.Next() { + var candidate roomKickCandidate + if err := rows.Scan(&candidate.AppCode, &candidate.EventID); err != nil { + return nil, err + } + candidates = append(candidates, candidate) + } + return candidates, rows.Err() +} + +func (r *MySQLRepository) claimRoomKickCandidate(ctx context.Context, candidate roomKickCandidate, workerID string, lockTTL time.Duration) (RoomKickEvent, bool, error) { + nowMs := time.Now().UnixMilli() + lockUntilMS := time.Now().Add(lockTTL).UnixMilli() + ctx = appcode.WithContext(ctx, candidate.AppCode) + + tx, err := r.db.BeginTx(ctx, nil) + if err != nil { + return RoomKickEvent{}, false, err + } + defer func() { _ = tx.Rollback() }() + + event, err := r.lockRoomKickEvent(ctx, tx, candidate) + if err != nil { + if errors.Is(err, sql.ErrNoRows) { + // 候选扫描和事务锁定之间可能被清理或事件类型变化,跳过该行即可。 + return RoomKickEvent{}, false, nil + } + return RoomKickEvent{}, false, err + } + retryCount, claimed, err := r.claimDeliveryEvent(ctx, tx, event, workerID, lockUntilMS, nowMs) + if err != nil || !claimed { + return RoomKickEvent{}, false, err + } + event.RetryCount = retryCount + if err := tx.Commit(); err != nil { + return RoomKickEvent{}, false, err + } + return event, true, nil +} + +func (r *MySQLRepository) lockRoomKickEvent(ctx context.Context, tx *sql.Tx, candidate roomKickCandidate) (RoomKickEvent, error) { + var ( + event RoomKickEvent + envelopeBytes []byte + ) + query := fmt.Sprintf(` + SELECT app_code, event_id, event_type, room_id, envelope, created_at_ms + FROM %s + WHERE app_code = ? AND event_id = ? AND event_type = ? + FOR UPDATE`, r.roomOutboxTable) + err := tx.QueryRowContext(ctx, query, + appcode.Normalize(candidate.AppCode), + candidate.EventID, + eventRoomUserKicked, + ).Scan( + &event.AppCode, + &event.EventID, + &event.EventType, + &event.RoomID, + &envelopeBytes, + &event.CreatedAtMS, + ) + if err != nil { + return RoomKickEvent{}, err + } + + var envelope roomeventsv1.EventEnvelope + if err := proto.Unmarshal(envelopeBytes, &envelope); err != nil { + return RoomKickEvent{}, err + } + if envelope.GetEventType() != eventRoomUserKicked { + return RoomKickEvent{}, fmt.Errorf("unexpected room event type %q", envelope.GetEventType()) + } + var body roomeventsv1.RoomUserKicked + if err := proto.Unmarshal(envelope.GetBody(), &body); err != nil { + return RoomKickEvent{}, err + } + event.RoomVersion = envelope.GetRoomVersion() + event.OccurredAtMS = envelope.GetOccurredAtMs() + event.ActorUserID = body.GetActorUserId() + event.TargetUserID = body.GetTargetUserId() + if event.TargetUserID <= 0 { + return RoomKickEvent{}, fmt.Errorf("room kick event target_user_id is invalid") + } + return event, nil +} + +func (r *MySQLRepository) claimDeliveryEvent(ctx context.Context, tx *sql.Tx, event RoomKickEvent, workerID string, lockUntilMS int64, nowMs int64) (int, bool, error) { + payload, err := roomKickNoticePayload(event) + if err != nil { + return 0, false, err + } + _, err = tx.ExecContext(ctx, ` + INSERT INTO notice_delivery_events ( + source_name, app_code, source_event_id, channel, notice_type, target_user_id, + status, retry_count, locked_by, lock_until_ms, next_retry_at_ms, + payload_json, last_error, delivered_at_ms, created_at_ms, updated_at_ms + ) VALUES (?, ?, ?, ?, ?, ?, ?, 0, ?, ?, 0, ?, '', 0, ?, ?)`, + sourceRoomOutbox, + event.AppCode, + event.EventID, + channelTencentIMC2C, + event.EventType, + event.TargetUserID, + deliveryStatusDelivering, + workerID, + lockUntilMS, + string(payload), + nowMs, + nowMs, + ) + if err == nil { + return 0, true, nil + } + if !isDuplicateKey(err) { + return 0, false, err + } + + result, err := tx.ExecContext(ctx, ` + UPDATE notice_delivery_events + SET status = ?, locked_by = ?, lock_until_ms = ?, payload_json = ?, updated_at_ms = ? + WHERE source_name = ? AND app_code = ? AND source_event_id = ? AND channel = ? + AND ( + (status = ? AND next_retry_at_ms <= ?) + OR (status = ? AND lock_until_ms <= ?) + )`, + deliveryStatusDelivering, + workerID, + lockUntilMS, + string(payload), + nowMs, + sourceRoomOutbox, + event.AppCode, + event.EventID, + channelTencentIMC2C, + deliveryStatusRetryable, + nowMs, + deliveryStatusDelivering, + nowMs, + ) + if err != nil { + return 0, false, err + } + affected, err := result.RowsAffected() + if err != nil || affected == 0 { + return 0, false, err + } + + var retryCount int + err = tx.QueryRowContext(ctx, ` + SELECT retry_count + FROM notice_delivery_events + WHERE source_name = ? AND app_code = ? AND source_event_id = ? AND channel = ? + FOR UPDATE`, + sourceRoomOutbox, + event.AppCode, + event.EventID, + channelTencentIMC2C, + ).Scan(&retryCount) + return retryCount, err == nil, err +} + +// MarkRoomKickDelivered 标记被踢私有通知已送达腾讯云 IM C2C 通道。 +func (r *MySQLRepository) MarkRoomKickDelivered(ctx context.Context, event RoomKickEvent, deliveredPayload []byte, nowMs int64) error { + _, err := r.db.ExecContext(ctx, ` + UPDATE notice_delivery_events + SET status = ?, locked_by = '', lock_until_ms = 0, next_retry_at_ms = 0, + payload_json = ?, last_error = '', delivered_at_ms = ?, updated_at_ms = ? + WHERE source_name = ? AND app_code = ? AND source_event_id = ? AND channel = ?`, + deliveryStatusDelivered, + string(deliveredPayload), + nowMs, + nowMs, + sourceRoomOutbox, + event.AppCode, + event.EventID, + channelTencentIMC2C, + ) + return err +} + +// MarkRoomKickRetryable 释放当前锁并进入退避重试;源 room_outbox 不受影响。 +func (r *MySQLRepository) MarkRoomKickRetryable(ctx context.Context, event RoomKickEvent, retryCount int, nextRetryAtMS int64, lastErr string, nowMs int64) error { + _, err := r.db.ExecContext(ctx, ` + UPDATE notice_delivery_events + SET status = ?, retry_count = ?, locked_by = '', lock_until_ms = 0, + next_retry_at_ms = ?, last_error = ?, updated_at_ms = ? + WHERE source_name = ? AND app_code = ? AND source_event_id = ? AND channel = ?`, + deliveryStatusRetryable, + retryCount, + nextRetryAtMS, + truncateError(lastErr), + nowMs, + sourceRoomOutbox, + event.AppCode, + event.EventID, + channelTencentIMC2C, + ) + return err +} + +// MarkRoomKickFailed 把无法投递的私有通知移入 notice 死信,等待后台人工重放。 +func (r *MySQLRepository) MarkRoomKickFailed(ctx context.Context, event RoomKickEvent, retryCount int, lastErr string, nowMs int64) error { + _, err := r.db.ExecContext(ctx, ` + UPDATE notice_delivery_events + SET status = ?, retry_count = ?, locked_by = '', lock_until_ms = 0, + next_retry_at_ms = 0, last_error = ?, updated_at_ms = ? + WHERE source_name = ? AND app_code = ? AND source_event_id = ? AND channel = ?`, + deliveryStatusFailed, + retryCount, + truncateError(lastErr), + nowMs, + sourceRoomOutbox, + event.AppCode, + event.EventID, + channelTencentIMC2C, + ) + return err +} + +func normalizeDatabaseName(value string) string { + value = strings.TrimSpace(value) + if value == "" { + return "" + } + for _, r := range value { + if r == '_' || unicode.IsDigit(r) || unicode.IsLetter(r) { + continue + } + return "" + } + return value +} + +func isDuplicateKey(err error) bool { + if err == nil { + return false + } + return strings.Contains(err.Error(), "Error 1062") || strings.Contains(strings.ToLower(err.Error()), "duplicate") +} + +func truncateError(value string) string { + value = strings.TrimSpace(value) + if len(value) <= 1000 { + return value + } + return value[:1000] +} diff --git a/services/notice-service/internal/modules/roomnotice/service.go b/services/notice-service/internal/modules/roomnotice/service.go new file mode 100644 index 00000000..dbed60d6 --- /dev/null +++ b/services/notice-service/internal/modules/roomnotice/service.go @@ -0,0 +1,142 @@ +package roomnotice + +import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "time" + + "hyapp/pkg/logx" + "hyapp/pkg/tencentim" +) + +// Repository 是 room notice 模块需要的持久化边界。 +type Repository interface { + ClaimRoomKickEvents(ctx context.Context, workerID string, limit int, lockTTL time.Duration) ([]RoomKickEvent, error) + MarkRoomKickDelivered(ctx context.Context, event RoomKickEvent, deliveredPayload []byte, nowMs int64) error + MarkRoomKickRetryable(ctx context.Context, event RoomKickEvent, retryCount int, nextRetryAtMS int64, lastErr string, nowMs int64) error + MarkRoomKickFailed(ctx context.Context, event RoomKickEvent, retryCount int, lastErr string, nowMs int64) error +} + +// UserMessagePublisher 把房间私有 notice 投递到用户个人实时通道。 +type UserMessagePublisher interface { + PublishUserCustomMessage(ctx context.Context, message tencentim.CustomUserMessage) error +} + +// Config 保存 room notice 的进程级配置。 +type Config struct { + NodeID string +} + +// Service 消费 room_outbox 中需要私有通知的房间事实,不拥有房间状态。 +type Service struct { + cfg Config + repository Repository + publisher UserMessagePublisher +} + +// New 创建 room notice 服务。 +func New(cfg Config, repository Repository, publisher UserMessagePublisher) *Service { + return &Service{cfg: cfg, repository: repository, publisher: publisher} +} + +// ProcessRoomKickNotices 处理一批“被踢用户本人”的私有通知。 +func (s *Service) ProcessRoomKickNotices(ctx context.Context, options RoomNoticeWorkerOptions) (int, error) { + options = normalizeRoomNoticeWorkerOptions(options, s.cfg.NodeID) + if s.repository == nil { + return 0, fmt.Errorf("notice repository is not configured") + } + if s.publisher == nil { + return 0, fmt.Errorf("notice publisher is not configured") + } + events, err := s.repository.ClaimRoomKickEvents(ctx, options.WorkerID, options.BatchSize, options.LockTTL) + if err != nil { + return 0, err + } + processed := 0 + for _, event := range events { + if err := s.publishRoomKickEvent(ctx, event, options); err != nil { + return processed, err + } + processed++ + } + return processed, nil +} + +func (s *Service) publishRoomKickEvent(ctx context.Context, event RoomKickEvent, options RoomNoticeWorkerOptions) error { + payload, err := roomKickNoticePayload(event) + if err != nil { + return s.markFailed(ctx, event, options, err) + } + publishCtx, cancel := context.WithTimeout(ctx, options.PublishTimeout) + defer cancel() + err = s.publisher.PublishUserCustomMessage(publishCtx, tencentim.CustomUserMessage{ + ToAccount: tencentim.FormatUserID(event.TargetUserID), + EventID: event.EventID, + Desc: "room_user_kicked", + Ext: "room_notice", + PayloadJSON: payload, + }) + nowMs := time.Now().UnixMilli() + if err == nil { + if markErr := s.repository.MarkRoomKickDelivered(ctx, event, payload, nowMs); markErr != nil { + return markErr + } + logx.Info(ctx, "notice_room_kick_delivered", + slog.String("event_id", event.EventID), + slog.String("app_code", event.AppCode), + slog.String("room_id", event.RoomID), + slog.Int64("target_user_id", event.TargetUserID), + ) + return nil + } + return s.markFailed(ctx, event, options, err) +} + +func (s *Service) markFailed(ctx context.Context, event RoomKickEvent, options RoomNoticeWorkerOptions, cause error) error { + nowMs := time.Now().UnixMilli() + nextRetryCount := event.RetryCount + 1 + if nextRetryCount >= options.MaxRetryCount { + if err := s.repository.MarkRoomKickFailed(ctx, event, nextRetryCount, cause.Error(), nowMs); err != nil { + return err + } + logx.Error(ctx, "notice_room_kick_dead_letter", cause, + slog.String("event_id", event.EventID), + slog.String("app_code", event.AppCode), + slog.String("room_id", event.RoomID), + slog.Int64("target_user_id", event.TargetUserID), + slog.Int("retry_count", nextRetryCount), + ) + return nil + } + nextRetryAtMS := nowMs + roomNoticeBackoff(nextRetryCount, options).Milliseconds() + if err := s.repository.MarkRoomKickRetryable(ctx, event, nextRetryCount, nextRetryAtMS, cause.Error(), nowMs); err != nil { + return err + } + logx.Error(ctx, "notice_room_kick_retryable", cause, + slog.String("event_id", event.EventID), + slog.String("app_code", event.AppCode), + slog.String("room_id", event.RoomID), + slog.Int64("target_user_id", event.TargetUserID), + slog.Int("retry_count", nextRetryCount), + slog.Int64("next_retry_at_ms", nextRetryAtMS), + ) + return nil +} + +func roomKickNoticePayload(event RoomKickEvent) (json.RawMessage, error) { + payload := map[string]any{ + "event_id": event.EventID, + "event_type": "room_user_kicked", + "source_event_type": event.EventType, + "app_code": event.AppCode, + "room_id": event.RoomID, + "room_version": event.RoomVersion, + "actor_user_id": event.ActorUserID, + "target_user_id": event.TargetUserID, + "occurred_at_ms": event.OccurredAtMS, + "source_created_at_ms": event.CreatedAtMS, + } + return json.Marshal(payload) +} diff --git a/services/notice-service/internal/modules/roomnotice/service_test.go b/services/notice-service/internal/modules/roomnotice/service_test.go new file mode 100644 index 00000000..a4e954d6 --- /dev/null +++ b/services/notice-service/internal/modules/roomnotice/service_test.go @@ -0,0 +1,145 @@ +package roomnotice + +import ( + "context" + "encoding/json" + "errors" + "testing" + "time" + + "hyapp/pkg/tencentim" +) + +func TestProcessRoomKickNoticesPublishesPrivateIM(t *testing.T) { + repo := &fakeRepository{ + events: []RoomKickEvent{{ + AppCode: "lalu", + EventID: "evt-room-kick-1", + EventType: "RoomUserKicked", + RoomID: "room_10001", + RoomVersion: 18, + ActorUserID: 10001, + TargetUserID: 20001, + OccurredAtMS: 1710000000123, + CreatedAtMS: 1710000000124, + }}, + } + publisher := &fakePublisher{} + service := New(Config{NodeID: "notice-test"}, repo, publisher) + + processed, err := service.ProcessRoomKickNotices(context.Background(), RoomNoticeWorkerOptions{ + WorkerID: "room-notice-test", + BatchSize: 10, + LockTTL: time.Second, + PublishTimeout: time.Second, + MaxRetryCount: 3, + InitialBackoff: time.Second, + MaxBackoff: time.Second, + }) + if err != nil { + t.Fatalf("ProcessRoomKickNotices failed: %v", err) + } + if processed != 1 { + t.Fatalf("processed=%d, want 1", processed) + } + if len(publisher.messages) != 1 { + t.Fatalf("published messages=%d, want 1", len(publisher.messages)) + } + message := publisher.messages[0] + if message.ToAccount != "20001" || message.EventID != "evt-room-kick-1" || message.Ext != "room_notice" || message.Desc != "room_user_kicked" { + t.Fatalf("unexpected message: %+v", message) + } + if repo.deliveredEventID != "evt-room-kick-1" { + t.Fatalf("delivered event id=%q", repo.deliveredEventID) + } + + var payload map[string]any + if err := json.Unmarshal(message.PayloadJSON, &payload); err != nil { + t.Fatalf("decode payload: %v", err) + } + if payload["event_type"] != "room_user_kicked" || payload["room_id"] != "room_10001" { + t.Fatalf("unexpected payload: %+v", payload) + } + if payload["target_user_id"].(float64) != 20001 || payload["actor_user_id"].(float64) != 10001 { + t.Fatalf("unexpected user payload: %+v", payload) + } +} + +func TestProcessRoomKickNoticesMarksRetryableOnPublishError(t *testing.T) { + repo := &fakeRepository{ + events: []RoomKickEvent{{ + AppCode: "lalu", + EventID: "evt-room-kick-2", + EventType: "RoomUserKicked", + RoomID: "room_10001", + ActorUserID: 10001, + TargetUserID: 20001, + RetryCount: 1, + }}, + } + service := New(Config{NodeID: "notice-test"}, repo, &fakePublisher{err: errors.New("im timeout")}) + + processed, err := service.ProcessRoomKickNotices(context.Background(), RoomNoticeWorkerOptions{ + WorkerID: "room-notice-test", + BatchSize: 10, + LockTTL: time.Second, + PublishTimeout: time.Second, + MaxRetryCount: 3, + InitialBackoff: time.Second, + MaxBackoff: time.Second, + }) + if err != nil { + t.Fatalf("ProcessRoomKickNotices failed: %v", err) + } + if processed != 1 { + t.Fatalf("processed=%d, want 1", processed) + } + if repo.retryEventID != "evt-room-kick-2" || repo.retryCount != 2 { + t.Fatalf("retry marker event=%q count=%d", repo.retryEventID, repo.retryCount) + } + if repo.failedEventID != "" { + t.Fatalf("event should be retryable, got failed=%q", repo.failedEventID) + } +} + +type fakeRepository struct { + events []RoomKickEvent + deliveredEventID string + retryEventID string + failedEventID string + retryCount int +} + +func (r *fakeRepository) ClaimRoomKickEvents(context.Context, string, int, time.Duration) ([]RoomKickEvent, error) { + return r.events, nil +} + +func (r *fakeRepository) MarkRoomKickDelivered(_ context.Context, event RoomKickEvent, _ []byte, _ int64) error { + r.deliveredEventID = event.EventID + return nil +} + +func (r *fakeRepository) MarkRoomKickRetryable(_ context.Context, event RoomKickEvent, retryCount int, _ int64, _ string, _ int64) error { + r.retryEventID = event.EventID + r.retryCount = retryCount + return nil +} + +func (r *fakeRepository) MarkRoomKickFailed(_ context.Context, event RoomKickEvent, retryCount int, _ string, _ int64) error { + r.failedEventID = event.EventID + r.retryCount = retryCount + return nil +} + +type fakePublisher struct { + messages []tencentim.CustomUserMessage + err error +} + +func (p *fakePublisher) PublishUserCustomMessage(_ context.Context, message tencentim.CustomUserMessage) error { + if p.err != nil { + return p.err + } + p.messages = append(p.messages, message) + return nil +} diff --git a/services/notice-service/internal/modules/roomnotice/worker.go b/services/notice-service/internal/modules/roomnotice/worker.go new file mode 100644 index 00000000..4b75a861 --- /dev/null +++ b/services/notice-service/internal/modules/roomnotice/worker.go @@ -0,0 +1,92 @@ +package roomnotice + +import ( + "context" + "log/slog" + "strings" + "time" + + "hyapp/pkg/logx" +) + +// RoomNoticeWorkerOptions 控制房间私有通知 worker 的运行参数。 +type RoomNoticeWorkerOptions struct { + WorkerID string + PollInterval time.Duration + BatchSize int + LockTTL time.Duration + PublishTimeout time.Duration + MaxRetryCount int + InitialBackoff time.Duration + MaxBackoff time.Duration +} + +// RunRoomKickWorker 持续消费 room_outbox 中的 RoomUserKicked 事件。 +func (s *Service) RunRoomKickWorker(ctx context.Context, options RoomNoticeWorkerOptions) { + options = normalizeRoomNoticeWorkerOptions(options, s.cfg.NodeID) + ticker := time.NewTicker(options.PollInterval) + defer ticker.Stop() + for { + processed, err := s.ProcessRoomKickNotices(ctx, options) + if err != nil && ctx.Err() == nil { + logx.Error(ctx, "notice_room_kick_batch_failed", err, slog.String("worker_id", options.WorkerID)) + } + if processed >= options.BatchSize { + // 批次打满说明有积压,立即继续 drain,降低被踢用户退出提示延迟。 + continue + } + select { + case <-ctx.Done(): + return + case <-ticker.C: + } + } +} + +func normalizeRoomNoticeWorkerOptions(options RoomNoticeWorkerOptions, nodeID string) RoomNoticeWorkerOptions { + if strings.TrimSpace(options.WorkerID) == "" { + if strings.TrimSpace(nodeID) == "" { + nodeID = "notice" + } + options.WorkerID = "room-notice-" + nodeID + } + if options.PollInterval <= 0 { + options.PollInterval = time.Second + } + if options.BatchSize <= 0 { + options.BatchSize = 100 + } + if options.LockTTL <= 0 { + options.LockTTL = 30 * time.Second + } + if options.PublishTimeout <= 0 { + options.PublishTimeout = 3 * time.Second + } + if options.MaxRetryCount <= 0 { + options.MaxRetryCount = 10 + } + if options.InitialBackoff <= 0 { + options.InitialBackoff = 5 * time.Second + } + if options.MaxBackoff <= 0 { + options.MaxBackoff = 5 * time.Minute + } + return options +} + +func roomNoticeBackoff(retryCount int, options RoomNoticeWorkerOptions) time.Duration { + if retryCount <= 0 { + return options.InitialBackoff + } + backoff := options.InitialBackoff + for i := 1; i < retryCount; i++ { + if backoff >= options.MaxBackoff/2 { + return options.MaxBackoff + } + backoff *= 2 + } + if backoff > options.MaxBackoff { + return options.MaxBackoff + } + return backoff +} diff --git a/services/room-service/deploy/mysql/initdb/001_room_service.sql b/services/room-service/deploy/mysql/initdb/001_room_service.sql index d43a6a60..44d8fe36 100644 --- a/services/room-service/deploy/mysql/initdb/001_room_service.sql +++ b/services/room-service/deploy/mysql/initdb/001_room_service.sql @@ -14,6 +14,7 @@ CREATE TABLE IF NOT EXISTS rooms ( seat_count INT NOT NULL, mode VARCHAR(64) NOT NULL, status VARCHAR(32) NOT NULL, + room_password_hash VARCHAR(128) NOT NULL DEFAULT '', visible_region_id BIGINT NOT NULL DEFAULT 0, created_at_ms BIGINT NOT NULL, updated_at_ms BIGINT NOT NULL, @@ -33,6 +34,7 @@ CREATE TABLE IF NOT EXISTS room_list_entries ( cover_url VARCHAR(512) NOT NULL DEFAULT '', mode VARCHAR(64) NOT NULL, status VARCHAR(32) NOT NULL, + locked BOOLEAN NOT NULL DEFAULT FALSE, heat BIGINT NOT NULL DEFAULT 0, online_count INT NOT NULL DEFAULT 0, seat_count INT NOT NULL DEFAULT 0, @@ -121,6 +123,38 @@ CREATE TABLE IF NOT EXISTS room_user_feed_entries ( KEY idx_room_user_feed_list (app_code, user_id, feed_type, updated_at_ms DESC, room_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; +CREATE TABLE IF NOT EXISTS room_follows ( + app_code VARCHAR(32) NOT NULL, + user_id BIGINT NOT NULL, + room_id VARCHAR(64) NOT NULL, + status VARCHAR(32) NOT NULL, + followed_at_ms BIGINT NOT NULL, + updated_at_ms BIGINT NOT NULL, + PRIMARY KEY (app_code, user_id, room_id), + KEY idx_room_follows_user_list (app_code, user_id, status, followed_at_ms DESC, room_id), + KEY idx_room_follows_room (app_code, room_id, status) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS room_region_pins ( + id BIGINT NOT NULL AUTO_INCREMENT, + app_code VARCHAR(32) NOT NULL, + visible_region_id BIGINT NOT NULL, + room_id VARCHAR(64) NOT NULL, + weight BIGINT NOT NULL DEFAULT 0, + status VARCHAR(32) NOT NULL, + pinned_at_ms BIGINT NOT NULL, + expires_at_ms BIGINT NOT NULL, + cancelled_at_ms BIGINT NOT NULL DEFAULT 0, + created_by_admin_id BIGINT UNSIGNED NOT NULL DEFAULT 0, + cancelled_by_admin_id BIGINT UNSIGNED NOT NULL DEFAULT 0, + created_at_ms BIGINT NOT NULL, + updated_at_ms BIGINT NOT NULL, + PRIMARY KEY (id), + UNIQUE KEY uk_room_region_pins_room (app_code, visible_region_id, room_id), + KEY idx_room_region_pins_active (app_code, visible_region_id, status, expires_at_ms, weight DESC, room_id), + KEY idx_room_region_pins_room (app_code, room_id, status) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + CREATE TABLE IF NOT EXISTS room_seat_configs ( app_code VARCHAR(32) NOT NULL, allowed_seat_counts VARCHAR(128) NOT NULL, diff --git a/services/room-service/internal/integration/tencent_im.go b/services/room-service/internal/integration/tencent_im.go index 4fabfe55..d5d3b6ab 100644 --- a/services/room-service/internal/integration/tencent_im.go +++ b/services/room-service/internal/integration/tencent_im.go @@ -185,6 +185,15 @@ func roomEventFromEnvelope(envelope *roomeventsv1.EventEnvelope) (tencentim.Room base.ActorUserID = body.GetActorUserId() base.Attributes = map[string]string{"enabled": fmt.Sprintf("%t", body.GetEnabled())} return base, true, nil + case "RoomPasswordChanged": + // 锁房事件只广播布尔状态,密码明文和哈希都不会进入 IM 自定义消息。 + var body roomeventsv1.RoomPasswordChanged + if err := proto.Unmarshal(envelope.GetBody(), &body); err != nil { + return tencentim.RoomEvent{}, false, err + } + base.ActorUserID = body.GetActorUserId() + base.Attributes = map[string]string{"locked": fmt.Sprintf("%t", body.GetLocked())} + return base, true, nil case "RoomAdminChanged": // 管理员变更进入系统消息,客户端收到后仍应以最新 snapshot 修正本地权限 UI。 var body roomeventsv1.RoomAdminChanged @@ -259,6 +268,8 @@ func eventTypeForClient(eventType string) string { return "room_profile_updated" case "RoomChatEnabledChanged": return "room_chat_enabled_changed" + case "RoomPasswordChanged": + return "room_password_changed" case "RoomAdminChanged": return "room_admin_changed" case "RoomUserMuted": diff --git a/services/room-service/internal/room/command/command.go b/services/room-service/internal/room/command/command.go index 46887eab..c8294d32 100644 --- a/services/room-service/internal/room/command/command.go +++ b/services/room-service/internal/room/command/command.go @@ -241,6 +241,20 @@ type SetChatEnabled struct { // Type 返回命令类型。 func (SetChatEnabled) Type() string { return "set_chat_enabled" } +// SetRoomPassword 定义房主设置或清空入房密码的请求。 +type SetRoomPassword struct { + Base + // Locked 为 false 表示清空密码;true 表示开启入房密码校验。 + Locked bool `json:"locked"` + // Password 只在当前进程内参与 command_id 冲突判断,序列化时必须省略,避免明文进入 command log。 + Password string `json:"-"` + // PasswordHash 是服务端生成的密码哈希,command log 不能保存客户端明文。 + PasswordHash string `json:"password_hash,omitempty"` +} + +// Type 返回命令类型。 +func (SetRoomPassword) Type() string { return "set_room_password" } + // SetRoomAdmin 定义添加或移除管理员请求。 type SetRoomAdmin struct { Base @@ -360,6 +374,8 @@ func IdempotencyPayload(payload []byte) ([]byte, error) { delete(values, "gift_point_added") delete(values, "heat_value") delete(values, "price_version") + // SetRoomPassword 的哈希带随机盐;通用 payload 比较先去掉哈希,service 层再用 transient 明文和已存 bcrypt 哈希确认是否同一密码。 + delete(values, "password_hash") // MicUp 的发流确认 deadline 由 room-service 生成,客户端重试同一 command_id 时不能因此冲突。 delete(values, "publish_deadline_ms") @@ -400,6 +416,8 @@ func Deserialize(commandType string, payload []byte) (Command, error) { cmd = &SetMicSeatLock{} case SetChatEnabled{}.Type(): cmd = &SetChatEnabled{} + case SetRoomPassword{}.Type(): + cmd = &SetRoomPassword{} case SetRoomAdmin{}.Type(): cmd = &SetRoomAdmin{} case MuteUser{}.Type(): diff --git a/services/room-service/internal/room/service/create_room.go b/services/room-service/internal/room/service/create_room.go index a985a803..26028077 100644 --- a/services/room-service/internal/room/service/create_room.go +++ b/services/room-service/internal/room/service/create_room.go @@ -188,14 +188,15 @@ func (s *Service) CreateRoom(ctx context.Context, req *roomv1.CreateRoomRequest) // 首次创建按 meta -> command log -> outbox -> snapshot 的顺序落盘,保证恢复有基础元数据和首版本命令。 saveMetaStartedAt := time.Now() if err := s.repository.SaveRoomMeta(ctx, RoomMeta{ - AppCode: cmd.AppCode, - RoomID: cmd.RoomID(), - OwnerUserID: cmd.OwnerUserID, - SeatCount: cmd.SeatCount, - Mode: cmd.Mode, - Status: state.RoomStatusActive, - VisibleRegionID: cmd.VisibleRegionID, - RoomShortID: cmd.RoomShortID, + AppCode: cmd.AppCode, + RoomID: cmd.RoomID(), + OwnerUserID: cmd.OwnerUserID, + SeatCount: cmd.SeatCount, + Mode: cmd.Mode, + Status: state.RoomStatusActive, + RoomPasswordHash: "", + VisibleRegionID: cmd.VisibleRegionID, + RoomShortID: cmd.RoomShortID, }); err != nil { return nil, err } diff --git a/services/room-service/internal/room/service/current_room.go b/services/room-service/internal/room/service/current_room.go index 75737e0d..74aa54c1 100644 --- a/services/room-service/internal/room/service/current_room.go +++ b/services/room-service/internal/room/service/current_room.go @@ -32,9 +32,11 @@ func (s *Service) GetCurrentRoom(ctx context.Context, req *roomv1.GetCurrentRoom return nil, err } if !exists { + // 没有用户当前房间投影时直接返回空结果,不扫描房间列表或所有 Room Cell。 return emptyCurrentRoomResponse(serverTimeMS), nil } + // presence 只是恢复入口的索引,必须用 Room Cell 快照确认房间仍 active 且用户仍在房间内。 snapshot, err := s.currentSnapshot(ctx, presence.RoomID) if err != nil { return nil, err @@ -54,6 +56,7 @@ func (s *Service) GetCurrentRoom(ctx context.Context, req *roomv1.GetCurrentRoom micSessionID := "" needRTCToken := false if seat != nil { + // 上麦用户回前台需要 RTC token 恢复媒体链路;普通房间用户只需要重新加 IM 群。 publishState = seat.GetPublishState() micSessionID = seat.GetMicSessionId() needRTCToken = publishState == state.MicPublishPending || publishState == state.MicPublishPublishing @@ -72,15 +75,19 @@ func (s *Service) GetCurrentRoom(ctx context.Context, req *roomv1.GetCurrentRoom }, nil } +// emptyCurrentRoomResponse 保留 server_time_ms,方便客户端用同一套时钟校正逻辑处理空结果。 func emptyCurrentRoomResponse(serverTimeMS int64) *roomv1.GetCurrentRoomResponse { return &roomv1.GetCurrentRoomResponse{ServerTimeMs: serverTimeMS} } +// currentRoomSnapshotRestorable 判定读模型指向的房间是否仍可被客户端恢复。 func currentRoomSnapshotRestorable(snapshot *roomv1.RoomSnapshot, userID int64) bool { if snapshot == nil || snapshot.GetRoomId() == "" || snapshot.GetStatus() != state.RoomStatusActive { + // 非 active 房间不能恢复,即使用户级 presence 投影还没被清理。 return false } if containsUserID(snapshot.GetBanUserIds(), userID) { + // ban 优先于旧 presence,避免被踢用户通过本地恢复入口重新收消息。 return false } return findProtoUser(snapshot, userID) != nil @@ -102,11 +109,14 @@ func (s *Service) projectRoomPresenceBestEffort(ctx context.Context, snapshot *r } } +// roomPresenceProjectionFromSnapshot 把 Room Cell 快照压缩成用户当前房间读模型。 +// 读模型只保存恢复入口需要的字段,不复制完整 RoomState,也不作为权限权威来源。 func roomPresenceProjectionFromSnapshot(snapshot *roomv1.RoomSnapshot, updatedAtMS int64) RoomPresenceSnapshot { if snapshot == nil || snapshot.GetRoomId() == "" { return RoomPresenceSnapshot{} } + // 先按 user_id 建立麦位索引,投影用户时能补齐发流状态而不做双层循环。 seatsByUser := make(map[int64]*roomv1.SeatState, len(snapshot.GetMicSeats())) for _, seat := range snapshot.GetMicSeats() { if seat.GetUserId() > 0 { @@ -116,6 +126,7 @@ func roomPresenceProjectionFromSnapshot(snapshot *roomv1.RoomSnapshot, updatedAt users := make([]RoomPresence, 0, len(snapshot.GetOnlineUsers())) if snapshot.GetStatus() == state.RoomStatusActive { + // 只有 active 房间才投影 active 用户;关闭房间通过空 users 让 repository 收敛旧 presence。 for _, user := range snapshot.GetOnlineUsers() { if user.GetUserId() <= 0 { continue @@ -131,6 +142,7 @@ func roomPresenceProjectionFromSnapshot(snapshot *roomv1.RoomSnapshot, updatedAt UpdatedAtMS: updatedAtMS, } if seat := seatsByUser[user.GetUserId()]; seat != nil { + // 发流状态只对当前上麦用户有意义,非上麦用户保持空字段。 entry.PublishState = seat.GetPublishState() entry.MicSessionID = seat.GetMicSessionId() } @@ -148,6 +160,7 @@ func roomPresenceProjectionFromSnapshot(snapshot *roomv1.RoomSnapshot, updatedAt } } +// containsUserID 是当前房间恢复入口的本地集合查询,独立保留便于后续替换为二分查找。 func containsUserID(values []int64, target int64) bool { return slices.Contains(values, target) } diff --git a/services/room-service/internal/room/service/follow.go b/services/room-service/internal/room/service/follow.go new file mode 100644 index 00000000..2d07e195 --- /dev/null +++ b/services/room-service/internal/room/service/follow.go @@ -0,0 +1,85 @@ +package service + +import ( + "context" + "strings" + + roomv1 "hyapp.local/api/proto/room/v1" + "hyapp/pkg/roomid" + "hyapp/pkg/xerr" +) + +// FollowRoom 建立当前用户对房间的关注关系。 +// 关注关系是用户个性化读模型事实,不改变 Room Cell 核心状态,也不需要 Redis lease 串行化。 +func (s *Service) FollowRoom(ctx context.Context, req *roomv1.FollowRoomRequest) (*roomv1.FollowRoomResponse, error) { + ctx = contextFromMeta(ctx, req.GetMeta()) + roomID, userID, err := normalizeRoomFollowInput(req.GetMeta(), req.GetRoomId(), req.GetUserId()) + if err != nil { + return nil, err + } + + meta, exists, err := s.repository.GetRoomMeta(ctx, roomID) + if err != nil { + return nil, err + } + if !exists { + return nil, xerr.New(xerr.NotFound, "room not found") + } + if isClosedRoomStatus(meta.Status) { + // 已关闭房间不再建立新的关注关系;历史关注仍可通过 UnfollowRoom 幂等取消。 + return nil, xerr.New(xerr.RoomClosed, "room closed") + } + + nowMS := s.clock.Now().UnixMilli() + record, err := s.repository.FollowRoom(ctx, userID, roomID, nowMS) + if err != nil { + return nil, err + } + + return &roomv1.FollowRoomResponse{ + RoomId: roomID, + Followed: true, + FollowedAtMs: record.FollowedAtMS, + ServerTimeMs: nowMS, + }, nil +} + +// UnfollowRoom 取消当前用户对房间的关注关系。 +// 未关注或历史房间已关闭都按幂等成功处理,方便客户端在本地状态不确定时直接收敛。 +func (s *Service) UnfollowRoom(ctx context.Context, req *roomv1.UnfollowRoomRequest) (*roomv1.UnfollowRoomResponse, error) { + ctx = contextFromMeta(ctx, req.GetMeta()) + roomID, userID, err := normalizeRoomFollowInput(req.GetMeta(), req.GetRoomId(), req.GetUserId()) + if err != nil { + return nil, err + } + + nowMS := s.clock.Now().UnixMilli() + if err := s.repository.UnfollowRoom(ctx, userID, roomID, nowMS); err != nil { + return nil, err + } + + return &roomv1.UnfollowRoomResponse{ + RoomId: roomID, + Followed: false, + ServerTimeMs: nowMS, + }, nil +} + +func normalizeRoomFollowInput(meta *roomv1.RequestMeta, rawRoomID string, userID int64) (string, int64, error) { + roomID := strings.TrimSpace(rawRoomID) + metaRoomID := strings.TrimSpace(meta.GetRoomId()) + if roomID == "" { + roomID = metaRoomID + } + if metaRoomID != "" && roomID != metaRoomID { + // meta.room_id 是链路和审计字段;与 body/path room_id 不一致时必须拒绝,避免写错关系。 + return "", 0, xerr.New(xerr.InvalidArgument, "room_id is invalid") + } + if !roomid.ValidStringID(roomID) { + return "", 0, xerr.New(xerr.InvalidArgument, "room_id is invalid") + } + if userID <= 0 { + return "", 0, xerr.New(xerr.InvalidArgument, "user_id is required") + } + return roomID, userID, nil +} diff --git a/services/room-service/internal/room/service/follow_test.go b/services/room-service/internal/room/service/follow_test.go new file mode 100644 index 00000000..6d91317a --- /dev/null +++ b/services/room-service/internal/room/service/follow_test.go @@ -0,0 +1,128 @@ +package service_test + +import ( + "context" + "testing" + "time" + + roomv1 "hyapp.local/api/proto/room/v1" + walletv1 "hyapp.local/api/proto/wallet/v1" + "hyapp/pkg/appcode" + "hyapp/services/room-service/internal/integration" + roomservice "hyapp/services/room-service/internal/room/service" + "hyapp/services/room-service/internal/router" + "hyapp/services/room-service/internal/testutil/mysqltest" +) + +type followTestWallet struct{} + +func (followTestWallet) DebitGift(context.Context, *walletv1.DebitGiftRequest) (*walletv1.DebitGiftResponse, error) { + return &walletv1.DebitGiftResponse{BillingReceiptId: "receipt-follow-test"}, nil +} + +func TestRoomFollowAffectsSnapshotAndFollowedFeed(t *testing.T) { + ctx := context.Background() + repository := mysqltest.NewRepository(t) + svc := roomservice.New(roomservice.Config{ + NodeID: "node-follow-test", + LeaseTTL: 10 * time.Second, + RankLimit: 20, + SnapshotEveryN: 1, + }, router.NewMemoryDirectory(), repository, followTestWallet{}, integration.NewNoopRoomEventPublisher(), integration.NewNoopOutboxPublisher()) + + roomID := "room-follow-flow" + ownerID := int64(1001) + viewerID := int64(2002) + if _, err := svc.CreateRoom(ctx, &roomv1.CreateRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, ownerID), + SeatCount: 10, + Mode: "voice", + VisibleRegionId: 1001, + RoomName: "Follow Flow", + RoomShortId: "follow-flow", + }); err != nil { + t.Fatalf("create room failed: %v", err) + } + if _, err := svc.JoinRoom(ctx, &roomv1.JoinRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, viewerID), + Role: "audience", + }); err != nil { + t.Fatalf("join room failed: %v", err) + } + + beforeFollow, err := svc.GetRoomSnapshot(ctx, &roomv1.GetRoomSnapshotRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default, RoomId: roomID}, + RoomId: roomID, + ViewerUserId: viewerID, + }) + if err != nil { + t.Fatalf("snapshot before follow failed: %v", err) + } + if beforeFollow.GetIsFollowed() { + t.Fatalf("new viewer must not be followed before FollowRoom") + } + + followResp, err := svc.FollowRoom(ctx, &roomv1.FollowRoomRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default, RoomId: roomID}, + RoomId: roomID, + UserId: viewerID, + }) + if err != nil { + t.Fatalf("follow room failed: %v", err) + } + if !followResp.GetFollowed() || followResp.GetFollowedAtMs() <= 0 { + t.Fatalf("follow response mismatch: %+v", followResp) + } + + afterFollow, err := svc.GetRoomSnapshot(ctx, &roomv1.GetRoomSnapshotRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default, RoomId: roomID}, + RoomId: roomID, + ViewerUserId: viewerID, + }) + if err != nil { + t.Fatalf("snapshot after follow failed: %v", err) + } + if !afterFollow.GetIsFollowed() { + t.Fatalf("snapshot must expose is_followed=true after FollowRoom") + } + + feedResp, err := svc.ListRoomFeeds(ctx, &roomv1.ListRoomFeedsRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default}, + ViewerUserId: viewerID, + VisibleRegionId: 1001, + Tab: "followed", + Limit: 20, + }) + if err != nil { + t.Fatalf("followed feed failed: %v", err) + } + if len(feedResp.GetRooms()) != 1 || feedResp.GetRooms()[0].GetRoomId() != roomID { + t.Fatalf("followed feed must return followed room: %+v", feedResp.GetRooms()) + } + + unfollowResp, err := svc.UnfollowRoom(ctx, &roomv1.UnfollowRoomRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default, RoomId: roomID}, + RoomId: roomID, + UserId: viewerID, + }) + if err != nil { + t.Fatalf("unfollow room failed: %v", err) + } + if unfollowResp.GetFollowed() { + t.Fatalf("unfollow response mismatch: %+v", unfollowResp) + } + + emptyFeedResp, err := svc.ListRoomFeeds(ctx, &roomv1.ListRoomFeedsRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default}, + ViewerUserId: viewerID, + VisibleRegionId: 1001, + Tab: "followed", + Limit: 20, + }) + if err != nil { + t.Fatalf("followed feed after unfollow failed: %v", err) + } + if len(emptyFeedResp.GetRooms()) != 0 { + t.Fatalf("followed feed must be empty after UnfollowRoom: %+v", emptyFeedResp.GetRooms()) + } +} diff --git a/services/room-service/internal/room/service/helpers.go b/services/room-service/internal/room/service/helpers.go index 2cfda7f1..b2814dfc 100644 --- a/services/room-service/internal/room/service/helpers.go +++ b/services/room-service/internal/room/service/helpers.go @@ -15,8 +15,10 @@ import ( ) type loadedRoomRef struct { + // AppCode 是运行态 Cell 所属租户,后台 worker 必须用它恢复 ctx。 AppCode string - RoomID string + // RoomID 是已装载 Room Cell 的业务房间 ID。 + RoomID string } func (s *Service) installCell(ctx context.Context, roomID string, roomCell *cell.RoomCell) { @@ -50,6 +52,7 @@ func (s *Service) loadedRoomRefs() []loadedRoomRef { func runtimeRoomKey(appCode string, roomID string) string { appCode = appcode.Normalize(appCode) + // 使用 NUL 分隔 app_code 和 room_id,避免普通字符串拼接出现歧义。 return appCode + "\x00" + roomID } @@ -60,10 +63,12 @@ func RuntimeRoomKey(appCode string, roomID string) string { } func runtimeRoomKeyFromContext(ctx context.Context, roomID string) string { + // 命令入口统一从 ctx 读取 app_code,避免 service 方法忘记把租户键传给 Redis lease。 return runtimeRoomKey(appcode.FromContext(ctx), roomID) } func (s *Service) loadedRoomLease(ctx context.Context, roomRef loadedRoomRef, now time.Time) (router.Lease, bool, error) { + // 后台 worker 通过 EnsureOwner 续租当前 Cell,不能在没有 lease 的情况下读取旧内存态。 lease, err := s.directory.EnsureOwner(ctx, runtimeRoomKey(roomRef.AppCode, roomRef.RoomID), s.nodeID, now, s.leaseTTL) if err != nil { return router.Lease{}, false, err @@ -78,10 +83,12 @@ func (s *Service) loadedRoomLease(ctx context.Context, roomRef loadedRoomRef, no } func (s *Service) verifyLoadedRoomLease(ctx context.Context, roomRef loadedRoomRef, lease router.Lease, now time.Time) (bool, error) { + // 使用同一个 lease token 做 fencing 校验,防止 worker 批处理期间 owner 已经切走。 return s.directory.VerifyOwner(ctx, runtimeRoomKey(roomRef.AppCode, roomRef.RoomID), s.nodeID, lease.LeaseToken, now) } func runtimeRoomRef(key string) loadedRoomRef { + // runtime key 是内部格式;解析失败时保留 room_id,便于旧测试数据仍能被安全跳过或排查。 for index := 0; index < len(key); index++ { if key[index] == 0 { return loadedRoomRef{AppCode: appcode.Normalize(key[:index]), RoomID: key[index+1:]} diff --git a/services/room-service/internal/room/service/kick_test.go b/services/room-service/internal/room/service/kick_test.go new file mode 100644 index 00000000..a21d6172 --- /dev/null +++ b/services/room-service/internal/room/service/kick_test.go @@ -0,0 +1,108 @@ +package service_test + +import ( + "context" + "testing" + "time" + + roomv1 "hyapp.local/api/proto/room/v1" + "hyapp/pkg/appcode" + "hyapp/services/room-service/internal/integration" + roomservice "hyapp/services/room-service/internal/room/service" + "hyapp/services/room-service/internal/router" + "hyapp/services/room-service/internal/testutil/mysqltest" +) + +type fakeRTCUserRemover struct { + roomID string + userID int64 +} + +func (r *fakeRTCUserRemover) RemoveUserByStrRoomID(_ context.Context, roomID string, userID int64) error { + r.roomID = roomID + r.userID = userID + return nil +} + +func TestKickUserRemovesPresenceBanAndRTCConnection(t *testing.T) { + ctx := context.Background() + repository := mysqltest.NewRepository(t) + rtc := &fakeRTCUserRemover{} + svc := roomservice.New(roomservice.Config{ + NodeID: "node-kick-test", + LeaseTTL: 10 * time.Second, + RankLimit: 20, + SnapshotEveryN: 1, + RTCUserRemover: rtc, + }, router.NewMemoryDirectory(), repository, followTestWallet{}, integration.NewNoopRoomEventPublisher(), integration.NewNoopOutboxPublisher()) + + roomID := "room-kick-flow" + ownerID := int64(7101) + viewerID := int64(7201) + if _, err := svc.CreateRoom(ctx, &roomv1.CreateRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, ownerID), + SeatCount: 10, + Mode: "voice", + VisibleRegionId: 8101, + RoomName: "Kick Flow", + RoomShortId: "kick-flow", + }); err != nil { + t.Fatalf("create kick room fixture failed: %v", err) + } + if _, err := svc.JoinRoom(ctx, &roomv1.JoinRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, viewerID), + Role: "audience", + }); err != nil { + t.Fatalf("join kick target failed: %v", err) + } + + kickResp, err := svc.KickUser(ctx, &roomv1.KickUserRequest{ + Meta: roomservice.NewRequestMeta(roomID, ownerID), + TargetUserId: viewerID, + }) + if err != nil { + t.Fatalf("kick user failed: %v", err) + } + if !kickResp.GetRtcKicked() || kickResp.GetRtcKickError() != "" || rtc.roomID != roomID || rtc.userID != viewerID { + t.Fatalf("kick must remove RTC user after Room Cell commit: resp=%+v rtc=%+v", kickResp, rtc) + } + if !containsInt64(kickResp.GetRoom().GetBanUserIds(), viewerID) || findRoomUser(kickResp.GetRoom(), viewerID) != nil { + t.Fatalf("kick response must ban and remove target presence: %+v", kickResp.GetRoom()) + } + + presenceResp, err := svc.VerifyRoomPresence(ctx, &roomv1.VerifyRoomPresenceRequest{ + AppCode: appcode.Default, + RoomId: roomID, + UserId: viewerID, + }) + if err != nil { + t.Fatalf("verify room presence after kick failed: %v", err) + } + if presenceResp.GetPresent() || presenceResp.GetReason() != "user_banned" { + t.Fatalf("kicked user must not pass IM presence guard: %+v", presenceResp) + } + if _, err := svc.JoinRoom(ctx, &roomv1.JoinRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, viewerID), + Role: "audience", + }); err == nil { + t.Fatalf("kicked user must not join before unban") + } +} + +func findRoomUser(snapshot *roomv1.RoomSnapshot, userID int64) *roomv1.RoomUser { + for _, user := range snapshot.GetOnlineUsers() { + if user.GetUserId() == userID { + return user + } + } + return nil +} + +func containsInt64(values []int64, target int64) bool { + for _, value := range values { + if value == target { + return true + } + } + return false +} diff --git a/services/room-service/internal/room/service/lifecycle.go b/services/room-service/internal/room/service/lifecycle.go index 7654eed7..a68085f2 100644 --- a/services/room-service/internal/room/service/lifecycle.go +++ b/services/room-service/internal/room/service/lifecycle.go @@ -20,10 +20,12 @@ func (s *Service) requireRoomOpenForEntry(ctx context.Context, roomID string) er if err != nil || !closed { return err } + // 进房入口使用专门错误码,gateway 可以稳定映射成客户端房间关闭态。 return xerr.New(xerr.RoomClosed, "room closed") } func (s *Service) isRoomClosed(ctx context.Context, roomID string) (bool, error) { + // 关闭状态先读 rooms 元数据,避免为了拒绝进房恢复完整 Room Cell。 roomMeta, exists, err := s.repository.GetRoomMeta(ctx, roomID) if err != nil || !exists { return false, err @@ -33,6 +35,7 @@ func (s *Service) isRoomClosed(ctx context.Context, roomID string) (bool, error) func isClosedRoomStatus(status string) bool { value := strings.TrimSpace(status) + // 空状态兼容测试构造;非 active 一律按不可进入处理,closing 也不接收新用户。 return value != "" && !strings.EqualFold(value, state.RoomStatusActive) } @@ -52,9 +55,11 @@ func (s *Service) CloseRoom(ctx context.Context, req *roomv1.CloseRoomRequest) ( return mutationResult{}, nil, xerr.New(xerr.NotFound, "room not found") } if current.Status == state.RoomStatusClosed { + // 关房命令幂等,重复请求只返回当前关闭快照,不重复写 RoomClosed 事件。 return mutationResult{snapshot: current.ToProto()}, nil, nil } if current.Status != state.RoomStatusActive && current.Status != state.RoomStatusClosing { + // creating 等非开放状态不允许用 CloseRoom 直接跳过创建收尾语义。 return mutationResult{}, nil, xerr.New(xerr.Conflict, "room is not active") } if err := requireOwnerPresent(current, cmd.ActorUserID()); err != nil { @@ -69,6 +74,7 @@ func (s *Service) CloseRoom(ctx context.Context, req *roomv1.CloseRoomRequest) ( occupiedSeats := make([]occupiedMicSeat, 0, len(current.MicSeats)) for _, seat := range current.MicSeats { if seat.UserID != 0 && seat.MicSessionID != "" { + // 清场前先保存占麦会话,后续 ClearMicSession 会抹掉 mic_session_id。 occupiedSeats = append(occupiedSeats, occupiedMicSeat{ userID: seat.UserID, seatNo: seat.SeatNo, @@ -77,6 +83,7 @@ func (s *Service) CloseRoom(ctx context.Context, req *roomv1.CloseRoomRequest) ( } } + // 关房是 Room Cell 的终态变更,presence 和麦位都在同一版本下清空。 current.Status = state.RoomStatusClosed current.OnlineUsers = map[int64]*state.RoomUserState{} for index := range current.MicSeats { diff --git a/services/room-service/internal/room/service/list.go b/services/room-service/internal/room/service/list.go index 6bc1d27d..d1c76c99 100644 --- a/services/room-service/internal/room/service/list.go +++ b/services/room-service/internal/room/service/list.go @@ -19,6 +19,7 @@ const ( roomListTabVisited = "visited" roomListTabFriend = "friend" roomListTabFollowing = "following" + roomListTabFollowed = "followed" defaultRoomListLimit = 20 maxRoomListLimit = 50 maxRoomListQueryRunes = 64 @@ -33,6 +34,9 @@ type roomListCursor struct { CreatedAtMS int64 `json:"created_at_ms,omitempty"` UpdatedAtMS int64 `json:"updated_at_ms,omitempty"` SubjectUserID int64 `json:"subject_user_id,omitempty"` + Pinned bool `json:"pinned,omitempty"` + PinWeight int64 `json:"pin_weight,omitempty"` + PinnedUntilMS int64 `json:"pinned_until_ms,omitempty"` RoomID string `json:"room_id"` } @@ -61,14 +65,18 @@ func (s *Service) ListRooms(ctx context.Context, req *roomv1.ListRoomsRequest) ( } entries, err := s.repository.ListRoomListEntries(ctx, RoomListQuery{ - AppCode: appcode.FromContext(ctx), - VisibleRegionID: normalizeVisibleRegionID(req.GetVisibleRegionId()), - Tab: tab, - Query: query, - Limit: limit + 1, - CursorSortScore: cursor.SortScore, - CursorCreatedAtMS: cursor.CreatedAtMS, - CursorRoomID: cursor.RoomID, + AppCode: appcode.FromContext(ctx), + VisibleRegionID: normalizeVisibleRegionID(req.GetVisibleRegionId()), + Tab: tab, + Query: query, + Limit: limit + 1, + CursorSortScore: cursor.SortScore, + CursorCreatedAtMS: cursor.CreatedAtMS, + CursorRoomID: cursor.RoomID, + CursorPinned: cursor.Pinned, + CursorPinWeight: cursor.PinWeight, + CursorPinnedUntilMS: cursor.PinnedUntilMS, + NowMS: s.clock.Now().UnixMilli(), }) if err != nil { return nil, err @@ -77,7 +85,7 @@ func (s *Service) ListRooms(ctx context.Context, req *roomv1.ListRoomsRequest) ( return roomListResponseFromEntries(tab, query, entries, limit), nil } -// ListRoomFeeds 查询 Mine 页 visited/friend/following 用户房间流。 +// ListRoomFeeds 查询 Mine 页 visited/friend/following/followed 房间流。 func (s *Service) ListRoomFeeds(ctx context.Context, req *roomv1.ListRoomFeedsRequest) (*roomv1.ListRoomsResponse, error) { ctx = appcode.WithContext(ctx, req.GetMeta().GetAppCode()) viewerUserID := req.GetViewerUserId() @@ -100,12 +108,13 @@ func (s *Service) ListRoomFeeds(ctx context.Context, req *roomv1.ListRoomFeedsRe if err != nil { return nil, err } - if tab != roomListTabVisited && strings.TrimSpace(req.GetCursor()) != "" && cursor.SubjectUserID <= 0 { + if roomFeedTabRequiresRelationCursor(tab) && strings.TrimSpace(req.GetCursor()) != "" && cursor.SubjectUserID <= 0 { return nil, xerr.New(xerr.InvalidArgument, "cursor is invalid") } var entries []RoomListEntry - if tab == roomListTabVisited { + switch tab { + case roomListTabVisited: entries, err = s.repository.ListRoomUserFeedEntries(ctx, RoomUserFeedQuery{ AppCode: appcode.FromContext(ctx), UserID: viewerUserID, @@ -116,7 +125,17 @@ func (s *Service) ListRoomFeeds(ctx context.Context, req *roomv1.ListRoomFeedsRe CursorUpdatedAtMS: cursor.UpdatedAtMS, CursorRoomID: cursor.RoomID, }) - } else { + case roomListTabFollowed: + entries, err = s.repository.ListRoomFollowEntries(ctx, RoomFollowQuery{ + AppCode: appcode.FromContext(ctx), + UserID: viewerUserID, + VisibleRegionID: normalizeVisibleRegionID(req.GetVisibleRegionId()), + Query: query, + Limit: limit + 1, + CursorFollowedAtMS: cursor.UpdatedAtMS, + CursorRoomID: cursor.RoomID, + }) + default: // friend/following 的关系事实属于 user-service;room-service 只根据 gateway 传入的一页关系用户查询 active 房间卡片。 entries, err = s.repository.ListRoomRelatedFeedEntries(ctx, RoomRelatedFeedQuery{ AppCode: appcode.FromContext(ctx), @@ -177,6 +196,7 @@ func roomListResponseFromEntries(tab string, query string, entries []RoomListEnt items := make([]*roomv1.RoomListItem, 0, len(entries)) for _, entry := range entries { + // response 只暴露列表卡片字段,不把 repository 的 cursor 辅助字段泄露给客户端。 items = append(items, roomListItemToProto(entry)) } @@ -187,6 +207,7 @@ func roomListResponseFromEntries(tab string, query string, entries []RoomListEnt } func roomFeedRelatedUsersFromProto(items []*roomv1.RoomFeedRelatedUser) []RoomFeedRelatedUser { + // gateway 已做关系授权,room-service 这里只过滤无效项并保持输入顺序供 repository 排序使用。 relatedUsers := make([]RoomFeedRelatedUser, 0, len(items)) for _, item := range items { if item == nil || item.GetUserId() <= 0 || item.GetRelationUpdatedAtMs() <= 0 { @@ -233,10 +254,12 @@ func roomListEntryFromSnapshot(snapshot *roomv1.RoomSnapshot, visibleRegionID in occupiedSeatCount := int32(0) for _, seat := range snapshot.GetMicSeats() { if seat.GetUserId() != 0 { + // 列表只需要占麦数量,不暴露具体麦位用户。 occupiedSeatCount++ } } + // 展示资料仍放在 RoomExt,列表投影只在刷新时复制需要的字段。 title := snapshot.GetRoomExt()["title"] coverURL := snapshot.GetRoomExt()["cover_url"] roomShortID := snapshot.GetRoomShortId() @@ -254,6 +277,7 @@ func roomListEntryFromSnapshot(snapshot *roomv1.RoomSnapshot, visibleRegionID in CoverURL: coverURL, Mode: snapshot.GetMode(), Status: snapshot.GetStatus(), + Locked: snapshot.GetLocked(), Heat: snapshot.GetHeat(), OnlineCount: onlineCount, SeatCount: seatCount, @@ -282,6 +306,7 @@ func normalizeRoomListTab(tab string) string { } func normalizeRoomFeedTab(tab string) string { + // Mine 页房间流只允许明确 tab,避免空 tab 被误解成公共 hot 列表。 switch strings.ToLower(strings.TrimSpace(tab)) { case roomListTabVisited: return roomListTabVisited @@ -289,17 +314,25 @@ func normalizeRoomFeedTab(tab string) string { return roomListTabFriend case roomListTabFollowing: return roomListTabFollowing + case roomListTabFollowed: + return roomListTabFollowed default: return "" } } +func roomFeedTabRequiresRelationCursor(tab string) bool { + // friend/following 的排序边界包含关系用户 ID,visited/followed 只需要房间 ID 和时间。 + return tab == roomListTabFriend || tab == roomListTabFollowing +} + func normalizeRoomListQuery(query string) (string, error) { query = strings.TrimSpace(query) if query == "" { return "", nil } if len([]rune(query)) > maxRoomListQueryRunes { + // 搜索词进入 LIKE 查询,长度必须在入口收敛,避免大字符串放大数据库扫描成本。 return "", xerr.New(xerr.InvalidArgument, "query is too long") } @@ -358,6 +391,9 @@ func encodeRoomListCursor(tab string, query string, entry RoomListEntry) string CreatedAtMS: entry.CreatedAtMS, UpdatedAtMS: entry.UpdatedAtMS, SubjectUserID: entry.FeedSubjectUserID, + Pinned: entry.IsPinned, + PinWeight: entry.PinWeight, + PinnedUntilMS: entry.PinnedUntilMS, RoomID: entry.RoomID, } @@ -381,6 +417,7 @@ func roomListItemToProto(entry RoomListEntry) *roomv1.RoomListItem { CoverUrl: entry.CoverURL, Mode: entry.Mode, Status: entry.Status, + Locked: entry.Locked, Heat: entry.Heat, OnlineCount: entry.OnlineCount, SeatCount: entry.SeatCount, @@ -391,6 +428,7 @@ func roomListItemToProto(entry RoomListEntry) *roomv1.RoomListItem { func roomListEntryFromMetaAndSnapshot(meta RoomMeta, snapshot *roomv1.RoomSnapshot, nowMS int64) RoomListEntry { if snapshot == nil || snapshot.GetRoomId() == "" { + // GetMyRoom 兜底路径:即使快照暂时不可用,也能用 rooms 元数据返回“有房间”的最小卡片。 return RoomListEntry{ AppCode: meta.AppCode, RoomID: meta.RoomID, @@ -399,6 +437,7 @@ func roomListEntryFromMetaAndSnapshot(meta RoomMeta, snapshot *roomv1.RoomSnapsh OwnerUserID: meta.OwnerUserID, Mode: meta.Mode, Status: meta.Status, + Locked: meta.RoomPasswordHash != "", SeatCount: meta.SeatCount, CreatedAtMS: nowMS, UpdatedAtMS: nowMS, @@ -407,9 +446,11 @@ func roomListEntryFromMetaAndSnapshot(meta RoomMeta, snapshot *roomv1.RoomSnapsh entry := roomListEntryFromSnapshot(snapshot, meta.VisibleRegionID, nowMS) if entry.RoomShortID == "" { + // 老快照可能没有 room_short_id,rooms meta 是短号的持久兜底来源。 entry.RoomShortID = meta.RoomShortID } if entry.Mode == "" { + // mode/status/owner 都从 meta 兜底,避免快照扩展字段缺失导致 Mine 卡片不可用。 entry.Mode = meta.Mode } if entry.Status == "" { diff --git a/services/room-service/internal/room/service/lock_test.go b/services/room-service/internal/room/service/lock_test.go new file mode 100644 index 00000000..4f59bf3e --- /dev/null +++ b/services/room-service/internal/room/service/lock_test.go @@ -0,0 +1,105 @@ +package service_test + +import ( + "context" + "testing" + "time" + + roomv1 "hyapp.local/api/proto/room/v1" + "hyapp/pkg/appcode" + "hyapp/services/room-service/internal/integration" + roomservice "hyapp/services/room-service/internal/room/service" + "hyapp/services/room-service/internal/router" + "hyapp/services/room-service/internal/testutil/mysqltest" +) + +func TestRoomPasswordControlsJoinAndListLockedFlag(t *testing.T) { + ctx := context.Background() + repository := mysqltest.NewRepository(t) + svc := roomservice.New(roomservice.Config{ + NodeID: "node-lock-test", + LeaseTTL: 10 * time.Second, + RankLimit: 20, + SnapshotEveryN: 1, + }, router.NewMemoryDirectory(), repository, followTestWallet{}, integration.NewNoopRoomEventPublisher(), integration.NewNoopOutboxPublisher()) + + roomID := "room-lock-flow" + ownerID := int64(5101) + viewerID := int64(5201) + if _, err := svc.CreateRoom(ctx, &roomv1.CreateRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, ownerID), + SeatCount: 10, + Mode: "voice", + VisibleRegionId: 6101, + RoomName: "Locked Room", + RoomShortId: "lock-flow", + }); err != nil { + t.Fatalf("create locked room fixture failed: %v", err) + } + + lockMeta := roomservice.NewRequestMeta(roomID, ownerID) + lockResp, err := svc.SetRoomPassword(ctx, &roomv1.SetRoomPasswordRequest{ + Meta: lockMeta, + Locked: true, + Password: "1234", + }) + if err != nil { + t.Fatalf("set room password failed: %v", err) + } + if _, err := svc.SetRoomPassword(ctx, &roomv1.SetRoomPasswordRequest{ + Meta: lockMeta, + Locked: true, + Password: "1234", + }); err != nil { + t.Fatalf("same command id and same password should be idempotent: %v", err) + } + if _, err := svc.SetRoomPassword(ctx, &roomv1.SetRoomPasswordRequest{ + Meta: lockMeta, + Locked: true, + Password: "9999", + }); err == nil { + t.Fatalf("same command id must reject a different room password") + } + if !lockResp.GetRoom().GetLocked() { + t.Fatalf("password response must expose locked snapshot: %+v", lockResp.GetRoom()) + } + meta, exists, err := repository.GetRoomMeta(ctx, roomID) + if err != nil || !exists || meta.RoomPasswordHash == "" || meta.RoomPasswordHash == "1234" { + t.Fatalf("room meta must persist only password hash: meta=%+v exists=%t err=%v", meta, exists, err) + } + + listResp, err := svc.ListRooms(ctx, &roomv1.ListRoomsRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default}, + ViewerUserId: viewerID, + VisibleRegionId: 6101, + Tab: "hot", + Limit: 20, + Query: "lock-flow", + }) + if err != nil { + t.Fatalf("list locked room failed: %v", err) + } + if len(listResp.GetRooms()) != 1 || !listResp.GetRooms()[0].GetLocked() { + t.Fatalf("list/search must return locked flag: %+v", listResp.GetRooms()) + } + + if _, err := svc.JoinRoom(ctx, &roomv1.JoinRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, viewerID), + Role: "audience", + Password: "wrong", + }); err == nil { + t.Fatalf("wrong password must not join locked room") + } + + joinResp, err := svc.JoinRoom(ctx, &roomv1.JoinRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, viewerID), + Role: "audience", + Password: "1234", + }) + if err != nil { + t.Fatalf("correct password should join locked room: %v", err) + } + if joinResp.GetUser().GetUserId() != viewerID || !joinResp.GetRoom().GetLocked() { + t.Fatalf("join response mismatch: user=%+v room=%+v", joinResp.GetUser(), joinResp.GetRoom()) + } +} diff --git a/services/room-service/internal/room/service/mic_publish_timeout.go b/services/room-service/internal/room/service/mic_publish_timeout.go index de7bc11e..25e23784 100644 --- a/services/room-service/internal/room/service/mic_publish_timeout.go +++ b/services/room-service/internal/room/service/mic_publish_timeout.go @@ -37,20 +37,24 @@ func (s *Service) SweepMicPublishTimeouts(ctx context.Context) error { now := s.clock.Now() nowMs := now.UnixMilli() for _, roomRef := range s.loadedRoomRefs() { + // 后台扫描只处理本进程已装载的 Cell,未装载房间由下一次用户命令恢复后再处理。 roomCtx := appcode.WithContext(ctx, roomRef.AppCode) lease, owned, err := s.loadedRoomLease(roomCtx, roomRef, now) if err != nil { return err } if !owned { + // lease 已被其他节点持有时,旧 owner 的内存状态不能再驱动下麦命令。 continue } roomCell := s.loadCell(roomCtx, roomRef.RoomID) if roomCell == nil { + // loadedRoomRefs 和 loadCell 之间允许并发变化,缺失时跳过即可。 continue } + // 先在命令边界读取快照,再根据快照筛出候选超时麦位。 currentState, _, err := roomCell.Snapshot(roomCtx) if err != nil { return err @@ -64,6 +68,7 @@ func (s *Service) SweepMicPublishTimeouts(ctx context.Context) error { } for _, seat := range pendingPublishTimedOutSeats(currentState, nowMs) { + // 每个候选执行前再次校验 lease,避免长批次期间 owner 已切换还继续写旧状态。 owned, err = s.verifyLoadedRoomLease(roomCtx, roomRef, lease, s.clock.Now()) if err != nil { return err @@ -72,6 +77,7 @@ func (s *Service) SweepMicPublishTimeouts(ctx context.Context) error { break } + // 通过标准 MicDown 命令链路释放麦位,复用 command log、outbox、快照和幂等保护。 cmd := command.MicDown{ Base: command.Base{ RequestID: idgen.New("req_mic_publish_timeout"), @@ -95,6 +101,7 @@ func (s *Service) SweepMicPublishTimeouts(ctx context.Context) error { return nil } +// pendingPublishTimedOutSeats 返回已经超过确认 deadline 的 pending_publish 麦位快照。 func pendingPublishTimedOutSeats(current *state.RoomState, nowMs int64) []state.MicSeat { if current == nil { return nil @@ -103,6 +110,7 @@ func pendingPublishTimedOutSeats(current *state.RoomState, nowMs int64) []state. seats := make([]state.MicSeat, 0) for _, seat := range current.MicSeats { if seat.UserID <= 0 || seat.MicSessionID == "" { + // 空麦位或没有 mic_session 的历史状态不属于自动下麦目标。 continue } if seat.PublishState == state.MicPublishPending && seat.PublishDeadlineMS > 0 && seat.PublishDeadlineMS <= nowMs { diff --git a/services/room-service/internal/room/service/moderation.go b/services/room-service/internal/room/service/moderation.go index 473101d8..0839fdb9 100644 --- a/services/room-service/internal/room/service/moderation.go +++ b/services/room-service/internal/room/service/moderation.go @@ -96,6 +96,7 @@ func (s *Service) KickUser(ctx context.Context, req *roomv1.KickUserRequest) (*r TargetUserID: req.GetTargetUserId(), } + shouldKickRTC := false result, err := s.mutateRoom(ctx, cmd, true, func(now time.Time, current *state.RoomState, _ *rank.LocalRank) (mutationResult, []outbox.Record, error) { if err := requireActiveRoom(current); err != nil { return mutationResult{}, nil, err @@ -119,6 +120,8 @@ func (s *Service) KickUser(ctx context.Context, req *roomv1.KickUserRequest) (*r // 已处于 ban 且没有残留 presence、麦位或管理员身份时,重复 KickUser 不产生新事件。 return mutationResult{snapshot: current.ToProto()}, nil, nil } + // 只有目标确实还在业务房间或麦位上,才需要请求 TRTC 服务端移除实时音频连接。 + shouldKickRTC = inRoom || onSeat var releasedSeatNo int32 var releasedMicSessionID string @@ -170,10 +173,20 @@ func (s *Service) KickUser(ctx context.Context, req *roomv1.KickUserRequest) (*r return nil, err } - return &roomv1.KickUserResponse{ + resp := &roomv1.KickUserResponse{ Result: commandResult(result.applied, result.snapshot.GetVersion(), s.clock.Now()), Room: result.snapshot, - }, nil + } + if result.applied && shouldKickRTC && s.rtcUserRemover != nil { + // RTC 是房间外连接态:踢人事实已提交后再调用 TRTC,失败不回滚 Room Cell,但要回传给调用方做告警。 + if err := s.rtcUserRemover.RemoveUserByStrRoomID(ctx, cmd.RoomID(), cmd.TargetUserID); err != nil { + resp.RtcKickError = err.Error() + } else { + resp.RtcKicked = true + } + } + + return resp, nil } // UnbanUser 解除房间 ban;不会恢复 presence、管理员、麦位或 RTC 推流事实。 diff --git a/services/room-service/internal/room/service/online_users_query.go b/services/room-service/internal/room/service/online_users_query.go index fd7198b3..b487c709 100644 --- a/services/room-service/internal/room/service/online_users_query.go +++ b/services/room-service/internal/room/service/online_users_query.go @@ -10,8 +10,10 @@ import ( ) const ( + // defaultRoomOnlineUsersPageSize 是在线用户弹窗的默认页大小,避免客户端不传 page_size 时一次拉全量。 defaultRoomOnlineUsersPageSize = 50 - maxRoomOnlineUsersPageSize = 100 + // maxRoomOnlineUsersPageSize 是在线用户列表单页硬上限,保护 presence 读模型查询。 + maxRoomOnlineUsersPageSize = 100 ) // ListRoomOnlineUsers 分页读取房间在线用户列表。 @@ -21,29 +23,36 @@ func (s *Service) ListRoomOnlineUsers(ctx context.Context, req *roomv1.ListRoomO roomID := req.GetRoomId() viewerUserID := req.GetViewerUserId() if !roomid.ValidStringID(roomID) { + // 在线用户查询必须绑定真实房间 ID,不能让空 room_id 触发宽查询。 return nil, xerr.New(xerr.InvalidArgument, "room_id is invalid") } if viewerUserID <= 0 { + // viewer_user_id 来自 gateway 鉴权态,用于限制只有房内用户可看在线列表。 return nil, xerr.New(xerr.InvalidArgument, "viewer_user_id is required") } + // 先用用户当前房间读模型做轻量权限判断,避免为了弹窗分页读取完整 RoomSnapshot。 presence, exists, err := s.repository.GetCurrentRoomPresence(ctx, viewerUserID) if err != nil { return nil, err } if !exists || presence.RoomID != roomID || presence.Status != roomPresenceStatusActive { + // 不在该房间的用户不能借分页接口枚举房间内成员。 return nil, xerr.New(xerr.PermissionDenied, "viewer is not in room") } page := int(req.GetPage()) if page <= 0 { + // page 从 1 开始,0 或负数按第一页处理,保持客户端容错。 page = 1 } pageSize := int(req.GetPageSize()) if pageSize <= 0 { + // 缺省页大小走服务端默认,避免前端每个入口复制同一数值。 pageSize = defaultRoomOnlineUsersPageSize } if pageSize > maxRoomOnlineUsersPageSize { + // 单页上限在 service 层压实,repository 不接受无限制分页。 pageSize = maxRoomOnlineUsersPageSize } @@ -59,6 +68,7 @@ func (s *Service) ListRoomOnlineUsers(ctx context.Context, req *roomv1.ListRoomO users := make([]*roomv1.RoomUser, 0, len(result.Users)) for _, user := range result.Users { + // 在线列表只返回轻量房间用户态,完整用户资料仍由 user-service 或 gateway 聚合。 users = append(users, &roomv1.RoomUser{ UserId: user.UserID, Role: user.Role, diff --git a/services/room-service/internal/room/service/outbox_worker.go b/services/room-service/internal/room/service/outbox_worker.go index 3557e8cf..7948e545 100644 --- a/services/room-service/internal/room/service/outbox_worker.go +++ b/services/room-service/internal/room/service/outbox_worker.go @@ -95,6 +95,7 @@ func (s *Service) RunOutboxWorker(ctx context.Context, options OutboxWorkerOptio return } + // 启动后先执行一轮,避免服务刚恢复时还要等一个 poll interval 才补偿历史事件。 if err := s.ProcessPendingOutbox(ctx, options); err != nil && ctx.Err() == nil { logx.Error(ctx, "worker_batch_failed", err, slog.String("worker", outboxWorkerName), slog.String("node_id", s.nodeID), slog.Int("batch_size", options.BatchSize)) } @@ -130,6 +131,7 @@ func (s *Service) ProcessPendingOutbox(ctx context.Context, options OutboxWorker for _, record := range records { select { case <-ctx.Done(): + // 退出时不再领取新事件;已抢占但未处理完的事件会在 lock_until_ms 到期后重新可见。 return ctx.Err() default: } @@ -154,6 +156,7 @@ func (s *Service) ProcessPendingOutbox(ctx context.Context, options OutboxWorker } publishCtx, cancel := context.WithTimeout(context.Background(), options.PublishTimeout) + // 发布上下文不继承 worker ctx,避免 shutdown 取消导致已开始的单条外部投递无界处于未知状态。 err := s.outboxPublisher.PublishOutboxEvent(publishCtx, record.Envelope) cancel() if err != nil { @@ -200,6 +203,7 @@ func (s *Service) ProcessPendingOutbox(ctx context.Context, options OutboxWorker return nil } +// outboxBackoff 根据失败次数计算指数退避,且永远不超过 MaxBackoff。 func outboxBackoff(retryCount int, options OutboxWorkerOptions) time.Duration { if retryCount <= 1 { return options.InitialBackoff @@ -207,6 +211,7 @@ func outboxBackoff(retryCount int, options OutboxWorkerOptions) time.Duration { backoff := options.InitialBackoff for i := 1; i < retryCount; i++ { if backoff >= options.MaxBackoff/2 { + // 提前截断,避免 duration 乘 2 溢出或超过配置上限。 return options.MaxBackoff } backoff *= 2 @@ -217,6 +222,7 @@ func outboxBackoff(retryCount int, options OutboxWorkerOptions) time.Duration { return backoff } +// deadLetterReason 生成写入 failed 状态的稳定错误原因。 func deadLetterReason(record outbox.Record) string { if strings.TrimSpace(record.LastError) == "" { return "outbox retry limit exceeded" diff --git a/services/room-service/internal/room/service/pin_test.go b/services/room-service/internal/room/service/pin_test.go new file mode 100644 index 00000000..37d3f49c --- /dev/null +++ b/services/room-service/internal/room/service/pin_test.go @@ -0,0 +1,88 @@ +package service_test + +import ( + "context" + "testing" + "time" + + roomv1 "hyapp.local/api/proto/room/v1" + "hyapp/pkg/appcode" + "hyapp/services/room-service/internal/integration" + roomservice "hyapp/services/room-service/internal/room/service" + "hyapp/services/room-service/internal/router" + "hyapp/services/room-service/internal/testutil/mysqltest" +) + +func TestRegionalPinOrdersPublicRoomList(t *testing.T) { + ctx := context.Background() + repository := mysqltest.NewRepository(t) + svc := roomservice.New(roomservice.Config{ + NodeID: "node-pin-test", + LeaseTTL: 10 * time.Second, + RankLimit: 20, + SnapshotEveryN: 1, + }, router.NewMemoryDirectory(), repository, followTestWallet{}, integration.NewNoopRoomEventPublisher(), integration.NewNoopOutboxPublisher()) + + createPinnedListRoom(t, ctx, svc, "room-pin-low", "pin-low", 3001, 9001) + createPinnedListRoom(t, ctx, svc, "room-hot-high", "hot-high", 3002, 9001) + createPinnedListRoom(t, ctx, svc, "room-hot-mid", "hot-mid", 3003, 9001) + repository.SetRoomSortScore("room-pin-low", 10) + repository.SetRoomSortScore("room-hot-high", 300) + repository.SetRoomSortScore("room-hot-mid", 200) + repository.PinRoom("room-pin-low", 9001, 99, time.Now().UTC().Add(24*time.Hour).UnixMilli()) + + firstPage, err := svc.ListRooms(ctx, &roomv1.ListRoomsRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default}, + ViewerUserId: 4001, + VisibleRegionId: 9001, + Tab: "hot", + Limit: 1, + }) + if err != nil { + t.Fatalf("list pinned first page failed: %v", err) + } + if len(firstPage.GetRooms()) != 1 || firstPage.GetRooms()[0].GetRoomId() != "room-pin-low" { + t.Fatalf("regional pin must be first even with lower hot score: %+v", firstPage.GetRooms()) + } + if firstPage.GetNextCursor() == "" { + t.Fatalf("first page should return cursor") + } + + secondPage, err := svc.ListRooms(ctx, &roomv1.ListRoomsRequest{ + Meta: &roomv1.RequestMeta{AppCode: appcode.Default}, + ViewerUserId: 4001, + VisibleRegionId: 9001, + Tab: "hot", + Limit: 2, + Cursor: firstPage.GetNextCursor(), + }) + if err != nil { + t.Fatalf("list pinned second page failed: %v", err) + } + if got := roomIDs(secondPage.GetRooms()); len(got) != 2 || got[0] != "room-hot-high" || got[1] != "room-hot-mid" { + t.Fatalf("second page should continue with regular hot order, got %+v", got) + } +} + +func createPinnedListRoom(t *testing.T, ctx context.Context, svc *roomservice.Service, roomID string, shortID string, ownerID int64, regionID int64) { + t.Helper() + + if _, err := svc.CreateRoom(ctx, &roomv1.CreateRoomRequest{ + Meta: roomservice.NewRequestMeta(roomID, ownerID), + SeatCount: 10, + Mode: "voice", + VisibleRegionId: regionID, + RoomName: roomID, + RoomShortId: shortID, + }); err != nil { + t.Fatalf("create room %s failed: %v", roomID, err) + } +} + +func roomIDs(rooms []*roomv1.RoomListItem) []string { + ids := make([]string, 0, len(rooms)) + for _, room := range rooms { + ids = append(ids, room.GetRoomId()) + } + return ids +} diff --git a/services/room-service/internal/room/service/pipeline.go b/services/room-service/internal/room/service/pipeline.go index 272ff98d..057cf549 100644 --- a/services/room-service/internal/room/service/pipeline.go +++ b/services/room-service/internal/room/service/pipeline.go @@ -91,9 +91,10 @@ func (s *Service) mutateRoom(ctx context.Context, cmd command.Command, replayabl LeaseToken: lease.LeaseToken, CreatedAtMS: now.UnixMilli(), }, - OutboxRecords: outboxRecords, - RoomStatus: result.roomStatus, - RoomSeatCount: result.roomSeatCount, + OutboxRecords: outboxRecords, + RoomStatus: result.roomStatus, + RoomSeatCount: result.roomSeatCount, + RoomPasswordHash: result.roomPasswordHash, }); err != nil { return nil, err } @@ -163,11 +164,13 @@ func (s *Service) mutateRoom(ctx context.Context, cmd command.Command, replayabl } func (s *Service) commandPayloadForIdempotency(ctx context.Context, cmd command.Command) ([]byte, bool, error) { + // 先序列化当前命令,后续无论首次提交还是冲突校验都使用同一份 payload。 payload, err := command.Serialize(cmd) if err != nil { return nil, false, err } + // command_id 在同一 room_id 内唯一;已有记录表示客户端重试或 command_id 被错误复用。 record, exists, err := s.repository.GetCommand(ctx, cmd.RoomID(), cmd.ID()) if err != nil { return nil, false, err @@ -175,6 +178,17 @@ func (s *Service) commandPayloadForIdempotency(ctx context.Context, cmd command. if !exists { return payload, false, nil } + if cmd.Type() == (command.SetRoomPassword{}).Type() && record.CommandType == (command.SetRoomPassword{}).Type() { + // 密码命令的持久 payload 只有哈希,必须走专门逻辑比较 transient 明文和已存哈希。 + matched, err := setRoomPasswordIdempotencyMatches(cmd, payload, record.Payload) + if err != nil { + return nil, true, err + } + if !matched { + return nil, true, xerr.New(xerr.Conflict, "command_id payload conflict") + } + return payload, true, nil + } currentIDPayload, err := command.IdempotencyPayload(payload) if err != nil { return nil, true, err @@ -184,14 +198,65 @@ func (s *Service) commandPayloadForIdempotency(ctx context.Context, cmd command. return nil, true, err } if record.CommandType != cmd.Type() || !bytes.Equal(storedIDPayload, currentIDPayload) { + // 同一个 command_id 携带不同业务载荷必须显式冲突,不能返回旧命令结果掩盖客户端错误。 return nil, true, xerr.New(xerr.Conflict, "command_id payload conflict") } return payload, true, nil } +func setRoomPasswordIdempotencyMatches(cmd command.Command, currentPayload []byte, storedPayload []byte) (bool, error) { + // 先比较去除哈希后的业务载荷,locked/room/actor 等字段不同仍然是冲突。 + currentIDPayload, err := command.IdempotencyPayload(currentPayload) + if err != nil { + return false, err + } + storedIDPayload, err := command.IdempotencyPayload(storedPayload) + if err != nil { + return false, err + } + if !bytes.Equal(storedIDPayload, currentIDPayload) { + return false, nil + } + + current, ok := setRoomPasswordCommand(cmd) + if !ok { + return false, nil + } + if !current.Locked { + // 解锁命令没有密码语义;通用 payload 相同即可视作同一动作重试。 + return true, nil + } + stored, err := command.Deserialize((command.SetRoomPassword{}).Type(), storedPayload) + if err != nil { + return false, err + } + storedPassword, ok := stored.(*command.SetRoomPassword) + if !ok { + return false, nil + } + // bcrypt 哈希带随机盐,不能直接比较两次请求生成的哈希;只在当前请求内用 transient 明文校验已持久化哈希。 + return roomPasswordMatches(storedPassword.PasswordHash, current.Password), nil +} + +func setRoomPasswordCommand(cmd command.Command) (command.SetRoomPassword, bool) { + // mutateRoom 入口有时传值、有时传指针,幂等判断统一收敛成值对象。 + switch typed := cmd.(type) { + case command.SetRoomPassword: + return typed, true + case *command.SetRoomPassword: + if typed == nil { + return command.SetRoomPassword{}, false + } + return *typed, true + default: + return command.SetRoomPassword{}, false + } +} + func commandPayloadForRecord(defaultPayload []byte, result mutationResult) []byte { if len(result.commandPayload) > 0 { + // SendGift 等命令需要把外部结算后的确定性结果写进 command log,恢复时不能重算。 return result.commandPayload } return defaultPayload diff --git a/services/room-service/internal/room/service/presence.go b/services/room-service/internal/room/service/presence.go index 72848e56..d5d68142 100644 --- a/services/room-service/internal/room/service/presence.go +++ b/services/room-service/internal/room/service/presence.go @@ -3,6 +3,7 @@ package service import ( "context" "log/slog" + "strings" "time" roomeventsv1 "hyapp.local/api/proto/events/room/v1" @@ -21,6 +22,7 @@ import ( // JoinRoom 把用户业务态接入房间。 func (s *Service) JoinRoom(ctx context.Context, req *roomv1.JoinRoomRequest) (*roomv1.JoinRoomResponse, error) { ctx = contextFromMeta(ctx, req.GetMeta()) + password := strings.TrimSpace(req.GetPassword()) // JoinRoom 只维护 room-service presence,不创建任何本地长连接订阅。 cmd := command.JoinRoom{ Base: baseFromMeta(req.GetMeta()), @@ -52,6 +54,10 @@ func (s *Service) JoinRoom(ctx context.Context, req *roomv1.JoinRoomRequest) (*r user: findProtoUser(snapshot, cmd.ActorUserID()), }, nil, nil } + if current.RoomPasswordHash != "" && current.OwnerUserID != cmd.ActorUserID() && !roomPasswordMatches(current.RoomPasswordHash, password) { + // 锁房只拦截新进入的非房主用户;已在房内的用户和 owner 不因为锁房状态重设被挤出。 + return mutationResult{}, nil, xerr.New(xerr.PermissionDenied, "room password is invalid") + } current.OnlineUsers[cmd.ActorUserID()] = &state.RoomUserState{ UserID: cmd.ActorUserID(), diff --git a/services/room-service/internal/room/service/profile.go b/services/room-service/internal/room/service/profile.go index 24b517f9..1f473345 100644 --- a/services/room-service/internal/room/service/profile.go +++ b/services/room-service/internal/room/service/profile.go @@ -94,18 +94,25 @@ func (s *Service) UpdateRoomProfile(ctx context.Context, req *roomv1.UpdateRoomP } type updateRoomProfilePatch struct { - Name *string - Avatar *string + // Name 为 nil 表示本次请求不修改房间名;非 nil 已完成裁剪和长度校验。 + Name *string + // Avatar 为 nil 表示不修改头像;空头像在 normalize 阶段已被替换为系统默认头像。 + Avatar *string + // Description 为 nil 表示不修改简介;非 nil 可以是空字符串,用于清空简介。 Description *string - SeatCount *int32 + // SeatCount 为 nil 表示不调整麦位数量;非 nil 已通过后台座位数配置校验。 + SeatCount *int32 } +// normalizeUpdateRoomProfile 把 protobuf patch 收敛为明确的领域补丁。 +// 这里区分 nil 和空字符串:nil 是不改字段,空字符串是否允许由具体字段语义决定。 func (s *Service) normalizeUpdateRoomProfile(ctx context.Context, req *roomv1.UpdateRoomProfileRequest) (updateRoomProfilePatch, error) { var patch updateRoomProfilePatch if req == nil { return patch, xerr.New(xerr.InvalidArgument, "request is required") } if req.RoomName != nil { + // 房间名不允许清空,列表卡片和房间详情都依赖它提供最小展示信息。 value := strings.TrimSpace(req.GetRoomName()) if value == "" { return patch, xerr.New(xerr.InvalidArgument, "room_name is required") @@ -127,6 +134,7 @@ func (s *Service) normalizeUpdateRoomProfile(ctx context.Context, req *roomv1.Up patch.Avatar = &value } if req.RoomDescription != nil { + // 简介允许清空,但不能允许无限长内容进入 snapshot、列表投影和 command log。 value := strings.TrimSpace(req.GetRoomDescription()) if utf8.RuneCountInString(value) > maxRoomDescriptionRunes { return patch, xerr.New(xerr.InvalidArgument, "room_description is too long") @@ -134,6 +142,7 @@ func (s *Service) normalizeUpdateRoomProfile(ctx context.Context, req *roomv1.Up patch.Description = &value } if req.SeatCount != nil { + // 座位数只能使用后台启用值,避免客户端直接制造超大麦位快照。 value, err := s.validateRoomSeatCount(ctx, req.GetSeatCount()) if err != nil { return patch, err @@ -143,12 +152,16 @@ func (s *Service) normalizeUpdateRoomProfile(ctx context.Context, req *roomv1.Up return patch, nil } +// applyProfilePatch 只修改显式传入且确实变化的展示资料字段。 +// 返回值用于决定是否递增房间版本和生成 RoomProfileUpdated 事件。 func applyProfilePatch(current *state.RoomState, cmd command.UpdateRoomProfile) bool { if current.RoomExt == nil { + // 恢复旧快照或测试构造状态可能没有 RoomExt,写展示字段前必须补齐 map。 current.RoomExt = make(map[string]string) } changed := false if cmd.RoomName != nil && current.RoomExt[roomExtTitleKey] != *cmd.RoomName { + // RoomExt 是房间资料的低频扩展容器,避免把展示字段塞进高频核心结构。 current.RoomExt[roomExtTitleKey] = *cmd.RoomName changed = true } @@ -163,6 +176,8 @@ func applyProfilePatch(current *state.RoomState, cmd command.UpdateRoomProfile) return changed } +// applySeatCountPatch 调整麦位数组大小,不迁移用户、不隐式下麦、不自动解锁。 +// 缩容只能删除完全空闲的高编号麦位,避免一个资料修改请求制造复合业务事件。 func applySeatCountPatch(current *state.RoomState, seatCount *int32) (bool, error) { if seatCount == nil { return false, nil @@ -170,9 +185,11 @@ func applySeatCountPatch(current *state.RoomState, seatCount *int32) (bool, erro target := *seatCount currentCount := int32(len(current.MicSeats)) if target == currentCount { + // 相同座位数是 no-op,仍由外层 command log 负责幂等记录。 return false, nil } if target > currentCount { + // 扩容只追加高编号空麦位,现有麦位编号和用户占用状态保持稳定。 for seatNo := currentCount + 1; seatNo <= target; seatNo++ { current.MicSeats = append(current.MicSeats, state.MicSeat{SeatNo: seatNo}) } @@ -182,6 +199,7 @@ func applySeatCountPatch(current *state.RoomState, seatCount *int32) (bool, erro nextSeats := make([]state.MicSeat, 0, target) for _, seat := range current.MicSeats { if seat.SeatNo <= target { + // 保留目标范围内的原麦位,锁定、占用和发流状态都原样保留。 nextSeats = append(nextSeats, seat) continue } diff --git a/services/room-service/internal/room/service/recovery.go b/services/room-service/internal/room/service/recovery.go index 15e086e7..52f96e3a 100644 --- a/services/room-service/internal/room/service/recovery.go +++ b/services/room-service/internal/room/service/recovery.go @@ -80,12 +80,15 @@ func (s *Service) recoverRoom(ctx context.Context, roomMeta RoomMeta) (*state.Ro recovered = state.FromProto(&snapshot) recovered.VisibleRegionID = roomMeta.VisibleRegionID + // 密码哈希不进入对外 protobuf 快照,最新快照恢复时从 rooms 元数据补齐。 + recovered.RoomPasswordHash = roomMeta.RoomPasswordHash fromVersion = snapshot.GetVersion() } else { // 没有快照时从 rooms meta 重建初始状态,再从版本 0 回放命令。 recovered = state.NewRoomState(roomMeta.RoomID, roomMeta.OwnerUserID, roomMeta.SeatCount, roomMeta.Mode) recovered.Status = roomMeta.Status recovered.VisibleRegionID = roomMeta.VisibleRegionID + recovered.RoomPasswordHash = roomMeta.RoomPasswordHash fromVersion = 0 } @@ -280,6 +283,14 @@ func replay(current *state.RoomState, cmd command.Command) error { // 公屏开关恢复后直接影响 CheckSpeakPermission 的 chat_disabled 判断。 current.ChatEnabled = typed.Enabled current.Version++ + case *command.SetRoomPassword: + // 锁房恢复只还原服务端哈希状态;明文密码从不进入 command log。 + if typed.Locked { + current.RoomPasswordHash = typed.PasswordHash + } else { + current.RoomPasswordHash = "" + } + current.Version++ case *command.SetRoomAdmin: if typed.Enabled { // 管理员集合是持久权限,恢复后用户重新进房即可继续具备 admin 身份。 diff --git a/services/room-service/internal/room/service/repository.go b/services/room-service/internal/room/service/repository.go index 7d7d68ed..5e97852c 100644 --- a/services/room-service/internal/room/service/repository.go +++ b/services/room-service/internal/room/service/repository.go @@ -23,6 +23,8 @@ type RoomMeta struct { Mode string // Status 是房间基础状态,快照缺失时用于恢复 RoomState.Status。 Status string + // RoomPasswordHash 是当前入房密码哈希;为空表示未锁房,明文从不落库。 + RoomPasswordHash string // VisibleRegionID 是房间列表可见区域,0 表示 GLOBAL 兜底桶。 VisibleRegionID int64 } @@ -61,6 +63,8 @@ type MutationCommit struct { RoomStatus string // RoomSeatCount 非 nil 时同步更新 rooms 元数据中的麦位总数。 RoomSeatCount *int32 + // RoomPasswordHash 非 nil 时同步更新 rooms 中的当前密码哈希,供最新快照恢复锁房态。 + RoomPasswordHash *string } // SnapshotRecord 对应 room_snapshots 中的一条最新快照。 @@ -97,6 +101,8 @@ type RoomListEntry struct { Mode string // Status 是房间生命周期状态,列表默认只查 active。 Status string + // Locked 表示进入房间是否需要密码;列表和搜索只暴露布尔标识,不暴露密码哈希。 + Locked bool // Heat 是房间热度,当前主要由送礼累计。 Heat int64 // OnlineCount 是 room-service 业务 presence 数量。 @@ -113,6 +119,12 @@ type RoomListEntry struct { UpdatedAtMS int64 // FeedSubjectUserID 是关系房间流命中的好友/关注用户;只用于生成稳定 cursor,不出现在 HTTP 卡片里。 FeedSubjectUserID int64 + // IsPinned 表达该卡片在当前区域列表查询中是否命中有效区域置顶。 + IsPinned bool + // PinWeight 是区域置顶权重;只用于公共房间列表排序和 cursor。 + PinWeight int64 + // PinnedUntilMS 是区域置顶过期时间;只用于公共房间列表排序和 cursor。 + PinnedUntilMS int64 } // RoomSeatConfig 是后台房间配置里控制创建/修改房间座位数的低频配置。 @@ -190,6 +202,14 @@ type RoomListQuery struct { CursorUpdatedAtMS int64 // CursorRoomID 是同分或同时间下的稳定翻页边界。 CursorRoomID string + // CursorPinned 是上一页最后一条是否为置顶卡片,公共列表 cursor 用它跨置顶/普通分区翻页。 + CursorPinned bool + // CursorPinWeight 是上一页最后一条置顶权重。 + CursorPinWeight int64 + // CursorPinnedUntilMS 是上一页最后一条置顶过期时间。 + CursorPinnedUntilMS int64 + // NowMS 是有效置顶判断时间,service 层使用 UTC 业务时钟注入。 + NowMS int64 } // RoomUserFeedEntry 是“访问过/好友/关注”房间流的读模型索引。 @@ -229,6 +249,41 @@ type RoomUserFeedQuery struct { CursorRoomID string } +// RoomFollowRecord 是用户关注房间的低频关系事实。 +// 它不进入 Room Cell 快照,避免把用户个性化关系扩散到房间核心状态。 +type RoomFollowRecord struct { + // AppCode 是关系所属 App,防止多 App 之间互相看到关注关系。 + AppCode string + // UserID 是发起关注的登录用户。 + UserID int64 + // RoomID 是被关注房间。 + RoomID string + // Status 表达当前关系是否仍 active;取消关注只改状态,保留审计时间。 + Status string + // FollowedAtMS 是最近一次从非 active 转为 active 的 UTC 毫秒。 + FollowedAtMS int64 + // UpdatedAtMS 是关系最后一次写入时间。 + UpdatedAtMS int64 +} + +// RoomFollowQuery 是 Mine 页“关注的房间”分页查询条件。 +type RoomFollowQuery struct { + // AppCode 是查询所属 App。 + AppCode string + // UserID 是当前登录用户。 + UserID int64 + // VisibleRegionID 沿用 Mine 房间流区域桶,避免跨区域露出房间卡片。 + VisibleRegionID int64 + // Query 非空时按 room_id、room_short_id 或 title 做包含匹配。 + Query string + // Limit 是实际查询数量,service 层会限制最大值。 + Limit int + // CursorFollowedAtMS 是上一页最后一条关注关系排序时间。 + CursorFollowedAtMS int64 + // CursorRoomID 是同时间下的稳定翻页边界。 + CursorRoomID string +} + // RoomFeedRelatedUser 是 gateway 从 user-service 读取到的关系事实快照。 // room-service 只使用它做 active 房间卡片查询和排序,不保存好友/关注关系。 type RoomFeedRelatedUser struct { @@ -302,6 +357,14 @@ type Repository interface { UpsertRoomUserFeedEntry(ctx context.Context, entry RoomUserFeedEntry) error // ListRoomUserFeedEntries 按用户关系流读取房间卡片,不访问 Room Cell 内存集合。 ListRoomUserFeedEntries(ctx context.Context, query RoomUserFeedQuery) ([]RoomListEntry, error) + // FollowRoom 建立或恢复用户对房间的关注关系;重复关注必须幂等。 + FollowRoom(ctx context.Context, userID int64, roomID string, nowMS int64) (RoomFollowRecord, error) + // UnfollowRoom 取消用户对房间的关注关系;未关注时必须按幂等成功处理。 + UnfollowRoom(ctx context.Context, userID int64, roomID string, nowMS int64) error + // IsRoomFollowed 查询 viewer 是否已经关注房间,用于房间详情个性化字段。 + IsRoomFollowed(ctx context.Context, userID int64, roomID string) (bool, error) + // ListRoomFollowEntries 按当前用户关注关系读取 active 房间卡片。 + ListRoomFollowEntries(ctx context.Context, query RoomFollowQuery) ([]RoomListEntry, error) // ListRoomRelatedFeedEntries 根据 user-service 关系事实查询 active 房间卡片,不持久化关系状态。 ListRoomRelatedFeedEntries(ctx context.Context, query RoomRelatedFeedQuery) ([]RoomListEntry, error) // ProjectRoomPresence 用最新快照刷新用户当前房间读模型;失败不应破坏 Room Cell 已提交状态。 diff --git a/services/room-service/internal/room/service/room_lock.go b/services/room-service/internal/room/service/room_lock.go new file mode 100644 index 00000000..30c3501e --- /dev/null +++ b/services/room-service/internal/room/service/room_lock.go @@ -0,0 +1,120 @@ +package service + +import ( + "context" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/crypto/bcrypt" + roomeventsv1 "hyapp.local/api/proto/events/room/v1" + roomv1 "hyapp.local/api/proto/room/v1" + "hyapp/pkg/tencentim" + "hyapp/pkg/xerr" + "hyapp/services/room-service/internal/room/command" + "hyapp/services/room-service/internal/room/outbox" + "hyapp/services/room-service/internal/room/rank" + "hyapp/services/room-service/internal/room/state" +) + +const maxRoomPasswordRunes = 64 + +// SetRoomPassword 设置或清空房间入房密码。 +// 密码属于 Room Cell 核心状态:JoinRoom、快照恢复和列表投影都必须以同一份状态为准。 +func (s *Service) SetRoomPassword(ctx context.Context, req *roomv1.SetRoomPasswordRequest) (*roomv1.SetRoomPasswordResponse, error) { + ctx = contextFromMeta(ctx, req.GetMeta()) + password, passwordHash, err := normalizeRoomPassword(req.GetLocked(), req.GetPassword()) + if err != nil { + return nil, err + } + + cmd := command.SetRoomPassword{ + Base: baseFromMeta(req.GetMeta()), + Locked: req.GetLocked(), + Password: password, + PasswordHash: passwordHash, + } + + result, err := s.mutateRoom(ctx, cmd, true, func(now time.Time, current *state.RoomState, _ *rank.LocalRank) (mutationResult, []outbox.Record, error) { + if err := requireActiveRoom(current); err != nil { + return mutationResult{}, nil, err + } + if err := requireOwnerPresent(current, cmd.ActorUserID()); err != nil { + // 锁房只允许 owner 操作,避免普通房管把房主挡在自己的房间外。 + return mutationResult{}, nil, err + } + + if !cmd.Locked { + if current.RoomPasswordHash == "" { + // 重复解锁是 no-op,只写 command log 保护幂等。 + return mutationResult{snapshot: current.ToProto()}, nil, nil + } + current.RoomPasswordHash = "" + } else { + if roomPasswordMatches(current.RoomPasswordHash, password) { + // 同一个密码重复提交不产生版本和系统消息,避免客户端收到无意义状态变更。 + return mutationResult{snapshot: current.ToProto()}, nil, nil + } + current.RoomPasswordHash = cmd.PasswordHash + } + + current.Version++ + currentHash := current.RoomPasswordHash + passwordEvent, err := outbox.Build(current.RoomID, "RoomPasswordChanged", current.Version, now, &roomeventsv1.RoomPasswordChanged{ + ActorUserId: cmd.ActorUserID(), + Locked: cmd.Locked, + }) + if err != nil { + return mutationResult{}, nil, err + } + + return mutationResult{ + snapshot: current.ToProto(), + roomPasswordHash: ¤tHash, + syncEvent: &tencentim.RoomEvent{ + EventID: passwordEvent.EventID, + RoomID: current.RoomID, + EventType: "room_password_changed", + ActorUserID: cmd.ActorUserID(), + RoomVersion: current.Version, + Attributes: map[string]string{ + "locked": boolString(cmd.Locked), + }, + }, + }, []outbox.Record{passwordEvent}, nil + }) + if err != nil { + return nil, err + } + + return &roomv1.SetRoomPasswordResponse{ + Result: commandResult(result.applied, result.snapshot.GetVersion(), s.clock.Now()), + Room: result.snapshot, + }, nil +} + +func normalizeRoomPassword(locked bool, raw string) (string, string, error) { + password := strings.TrimSpace(raw) + if !locked { + return "", "", nil + } + if password == "" { + return "", "", xerr.New(xerr.InvalidArgument, "room password is required") + } + if utf8.RuneCountInString(password) > maxRoomPasswordRunes { + // 密码只服务入房校验,必须给 snapshot 和 command log 一个有界载荷。 + return "", "", xerr.New(xerr.InvalidArgument, "room password is too long") + } + hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) + if err != nil { + return "", "", err + } + return password, string(hash), nil +} + +func roomPasswordMatches(hash string, password string) bool { + if hash == "" || password == "" { + return false + } + return bcrypt.CompareHashAndPassword([]byte(hash), []byte(password)) == nil +} diff --git a/services/room-service/internal/room/service/rtc_event.go b/services/room-service/internal/room/service/rtc_event.go index 59f159f4..3fc5bfb7 100644 --- a/services/room-service/internal/room/service/rtc_event.go +++ b/services/room-service/internal/room/service/rtc_event.go @@ -16,14 +16,18 @@ import ( ) const ( + // rtcEventAudioStarted 表示腾讯 RTC 侧观测到用户开始发布音频。 rtcEventAudioStarted = "audio_started" + // rtcEventAudioStopped 表示腾讯 RTC 侧观测到用户停止发布音频。 rtcEventAudioStopped = "audio_stopped" - rtcEventRoomExited = "room_exited" + // rtcEventRoomExited 表示用户离开 RTC 媒体房间,不等价于 App 业务离房。 + rtcEventRoomExited = "room_exited" ) // ApplyRTCEvent 把已验签的腾讯 RTC 服务端事件落到 Room Cell。 func (s *Service) ApplyRTCEvent(ctx context.Context, req *roomv1.ApplyRTCEventRequest) (*roomv1.ApplyRTCEventResponse, error) { ctx = contextFromMeta(ctx, req.GetMeta()) + // gateway 负责验签和 user_id 映射,room-service 只处理可信且已标准化的媒体事件。 cmd := command.ApplyRTCEvent{ Base: baseFromMeta(req.GetMeta()), TargetUserID: req.GetTargetUserId(), @@ -43,9 +47,11 @@ func (s *Service) ApplyRTCEvent(ctx context.Context, req *roomv1.ApplyRTCEventRe result, err := s.mutateRoom(ctx, cmd, true, func(now time.Time, current *state.RoomState, _ *rank.LocalRank) (mutationResult, []outbox.Record, error) { if cmd.TargetUserID <= 0 || cmd.EventType == "" || cmd.EventTimeMS <= 0 { + // RTC 事件必须能定位用户、事件类型和事件时间,否则无法做乱序/旧事件过滤。 return mutationResult{}, nil, xerr.New(xerr.InvalidArgument, "rtc event is incomplete") } + // 不同 RTC 事件的业务语义不同:开始发布只确认麦位,停止发布释放麦位,退房只处理媒体状态。 switch cmd.EventType { case rtcEventAudioStarted: return s.applyRTCAudioStarted(now, current, cmd) @@ -68,6 +74,8 @@ func (s *Service) ApplyRTCEvent(ctx context.Context, req *roomv1.ApplyRTCEventRe }, nil } +// applyRTCAudioStarted 把当前 mic_session 从 pending_publish 确认为 publishing。 +// 它只接受匹配当前麦位会话、未超时且时间更新的事件,腾讯回调重试或乱序事件都按 no-op 处理。 func (s *Service) applyRTCAudioStarted(now time.Time, current *state.RoomState, cmd command.ApplyRTCEvent) (mutationResult, []outbox.Record, error) { if err := requireActiveRoom(current); err != nil { return mutationResult{}, nil, err @@ -79,18 +87,23 @@ func (s *Service) applyRTCAudioStarted(now time.Time, current *state.RoomState, seat, exists := current.SeatByUser(cmd.TargetUserID) if !exists { + // 用户不在麦上时,audio_started 只能是旧回调或客户端已经下麦后的迟到事件。 return mutationResult{snapshot: current.ToProto()}, nil, nil } if !rtcEventMatchesCurrentMicSession(seat, cmd.EventTimeMS, s.micPublishTimeout) { + // 会话不匹配、事件时间倒退或超过确认 deadline 时不能推进当前麦位状态。 return mutationResult{snapshot: current.ToProto(), seatNo: seat.SeatNo}, nil, nil } if seat.PublishState == state.MicPublishPublishing { + // 腾讯可能重试同一事件,已确认发流时保持幂等 no-op。 return mutationResult{snapshot: current.ToProto(), seatNo: seat.SeatNo}, nil, nil } if seat.PublishState != state.MicPublishPending { + // 非 pending 状态不应该被 audio_started 重新打开,避免旧事件复活已释放会话。 return mutationResult{snapshot: current.ToProto(), seatNo: seat.SeatNo}, nil, nil } + // 只有通过所有防旧校验后,才把麦位推进到 publishing 并记录最新媒体事件时间。 index := current.SeatIndex(seat.SeatNo) current.MicSeats[index].PublishState = state.MicPublishPublishing current.MicSeats[index].LastPublishEventTimeMS = cmd.EventTimeMS @@ -134,15 +147,20 @@ func (s *Service) applyRTCAudioStarted(now time.Time, current *state.RoomState, }, []outbox.Record{micEvent}, nil } +// applyRTCAudioStopped 释放当前 mic_session 占用的麦位。 +// 停止发布事件不检查业务 presence,因为 RTC 退流可能先于 LeaveRoom 或 stale 清理到达。 func (s *Service) applyRTCAudioStopped(now time.Time, current *state.RoomState, cmd command.ApplyRTCEvent) (mutationResult, []outbox.Record, error) { seat, exists := current.SeatByUser(cmd.TargetUserID) if !exists { + // 麦位已释放时,迟到的停止发布事件按 no-op 收敛。 return mutationResult{snapshot: current.ToProto()}, nil, nil } if !rtcStopEventMatchesCurrentMicSession(seat, cmd.EventTimeMS, s.micPublishTimeout) { + // 旧事件不能释放新 mic_session,防止用户快速重上麦时被迟到 webhook 踢下。 return mutationResult{snapshot: current.ToProto(), seatNo: seat.SeatNo}, nil, nil } + // 清麦和 RoomMicChanged/down 必须同版本提交,给时长聚合一个稳定闭合点。 index := current.SeatIndex(seat.SeatNo) micSessionID := current.MicSeats[index].MicSessionID current.ClearMicSession(index) @@ -187,6 +205,7 @@ func (s *Service) applyRTCAudioStopped(now time.Time, current *state.RoomState, }, []outbox.Record{micEvent}, nil } +// applyRTCRoomExited 只处理 RTC 媒体房间退出事实,不删除 room-service 业务 presence。 func (s *Service) applyRTCRoomExited(now time.Time, current *state.RoomState, cmd command.ApplyRTCEvent) (mutationResult, []outbox.Record, error) { if user, exists := current.OnlineUsers[cmd.TargetUserID]; exists && user.LastSeenAtMS > cmd.EventTimeMS { // 腾讯可能重试或延迟投递旧退房事件;如果业务 presence 已被更新到事件之后,保留当前重连和麦位状态。 @@ -203,31 +222,38 @@ func (s *Service) applyRTCRoomExited(now time.Time, current *state.RoomState, cm return s.applyRTCAudioStopped(now, current, cmd) } +// rtcEventMatchesCurrentMicSession 校验音频开始事件是否仍属于当前 pending mic_session。 func rtcEventMatchesCurrentMicSession(seat state.MicSeat, eventTimeMS int64, timeout time.Duration) bool { if !rtcStopEventMatchesCurrentMicSession(seat, eventTimeMS, timeout) { return false } if seat.PublishDeadlineMS > 0 && eventTimeMS > seat.PublishDeadlineMS { + // audio_started 过了确认 deadline 不再接受,超时 worker 会按 mic_session_id 释放麦位。 return false } return true } +// rtcStopEventMatchesCurrentMicSession 校验停止/退房事件是否能作用于当前 mic_session。 func rtcStopEventMatchesCurrentMicSession(seat state.MicSeat, eventTimeMS int64, timeout time.Duration) bool { if seat.MicSessionID == "" || eventTimeMS <= seat.LastPublishEventTimeMS { + // 没有会话或事件时间不递增时,事件不能改变当前麦位。 return false } if createdAtMS := rtcMicSessionCreatedAtMS(seat, timeout); createdAtMS > 0 && eventTimeMS < createdAtMS { + // 小于会话创建时间的 webhook 一定属于旧会话。 return false } return true } +// rtcMicSessionCreatedAtMS 从发布 deadline 反推出会话创建时间,用于过滤旧 RTC 事件。 func rtcMicSessionCreatedAtMS(seat state.MicSeat, timeout time.Duration) int64 { timeoutMS := timeout.Milliseconds() if seat.PublishDeadlineMS <= 0 || timeoutMS <= 0 { + // 没有 deadline 或 timeout 配置时无法反推创建时间,调用方只能使用事件时间递增校验。 return 0 } diff --git a/services/room-service/internal/room/service/service.go b/services/room-service/internal/room/service/service.go index c3ff561a..182ccc4e 100644 --- a/services/room-service/internal/room/service/service.go +++ b/services/room-service/internal/room/service/service.go @@ -103,6 +103,8 @@ type mutationResult struct { roomStatus string // roomSeatCount 非 nil 时代表命令提交时需要同步更新 rooms 元数据座位数。 roomSeatCount *int32 + // roomPasswordHash 非 nil 时代表命令提交时需要同步更新 rooms 当前密码哈希。 + roomPasswordHash *string // walletDebitMS 记录 SendGift 同步扣费耗时;非钱包命令保持 0。 walletDebitMS int64 } diff --git a/services/room-service/internal/room/service/snapshot.go b/services/room-service/internal/room/service/snapshot.go index 3a746eb1..40a6a3c5 100644 --- a/services/room-service/internal/room/service/snapshot.go +++ b/services/room-service/internal/room/service/snapshot.go @@ -66,8 +66,10 @@ func snapshotWithApp(ctx context.Context, snapshot *roomv1.RoomSnapshot) *roomv1 if snapshot == nil { return nil } + // RoomState 本身不保存租户上下文,快照出服务边界前统一补 app_code。 snapshot.AppCode = appcode.FromContext(ctx) if snapshot.RoomShortId == "" && snapshot.GetRoomExt() != nil { + // room_short_id 已提升为顶层字段,但旧快照/恢复路径仍可能只存在于 RoomExt。 snapshot.RoomShortId = snapshot.GetRoomExt()["room_short_id"] } return snapshot diff --git a/services/room-service/internal/room/service/snapshot_query.go b/services/room-service/internal/room/service/snapshot_query.go index a098b040..20ca5765 100644 --- a/services/room-service/internal/room/service/snapshot_query.go +++ b/services/room-service/internal/room/service/snapshot_query.go @@ -48,8 +48,14 @@ func (s *Service) GetRoomSnapshot(ctx context.Context, req *roomv1.GetRoomSnapsh return nil, xerr.New(xerr.PermissionDenied, "viewer is not in room") } + followed, err := s.repository.IsRoomFollowed(ctx, viewerUserID, roomID) + if err != nil { + return nil, err + } + return &roomv1.GetRoomSnapshotResponse{ Room: snapshot, ServerTimeMs: s.clock.Now().UnixMilli(), + IsFollowed: followed, }, nil } diff --git a/services/room-service/internal/room/service/system_evict.go b/services/room-service/internal/room/service/system_evict.go index 0ab9dea2..a2614b73 100644 --- a/services/room-service/internal/room/service/system_evict.go +++ b/services/room-service/internal/room/service/system_evict.go @@ -17,17 +17,19 @@ import ( const defaultSystemEvictReason = "platform_moderation" -// SystemEvictUser removes a platform-banned or risk-blocked user from their current Room Cell. -// It deliberately bypasses room manager role checks, but still serializes through the Room Cell command log. +// SystemEvictUser 把平台封禁、风控命中或后台治理用户从当前 Room Cell 驱逐。 +// 该命令绕过房间管理员权限矩阵,但仍必须经过 Room Cell、command log、outbox 和快照链路。 func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUserRequest) (*roomv1.SystemEvictUserResponse, error) { ctx = contextFromMeta(ctx, req.GetMeta()) targetUserID := req.GetTargetUserId() if targetUserID <= 0 { + // 系统驱逐一定要有明确目标用户,不能依赖 actor 兜底误踢触发人。 return nil, xerr.New(xerr.InvalidArgument, "target_user_id is required") } roomID := strings.TrimSpace(req.GetMeta().GetRoomId()) if roomID == "" { + // 上游不知道房间时从当前房间读模型定位;该读模型来自 RoomSnapshot 投影,不扫描所有 Cell。 presence, exists, err := s.repository.GetCurrentRoomPresence(ctx, targetUserID) if err != nil { return nil, err @@ -38,13 +40,14 @@ func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUs Result: commandResult(false, 0, s.clock.Now()), }, nil } + // presence 只提供候选房间,后续 mutateRoom 仍会恢复并校验 Room Cell 权威状态。 roomID = presence.RoomID } base := baseFromMeta(req.GetMeta()) base.Room = roomID if base.ActorID <= 0 { - // mutateRoom requires a non-zero actor for idempotency metadata; system eviction does not use it for authorization. + // mutateRoom 需要非零 actor 作为命令元信息;系统驱逐不使用它做房间权限判断。 base.ActorID = targetUserID } cmd := command.SystemEvictUser{ @@ -58,6 +61,7 @@ func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUs shouldKickRTC := false result, err := s.mutateRoom(ctx, cmd, true, func(now time.Time, current *state.RoomState, _ *rank.LocalRank) (mutationResult, []outbox.Record, error) { if err := requireActiveRoom(current); err != nil { + // 关闭房间已经没有可驱逐的业务在线态,避免系统命令复活历史状态。 return mutationResult{}, nil, err } @@ -68,11 +72,13 @@ func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUs // 重复系统驱逐保持幂等;没有残留状态时只返回当前快照。 return mutationResult{snapshot: current.ToProto()}, nil, nil } + // 只有用户确实还在业务房间或麦位上,才需要额外调用 RTC 服务端踢出媒体连接。 shouldKickRTC = inRoom || onSeat var releasedSeatNo int32 var releasedMicSessionID string if seat, exists := current.SeatByUser(cmd.TargetUserID); exists { + // 系统驱逐释放麦位时同样写 mic down 事件,麦上时长统计不能只看 kick 事件。 index := current.SeatIndex(seat.SeatNo) releasedSeatNo = seat.SeatNo releasedMicSessionID = current.MicSeats[index].MicSessionID @@ -82,10 +88,12 @@ func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUs delete(current.OnlineUsers, cmd.TargetUserID) delete(current.AdminUsers, cmd.TargetUserID) if cmd.BanFromRoom { + // BanFromRoom 由治理入口决定;只驱逐不封房间时,用户后续可按产品策略重新进房。 current.BanUsers[cmd.TargetUserID] = true } current.Version++ + // 复用 RoomUserKicked 事实类型,让客户端和活动消费者不用区分管理踢人与系统驱逐的清场语义。 evictEvent, err := outbox.Build(current.RoomID, "RoomUserKicked", current.Version, now, &roomeventsv1.RoomUserKicked{ ActorUserId: 0, TargetUserId: cmd.TargetUserID, @@ -119,6 +127,7 @@ func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUs return nil, err } + // Room Cell 提交后再做 RTC 踢人:RTC 是房间外副作用,失败不能回滚已经落盘的治理事实。 response := &roomv1.SystemEvictUserResponse{ HadCurrentRoom: true, Result: commandResult(result.applied, result.snapshot.GetVersion(), s.clock.Now()), @@ -136,6 +145,7 @@ func (s *Service) SystemEvictUser(ctx context.Context, req *roomv1.SystemEvictUs return response, nil } +// normalizeSystemEvictReason 固定治理事件默认原因,避免空 reason 进入 outbox 和 IM 属性。 func normalizeSystemEvictReason(reason string) string { reason = strings.TrimSpace(reason) if reason == "" { diff --git a/services/room-service/internal/room/state/state.go b/services/room-service/internal/room/state/state.go index 491c7371..05b85c3d 100644 --- a/services/room-service/internal/room/state/state.go +++ b/services/room-service/internal/room/state/state.go @@ -87,6 +87,8 @@ type RoomState struct { Status string // ChatEnabled 控制腾讯云 IM 公屏发言守卫。 ChatEnabled bool + // RoomPasswordHash 非空表示房间开启入房密码;只保存哈希,明文只存在于单次 JoinRoom 请求。 + RoomPasswordHash string // MicSeats 是麦位占用状态,所有麦位变更必须在 Room Cell 内完成。 MicSeats []MicSeat // OnlineUsers 是 room-service 业务 presence,不保存真实 socket。 @@ -143,21 +145,22 @@ func (s *RoomState) Clone() *RoomState { // 所有 map 和 slice 都重新分配,避免 mutate 失败时污染当前 Cell 状态。 cloned := &RoomState{ - RoomID: s.RoomID, - OwnerUserID: s.OwnerUserID, - Mode: s.Mode, - VisibleRegionID: s.VisibleRegionID, - Status: s.Status, - ChatEnabled: s.ChatEnabled, - MicSeats: append([]MicSeat(nil), s.MicSeats...), - OnlineUsers: make(map[int64]*RoomUserState, len(s.OnlineUsers)), - AdminUsers: make(map[int64]bool, len(s.AdminUsers)), - BanUsers: make(map[int64]bool, len(s.BanUsers)), - MuteUsers: make(map[int64]bool, len(s.MuteUsers)), - Heat: s.Heat, - GiftRank: append([]RankItem(nil), s.GiftRank...), - RoomExt: make(map[string]string, len(s.RoomExt)), - Version: s.Version, + RoomID: s.RoomID, + OwnerUserID: s.OwnerUserID, + Mode: s.Mode, + VisibleRegionID: s.VisibleRegionID, + Status: s.Status, + ChatEnabled: s.ChatEnabled, + RoomPasswordHash: s.RoomPasswordHash, + MicSeats: append([]MicSeat(nil), s.MicSeats...), + OnlineUsers: make(map[int64]*RoomUserState, len(s.OnlineUsers)), + AdminUsers: make(map[int64]bool, len(s.AdminUsers)), + BanUsers: make(map[int64]bool, len(s.BanUsers)), + MuteUsers: make(map[int64]bool, len(s.MuteUsers)), + Heat: s.Heat, + GiftRank: append([]RankItem(nil), s.GiftRank...), + RoomExt: make(map[string]string, len(s.RoomExt)), + Version: s.Version, } for userID, userState := range s.OnlineUsers { @@ -296,6 +299,7 @@ func (s *RoomState) ToProto() *roomv1.RoomSnapshot { Heat: s.Heat, Version: s.Version, RoomShortId: s.RoomExt["room_short_id"], + Locked: s.RoomPasswordHash != "", } } diff --git a/services/room-service/internal/storage/mysql/repository.go b/services/room-service/internal/storage/mysql/repository.go index 53f3b942..11e7d761 100644 --- a/services/room-service/internal/storage/mysql/repository.go +++ b/services/room-service/internal/storage/mysql/repository.go @@ -79,6 +79,7 @@ func (r *Repository) Migrate(ctx context.Context) error { seat_count INT NOT NULL, mode VARCHAR(64) NOT NULL, status VARCHAR(32) NOT NULL, + room_password_hash VARCHAR(128) NOT NULL DEFAULT '', visible_region_id BIGINT NOT NULL DEFAULT 0, created_at_ms BIGINT NOT NULL, updated_at_ms BIGINT NOT NULL, @@ -97,6 +98,7 @@ func (r *Repository) Migrate(ctx context.Context) error { cover_url VARCHAR(512) NOT NULL DEFAULT '', mode VARCHAR(64) NOT NULL, status VARCHAR(32) NOT NULL, + locked BOOLEAN NOT NULL DEFAULT FALSE, heat BIGINT NOT NULL DEFAULT 0, online_count INT NOT NULL DEFAULT 0, seat_count INT NOT NULL DEFAULT 0, @@ -178,6 +180,36 @@ func (r *Repository) Migrate(ctx context.Context) error { PRIMARY KEY (app_code, user_id, feed_type, room_id), KEY idx_room_user_feed_list (app_code, user_id, feed_type, updated_at_ms DESC, room_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`, + `CREATE TABLE IF NOT EXISTS room_follows ( + app_code VARCHAR(32) NOT NULL, + user_id BIGINT NOT NULL, + room_id VARCHAR(64) NOT NULL, + status VARCHAR(32) NOT NULL, + followed_at_ms BIGINT NOT NULL, + updated_at_ms BIGINT NOT NULL, + PRIMARY KEY (app_code, user_id, room_id), + KEY idx_room_follows_user_list (app_code, user_id, status, followed_at_ms DESC, room_id), + KEY idx_room_follows_room (app_code, room_id, status) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`, + `CREATE TABLE IF NOT EXISTS room_region_pins ( + id BIGINT NOT NULL AUTO_INCREMENT, + app_code VARCHAR(32) NOT NULL, + visible_region_id BIGINT NOT NULL, + room_id VARCHAR(64) NOT NULL, + weight BIGINT NOT NULL DEFAULT 0, + status VARCHAR(32) NOT NULL, + pinned_at_ms BIGINT NOT NULL, + expires_at_ms BIGINT NOT NULL, + cancelled_at_ms BIGINT NOT NULL DEFAULT 0, + created_by_admin_id BIGINT UNSIGNED NOT NULL DEFAULT 0, + cancelled_by_admin_id BIGINT UNSIGNED NOT NULL DEFAULT 0, + created_at_ms BIGINT NOT NULL, + updated_at_ms BIGINT NOT NULL, + PRIMARY KEY (id), + UNIQUE KEY uk_room_region_pins_room (app_code, visible_region_id, room_id), + KEY idx_room_region_pins_active (app_code, visible_region_id, status, expires_at_ms, weight DESC, room_id), + KEY idx_room_region_pins_room (app_code, room_id, status) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`, `CREATE TABLE IF NOT EXISTS room_seat_configs ( app_code VARCHAR(32) NOT NULL, allowed_seat_counts VARCHAR(128) NOT NULL, @@ -195,6 +227,8 @@ func (r *Repository) Migrate(ctx context.Context) error { `ALTER TABLE room_command_log MODIFY COLUMN app_code VARCHAR(32) NOT NULL`, `ALTER TABLE room_outbox MODIFY COLUMN app_code VARCHAR(32) NOT NULL`, `ALTER TABLE room_user_feed_entries MODIFY COLUMN app_code VARCHAR(32) NOT NULL`, + `ALTER TABLE room_follows MODIFY COLUMN app_code VARCHAR(32) NOT NULL`, + `ALTER TABLE room_region_pins MODIFY COLUMN app_code VARCHAR(32) NOT NULL`, `ALTER TABLE room_seat_configs MODIFY COLUMN app_code VARCHAR(32) NOT NULL`, } @@ -205,9 +239,44 @@ func (r *Repository) Migrate(ctx context.Context) error { } } + if err := r.ensureRoomListLockSchema(ctx); err != nil { + return err + } + if err := r.ensureRoomPasswordSchema(ctx); err != nil { + return err + } + return r.ensureOutboxRetrySchema(ctx) } +func (r *Repository) ensureRoomPasswordSchema(ctx context.Context) error { + hasColumn, err := r.columnExists(ctx, "rooms", "room_password_hash") + if err != nil { + return err + } + if !hasColumn { + // rooms 是最新快照恢复密码哈希的持久来源;列表只使用 locked 布尔投影。 + if _, err := r.db.ExecContext(ctx, `ALTER TABLE rooms ADD COLUMN room_password_hash VARCHAR(128) NOT NULL DEFAULT '' AFTER status`); err != nil { + return err + } + } + return nil +} + +func (r *Repository) ensureRoomListLockSchema(ctx context.Context) error { + hasColumn, err := r.columnExists(ctx, "room_list_entries", "locked") + if err != nil { + return err + } + if !hasColumn { + // locked 是列表/搜索需要的纯投影字段,历史行默认 false,后续房间状态变更会刷新为真实值。 + if _, err := r.db.ExecContext(ctx, `ALTER TABLE room_list_entries ADD COLUMN locked BOOLEAN NOT NULL DEFAULT FALSE AFTER status`); err != nil { + return err + } + } + return nil +} + func (r *Repository) ensureOutboxRetrySchema(ctx context.Context) error { hasColumn, err := r.columnExists(ctx, "room_outbox", "next_retry_at_ms") if err != nil { @@ -256,8 +325,8 @@ func (r *Repository) SaveRoomMeta(ctx context.Context, meta roomservice.RoomMeta appCode := normalizedRecordAppCode(ctx, meta.AppCode) nowMS := time.Now().UTC().UnixMilli() _, err := r.db.ExecContext(ctx, - `INSERT INTO rooms (app_code, room_id, room_short_id, owner_user_id, seat_count, mode, status, visible_region_id, created_at_ms, updated_at_ms) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, + `INSERT INTO rooms (app_code, room_id, room_short_id, owner_user_id, seat_count, mode, status, room_password_hash, visible_region_id, created_at_ms, updated_at_ms) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, appCode, meta.RoomID, meta.RoomShortID, @@ -265,6 +334,7 @@ func (r *Repository) SaveRoomMeta(ctx context.Context, meta roomservice.RoomMeta meta.SeatCount, meta.Mode, meta.Status, + meta.RoomPasswordHash, meta.VisibleRegionID, nowMS, nowMS, @@ -277,7 +347,7 @@ func (r *Repository) SaveRoomMeta(ctx context.Context, meta roomservice.RoomMeta func (r *Repository) GetRoomMeta(ctx context.Context, roomID string) (roomservice.RoomMeta, bool, error) { // meta 是无内存 Cell 恢复的入口;不存在时上层返回 room not found。 row := r.db.QueryRowContext(ctx, - `SELECT app_code, room_id, room_short_id, owner_user_id, seat_count, mode, status, visible_region_id + `SELECT app_code, room_id, room_short_id, owner_user_id, seat_count, mode, status, room_password_hash, visible_region_id FROM rooms WHERE app_code = ? AND room_id = ?`, appcode.FromContext(ctx), @@ -285,7 +355,7 @@ func (r *Repository) GetRoomMeta(ctx context.Context, roomID string) (roomservic ) var meta roomservice.RoomMeta - if err := row.Scan(&meta.AppCode, &meta.RoomID, &meta.RoomShortID, &meta.OwnerUserID, &meta.SeatCount, &meta.Mode, &meta.Status, &meta.VisibleRegionID); err != nil { + if err := row.Scan(&meta.AppCode, &meta.RoomID, &meta.RoomShortID, &meta.OwnerUserID, &meta.SeatCount, &meta.Mode, &meta.Status, &meta.RoomPasswordHash, &meta.VisibleRegionID); err != nil { if errors.Is(err, sql.ErrNoRows) { // 未创建房间不是数据库错误,用 exists=false 表达。 return roomservice.RoomMeta{}, false, nil @@ -301,7 +371,7 @@ func (r *Repository) GetRoomMeta(ctx context.Context, roomID string) (roomservic func (r *Repository) GetRoomMetaByOwner(ctx context.Context, ownerUserID int64) (roomservice.RoomMeta, bool, error) { // rooms.owner_user_id 有唯一约束,查询最多返回一条;该读路径用于 CreateRoom 前置失败。 row := r.db.QueryRowContext(ctx, - `SELECT app_code, room_id, room_short_id, owner_user_id, seat_count, mode, status, visible_region_id + `SELECT app_code, room_id, room_short_id, owner_user_id, seat_count, mode, status, room_password_hash, visible_region_id FROM rooms WHERE app_code = ? AND owner_user_id = ? LIMIT 1`, @@ -310,7 +380,7 @@ func (r *Repository) GetRoomMetaByOwner(ctx context.Context, ownerUserID int64) ) var meta roomservice.RoomMeta - if err := row.Scan(&meta.AppCode, &meta.RoomID, &meta.RoomShortID, &meta.OwnerUserID, &meta.SeatCount, &meta.Mode, &meta.Status, &meta.VisibleRegionID); err != nil { + if err := row.Scan(&meta.AppCode, &meta.RoomID, &meta.RoomShortID, &meta.OwnerUserID, &meta.SeatCount, &meta.Mode, &meta.Status, &meta.RoomPasswordHash, &meta.VisibleRegionID); err != nil { if errors.Is(err, sql.ErrNoRows) { return roomservice.RoomMeta{}, false, nil } @@ -480,6 +550,33 @@ func (r *Repository) SaveMutation(ctx context.Context, commit roomservice.Mutati return err } } + if commit.RoomPasswordHash != nil { + locked := strings.TrimSpace(*commit.RoomPasswordHash) != "" + if _, err := tx.ExecContext(ctx, + `UPDATE rooms + SET room_password_hash = ?, updated_at_ms = ? + WHERE app_code = ? AND room_id = ?`, + *commit.RoomPasswordHash, + commit.Command.CreatedAtMS, + appCode, + commit.Command.RoomID, + ); err != nil { + _ = tx.Rollback() + return err + } + if _, err := tx.ExecContext(ctx, + `UPDATE room_list_entries + SET locked = ?, updated_at_ms = ? + WHERE app_code = ? AND room_id = ?`, + locked, + commit.Command.CreatedAtMS, + appCode, + commit.Command.RoomID, + ); err != nil { + _ = tx.Rollback() + return err + } + } return tx.Commit() } @@ -890,9 +987,9 @@ func (r *Repository) UpsertRoomListEntry(ctx context.Context, entry roomservice. appCode := normalizedRecordAppCode(ctx, entry.AppCode) _, err := r.db.ExecContext(ctx, `INSERT INTO room_list_entries ( - app_code, room_id, room_short_id, visible_region_id, owner_user_id, title, cover_url, mode, status, + app_code, room_id, room_short_id, visible_region_id, owner_user_id, title, cover_url, mode, status, locked, heat, online_count, seat_count, occupied_seat_count, sort_score, created_at_ms, updated_at_ms - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE room_short_id = VALUES(room_short_id), visible_region_id = VALUES(visible_region_id), @@ -901,6 +998,7 @@ func (r *Repository) UpsertRoomListEntry(ctx context.Context, entry roomservice. cover_url = VALUES(cover_url), mode = VALUES(mode), status = VALUES(status), + locked = VALUES(locked), heat = VALUES(heat), online_count = VALUES(online_count), seat_count = VALUES(seat_count), @@ -916,6 +1014,7 @@ func (r *Repository) UpsertRoomListEntry(ctx context.Context, entry roomservice. entry.CoverURL, entry.Mode, entry.Status, + entry.Locked, entry.Heat, entry.OnlineCount, entry.SeatCount, @@ -934,6 +1033,9 @@ func (r *Repository) ListRoomListEntries(ctx context.Context, query roomservice. query.Limit = 20 } query.AppCode = normalizedRecordAppCode(ctx, query.AppCode) + if query.NowMS <= 0 { + query.NowMS = time.Now().UTC().UnixMilli() + } sqlText, args := buildRoomListQuerySQL(query) rows, err := r.db.QueryContext(ctx, sqlText, args...) @@ -945,6 +1047,7 @@ func (r *Repository) ListRoomListEntries(ctx context.Context, query roomservice. entries := make([]roomservice.RoomListEntry, 0, query.Limit) for rows.Next() { var entry roomservice.RoomListEntry + var pinned int64 if err := rows.Scan( &entry.AppCode, &entry.RoomID, @@ -955,6 +1058,7 @@ func (r *Repository) ListRoomListEntries(ctx context.Context, query roomservice. &entry.CoverURL, &entry.Mode, &entry.Status, + &entry.Locked, &entry.Heat, &entry.OnlineCount, &entry.SeatCount, @@ -962,10 +1066,14 @@ func (r *Repository) ListRoomListEntries(ctx context.Context, query roomservice. &entry.SortScore, &entry.CreatedAtMS, &entry.UpdatedAtMS, + &pinned, + &entry.PinWeight, + &entry.PinnedUntilMS, ); err != nil { return nil, err } + entry.IsPinned = pinned > 0 entries = append(entries, entry) } if err := rows.Err(); err != nil { @@ -1021,6 +1129,132 @@ func (r *Repository) ListRoomUserFeedEntries(ctx context.Context, query roomserv &entry.CoverURL, &entry.Mode, &entry.Status, + &entry.Locked, + &entry.Heat, + &entry.OnlineCount, + &entry.SeatCount, + &entry.OccupiedSeatCount, + &entry.SortScore, + &entry.CreatedAtMS, + &entry.UpdatedAtMS, + ); err != nil { + return nil, err + } + + entries = append(entries, entry) + } + if err := rows.Err(); err != nil { + return nil, err + } + + return entries, nil +} + +// FollowRoom 建立或恢复用户对房间的关注关系。 +func (r *Repository) FollowRoom(ctx context.Context, userID int64, roomID string, nowMS int64) (roomservice.RoomFollowRecord, error) { + appCode := appcode.FromContext(ctx) + if nowMS <= 0 { + nowMS = time.Now().UTC().UnixMilli() + } + if _, err := r.db.ExecContext(ctx, + `INSERT INTO room_follows (app_code, user_id, room_id, status, followed_at_ms, updated_at_ms) + VALUES (?, ?, ?, ?, ?, ?) + ON DUPLICATE KEY UPDATE + followed_at_ms = IF(status = ?, followed_at_ms, VALUES(followed_at_ms)), + status = VALUES(status), + updated_at_ms = VALUES(updated_at_ms)`, + appCode, + userID, + roomID, + roomFollowStatusActiveSQL, + nowMS, + nowMS, + roomFollowStatusActiveSQL, + ); err != nil { + return roomservice.RoomFollowRecord{}, err + } + + record, _, err := r.getRoomFollowRecord(ctx, userID, roomID) + return record, err +} + +// UnfollowRoom 取消用户对房间的关注关系;没有现存关系时不写入新行。 +func (r *Repository) UnfollowRoom(ctx context.Context, userID int64, roomID string, nowMS int64) error { + if nowMS <= 0 { + nowMS = time.Now().UTC().UnixMilli() + } + _, err := r.db.ExecContext(ctx, + `UPDATE room_follows + SET status = ?, updated_at_ms = ? + WHERE app_code = ? AND user_id = ? AND room_id = ? AND status = ?`, + roomFollowStatusCancelledSQL, + nowMS, + appcode.FromContext(ctx), + userID, + roomID, + roomFollowStatusActiveSQL, + ) + return err +} + +// IsRoomFollowed 查询用户是否正在关注指定房间。 +func (r *Repository) IsRoomFollowed(ctx context.Context, userID int64, roomID string) (bool, error) { + record, exists, err := r.getRoomFollowRecord(ctx, userID, roomID) + if err != nil || !exists { + return false, err + } + return record.Status == roomFollowStatusActiveSQL, nil +} + +func (r *Repository) getRoomFollowRecord(ctx context.Context, userID int64, roomID string) (roomservice.RoomFollowRecord, bool, error) { + row := r.db.QueryRowContext(ctx, + `SELECT app_code, user_id, room_id, status, followed_at_ms, updated_at_ms + FROM room_follows + WHERE app_code = ? AND user_id = ? AND room_id = ? + LIMIT 1`, + appcode.FromContext(ctx), + userID, + roomID, + ) + + var record roomservice.RoomFollowRecord + if err := row.Scan(&record.AppCode, &record.UserID, &record.RoomID, &record.Status, &record.FollowedAtMS, &record.UpdatedAtMS); err != nil { + if errors.Is(err, sql.ErrNoRows) { + return roomservice.RoomFollowRecord{}, false, nil + } + return roomservice.RoomFollowRecord{}, false, err + } + return record, true, nil +} + +// ListRoomFollowEntries 读取当前用户关注的 active 房间卡片。 +func (r *Repository) ListRoomFollowEntries(ctx context.Context, query roomservice.RoomFollowQuery) ([]roomservice.RoomListEntry, error) { + if query.Limit <= 0 { + query.Limit = 20 + } + query.AppCode = normalizedRecordAppCode(ctx, query.AppCode) + + sqlText, args := buildRoomFollowQuerySQL(query) + rows, err := r.db.QueryContext(ctx, sqlText, args...) + if err != nil { + return nil, err + } + defer rows.Close() + + entries := make([]roomservice.RoomListEntry, 0, query.Limit) + for rows.Next() { + var entry roomservice.RoomListEntry + if err := rows.Scan( + &entry.AppCode, + &entry.RoomID, + &entry.RoomShortID, + &entry.VisibleRegionID, + &entry.OwnerUserID, + &entry.Title, + &entry.CoverURL, + &entry.Mode, + &entry.Status, + &entry.Locked, &entry.Heat, &entry.OnlineCount, &entry.SeatCount, @@ -1072,6 +1306,7 @@ func (r *Repository) ListRoomRelatedFeedEntries(ctx context.Context, query rooms &entry.CoverURL, &entry.Mode, &entry.Status, + &entry.Locked, &entry.Heat, &entry.OnlineCount, &entry.SeatCount, @@ -1109,43 +1344,87 @@ func (r *Repository) ListRoomRelatedFeedEntries(ctx context.Context, query rooms } const roomListSelectColumns = ` - SELECT app_code, room_id, room_short_id, visible_region_id, owner_user_id, title, cover_url, mode, status, + SELECT app_code, room_id, room_short_id, visible_region_id, owner_user_id, title, cover_url, mode, status, locked, heat, online_count, seat_count, occupied_seat_count, sort_score, created_at_ms, updated_at_ms FROM room_list_entries` const roomUserFeedSelectColumns = ` - SELECT r.app_code, r.room_id, r.room_short_id, r.visible_region_id, r.owner_user_id, r.title, r.cover_url, r.mode, r.status, + SELECT r.app_code, r.room_id, r.room_short_id, r.visible_region_id, r.owner_user_id, r.title, r.cover_url, r.mode, r.status, r.locked, r.heat, r.online_count, r.seat_count, r.occupied_seat_count, r.sort_score, r.created_at_ms, f.updated_at_ms FROM room_user_feed_entries f JOIN room_list_entries r ON r.app_code = f.app_code AND r.room_id = f.room_id` +const roomFollowSelectColumns = ` + SELECT r.app_code, r.room_id, r.room_short_id, r.visible_region_id, r.owner_user_id, r.title, r.cover_url, r.mode, r.status, r.locked, + r.heat, r.online_count, r.seat_count, r.occupied_seat_count, r.sort_score, r.created_at_ms, f.followed_at_ms + FROM room_follows f + JOIN room_list_entries r ON r.app_code = f.app_code AND r.room_id = f.room_id` + func buildRoomListQuerySQL(query roomservice.RoomListQuery) (string, []any) { - where := []string{"app_code = ?", "visible_region_id = ?", "status = ?"} - args := []any{appcode.Normalize(query.AppCode), query.VisibleRegionID, "active"} + pinnedExpr := "CASE WHEN p.room_id IS NULL THEN 0 ELSE 1 END" + pinWeightExpr := "COALESCE(p.weight, 0)" + pinExpiresExpr := "COALESCE(p.expires_at_ms, 0)" + selectSQL := ` + SELECT r.app_code, r.room_id, r.room_short_id, r.visible_region_id, r.owner_user_id, r.title, r.cover_url, r.mode, r.status, r.locked, + r.heat, r.online_count, r.seat_count, r.occupied_seat_count, r.sort_score, r.created_at_ms, r.updated_at_ms, + ` + pinnedExpr + ` AS is_pinned, ` + pinWeightExpr + ` AS pin_weight, ` + pinExpiresExpr + ` AS pinned_until_ms + FROM room_list_entries r + LEFT JOIN room_region_pins p + ON p.app_code = r.app_code + AND p.visible_region_id = r.visible_region_id + AND p.room_id = r.room_id + AND p.status = ? + AND p.expires_at_ms > ?` + where := []string{"r.app_code = ?", "r.visible_region_id = ?", "r.status = ?"} + args := []any{"active", query.NowMS, appcode.Normalize(query.AppCode), query.VisibleRegionID, "active"} if query.OwnerUserID > 0 { - where = append(where, "owner_user_id = ?") + where = append(where, "r.owner_user_id = ?") args = append(args, query.OwnerUserID) } if strings.TrimSpace(query.Query) != "" { - where = append(where, "(room_id LIKE ? ESCAPE '\\\\' OR room_short_id LIKE ? ESCAPE '\\\\' OR title LIKE ? ESCAPE '\\\\')") + where = append(where, "(r.room_id LIKE ? ESCAPE '\\\\' OR r.room_short_id LIKE ? ESCAPE '\\\\' OR r.title LIKE ? ESCAPE '\\\\')") like := "%" + escapeRoomListLike(query.Query) + "%" args = append(args, like, like, like) } if query.Tab == "new" { if query.CursorRoomID != "" { - where = append(where, "(created_at_ms < ? OR (created_at_ms = ? AND room_id > ?))") - args = append(args, query.CursorCreatedAtMS, query.CursorCreatedAtMS, query.CursorRoomID) + where = append(where, roomListAfterCursorSQL(pinnedExpr, pinWeightExpr, pinExpiresExpr, "r.created_at_ms")) + args = append(args, roomListAfterCursorArgs(query.CursorPinned, query.CursorPinWeight, query.CursorPinnedUntilMS, query.CursorCreatedAtMS, query.CursorRoomID)...) } args = append(args, query.Limit) - return roomListSelectColumns + "\n\tWHERE " + strings.Join(where, " AND ") + "\n\tORDER BY created_at_ms DESC, room_id ASC\n\tLIMIT ?", args + return selectSQL + "\n\tWHERE " + strings.Join(where, " AND ") + "\n\tORDER BY " + pinnedExpr + " DESC, " + pinWeightExpr + " DESC, " + pinExpiresExpr + " DESC, r.created_at_ms DESC, r.room_id ASC\n\tLIMIT ?", args } if query.CursorRoomID != "" { - where = append(where, "(sort_score < ? OR (sort_score = ? AND room_id > ?))") - args = append(args, query.CursorSortScore, query.CursorSortScore, query.CursorRoomID) + where = append(where, roomListAfterCursorSQL(pinnedExpr, pinWeightExpr, pinExpiresExpr, "r.sort_score")) + args = append(args, roomListAfterCursorArgs(query.CursorPinned, query.CursorPinWeight, query.CursorPinnedUntilMS, query.CursorSortScore, query.CursorRoomID)...) } args = append(args, query.Limit) - return roomListSelectColumns + "\n\tWHERE " + strings.Join(where, " AND ") + "\n\tORDER BY sort_score DESC, room_id ASC\n\tLIMIT ?", args + return selectSQL + "\n\tWHERE " + strings.Join(where, " AND ") + "\n\tORDER BY " + pinnedExpr + " DESC, " + pinWeightExpr + " DESC, " + pinExpiresExpr + " DESC, r.sort_score DESC, r.room_id ASC\n\tLIMIT ?", args +} + +func roomListAfterCursorSQL(pinnedExpr string, pinWeightExpr string, pinExpiresExpr string, sortExpr string) string { + // 置顶分区、权重、过期时间和原有排序键共同组成游标,避免区域置顶跨页时重复或跳过普通房间。 + return "(" + + pinnedExpr + " < ? OR (" + + pinnedExpr + " = ? AND " + pinWeightExpr + " < ?) OR (" + + pinnedExpr + " = ? AND " + pinWeightExpr + " = ? AND " + pinExpiresExpr + " < ?) OR (" + + pinnedExpr + " = ? AND " + pinWeightExpr + " = ? AND " + pinExpiresExpr + " = ? AND " + sortExpr + " < ?) OR (" + + pinnedExpr + " = ? AND " + pinWeightExpr + " = ? AND " + pinExpiresExpr + " = ? AND " + sortExpr + " = ? AND r.room_id > ?))" +} + +func roomListAfterCursorArgs(pinned bool, pinWeight int64, pinnedUntilMS int64, sortValue int64, roomID string) []any { + pinnedValue := 0 + if pinned { + pinnedValue = 1 + } + return []any{ + pinnedValue, + pinnedValue, pinWeight, + pinnedValue, pinWeight, pinnedUntilMS, + pinnedValue, pinWeight, pinnedUntilMS, sortValue, + pinnedValue, pinWeight, pinnedUntilMS, sortValue, roomID, + } } func buildRoomUserFeedQuerySQL(query roomservice.RoomUserFeedQuery) (string, []any) { @@ -1164,6 +1443,22 @@ func buildRoomUserFeedQuerySQL(query roomservice.RoomUserFeedQuery) (string, []a return roomUserFeedSelectColumns + "\n\tWHERE " + strings.Join(where, " AND ") + "\n\tORDER BY f.updated_at_ms DESC, f.room_id ASC\n\tLIMIT ?", args } +func buildRoomFollowQuerySQL(query roomservice.RoomFollowQuery) (string, []any) { + where := []string{"f.app_code = ?", "f.user_id = ?", "f.status = ?", "r.visible_region_id = ?", "r.status = ?"} + args := []any{appcode.Normalize(query.AppCode), query.UserID, roomFollowStatusActiveSQL, query.VisibleRegionID, "active"} + if strings.TrimSpace(query.Query) != "" { + where = append(where, "(r.room_id LIKE ? ESCAPE '\\\\' OR r.room_short_id LIKE ? ESCAPE '\\\\' OR r.title LIKE ? ESCAPE '\\\\')") + like := "%" + escapeRoomListLike(query.Query) + "%" + args = append(args, like, like, like) + } + if query.CursorRoomID != "" { + where = append(where, "(f.followed_at_ms < ? OR (f.followed_at_ms = ? AND f.room_id > ?))") + args = append(args, query.CursorFollowedAtMS, query.CursorFollowedAtMS, query.CursorRoomID) + } + args = append(args, query.Limit) + return roomFollowSelectColumns + "\n\tWHERE " + strings.Join(where, " AND ") + "\n\tORDER BY f.followed_at_ms DESC, f.room_id ASC\n\tLIMIT ?", args +} + func buildRoomRelatedFeedQuerySQL(query roomservice.RoomRelatedFeedQuery, relations map[int64]int64) (string, []any) { where := []string{"app_code = ?", "visible_region_id = ?", "status = ?"} args := []any{appcode.Normalize(query.AppCode), query.VisibleRegionID, "active"} @@ -1402,8 +1697,10 @@ func (r *Repository) ListRoomOnlineUsers(ctx context.Context, query roomservice. } const ( - roomPresenceStatusActiveSQL = "active" - roomPresenceStatusLeftSQL = "left" + roomPresenceStatusActiveSQL = "active" + roomPresenceStatusLeftSQL = "left" + roomFollowStatusActiveSQL = "active" + roomFollowStatusCancelledSQL = "cancelled" ) func escapeRoomListLike(value string) string { diff --git a/services/room-service/internal/testutil/mysqltest/mysqltest.go b/services/room-service/internal/testutil/mysqltest/mysqltest.go index b4af5a12..536a0c3b 100644 --- a/services/room-service/internal/testutil/mysqltest/mysqltest.go +++ b/services/room-service/internal/testutil/mysqltest/mysqltest.go @@ -72,6 +72,37 @@ func (r *Repository) DeleteRoomListEntry(roomID string) { } } +// SetRoomSortScore rewrites discovery sort_score for deterministic list-order tests. +func (r *Repository) SetRoomSortScore(roomID string, sortScore int64) { + r.t.Helper() + + if _, err := r.schema.DB.ExecContext(context.Background(), `UPDATE room_list_entries SET sort_score = ? WHERE app_code = ? AND room_id = ?`, sortScore, appcode.Default, roomID); err != nil { + r.t.Fatalf("update room sort score failed: %v", err) + } +} + +// PinRoom inserts an active regional pin exactly as the admin backend writes it. +func (r *Repository) PinRoom(roomID string, regionID int64, weight int64, expiresAtMS int64) { + r.t.Helper() + + nowMS := int64(1000) + if _, err := r.schema.DB.ExecContext(context.Background(), ` + INSERT INTO room_region_pins ( + app_code, visible_region_id, room_id, weight, status, pinned_at_ms, expires_at_ms, + cancelled_at_ms, created_by_admin_id, cancelled_by_admin_id, created_at_ms, updated_at_ms + ) VALUES (?, ?, ?, ?, 'active', ?, ?, 0, 1, 0, ?, ?) + ON DUPLICATE KEY UPDATE + weight = VALUES(weight), + status = VALUES(status), + pinned_at_ms = VALUES(pinned_at_ms), + expires_at_ms = VALUES(expires_at_ms), + cancelled_at_ms = 0, + updated_at_ms = VALUES(updated_at_ms) + `, appcode.Default, regionID, roomID, weight, nowMS, expiresAtMS, nowMS, nowMS); err != nil { + r.t.Fatalf("pin room failed: %v", err) + } +} + // OutboxRecord reads one outbox row, including delivered rows that normal scans skip. func (r *Repository) OutboxRecord(eventID string) (outbox.Record, bool) { r.t.Helper() diff --git a/services/room-service/internal/transport/grpc/server.go b/services/room-service/internal/transport/grpc/server.go index cbbec4df..9b19f890 100644 --- a/services/room-service/internal/transport/grpc/server.go +++ b/services/room-service/internal/transport/grpc/server.go @@ -228,6 +228,18 @@ func (s *Server) SetChatEnabled(ctx context.Context, req *roomv1.SetChatEnabledR return mapServiceResult(s.svc.SetChatEnabled(ctx, req)) } +// SetRoomPassword 代理到领域服务。 +func (s *Server) SetRoomPassword(ctx context.Context, req *roomv1.SetRoomPasswordRequest) (*roomv1.SetRoomPasswordResponse, error) { + // 房间密码影响 JoinRoom 入口,必须由当前 Room Cell owner 串行提交。 + ctx = contextWithMetaApp(ctx, req.GetMeta()) + if resp, forwarded, err := forwardCommand(s, ctx, req.GetMeta(), func(callCtx context.Context, client roomv1.RoomCommandServiceClient) (*roomv1.SetRoomPasswordResponse, error) { + return client.SetRoomPassword(callCtx, req) + }); forwarded { + return resp, err + } + return mapServiceResult(s.svc.SetRoomPassword(ctx, req)) +} + // SetRoomAdmin 代理到领域服务。 func (s *Server) SetRoomAdmin(ctx context.Context, req *roomv1.SetRoomAdminRequest) (*roomv1.SetRoomAdminResponse, error) { // 管理员集合只能由 room-service 权限矩阵修改。 @@ -300,6 +312,20 @@ func (s *Server) SendGift(ctx context.Context, req *roomv1.SendGiftRequest) (*ro return mapServiceResult(s.svc.SendGift(ctx, req)) } +// FollowRoom 建立用户对房间的关注关系。 +func (s *Server) FollowRoom(ctx context.Context, req *roomv1.FollowRoomRequest) (*roomv1.FollowRoomResponse, error) { + // 房间关注是用户-房间关系事实,不改变 Room Cell 核心状态,因此不需要 owner 转发。 + ctx = contextWithMetaApp(ctx, req.GetMeta()) + return mapServiceResult(s.svc.FollowRoom(ctx, req)) +} + +// UnfollowRoom 取消用户对房间的关注关系。 +func (s *Server) UnfollowRoom(ctx context.Context, req *roomv1.UnfollowRoomRequest) (*roomv1.UnfollowRoomResponse, error) { + // 取消关注只收敛关系表状态;历史房间是否仍有 Cell 不影响幂等取消。 + ctx = contextWithMetaApp(ctx, req.GetMeta()) + return mapServiceResult(s.svc.UnfollowRoom(ctx, req)) +} + // CheckSpeakPermission 代理到领域服务。 func (s *Server) CheckSpeakPermission(ctx context.Context, req *roomv1.CheckSpeakPermissionRequest) (*roomv1.CheckSpeakPermissionResponse, error) { // 外部 IM 发公屏前调用该守卫,避免复制禁言和房间状态规则。