From c0ceb4331b67d0099a1986dbfb3adc4cbe502016 Mon Sep 17 00:00:00 2001 From: "DESKTOP-V763RJ7\\Administrator" <835606593@qq.com> Date: Wed, 28 Oct 2026 21:49:26 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + README.md | 2 +- go.mod | 17 + go.sum | 8 + proto/rs/rscommon/rs_common.pb.go | 1470 +++++++++++++++ proto/rs/rspb/service_gateway.pb.go | 675 +++++++ proto/rs/rspb/service_gateway_grpc.pb.go | 324 ++++ proto/rs/rspb/service_notice.pb.go | 69 + proto/rs/rspb/service_notice_grpc.pb.go | 65 + proto/rs/rspb/service_scene.pb.go | 68 + proto/rs/rspb/service_scene_grpc.pb.go | 65 + proto/rs/rspb/service_third-party.pb.go | 1586 +++++++++++++++++ proto/rs/rspb/service_third-party.pb.gw.go | 469 +++++ proto/rs/rspb/service_third-party_grpc.pb.go | 411 +++++ proto/rs/rspb/service_user.pb.go | 1113 ++++++++++++ proto/rs/rspb/service_user.pb.gw.go | 217 +++ proto/rs/rspb/service_user_grpc.pb.go | 411 +++++ proto/ss/sscommon/ss_common.pb.go | 63 + proto/ss/sspb/channel.pb.go | 389 ++++ proto/ss/sspb/define.pb.go | 237 +++ proto/ss/sspb/service.pb.go | 454 +++++ protofile/RpcServer/gen/api.swagger.json | 546 ++++++ protofile/RpcServer/gen_proto.ps1 | 22 + .../sources/google/api/annotations.proto | 31 + .../RpcServer/sources/google/api/http.proto | 370 ++++ .../sources/google/protobuf/any.proto | 162 ++ .../sources/google/protobuf/descriptor.proto | 1448 +++++++++++++++ protofile/RpcServer/sources/rs_common.proto | 122 ++ .../RpcServer/sources/service_gateway.proto | 59 + .../RpcServer/sources/service_notice.proto | 11 + .../RpcServer/sources/service_scene.proto | 11 + .../sources/service_third-party.proto | 134 ++ .../RpcServer/sources/service_user.proto | 108 ++ protofile/SocketServer/gen_proto.ps1 | 18 + protofile/SocketServer/sources/channel.proto | 27 + protofile/SocketServer/sources/define.proto | 21 + protofile/SocketServer/sources/service.proto | 35 + .../SocketServer/sources/ss_common.proto | 3 + topic/define.go | 5 + topic/template.go | 15 + 40 files changed, 11262 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 go.mod create mode 100644 go.sum create mode 100644 proto/rs/rscommon/rs_common.pb.go create mode 100644 proto/rs/rspb/service_gateway.pb.go create mode 100644 proto/rs/rspb/service_gateway_grpc.pb.go create mode 100644 proto/rs/rspb/service_notice.pb.go create mode 100644 proto/rs/rspb/service_notice_grpc.pb.go create mode 100644 proto/rs/rspb/service_scene.pb.go create mode 100644 proto/rs/rspb/service_scene_grpc.pb.go create mode 100644 proto/rs/rspb/service_third-party.pb.go create mode 100644 proto/rs/rspb/service_third-party.pb.gw.go create mode 100644 proto/rs/rspb/service_third-party_grpc.pb.go create mode 100644 proto/rs/rspb/service_user.pb.go create mode 100644 proto/rs/rspb/service_user.pb.gw.go create mode 100644 proto/rs/rspb/service_user_grpc.pb.go create mode 100644 proto/ss/sscommon/ss_common.pb.go create mode 100644 proto/ss/sspb/channel.pb.go create mode 100644 proto/ss/sspb/define.pb.go create mode 100644 proto/ss/sspb/service.pb.go create mode 100644 protofile/RpcServer/gen/api.swagger.json create mode 100644 protofile/RpcServer/gen_proto.ps1 create mode 100644 protofile/RpcServer/sources/google/api/annotations.proto create mode 100644 protofile/RpcServer/sources/google/api/http.proto create mode 100644 protofile/RpcServer/sources/google/protobuf/any.proto create mode 100644 protofile/RpcServer/sources/google/protobuf/descriptor.proto create mode 100644 protofile/RpcServer/sources/rs_common.proto create mode 100644 protofile/RpcServer/sources/service_gateway.proto create mode 100644 protofile/RpcServer/sources/service_notice.proto create mode 100644 protofile/RpcServer/sources/service_scene.proto create mode 100644 protofile/RpcServer/sources/service_third-party.proto create mode 100644 protofile/RpcServer/sources/service_user.proto create mode 100644 protofile/SocketServer/gen_proto.ps1 create mode 100644 protofile/SocketServer/sources/channel.proto create mode 100644 protofile/SocketServer/sources/define.proto create mode 100644 protofile/SocketServer/sources/service.proto create mode 100644 protofile/SocketServer/sources/ss_common.proto create mode 100644 topic/define.go create mode 100644 topic/template.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6104e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +*/.idea \ No newline at end of file diff --git a/README.md b/README.md index 78d5ba3..29ad8b4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # proto -协议 \ No newline at end of file +定义协议、Topic \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..ab70cd3 --- /dev/null +++ b/go.mod @@ -0,0 +1,17 @@ +module git.hlsq.asia/alex/proto + +go 1.24.0 + +require ( + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 + google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 + google.golang.org/grpc v1.77.0 + google.golang.org/protobuf v1.36.10 +) + +require ( + golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82 // indirect + golang.org/x/sys v0.37.0 // indirect + golang.org/x/text v0.30.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..df94486 --- /dev/null +++ b/go.sum @@ -0,0 +1,8 @@ +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3/go.mod h1:zQrxl1YP88HQlA6i9c63DSVPFklWpGX4OWAc9bFuaH4= +golang.org/x/net v0.46.1-0.20251013234738-63d1a5100f82/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210= +golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM= +google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251124214823-79d6a2a48846/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= +google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= +google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= diff --git a/proto/rs/rscommon/rs_common.pb.go b/proto/rs/rscommon/rs_common.pb.go new file mode 100644 index 0000000..29ce594 --- /dev/null +++ b/proto/rs/rscommon/rs_common.pb.go @@ -0,0 +1,1470 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: rs_common.proto + +package rscommon + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ScoreType int32 + +const ( + ScoreType_SCORE_TYPE_UNKNOWN ScoreType = 0 + ScoreType_SCORE_TYPE_HOLE_IN_ONE ScoreType = 1 // 一杆进洞 + ScoreType_SCORE_TYPE_ALBATROSS ScoreType = 2 // 信天翁 + ScoreType_SCORE_TYPE_EAGLE ScoreType = 3 // 老鹰 + ScoreType_SCORE_TYPE_BIRDIE ScoreType = 4 // 小鸟 + ScoreType_SCORE_TYPE_PAR ScoreType = 5 // 标准杆 + ScoreType_SCORE_TYPE_BOGEY ScoreType = 6 // 柏忌 + ScoreType_SCORE_TYPE_BOGEY_PLUS ScoreType = 7 // 柏忌+ +) + +// Enum value maps for ScoreType. +var ( + ScoreType_name = map[int32]string{ + 0: "SCORE_TYPE_UNKNOWN", + 1: "SCORE_TYPE_HOLE_IN_ONE", + 2: "SCORE_TYPE_ALBATROSS", + 3: "SCORE_TYPE_EAGLE", + 4: "SCORE_TYPE_BIRDIE", + 5: "SCORE_TYPE_PAR", + 6: "SCORE_TYPE_BOGEY", + 7: "SCORE_TYPE_BOGEY_PLUS", + } + ScoreType_value = map[string]int32{ + "SCORE_TYPE_UNKNOWN": 0, + "SCORE_TYPE_HOLE_IN_ONE": 1, + "SCORE_TYPE_ALBATROSS": 2, + "SCORE_TYPE_EAGLE": 3, + "SCORE_TYPE_BIRDIE": 4, + "SCORE_TYPE_PAR": 5, + "SCORE_TYPE_BOGEY": 6, + "SCORE_TYPE_BOGEY_PLUS": 7, + } +) + +func (x ScoreType) Enum() *ScoreType { + p := new(ScoreType) + *p = x + return p +} + +func (x ScoreType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScoreType) Descriptor() protoreflect.EnumDescriptor { + return file_rs_common_proto_enumTypes[0].Descriptor() +} + +func (ScoreType) Type() protoreflect.EnumType { + return &file_rs_common_proto_enumTypes[0] +} + +func (x ScoreType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ScoreType.Descriptor instead. +func (ScoreType) EnumDescriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{0} +} + +// 玩法的枚举 +type SideType int32 + +const ( + SideType_SIDE_TYPE_UNKNOWN SideType = 0 + SideType_SIDE_TYPE_TIGER SideType = 1 // 打老虎 + SideType_SIDE_TYPE_RYDER_CUP SideType = 2 // 莱德杯 +) + +// Enum value maps for SideType. +var ( + SideType_name = map[int32]string{ + 0: "SIDE_TYPE_UNKNOWN", + 1: "SIDE_TYPE_TIGER", + 2: "SIDE_TYPE_RYDER_CUP", + } + SideType_value = map[string]int32{ + "SIDE_TYPE_UNKNOWN": 0, + "SIDE_TYPE_TIGER": 1, + "SIDE_TYPE_RYDER_CUP": 2, + } +) + +func (x SideType) Enum() *SideType { + p := new(SideType) + *p = x + return p +} + +func (x SideType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SideType) Descriptor() protoreflect.EnumDescriptor { + return file_rs_common_proto_enumTypes[1].Descriptor() +} + +func (SideType) Type() protoreflect.EnumType { + return &file_rs_common_proto_enumTypes[1] +} + +func (x SideType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SideType.Descriptor instead. +func (SideType) EnumDescriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{1} +} + +// HandicapLimitMode 差点限制模式 +type HandicapLimitMode int32 + +const ( + HandicapLimitMode_HANDICAP_LIMIT_NONE HandicapLimitMode = 0 // 无 + HandicapLimitMode_HANDICAP_LIMIT_36 HandicapLimitMode = 1 // ≥36 + HandicapLimitMode_HANDICAP_LIMIT_28_TO_36 HandicapLimitMode = 2 // 28-36 + HandicapLimitMode_HANDICAP_LIMIT_18_TO_28 HandicapLimitMode = 3 // 18-28 + HandicapLimitMode_HANDICAP_LIMIT_8_TO_18 HandicapLimitMode = 4 // 8-18 + HandicapLimitMode_HANDICAP_LIMIT_0_TO_8 HandicapLimitMode = 5 // 0-8 + HandicapLimitMode_HANDICAP_LIMIT_LESS_THAN_0 HandicapLimitMode = 6 // ≤8 +) + +// Enum value maps for HandicapLimitMode. +var ( + HandicapLimitMode_name = map[int32]string{ + 0: "HANDICAP_LIMIT_NONE", + 1: "HANDICAP_LIMIT_36", + 2: "HANDICAP_LIMIT_28_TO_36", + 3: "HANDICAP_LIMIT_18_TO_28", + 4: "HANDICAP_LIMIT_8_TO_18", + 5: "HANDICAP_LIMIT_0_TO_8", + 6: "HANDICAP_LIMIT_LESS_THAN_0", + } + HandicapLimitMode_value = map[string]int32{ + "HANDICAP_LIMIT_NONE": 0, + "HANDICAP_LIMIT_36": 1, + "HANDICAP_LIMIT_28_TO_36": 2, + "HANDICAP_LIMIT_18_TO_28": 3, + "HANDICAP_LIMIT_8_TO_18": 4, + "HANDICAP_LIMIT_0_TO_8": 5, + "HANDICAP_LIMIT_LESS_THAN_0": 6, + } +) + +func (x HandicapLimitMode) Enum() *HandicapLimitMode { + p := new(HandicapLimitMode) + *p = x + return p +} + +func (x HandicapLimitMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HandicapLimitMode) Descriptor() protoreflect.EnumDescriptor { + return file_rs_common_proto_enumTypes[2].Descriptor() +} + +func (HandicapLimitMode) Type() protoreflect.EnumType { + return &file_rs_common_proto_enumTypes[2] +} + +func (x HandicapLimitMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HandicapLimitMode.Descriptor instead. +func (HandicapLimitMode) EnumDescriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{2} +} + +type ErrorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` +} + +func (x *ErrorInfo) Reset() { + *x = ErrorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorInfo) ProtoMessage() {} + +func (x *ErrorInfo) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[0] + 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 ErrorInfo.ProtoReflect.Descriptor instead. +func (*ErrorInfo) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{0} +} + +func (x *ErrorInfo) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ErrorInfo) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +type PageArgs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageIndex int32 `protobuf:"varint,1,opt,name=PageIndex,json=pageIndex,proto3" json:"PageIndex,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=PageSize,json=pageSize,proto3" json:"PageSize,omitempty"` + OrderList []*OrderInfo `protobuf:"bytes,3,rep,name=OrderList,json=orderList,proto3" json:"OrderList,omitempty"` +} + +func (x *PageArgs) Reset() { + *x = PageArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PageArgs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageArgs) ProtoMessage() {} + +func (x *PageArgs) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[1] + 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 PageArgs.ProtoReflect.Descriptor instead. +func (*PageArgs) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{1} +} + +func (x *PageArgs) GetPageIndex() int32 { + if x != nil { + return x.PageIndex + } + return 0 +} + +func (x *PageArgs) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *PageArgs) GetOrderList() []*OrderInfo { + if x != nil { + return x.OrderList + } + return nil +} + +type PageInfoReply struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PageIndex int32 `protobuf:"varint,1,opt,name=PageIndex,json=pageIndex,proto3" json:"PageIndex,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=PageSize,json=pageSize,proto3" json:"PageSize,omitempty"` + TotalCount int32 `protobuf:"varint,3,opt,name=TotalCount,json=totalCount,proto3" json:"TotalCount,omitempty"` +} + +func (x *PageInfoReply) Reset() { + *x = PageInfoReply{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PageInfoReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageInfoReply) ProtoMessage() {} + +func (x *PageInfoReply) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[2] + 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 PageInfoReply.ProtoReflect.Descriptor instead. +func (*PageInfoReply) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{2} +} + +func (x *PageInfoReply) GetPageIndex() int32 { + if x != nil { + return x.PageIndex + } + return 0 +} + +func (x *PageInfoReply) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *PageInfoReply) GetTotalCount() int32 { + if x != nil { + return x.TotalCount + } + return 0 +} + +type OrderInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Asc bool `protobuf:"varint,2,opt,name=asc,proto3" json:"asc,omitempty"` +} + +func (x *OrderInfo) Reset() { + *x = OrderInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OrderInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderInfo) ProtoMessage() {} + +func (x *OrderInfo) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[3] + 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 OrderInfo.ProtoReflect.Descriptor instead. +func (*OrderInfo) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{3} +} + +func (x *OrderInfo) GetField() string { + if x != nil { + return x.Field + } + return "" +} + +func (x *OrderInfo) GetAsc() bool { + if x != nil { + return x.Asc + } + return false +} + +// 挥杆表数据(展示每个洞的详细杆数) +type AppStroke struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HoleConfig []*AppHoleConfig `protobuf:"bytes,1,rep,name=HoleConfig,json=holeConfig,proto3" json:"HoleConfig,omitempty"` // 球洞的配置 + HoleList []*AppHoleItem `protobuf:"bytes,2,rep,name=HoleList,json=holeList,proto3" json:"HoleList,omitempty"` +} + +func (x *AppStroke) Reset() { + *x = AppStroke{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppStroke) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppStroke) ProtoMessage() {} + +func (x *AppStroke) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[4] + 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 AppStroke.ProtoReflect.Descriptor instead. +func (*AppStroke) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{4} +} + +func (x *AppStroke) GetHoleConfig() []*AppHoleConfig { + if x != nil { + return x.HoleConfig + } + return nil +} + +func (x *AppStroke) GetHoleList() []*AppHoleItem { + if x != nil { + return x.HoleList + } + return nil +} + +type AppHoleItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RoundSn int64 `protobuf:"varint,1,opt,name=RoundSn,json=roundSn,proto3" json:"RoundSn,omitempty"` // 轮次编号 + NickName string `protobuf:"bytes,2,opt,name=NickName,json=nickName,proto3" json:"NickName,omitempty"` // 昵称 + Avatar string `protobuf:"bytes,3,opt,name=Avatar,json=avatar,proto3" json:"Avatar,omitempty"` // 头像 + HCP int32 `protobuf:"varint,4,opt,name=HCP,json=hcp,proto3" json:"HCP,omitempty"` // 差点让杆 + Tee int32 `protobuf:"varint,5,opt,name=Tee,json=tee,proto3" json:"Tee,omitempty"` // 选的Tee台颜色 0 黑 1 金 2 蓝 3 白 4 红 + HoleInfo []*AppHoleConfig `protobuf:"bytes,6,rep,name=HoleInfo,json=holeInfo,proto3" json:"HoleInfo,omitempty"` // 球洞信息 +} + +func (x *AppHoleItem) Reset() { + *x = AppHoleItem{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppHoleItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppHoleItem) ProtoMessage() {} + +func (x *AppHoleItem) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[5] + 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 AppHoleItem.ProtoReflect.Descriptor instead. +func (*AppHoleItem) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{5} +} + +func (x *AppHoleItem) GetRoundSn() int64 { + if x != nil { + return x.RoundSn + } + return 0 +} + +func (x *AppHoleItem) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +func (x *AppHoleItem) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *AppHoleItem) GetHCP() int32 { + if x != nil { + return x.HCP + } + return 0 +} + +func (x *AppHoleItem) GetTee() int32 { + if x != nil { + return x.Tee + } + return 0 +} + +func (x *AppHoleItem) GetHoleInfo() []*AppHoleConfig { + if x != nil { + return x.HoleInfo + } + return nil +} + +type AppHoleConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + HoleNumber int32 `protobuf:"varint,1,opt,name=HoleNumber,json=holeNumber,proto3" json:"HoleNumber,omitempty"` // 球洞编号 + StrokeIndex int32 `protobuf:"varint,2,opt,name=StrokeIndex,json=strokeIndex,proto3" json:"StrokeIndex,omitempty"` // 挥杆指数 + Par int32 `protobuf:"varint,3,opt,name=Par,json=par,proto3" json:"Par,omitempty"` // 球洞par + Gross int32 `protobuf:"varint,4,opt,name=Gross,json=gross,proto3" json:"Gross,omitempty"` // 球洞总杆 + Net int32 `protobuf:"varint,5,opt,name=Net,json=net,proto3" json:"Net,omitempty"` // 球洞净杆 +} + +func (x *AppHoleConfig) Reset() { + *x = AppHoleConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppHoleConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppHoleConfig) ProtoMessage() {} + +func (x *AppHoleConfig) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[6] + 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 AppHoleConfig.ProtoReflect.Descriptor instead. +func (*AppHoleConfig) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{6} +} + +func (x *AppHoleConfig) GetHoleNumber() int32 { + if x != nil { + return x.HoleNumber + } + return 0 +} + +func (x *AppHoleConfig) GetStrokeIndex() int32 { + if x != nil { + return x.StrokeIndex + } + return 0 +} + +func (x *AppHoleConfig) GetPar() int32 { + if x != nil { + return x.Par + } + return 0 +} + +func (x *AppHoleConfig) GetGross() int32 { + if x != nil { + return x.Gross + } + return 0 +} + +func (x *AppHoleConfig) GetNet() int32 { + if x != nil { + return x.Net + } + return 0 +} + +// 得分分布 +type AppCourtGameResultScoreType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type ScoreType `protobuf:"varint,1,opt,name=Type,json=type,proto3,enum=ScoreType" json:"Type,omitempty"` // 类型 + Count int32 `protobuf:"varint,2,opt,name=Count,json=count,proto3" json:"Count,omitempty"` // 数量 +} + +func (x *AppCourtGameResultScoreType) Reset() { + *x = AppCourtGameResultScoreType{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppCourtGameResultScoreType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppCourtGameResultScoreType) ProtoMessage() {} + +func (x *AppCourtGameResultScoreType) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[7] + 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 AppCourtGameResultScoreType.ProtoReflect.Descriptor instead. +func (*AppCourtGameResultScoreType) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{7} +} + +func (x *AppCourtGameResultScoreType) GetType() ScoreType { + if x != nil { + return x.Type + } + return ScoreType_SCORE_TYPE_UNKNOWN +} + +func (x *AppCourtGameResultScoreType) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +// 生涯中的平均成绩 +type AppCareerAveScoring struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Par3 float64 `protobuf:"fixed64,1,opt,name=Par3,json=par3,proto3" json:"Par3,omitempty"` + Par4 float64 `protobuf:"fixed64,2,opt,name=Par4,json=par4,proto3" json:"Par4,omitempty"` + Par5 float64 `protobuf:"fixed64,3,opt,name=Par5,json=par5,proto3" json:"Par5,omitempty"` +} + +func (x *AppCareerAveScoring) Reset() { + *x = AppCareerAveScoring{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppCareerAveScoring) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppCareerAveScoring) ProtoMessage() {} + +func (x *AppCareerAveScoring) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[8] + 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 AppCareerAveScoring.ProtoReflect.Descriptor instead. +func (*AppCareerAveScoring) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{8} +} + +func (x *AppCareerAveScoring) GetPar3() float64 { + if x != nil { + return x.Par3 + } + return 0 +} + +func (x *AppCareerAveScoring) GetPar4() float64 { + if x != nil { + return x.Par4 + } + return 0 +} + +func (x *AppCareerAveScoring) GetPar5() float64 { + if x != nil { + return x.Par5 + } + return 0 +} + +// 生涯中的场均成绩 +type AppCareerAvePerRound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bogey float64 `protobuf:"fixed64,1,opt,name=Bogey,json=bogey,proto3" json:"Bogey,omitempty"` // 柏忌 + Par float64 `protobuf:"fixed64,2,opt,name=Par,json=par,proto3" json:"Par,omitempty"` // 保帕 + Birdie float64 `protobuf:"fixed64,3,opt,name=Birdie,json=birdie,proto3" json:"Birdie,omitempty"` // 小鸟球 + Eagle float64 `protobuf:"fixed64,4,opt,name=Eagle,json=eagle,proto3" json:"Eagle,omitempty"` // 老鹰球 +} + +func (x *AppCareerAvePerRound) Reset() { + *x = AppCareerAvePerRound{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppCareerAvePerRound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppCareerAvePerRound) ProtoMessage() {} + +func (x *AppCareerAvePerRound) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_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 AppCareerAvePerRound.ProtoReflect.Descriptor instead. +func (*AppCareerAvePerRound) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{9} +} + +func (x *AppCareerAvePerRound) GetBogey() float64 { + if x != nil { + return x.Bogey + } + return 0 +} + +func (x *AppCareerAvePerRound) GetPar() float64 { + if x != nil { + return x.Par + } + return 0 +} + +func (x *AppCareerAvePerRound) GetBirdie() float64 { + if x != nil { + return x.Birdie + } + return 0 +} + +func (x *AppCareerAvePerRound) GetEagle() float64 { + if x != nil { + return x.Eagle + } + return 0 +} + +// 生涯中的累计数据 +type AppCareerHandicapTrend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Swings int32 `protobuf:"varint,1,opt,name=Swings,json=swings,proto3" json:"Swings,omitempty"` // 生涯总挥杆次数 + Holes int32 `protobuf:"varint,2,opt,name=Holes,json=holes,proto3" json:"Holes,omitempty"` // 完成洞数 + Calorie float64 `protobuf:"fixed64,3,opt,name=Calorie,json=calorie,proto3" json:"Calorie,omitempty"` // 卡路里 + Yards float64 `protobuf:"fixed64,4,opt,name=Yards,json=yards,proto3" json:"Yards,omitempty"` // 总击球距离 +} + +func (x *AppCareerHandicapTrend) Reset() { + *x = AppCareerHandicapTrend{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppCareerHandicapTrend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppCareerHandicapTrend) ProtoMessage() {} + +func (x *AppCareerHandicapTrend) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[10] + 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 AppCareerHandicapTrend.ProtoReflect.Descriptor instead. +func (*AppCareerHandicapTrend) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{10} +} + +func (x *AppCareerHandicapTrend) GetSwings() int32 { + if x != nil { + return x.Swings + } + return 0 +} + +func (x *AppCareerHandicapTrend) GetHoles() int32 { + if x != nil { + return x.Holes + } + return 0 +} + +func (x *AppCareerHandicapTrend) GetCalorie() float64 { + if x != nil { + return x.Calorie + } + return 0 +} + +func (x *AppCareerHandicapTrend) GetYards() float64 { + if x != nil { + return x.Yards + } + return 0 +} + +// 小程序首页广场的卡片结构 +type AppGetMatchData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CourtSn int64 `protobuf:"varint,1,opt,name=CourtSn,json=courtSn,proto3" json:"CourtSn,omitempty"` // 比赛球场ID + Avatar string `protobuf:"bytes,2,opt,name=Avatar,json=avatar,proto3" json:"Avatar,omitempty"` // 头像 + CompetitionName string `protobuf:"bytes,3,opt,name=CompetitionName,json=competitionName,proto3" json:"CompetitionName,omitempty"` // 比赛名称 + CompetitionLocation string `protobuf:"bytes,4,opt,name=CompetitionLocation,json=competitionLocation,proto3" json:"CompetitionLocation,omitempty"` // 比赛地点 + PlayersNum int32 `protobuf:"varint,5,opt,name=PlayersNum,json=playersNum,proto3" json:"PlayersNum,omitempty"` // 玩家数量 + CreateAt int64 `protobuf:"varint,6,opt,name=CreateAt,json=createAt,proto3" json:"CreateAt,omitempty"` // 创建时间 + CompetitionState int32 `protobuf:"varint,7,opt,name=CompetitionState,json=competitionState,proto3" json:"CompetitionState,omitempty"` // 比赛状态 (1:进行中 2:已结束 0:未开始-创建初始值) + GrossScore int32 `protobuf:"varint,8,opt,name=GrossScore,json=grossScore,proto3" json:"GrossScore,omitempty"` // 总杆 + Par int32 `protobuf:"varint,9,opt,name=Par,json=par,proto3" json:"Par,omitempty"` // 球场标准杆 + Type int32 `protobuf:"varint,10,opt,name=Type,json=type,proto3" json:"Type,omitempty"` // 类型 1线上 2线下 + IsParticipate bool `protobuf:"varint,11,opt,name=IsParticipate,json=isParticipate,proto3" json:"IsParticipate,omitempty"` // 当前用户是否参与此比赛 + Mode int32 `protobuf:"varint,12,opt,name=Mode,json=mode,proto3" json:"Mode,omitempty"` // 比赛模式 1 经典 2 赛事 + SubMode int32 `protobuf:"varint,13,opt,name=SubMode,json=subMode,proto3" json:"SubMode,omitempty"` // 子模式 1 本地比赛 2 在线比赛 3 锦标赛 + CourtName string `protobuf:"bytes,14,opt,name=CourtName,json=courtName,proto3" json:"CourtName,omitempty"` // 球场名称 + IsCaddy bool `protobuf:"varint,15,opt,name=IsCaddy,json=isCaddy,proto3" json:"IsCaddy,omitempty"` // 是否是球童 + OpenSide []SideType `protobuf:"varint,16,rep,packed,name=OpenSide,json=openSide,proto3,enum=SideType" json:"OpenSide,omitempty"` // 开启了哪些玩法 + Hcp HandicapLimitMode `protobuf:"varint,17,opt,name=Hcp,json=hcp,proto3,enum=HandicapLimitMode" json:"Hcp,omitempty"` // HCP + Background string `protobuf:"bytes,18,opt,name=Background,json=background,proto3" json:"Background,omitempty"` // 卡片的背景图 +} + +func (x *AppGetMatchData) Reset() { + *x = AppGetMatchData{} + if protoimpl.UnsafeEnabled { + mi := &file_rs_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppGetMatchData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppGetMatchData) ProtoMessage() {} + +func (x *AppGetMatchData) ProtoReflect() protoreflect.Message { + mi := &file_rs_common_proto_msgTypes[11] + 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 AppGetMatchData.ProtoReflect.Descriptor instead. +func (*AppGetMatchData) Descriptor() ([]byte, []int) { + return file_rs_common_proto_rawDescGZIP(), []int{11} +} + +func (x *AppGetMatchData) GetCourtSn() int64 { + if x != nil { + return x.CourtSn + } + return 0 +} + +func (x *AppGetMatchData) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *AppGetMatchData) GetCompetitionName() string { + if x != nil { + return x.CompetitionName + } + return "" +} + +func (x *AppGetMatchData) GetCompetitionLocation() string { + if x != nil { + return x.CompetitionLocation + } + return "" +} + +func (x *AppGetMatchData) GetPlayersNum() int32 { + if x != nil { + return x.PlayersNum + } + return 0 +} + +func (x *AppGetMatchData) GetCreateAt() int64 { + if x != nil { + return x.CreateAt + } + return 0 +} + +func (x *AppGetMatchData) GetCompetitionState() int32 { + if x != nil { + return x.CompetitionState + } + return 0 +} + +func (x *AppGetMatchData) GetGrossScore() int32 { + if x != nil { + return x.GrossScore + } + return 0 +} + +func (x *AppGetMatchData) GetPar() int32 { + if x != nil { + return x.Par + } + return 0 +} + +func (x *AppGetMatchData) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *AppGetMatchData) GetIsParticipate() bool { + if x != nil { + return x.IsParticipate + } + return false +} + +func (x *AppGetMatchData) GetMode() int32 { + if x != nil { + return x.Mode + } + return 0 +} + +func (x *AppGetMatchData) GetSubMode() int32 { + if x != nil { + return x.SubMode + } + return 0 +} + +func (x *AppGetMatchData) GetCourtName() string { + if x != nil { + return x.CourtName + } + return "" +} + +func (x *AppGetMatchData) GetIsCaddy() bool { + if x != nil { + return x.IsCaddy + } + return false +} + +func (x *AppGetMatchData) GetOpenSide() []SideType { + if x != nil { + return x.OpenSide + } + return nil +} + +func (x *AppGetMatchData) GetHcp() HandicapLimitMode { + if x != nil { + return x.Hcp + } + return HandicapLimitMode_HANDICAP_LIMIT_NONE +} + +func (x *AppGetMatchData) GetBackground() string { + if x != nil { + return x.Background + } + return "" +} + +var File_rs_common_proto protoreflect.FileDescriptor + +var file_rs_common_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x31, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, + 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x4d, 0x73, 0x67, 0x22, 0x6e, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x41, 0x72, 0x67, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, + 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x28, 0x0a, 0x09, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x4c, 0x69, 0x73, 0x74, 0x22, 0x69, 0x0a, 0x0d, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x33, 0x0a, 0x09, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x03, 0x61, 0x73, 0x63, 0x22, 0x65, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x53, 0x74, 0x72, 0x6f, 0x6b, + 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x48, 0x6f, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x41, 0x70, 0x70, 0x48, 0x6f, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x68, 0x6f, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x28, 0x0a, 0x08, 0x48, 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x41, 0x70, 0x70, 0x48, 0x6f, 0x6c, 0x65, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x08, 0x68, 0x6f, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x0b, + 0x41, 0x70, 0x70, 0x48, 0x6f, 0x6c, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x52, + 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x72, 0x6f, + 0x75, 0x6e, 0x64, 0x53, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x48, 0x43, 0x50, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x68, 0x63, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x54, + 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x65, 0x65, 0x12, 0x2a, 0x0a, + 0x08, 0x48, 0x6f, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x41, 0x70, 0x70, 0x48, 0x6f, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x08, 0x68, 0x6f, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x0d, 0x41, 0x70, + 0x70, 0x48, 0x6f, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x48, + 0x6f, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x68, 0x6f, 0x6c, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x53, + 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, + 0x03, 0x50, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x61, 0x72, 0x12, + 0x14, 0x0a, 0x05, 0x47, 0x72, 0x6f, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x67, 0x72, 0x6f, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x6e, 0x65, 0x74, 0x22, 0x53, 0x0a, 0x1b, 0x41, 0x70, 0x70, 0x43, 0x6f, + 0x75, 0x72, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x6f, + 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x51, 0x0a, 0x13, + 0x41, 0x70, 0x70, 0x43, 0x61, 0x72, 0x65, 0x65, 0x72, 0x41, 0x76, 0x65, 0x53, 0x63, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x72, 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x04, 0x70, 0x61, 0x72, 0x33, 0x12, 0x12, 0x0a, 0x04, 0x50, 0x61, 0x72, 0x34, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x70, 0x61, 0x72, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x50, + 0x61, 0x72, 0x35, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x70, 0x61, 0x72, 0x35, 0x22, + 0x6c, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x43, 0x61, 0x72, 0x65, 0x65, 0x72, 0x41, 0x76, 0x65, 0x50, + 0x65, 0x72, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x42, 0x6f, 0x67, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x62, 0x6f, 0x67, 0x65, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x50, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x70, 0x61, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x42, 0x69, 0x72, 0x64, 0x69, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x06, 0x62, 0x69, 0x72, 0x64, 0x69, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x61, 0x67, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x65, 0x61, 0x67, 0x6c, 0x65, 0x22, 0x76, 0x0a, + 0x16, 0x41, 0x70, 0x70, 0x43, 0x61, 0x72, 0x65, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x69, 0x63, + 0x61, 0x70, 0x54, 0x72, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x77, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x48, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x68, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x61, 0x6c, 0x6f, 0x72, 0x69, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x63, 0x61, 0x6c, 0x6f, 0x72, 0x69, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x59, 0x61, 0x72, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, + 0x79, 0x61, 0x72, 0x64, 0x73, 0x22, 0xc6, 0x04, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x47, 0x65, 0x74, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6f, 0x75, + 0x72, 0x74, 0x53, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x72, + 0x74, 0x53, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x28, 0x0a, 0x0f, 0x43, + 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x73, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, + 0x6f, 0x6d, 0x70, 0x65, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x47, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x73, 0x73, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x50, 0x61, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x61, + 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x49, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4d, + 0x6f, 0x64, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6f, 0x75, + 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, + 0x75, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x73, 0x43, 0x61, 0x64, + 0x64, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x43, 0x61, 0x64, 0x64, + 0x79, 0x12, 0x25, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x18, 0x10, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x6f, 0x70, 0x65, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x48, 0x63, 0x70, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x70, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x68, 0x63, 0x70, 0x12, 0x1e, + 0x0a, 0x0a, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2a, 0xcb, + 0x01, 0x0a, 0x09, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, + 0x53, 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x4c, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, + 0x4c, 0x42, 0x41, 0x54, 0x52, 0x4f, 0x53, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x43, + 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x41, 0x47, 0x4c, 0x45, 0x10, 0x03, + 0x12, 0x15, 0x0a, 0x11, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, + 0x49, 0x52, 0x44, 0x49, 0x45, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x43, 0x4f, 0x52, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x53, + 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x47, 0x45, 0x59, 0x10, + 0x06, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x43, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x42, 0x4f, 0x47, 0x45, 0x59, 0x5f, 0x50, 0x4c, 0x55, 0x53, 0x10, 0x07, 0x2a, 0x4f, 0x0a, 0x08, + 0x53, 0x69, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x49, 0x44, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, 0x47, + 0x45, 0x52, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x52, 0x59, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x55, 0x50, 0x10, 0x02, 0x2a, 0xd4, 0x01, + 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x41, 0x4e, 0x44, 0x49, 0x43, 0x41, 0x50, 0x5f, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, + 0x48, 0x41, 0x4e, 0x44, 0x49, 0x43, 0x41, 0x50, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x33, + 0x36, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x41, 0x4e, 0x44, 0x49, 0x43, 0x41, 0x50, 0x5f, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x32, 0x38, 0x5f, 0x54, 0x4f, 0x5f, 0x33, 0x36, 0x10, 0x02, + 0x12, 0x1b, 0x0a, 0x17, 0x48, 0x41, 0x4e, 0x44, 0x49, 0x43, 0x41, 0x50, 0x5f, 0x4c, 0x49, 0x4d, + 0x49, 0x54, 0x5f, 0x31, 0x38, 0x5f, 0x54, 0x4f, 0x5f, 0x32, 0x38, 0x10, 0x03, 0x12, 0x1a, 0x0a, + 0x16, 0x48, 0x41, 0x4e, 0x44, 0x49, 0x43, 0x41, 0x50, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, + 0x38, 0x5f, 0x54, 0x4f, 0x5f, 0x31, 0x38, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x48, 0x41, 0x4e, + 0x44, 0x49, 0x43, 0x41, 0x50, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x30, 0x5f, 0x54, 0x4f, + 0x5f, 0x38, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x48, 0x41, 0x4e, 0x44, 0x49, 0x43, 0x41, 0x50, + 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x5f, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x41, 0x4e, + 0x5f, 0x30, 0x10, 0x06, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, + 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_rs_common_proto_rawDescOnce sync.Once + file_rs_common_proto_rawDescData = file_rs_common_proto_rawDesc +) + +func file_rs_common_proto_rawDescGZIP() []byte { + file_rs_common_proto_rawDescOnce.Do(func() { + file_rs_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_rs_common_proto_rawDescData) + }) + return file_rs_common_proto_rawDescData +} + +var file_rs_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_rs_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_rs_common_proto_goTypes = []interface{}{ + (ScoreType)(0), // 0: ScoreType + (SideType)(0), // 1: SideType + (HandicapLimitMode)(0), // 2: HandicapLimitMode + (*ErrorInfo)(nil), // 3: ErrorInfo + (*PageArgs)(nil), // 4: PageArgs + (*PageInfoReply)(nil), // 5: PageInfoReply + (*OrderInfo)(nil), // 6: OrderInfo + (*AppStroke)(nil), // 7: AppStroke + (*AppHoleItem)(nil), // 8: AppHoleItem + (*AppHoleConfig)(nil), // 9: AppHoleConfig + (*AppCourtGameResultScoreType)(nil), // 10: AppCourtGameResultScoreType + (*AppCareerAveScoring)(nil), // 11: AppCareerAveScoring + (*AppCareerAvePerRound)(nil), // 12: AppCareerAvePerRound + (*AppCareerHandicapTrend)(nil), // 13: AppCareerHandicapTrend + (*AppGetMatchData)(nil), // 14: AppGetMatchData +} +var file_rs_common_proto_depIdxs = []int32{ + 6, // 0: PageArgs.OrderList:type_name -> OrderInfo + 9, // 1: AppStroke.HoleConfig:type_name -> AppHoleConfig + 8, // 2: AppStroke.HoleList:type_name -> AppHoleItem + 9, // 3: AppHoleItem.HoleInfo:type_name -> AppHoleConfig + 0, // 4: AppCourtGameResultScoreType.Type:type_name -> ScoreType + 1, // 5: AppGetMatchData.OpenSide:type_name -> SideType + 2, // 6: AppGetMatchData.Hcp:type_name -> HandicapLimitMode + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_rs_common_proto_init() } +func file_rs_common_proto_init() { + if File_rs_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_rs_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PageArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PageInfoReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppStroke); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppHoleItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppHoleConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppCourtGameResultScoreType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppCareerAveScoring); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppCareerAvePerRound); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppCareerHandicapTrend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rs_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppGetMatchData); 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_rs_common_proto_rawDesc, + NumEnums: 3, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_rs_common_proto_goTypes, + DependencyIndexes: file_rs_common_proto_depIdxs, + EnumInfos: file_rs_common_proto_enumTypes, + MessageInfos: file_rs_common_proto_msgTypes, + }.Build() + File_rs_common_proto = out.File + file_rs_common_proto_rawDesc = nil + file_rs_common_proto_goTypes = nil + file_rs_common_proto_depIdxs = nil +} diff --git a/proto/rs/rspb/service_gateway.pb.go b/proto/rs/rspb/service_gateway.pb.go new file mode 100644 index 0000000..18f578e --- /dev/null +++ b/proto/rs/rspb/service_gateway.pb.go @@ -0,0 +1,675 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: service_gateway.proto + +package rspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/rs/rscommon" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ---------- InnerToClient ---------- +type InnerToClientReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` + Platform int32 `protobuf:"varint,2,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台(这里的类型是rspb.PlatformType) + MessageID int32 `protobuf:"varint,3,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 消息ID + Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息内容 +} + +func (x *InnerToClientReq) Reset() { + *x = InnerToClientReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerToClientReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerToClientReq) ProtoMessage() {} + +func (x *InnerToClientReq) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[0] + 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 InnerToClientReq.ProtoReflect.Descriptor instead. +func (*InnerToClientReq) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{0} +} + +func (x *InnerToClientReq) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +func (x *InnerToClientReq) GetPlatform() int32 { + if x != nil { + return x.Platform + } + return 0 +} + +func (x *InnerToClientReq) GetMessageID() int32 { + if x != nil { + return x.MessageID + } + return 0 +} + +func (x *InnerToClientReq) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type InnerToClientResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InnerToClientResp) Reset() { + *x = InnerToClientResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerToClientResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerToClientResp) ProtoMessage() {} + +func (x *InnerToClientResp) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[1] + 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 InnerToClientResp.ProtoReflect.Descriptor instead. +func (*InnerToClientResp) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{1} +} + +// ---------- InnerBroadcastClient ---------- +type InnerBroadcastClientReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN []int64 `protobuf:"varint,1,rep,packed,name=USN,proto3" json:"USN,omitempty"` + Platform []int32 `protobuf:"varint,2,rep,packed,name=Platform,proto3" json:"Platform,omitempty"` // 平台(这里的类型是rspb.PlatformType) + MessageID int32 `protobuf:"varint,3,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 消息ID + Payload []byte `protobuf:"bytes,4,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息内容 +} + +func (x *InnerBroadcastClientReq) Reset() { + *x = InnerBroadcastClientReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerBroadcastClientReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerBroadcastClientReq) ProtoMessage() {} + +func (x *InnerBroadcastClientReq) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[2] + 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 InnerBroadcastClientReq.ProtoReflect.Descriptor instead. +func (*InnerBroadcastClientReq) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{2} +} + +func (x *InnerBroadcastClientReq) GetUSN() []int64 { + if x != nil { + return x.USN + } + return nil +} + +func (x *InnerBroadcastClientReq) GetPlatform() []int32 { + if x != nil { + return x.Platform + } + return nil +} + +func (x *InnerBroadcastClientReq) GetMessageID() int32 { + if x != nil { + return x.MessageID + } + return 0 +} + +func (x *InnerBroadcastClientReq) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type InnerBroadcastClientResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InnerBroadcastClientResp) Reset() { + *x = InnerBroadcastClientResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerBroadcastClientResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerBroadcastClientResp) ProtoMessage() {} + +func (x *InnerBroadcastClientResp) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[3] + 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 InnerBroadcastClientResp.ProtoReflect.Descriptor instead. +func (*InnerBroadcastClientResp) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{3} +} + +// ---------- InnerBroadcastChannel ---------- +type InnerBroadcastChannelReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChannelName string `protobuf:"bytes,1,opt,name=ChannelName,proto3" json:"ChannelName,omitempty"` // 频道名称 + MessageID int32 `protobuf:"varint,2,opt,name=MessageID,proto3" json:"MessageID,omitempty"` // 消息ID + Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"` // 消息内容 +} + +func (x *InnerBroadcastChannelReq) Reset() { + *x = InnerBroadcastChannelReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerBroadcastChannelReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerBroadcastChannelReq) ProtoMessage() {} + +func (x *InnerBroadcastChannelReq) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[4] + 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 InnerBroadcastChannelReq.ProtoReflect.Descriptor instead. +func (*InnerBroadcastChannelReq) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{4} +} + +func (x *InnerBroadcastChannelReq) GetChannelName() string { + if x != nil { + return x.ChannelName + } + return "" +} + +func (x *InnerBroadcastChannelReq) GetMessageID() int32 { + if x != nil { + return x.MessageID + } + return 0 +} + +func (x *InnerBroadcastChannelReq) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type InnerBroadcastChannelResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InnerBroadcastChannelResp) Reset() { + *x = InnerBroadcastChannelResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerBroadcastChannelResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerBroadcastChannelResp) ProtoMessage() {} + +func (x *InnerBroadcastChannelResp) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[5] + 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 InnerBroadcastChannelResp.ProtoReflect.Descriptor instead. +func (*InnerBroadcastChannelResp) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{5} +} + +// ---------- InnerKickUser ---------- +type InnerKickUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` + Platform int32 `protobuf:"varint,2,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台(这里的类型是rspb.PlatformType) + ID int32 `protobuf:"varint,3,opt,name=ID,proto3" json:"ID,omitempty"` // 踢出原因(这里的类型是rspb.KickOutID) +} + +func (x *InnerKickUserReq) Reset() { + *x = InnerKickUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerKickUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerKickUserReq) ProtoMessage() {} + +func (x *InnerKickUserReq) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[6] + 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 InnerKickUserReq.ProtoReflect.Descriptor instead. +func (*InnerKickUserReq) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{6} +} + +func (x *InnerKickUserReq) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +func (x *InnerKickUserReq) GetPlatform() int32 { + if x != nil { + return x.Platform + } + return 0 +} + +func (x *InnerKickUserReq) GetID() int32 { + if x != nil { + return x.ID + } + return 0 +} + +type InnerKickUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InnerKickUserResp) Reset() { + *x = InnerKickUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_gateway_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerKickUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerKickUserResp) ProtoMessage() {} + +func (x *InnerKickUserResp) ProtoReflect() protoreflect.Message { + mi := &file_service_gateway_proto_msgTypes[7] + 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 InnerKickUserResp.ProtoReflect.Descriptor instead. +func (*InnerKickUserResp) Descriptor() ([]byte, []int) { + return file_service_gateway_proto_rawDescGZIP(), []int{7} +} + +var File_service_gateway_proto protoreflect.FileDescriptor + +var file_service_gateway_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x10, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, + 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, + 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x1a, 0x0a, 0x08, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x13, 0x0a, 0x11, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x7f, 0x0a, 0x17, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x03, 0x55, + 0x53, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1c, + 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x74, 0x0a, 0x18, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x20, + 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x18, + 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x49, 0x6e, 0x6e, 0x65, + 0x72, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x4b, 0x69, + 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x1a, 0x0a, 0x08, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x44, 0x22, 0x13, 0x0a, 0x11, 0x49, 0x6e, 0x6e, 0x65, 0x72, + 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x32, 0xa4, 0x02, 0x0a, + 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x3a, 0x0a, 0x0d, 0x49, 0x6e, 0x6e, 0x65, + 0x72, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x11, 0x2e, 0x49, 0x6e, 0x6e, 0x65, + 0x72, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x49, + 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x00, 0x28, 0x01, 0x12, 0x4f, 0x0a, 0x14, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x49, + 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x00, 0x28, 0x01, 0x12, 0x52, 0x0a, 0x15, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x19, + 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x49, 0x6e, 0x6e, 0x65, + 0x72, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x12, 0x38, 0x0a, 0x0d, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x11, 0x2e, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, + 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x22, 0x00, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, + 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_gateway_proto_rawDescOnce sync.Once + file_service_gateway_proto_rawDescData = file_service_gateway_proto_rawDesc +) + +func file_service_gateway_proto_rawDescGZIP() []byte { + file_service_gateway_proto_rawDescOnce.Do(func() { + file_service_gateway_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_gateway_proto_rawDescData) + }) + return file_service_gateway_proto_rawDescData +} + +var file_service_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_service_gateway_proto_goTypes = []interface{}{ + (*InnerToClientReq)(nil), // 0: InnerToClientReq + (*InnerToClientResp)(nil), // 1: InnerToClientResp + (*InnerBroadcastClientReq)(nil), // 2: InnerBroadcastClientReq + (*InnerBroadcastClientResp)(nil), // 3: InnerBroadcastClientResp + (*InnerBroadcastChannelReq)(nil), // 4: InnerBroadcastChannelReq + (*InnerBroadcastChannelResp)(nil), // 5: InnerBroadcastChannelResp + (*InnerKickUserReq)(nil), // 6: InnerKickUserReq + (*InnerKickUserResp)(nil), // 7: InnerKickUserResp +} +var file_service_gateway_proto_depIdxs = []int32{ + 0, // 0: Gateway.InnerToClient:input_type -> InnerToClientReq + 2, // 1: Gateway.InnerBroadcastClient:input_type -> InnerBroadcastClientReq + 4, // 2: Gateway.InnerBroadcastChannel:input_type -> InnerBroadcastChannelReq + 6, // 3: Gateway.InnerKickUser:input_type -> InnerKickUserReq + 1, // 4: Gateway.InnerToClient:output_type -> InnerToClientResp + 3, // 5: Gateway.InnerBroadcastClient:output_type -> InnerBroadcastClientResp + 5, // 6: Gateway.InnerBroadcastChannel:output_type -> InnerBroadcastChannelResp + 7, // 7: Gateway.InnerKickUser:output_type -> InnerKickUserResp + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_service_gateway_proto_init() } +func file_service_gateway_proto_init() { + if File_service_gateway_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_gateway_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerToClientReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerToClientResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerBroadcastClientReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerBroadcastClientResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerBroadcastChannelReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerBroadcastChannelResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerKickUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_gateway_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerKickUserResp); 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_service_gateway_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_gateway_proto_goTypes, + DependencyIndexes: file_service_gateway_proto_depIdxs, + MessageInfos: file_service_gateway_proto_msgTypes, + }.Build() + File_service_gateway_proto = out.File + file_service_gateway_proto_rawDesc = nil + file_service_gateway_proto_goTypes = nil + file_service_gateway_proto_depIdxs = nil +} diff --git a/proto/rs/rspb/service_gateway_grpc.pb.go b/proto/rs/rspb/service_gateway_grpc.pb.go new file mode 100644 index 0000000..662d94e --- /dev/null +++ b/proto/rs/rspb/service_gateway_grpc.pb.go @@ -0,0 +1,324 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.25.1 +// source: service_gateway.proto + +package rspb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// GatewayClient is the client API for Gateway service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type GatewayClient interface { + // 发送消息到客户端 + InnerToClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_InnerToClientClient, error) + // 广播消息到客户端 + InnerBroadcastClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_InnerBroadcastClientClient, error) + // 广播消息到频道 + InnerBroadcastChannel(ctx context.Context, opts ...grpc.CallOption) (Gateway_InnerBroadcastChannelClient, error) + // 踢用户下线 + InnerKickUser(ctx context.Context, in *InnerKickUserReq, opts ...grpc.CallOption) (*InnerKickUserResp, error) +} + +type gatewayClient struct { + cc grpc.ClientConnInterface +} + +func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient { + return &gatewayClient{cc} +} + +func (c *gatewayClient) InnerToClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_InnerToClientClient, error) { + stream, err := c.cc.NewStream(ctx, &Gateway_ServiceDesc.Streams[0], "/Gateway/InnerToClient", opts...) + if err != nil { + return nil, err + } + x := &gatewayInnerToClientClient{stream} + return x, nil +} + +type Gateway_InnerToClientClient interface { + Send(*InnerToClientReq) error + CloseAndRecv() (*InnerToClientResp, error) + grpc.ClientStream +} + +type gatewayInnerToClientClient struct { + grpc.ClientStream +} + +func (x *gatewayInnerToClientClient) Send(m *InnerToClientReq) error { + return x.ClientStream.SendMsg(m) +} + +func (x *gatewayInnerToClientClient) CloseAndRecv() (*InnerToClientResp, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(InnerToClientResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *gatewayClient) InnerBroadcastClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_InnerBroadcastClientClient, error) { + stream, err := c.cc.NewStream(ctx, &Gateway_ServiceDesc.Streams[1], "/Gateway/InnerBroadcastClient", opts...) + if err != nil { + return nil, err + } + x := &gatewayInnerBroadcastClientClient{stream} + return x, nil +} + +type Gateway_InnerBroadcastClientClient interface { + Send(*InnerBroadcastClientReq) error + CloseAndRecv() (*InnerBroadcastClientResp, error) + grpc.ClientStream +} + +type gatewayInnerBroadcastClientClient struct { + grpc.ClientStream +} + +func (x *gatewayInnerBroadcastClientClient) Send(m *InnerBroadcastClientReq) error { + return x.ClientStream.SendMsg(m) +} + +func (x *gatewayInnerBroadcastClientClient) CloseAndRecv() (*InnerBroadcastClientResp, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(InnerBroadcastClientResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *gatewayClient) InnerBroadcastChannel(ctx context.Context, opts ...grpc.CallOption) (Gateway_InnerBroadcastChannelClient, error) { + stream, err := c.cc.NewStream(ctx, &Gateway_ServiceDesc.Streams[2], "/Gateway/InnerBroadcastChannel", opts...) + if err != nil { + return nil, err + } + x := &gatewayInnerBroadcastChannelClient{stream} + return x, nil +} + +type Gateway_InnerBroadcastChannelClient interface { + Send(*InnerBroadcastChannelReq) error + CloseAndRecv() (*InnerBroadcastChannelResp, error) + grpc.ClientStream +} + +type gatewayInnerBroadcastChannelClient struct { + grpc.ClientStream +} + +func (x *gatewayInnerBroadcastChannelClient) Send(m *InnerBroadcastChannelReq) error { + return x.ClientStream.SendMsg(m) +} + +func (x *gatewayInnerBroadcastChannelClient) CloseAndRecv() (*InnerBroadcastChannelResp, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(InnerBroadcastChannelResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *gatewayClient) InnerKickUser(ctx context.Context, in *InnerKickUserReq, opts ...grpc.CallOption) (*InnerKickUserResp, error) { + out := new(InnerKickUserResp) + err := c.cc.Invoke(ctx, "/Gateway/InnerKickUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// GatewayServer is the server API for Gateway service. +// All implementations must embed UnimplementedGatewayServer +// for forward compatibility +type GatewayServer interface { + // 发送消息到客户端 + InnerToClient(Gateway_InnerToClientServer) error + // 广播消息到客户端 + InnerBroadcastClient(Gateway_InnerBroadcastClientServer) error + // 广播消息到频道 + InnerBroadcastChannel(Gateway_InnerBroadcastChannelServer) error + // 踢用户下线 + InnerKickUser(context.Context, *InnerKickUserReq) (*InnerKickUserResp, error) + mustEmbedUnimplementedGatewayServer() +} + +// UnimplementedGatewayServer must be embedded to have forward compatible implementations. +type UnimplementedGatewayServer struct { +} + +func (UnimplementedGatewayServer) InnerToClient(Gateway_InnerToClientServer) error { + return status.Errorf(codes.Unimplemented, "method InnerToClient not implemented") +} +func (UnimplementedGatewayServer) InnerBroadcastClient(Gateway_InnerBroadcastClientServer) error { + return status.Errorf(codes.Unimplemented, "method InnerBroadcastClient not implemented") +} +func (UnimplementedGatewayServer) InnerBroadcastChannel(Gateway_InnerBroadcastChannelServer) error { + return status.Errorf(codes.Unimplemented, "method InnerBroadcastChannel not implemented") +} +func (UnimplementedGatewayServer) InnerKickUser(context.Context, *InnerKickUserReq) (*InnerKickUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerKickUser not implemented") +} +func (UnimplementedGatewayServer) mustEmbedUnimplementedGatewayServer() {} + +// UnsafeGatewayServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to GatewayServer will +// result in compilation errors. +type UnsafeGatewayServer interface { + mustEmbedUnimplementedGatewayServer() +} + +func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer) { + s.RegisterService(&Gateway_ServiceDesc, srv) +} + +func _Gateway_InnerToClient_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(GatewayServer).InnerToClient(&gatewayInnerToClientServer{stream}) +} + +type Gateway_InnerToClientServer interface { + SendAndClose(*InnerToClientResp) error + Recv() (*InnerToClientReq, error) + grpc.ServerStream +} + +type gatewayInnerToClientServer struct { + grpc.ServerStream +} + +func (x *gatewayInnerToClientServer) SendAndClose(m *InnerToClientResp) error { + return x.ServerStream.SendMsg(m) +} + +func (x *gatewayInnerToClientServer) Recv() (*InnerToClientReq, error) { + m := new(InnerToClientReq) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Gateway_InnerBroadcastClient_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(GatewayServer).InnerBroadcastClient(&gatewayInnerBroadcastClientServer{stream}) +} + +type Gateway_InnerBroadcastClientServer interface { + SendAndClose(*InnerBroadcastClientResp) error + Recv() (*InnerBroadcastClientReq, error) + grpc.ServerStream +} + +type gatewayInnerBroadcastClientServer struct { + grpc.ServerStream +} + +func (x *gatewayInnerBroadcastClientServer) SendAndClose(m *InnerBroadcastClientResp) error { + return x.ServerStream.SendMsg(m) +} + +func (x *gatewayInnerBroadcastClientServer) Recv() (*InnerBroadcastClientReq, error) { + m := new(InnerBroadcastClientReq) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Gateway_InnerBroadcastChannel_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(GatewayServer).InnerBroadcastChannel(&gatewayInnerBroadcastChannelServer{stream}) +} + +type Gateway_InnerBroadcastChannelServer interface { + SendAndClose(*InnerBroadcastChannelResp) error + Recv() (*InnerBroadcastChannelReq, error) + grpc.ServerStream +} + +type gatewayInnerBroadcastChannelServer struct { + grpc.ServerStream +} + +func (x *gatewayInnerBroadcastChannelServer) SendAndClose(m *InnerBroadcastChannelResp) error { + return x.ServerStream.SendMsg(m) +} + +func (x *gatewayInnerBroadcastChannelServer) Recv() (*InnerBroadcastChannelReq, error) { + m := new(InnerBroadcastChannelReq) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Gateway_InnerKickUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerKickUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatewayServer).InnerKickUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/Gateway/InnerKickUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatewayServer).InnerKickUser(ctx, req.(*InnerKickUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +// Gateway_ServiceDesc is the grpc.ServiceDesc for Gateway service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Gateway_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "Gateway", + HandlerType: (*GatewayServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InnerKickUser", + Handler: _Gateway_InnerKickUser_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "InnerToClient", + Handler: _Gateway_InnerToClient_Handler, + ClientStreams: true, + }, + { + StreamName: "InnerBroadcastClient", + Handler: _Gateway_InnerBroadcastClient_Handler, + ClientStreams: true, + }, + { + StreamName: "InnerBroadcastChannel", + Handler: _Gateway_InnerBroadcastChannel_Handler, + ClientStreams: true, + }, + }, + Metadata: "service_gateway.proto", +} diff --git a/proto/rs/rspb/service_notice.pb.go b/proto/rs/rspb/service_notice.pb.go new file mode 100644 index 0000000..ac1ffae --- /dev/null +++ b/proto/rs/rspb/service_notice.pb.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: service_notice.proto + +package rspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/rs/rscommon" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_service_notice_proto protoreflect.FileDescriptor + +var file_service_notice_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x08, 0x0a, 0x06, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x42, + 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, + 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var file_service_notice_proto_goTypes = []interface{}{} +var file_service_notice_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_service_notice_proto_init() } +func file_service_notice_proto_init() { + if File_service_notice_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_notice_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_notice_proto_goTypes, + DependencyIndexes: file_service_notice_proto_depIdxs, + }.Build() + File_service_notice_proto = out.File + file_service_notice_proto_rawDesc = nil + file_service_notice_proto_goTypes = nil + file_service_notice_proto_depIdxs = nil +} diff --git a/proto/rs/rspb/service_notice_grpc.pb.go b/proto/rs/rspb/service_notice_grpc.pb.go new file mode 100644 index 0000000..948a4ad --- /dev/null +++ b/proto/rs/rspb/service_notice_grpc.pb.go @@ -0,0 +1,65 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.25.1 +// source: service_notice.proto + +package rspb + +import ( + grpc "google.golang.org/grpc" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// NoticeClient is the client API for Notice service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NoticeClient interface { +} + +type noticeClient struct { + cc grpc.ClientConnInterface +} + +func NewNoticeClient(cc grpc.ClientConnInterface) NoticeClient { + return ¬iceClient{cc} +} + +// NoticeServer is the server API for Notice service. +// All implementations must embed UnimplementedNoticeServer +// for forward compatibility +type NoticeServer interface { + mustEmbedUnimplementedNoticeServer() +} + +// UnimplementedNoticeServer must be embedded to have forward compatible implementations. +type UnimplementedNoticeServer struct { +} + +func (UnimplementedNoticeServer) mustEmbedUnimplementedNoticeServer() {} + +// UnsafeNoticeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NoticeServer will +// result in compilation errors. +type UnsafeNoticeServer interface { + mustEmbedUnimplementedNoticeServer() +} + +func RegisterNoticeServer(s grpc.ServiceRegistrar, srv NoticeServer) { + s.RegisterService(&Notice_ServiceDesc, srv) +} + +// Notice_ServiceDesc is the grpc.ServiceDesc for Notice service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Notice_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "Notice", + HandlerType: (*NoticeServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{}, + Metadata: "service_notice.proto", +} diff --git a/proto/rs/rspb/service_scene.pb.go b/proto/rs/rspb/service_scene.pb.go new file mode 100644 index 0000000..b1a2205 --- /dev/null +++ b/proto/rs/rspb/service_scene.pb.go @@ -0,0 +1,68 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: service_scene.proto + +package rspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/rs/rscommon" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_service_scene_proto protoreflect.FileDescriptor + +var file_service_scene_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x65, 0x6e, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x07, 0x0a, 0x05, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x42, 0x28, 0x5a, + 0x26, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, + 0x6c, 0x65, 0x78, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_service_scene_proto_goTypes = []interface{}{} +var file_service_scene_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_service_scene_proto_init() } +func file_service_scene_proto_init() { + if File_service_scene_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_service_scene_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_scene_proto_goTypes, + DependencyIndexes: file_service_scene_proto_depIdxs, + }.Build() + File_service_scene_proto = out.File + file_service_scene_proto_rawDesc = nil + file_service_scene_proto_goTypes = nil + file_service_scene_proto_depIdxs = nil +} diff --git a/proto/rs/rspb/service_scene_grpc.pb.go b/proto/rs/rspb/service_scene_grpc.pb.go new file mode 100644 index 0000000..277e967 --- /dev/null +++ b/proto/rs/rspb/service_scene_grpc.pb.go @@ -0,0 +1,65 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.25.1 +// source: service_scene.proto + +package rspb + +import ( + grpc "google.golang.org/grpc" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SceneClient is the client API for Scene service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SceneClient interface { +} + +type sceneClient struct { + cc grpc.ClientConnInterface +} + +func NewSceneClient(cc grpc.ClientConnInterface) SceneClient { + return &sceneClient{cc} +} + +// SceneServer is the server API for Scene service. +// All implementations must embed UnimplementedSceneServer +// for forward compatibility +type SceneServer interface { + mustEmbedUnimplementedSceneServer() +} + +// UnimplementedSceneServer must be embedded to have forward compatible implementations. +type UnimplementedSceneServer struct { +} + +func (UnimplementedSceneServer) mustEmbedUnimplementedSceneServer() {} + +// UnsafeSceneServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SceneServer will +// result in compilation errors. +type UnsafeSceneServer interface { + mustEmbedUnimplementedSceneServer() +} + +func RegisterSceneServer(s grpc.ServiceRegistrar, srv SceneServer) { + s.RegisterService(&Scene_ServiceDesc, srv) +} + +// Scene_ServiceDesc is the grpc.ServiceDesc for Scene service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Scene_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "Scene", + HandlerType: (*SceneServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{}, + Metadata: "service_scene.proto", +} diff --git a/proto/rs/rspb/service_third-party.pb.go b/proto/rs/rspb/service_third-party.pb.go new file mode 100644 index 0000000..569c906 --- /dev/null +++ b/proto/rs/rspb/service_third-party.pb.go @@ -0,0 +1,1586 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: service_third-party.proto + +package rspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/rs/rscommon" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LoginType int32 + +const ( + LoginType_LOGIN_TYPE_UNKNOWN LoginType = 0 + LoginType_LOGIN_TYPE_PHONE LoginType = 1 // 手机号 + LoginType_LOGIN_TYPE_WX_MINI LoginType = 2 // 微信小程序 + LoginType_LOGIN_TYPE_WX_APP LoginType = 3 // 微信App + LoginType_LOGIN_TYPE_APPLE LoginType = 4 // 苹果 +) + +// Enum value maps for LoginType. +var ( + LoginType_name = map[int32]string{ + 0: "LOGIN_TYPE_UNKNOWN", + 1: "LOGIN_TYPE_PHONE", + 2: "LOGIN_TYPE_WX_MINI", + 3: "LOGIN_TYPE_WX_APP", + 4: "LOGIN_TYPE_APPLE", + } + LoginType_value = map[string]int32{ + "LOGIN_TYPE_UNKNOWN": 0, + "LOGIN_TYPE_PHONE": 1, + "LOGIN_TYPE_WX_MINI": 2, + "LOGIN_TYPE_WX_APP": 3, + "LOGIN_TYPE_APPLE": 4, + } +) + +func (x LoginType) Enum() *LoginType { + p := new(LoginType) + *p = x + return p +} + +func (x LoginType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LoginType) Descriptor() protoreflect.EnumDescriptor { + return file_service_third_party_proto_enumTypes[0].Descriptor() +} + +func (LoginType) Type() protoreflect.EnumType { + return &file_service_third_party_proto_enumTypes[0] +} + +func (x LoginType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LoginType.Descriptor instead. +func (LoginType) EnumDescriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{0} +} + +type PlatformType int32 + +const ( + PlatformType_PLATFORM_TYPE_UNKNOWN PlatformType = 0 + PlatformType_PLATFORM_TYPE_GAME PlatformType = 1 // 游戏(APP) + PlatformType_PLATFORM_TYPE_WX_MINI PlatformType = 2 // 微信小程序 + PlatformType_PLATFORM_TYPE_ADMIN PlatformType = 3 // 后台 +) + +// Enum value maps for PlatformType. +var ( + PlatformType_name = map[int32]string{ + 0: "PLATFORM_TYPE_UNKNOWN", + 1: "PLATFORM_TYPE_GAME", + 2: "PLATFORM_TYPE_WX_MINI", + 3: "PLATFORM_TYPE_ADMIN", + } + PlatformType_value = map[string]int32{ + "PLATFORM_TYPE_UNKNOWN": 0, + "PLATFORM_TYPE_GAME": 1, + "PLATFORM_TYPE_WX_MINI": 2, + "PLATFORM_TYPE_ADMIN": 3, + } +) + +func (x PlatformType) Enum() *PlatformType { + p := new(PlatformType) + *p = x + return p +} + +func (x PlatformType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PlatformType) Descriptor() protoreflect.EnumDescriptor { + return file_service_third_party_proto_enumTypes[1].Descriptor() +} + +func (PlatformType) Type() protoreflect.EnumType { + return &file_service_third_party_proto_enumTypes[1] +} + +func (x PlatformType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PlatformType.Descriptor instead. +func (PlatformType) EnumDescriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{1} +} + +// ---------- InnerCheckCode ---------- +type InnerCheckCodeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CountryCode string `protobuf:"bytes,1,opt,name=CountryCode,json=countryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + Phone string `protobuf:"bytes,2,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` // 手机号 + Code string `protobuf:"bytes,3,opt,name=Code,json=code,proto3" json:"Code,omitempty"` // 验证码 +} + +func (x *InnerCheckCodeReq) Reset() { + *x = InnerCheckCodeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCheckCodeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCheckCodeReq) ProtoMessage() {} + +func (x *InnerCheckCodeReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[0] + 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 InnerCheckCodeReq.ProtoReflect.Descriptor instead. +func (*InnerCheckCodeReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{0} +} + +func (x *InnerCheckCodeReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *InnerCheckCodeReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *InnerCheckCodeReq) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +type InnerCheckCodeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=Success,json=success,proto3" json:"Success,omitempty"` +} + +func (x *InnerCheckCodeResp) Reset() { + *x = InnerCheckCodeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCheckCodeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCheckCodeResp) ProtoMessage() {} + +func (x *InnerCheckCodeResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[1] + 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 InnerCheckCodeResp.ProtoReflect.Descriptor instead. +func (*InnerCheckCodeResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{1} +} + +func (x *InnerCheckCodeResp) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +// ---------- InnerCheckCodeVoucher ---------- +type InnerCheckCodeVoucherReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Voucher string `protobuf:"bytes,1,opt,name=Voucher,json=voucher,proto3" json:"Voucher,omitempty"` // 凭证 +} + +func (x *InnerCheckCodeVoucherReq) Reset() { + *x = InnerCheckCodeVoucherReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCheckCodeVoucherReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCheckCodeVoucherReq) ProtoMessage() {} + +func (x *InnerCheckCodeVoucherReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[2] + 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 InnerCheckCodeVoucherReq.ProtoReflect.Descriptor instead. +func (*InnerCheckCodeVoucherReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{2} +} + +func (x *InnerCheckCodeVoucherReq) GetVoucher() string { + if x != nil { + return x.Voucher + } + return "" +} + +type InnerCheckCodeVoucherResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=Success,json=success,proto3" json:"Success,omitempty"` + Phone string `protobuf:"bytes,2,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` +} + +func (x *InnerCheckCodeVoucherResp) Reset() { + *x = InnerCheckCodeVoucherResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCheckCodeVoucherResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCheckCodeVoucherResp) ProtoMessage() {} + +func (x *InnerCheckCodeVoucherResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[3] + 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 InnerCheckCodeVoucherResp.ProtoReflect.Descriptor instead. +func (*InnerCheckCodeVoucherResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{3} +} + +func (x *InnerCheckCodeVoucherResp) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *InnerCheckCodeVoucherResp) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +// ---------- InnerKickOffline ---------- +type InnerKickOfflineReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID +} + +func (x *InnerKickOfflineReq) Reset() { + *x = InnerKickOfflineReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerKickOfflineReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerKickOfflineReq) ProtoMessage() {} + +func (x *InnerKickOfflineReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[4] + 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 InnerKickOfflineReq.ProtoReflect.Descriptor instead. +func (*InnerKickOfflineReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{4} +} + +func (x *InnerKickOfflineReq) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +type InnerKickOfflineResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *InnerKickOfflineResp) Reset() { + *x = InnerKickOfflineResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerKickOfflineResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerKickOfflineResp) ProtoMessage() {} + +func (x *InnerKickOfflineResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[5] + 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 InnerKickOfflineResp.ProtoReflect.Descriptor instead. +func (*InnerKickOfflineResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{5} +} + +// ---------- AppLogin ---------- +type AppLoginReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type LoginType `protobuf:"varint,1,opt,name=Type,json=type,proto3,enum=LoginType" json:"Type,omitempty"` // 登录方式 + PlatformType PlatformType `protobuf:"varint,2,opt,name=PlatformType,json=platformType,proto3,enum=PlatformType" json:"PlatformType,omitempty"` // 平台类型 + CountryCode string `protobuf:"bytes,3,opt,name=CountryCode,json=countryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + Phone string `protobuf:"bytes,4,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` // 手机号 + Code string `protobuf:"bytes,5,opt,name=Code,json=code,proto3" json:"Code,omitempty"` // 验证码 + WxMiniCode string `protobuf:"bytes,6,opt,name=WxMiniCode,json=wxMiniCode,proto3" json:"WxMiniCode,omitempty"` // 微信小程序登录凭证 + WxAppCode string `protobuf:"bytes,7,opt,name=WxAppCode,json=wxAppCode,proto3" json:"WxAppCode,omitempty"` // 微信App登录凭证 + IdentityToken string `protobuf:"bytes,8,opt,name=IdentityToken,json=identityToken,proto3" json:"IdentityToken,omitempty"` // 苹果登录凭证 + FullName string `protobuf:"bytes,9,opt,name=FullName,json=fullName,proto3" json:"FullName,omitempty"` // 苹果全称 + Email string `protobuf:"bytes,10,opt,name=Email,json=email,proto3" json:"Email,omitempty"` // 邮箱 +} + +func (x *AppLoginReq) Reset() { + *x = AppLoginReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppLoginReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppLoginReq) ProtoMessage() {} + +func (x *AppLoginReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[6] + 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 AppLoginReq.ProtoReflect.Descriptor instead. +func (*AppLoginReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{6} +} + +func (x *AppLoginReq) GetType() LoginType { + if x != nil { + return x.Type + } + return LoginType_LOGIN_TYPE_UNKNOWN +} + +func (x *AppLoginReq) GetPlatformType() PlatformType { + if x != nil { + return x.PlatformType + } + return PlatformType_PLATFORM_TYPE_UNKNOWN +} + +func (x *AppLoginReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *AppLoginReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *AppLoginReq) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *AppLoginReq) GetWxMiniCode() string { + if x != nil { + return x.WxMiniCode + } + return "" +} + +func (x *AppLoginReq) GetWxAppCode() string { + if x != nil { + return x.WxAppCode + } + return "" +} + +func (x *AppLoginReq) GetIdentityToken() string { + if x != nil { + return x.IdentityToken + } + return "" +} + +func (x *AppLoginReq) GetFullName() string { + if x != nil { + return x.FullName + } + return "" +} + +func (x *AppLoginReq) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +type AppLoginResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=Status,json=status,proto3" json:"Status,omitempty"` // 状态 0 成功 1 需要绑定手机号 + Ticket string `protobuf:"bytes,2,opt,name=Ticket,json=ticket,proto3" json:"Ticket,omitempty"` // 凭证 + USN int64 `protobuf:"varint,3,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` // 用户ID + AccessToken string `protobuf:"bytes,4,opt,name=AccessToken,json=accessToken,proto3" json:"AccessToken,omitempty"` + RefreshToken string `protobuf:"bytes,5,opt,name=RefreshToken,json=refreshToken,proto3" json:"RefreshToken,omitempty"` + IsMaintain bool `protobuf:"varint,6,opt,name=IsMaintain,json=isMaintain,proto3" json:"IsMaintain,omitempty"` // 服务器是否在维护 +} + +func (x *AppLoginResp) Reset() { + *x = AppLoginResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppLoginResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppLoginResp) ProtoMessage() {} + +func (x *AppLoginResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[7] + 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 AppLoginResp.ProtoReflect.Descriptor instead. +func (*AppLoginResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{7} +} + +func (x *AppLoginResp) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *AppLoginResp) GetTicket() string { + if x != nil { + return x.Ticket + } + return "" +} + +func (x *AppLoginResp) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +func (x *AppLoginResp) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *AppLoginResp) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *AppLoginResp) GetIsMaintain() bool { + if x != nil { + return x.IsMaintain + } + return false +} + +// ---------- AppBindPhone ---------- +type AppBindPhoneReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ticket string `protobuf:"bytes,1,opt,name=Ticket,json=ticket,proto3" json:"Ticket,omitempty"` // 凭证 + CountryCode string `protobuf:"bytes,2,opt,name=CountryCode,json=countryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + Phone string `protobuf:"bytes,3,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` // 手机号 + Code string `protobuf:"bytes,4,opt,name=Code,json=code,proto3" json:"Code,omitempty"` // 验证码 + MiniPhoneCode string `protobuf:"bytes,5,opt,name=MiniPhoneCode,json=miniPhoneCode,proto3" json:"MiniPhoneCode,omitempty"` // 微信小程序手机凭证 +} + +func (x *AppBindPhoneReq) Reset() { + *x = AppBindPhoneReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppBindPhoneReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppBindPhoneReq) ProtoMessage() {} + +func (x *AppBindPhoneReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[8] + 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 AppBindPhoneReq.ProtoReflect.Descriptor instead. +func (*AppBindPhoneReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{8} +} + +func (x *AppBindPhoneReq) GetTicket() string { + if x != nil { + return x.Ticket + } + return "" +} + +func (x *AppBindPhoneReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *AppBindPhoneReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *AppBindPhoneReq) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *AppBindPhoneReq) GetMiniPhoneCode() string { + if x != nil { + return x.MiniPhoneCode + } + return "" +} + +// ---------- AppRefreshToken ---------- +type AppRefreshTokenReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RefreshToken string `protobuf:"bytes,1,opt,name=RefreshToken,json=refreshToken,proto3" json:"RefreshToken,omitempty"` +} + +func (x *AppRefreshTokenReq) Reset() { + *x = AppRefreshTokenReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppRefreshTokenReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppRefreshTokenReq) ProtoMessage() {} + +func (x *AppRefreshTokenReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_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 AppRefreshTokenReq.ProtoReflect.Descriptor instead. +func (*AppRefreshTokenReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{9} +} + +func (x *AppRefreshTokenReq) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +type AppRefreshTokenResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccessToken string `protobuf:"bytes,1,opt,name=AccessToken,json=accessToken,proto3" json:"AccessToken,omitempty"` + RefreshToken string `protobuf:"bytes,2,opt,name=RefreshToken,json=refreshToken,proto3" json:"RefreshToken,omitempty"` + IsMaintain bool `protobuf:"varint,3,opt,name=IsMaintain,json=isMaintain,proto3" json:"IsMaintain,omitempty"` +} + +func (x *AppRefreshTokenResp) Reset() { + *x = AppRefreshTokenResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppRefreshTokenResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppRefreshTokenResp) ProtoMessage() {} + +func (x *AppRefreshTokenResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[10] + 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 AppRefreshTokenResp.ProtoReflect.Descriptor instead. +func (*AppRefreshTokenResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{10} +} + +func (x *AppRefreshTokenResp) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *AppRefreshTokenResp) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *AppRefreshTokenResp) GetIsMaintain() bool { + if x != nil { + return x.IsMaintain + } + return false +} + +// ---------- AppLogout ---------- +type AppLogoutReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RefreshToken string `protobuf:"bytes,1,opt,name=RefreshToken,json=refreshToken,proto3" json:"RefreshToken,omitempty"` +} + +func (x *AppLogoutReq) Reset() { + *x = AppLogoutReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppLogoutReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppLogoutReq) ProtoMessage() {} + +func (x *AppLogoutReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[11] + 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 AppLogoutReq.ProtoReflect.Descriptor instead. +func (*AppLogoutReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{11} +} + +func (x *AppLogoutReq) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +type AppLogoutResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AppLogoutResp) Reset() { + *x = AppLogoutResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppLogoutResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppLogoutResp) ProtoMessage() {} + +func (x *AppLogoutResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[12] + 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 AppLogoutResp.ProtoReflect.Descriptor instead. +func (*AppLogoutResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{12} +} + +// ---------- AppSendCode ---------- +type AppSendCodeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phone string `protobuf:"bytes,1,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` + CountryCode string `protobuf:"bytes,2,opt,name=CountryCode,json=countryCode,proto3" json:"CountryCode,omitempty"` +} + +func (x *AppSendCodeReq) Reset() { + *x = AppSendCodeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppSendCodeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppSendCodeReq) ProtoMessage() {} + +func (x *AppSendCodeReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[13] + 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 AppSendCodeReq.ProtoReflect.Descriptor instead. +func (*AppSendCodeReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{13} +} + +func (x *AppSendCodeReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *AppSendCodeReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +type AppSendCodeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AppSendCodeResp) Reset() { + *x = AppSendCodeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppSendCodeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppSendCodeResp) ProtoMessage() {} + +func (x *AppSendCodeResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[14] + 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 AppSendCodeResp.ProtoReflect.Descriptor instead. +func (*AppSendCodeResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{14} +} + +// ---------- AppGetCodeVoucher ---------- +type AppGetCodeVoucherReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CountryCode string `protobuf:"bytes,1,opt,name=CountryCode,json=countryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + Phone string `protobuf:"bytes,2,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` // 手机号 + Code string `protobuf:"bytes,3,opt,name=Code,json=code,proto3" json:"Code,omitempty"` // 验证码 +} + +func (x *AppGetCodeVoucherReq) Reset() { + *x = AppGetCodeVoucherReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppGetCodeVoucherReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppGetCodeVoucherReq) ProtoMessage() {} + +func (x *AppGetCodeVoucherReq) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[15] + 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 AppGetCodeVoucherReq.ProtoReflect.Descriptor instead. +func (*AppGetCodeVoucherReq) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{15} +} + +func (x *AppGetCodeVoucherReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *AppGetCodeVoucherReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *AppGetCodeVoucherReq) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +type AppGetCodeVoucherResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CodeVoucher string `protobuf:"bytes,1,opt,name=CodeVoucher,json=codeVoucher,proto3" json:"CodeVoucher,omitempty"` // 凭证 +} + +func (x *AppGetCodeVoucherResp) Reset() { + *x = AppGetCodeVoucherResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_third_party_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppGetCodeVoucherResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppGetCodeVoucherResp) ProtoMessage() {} + +func (x *AppGetCodeVoucherResp) ProtoReflect() protoreflect.Message { + mi := &file_service_third_party_proto_msgTypes[16] + 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 AppGetCodeVoucherResp.ProtoReflect.Descriptor instead. +func (*AppGetCodeVoucherResp) Descriptor() ([]byte, []int) { + return file_service_third_party_proto_rawDescGZIP(), []int{16} +} + +func (x *AppGetCodeVoucherResp) GetCodeVoucher() string { + if x != nil { + return x.CodeVoucher + } + return "" +} + +var File_service_third_party_proto protoreflect.FileDescriptor + +var file_service_third_party_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2d, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x11, 0x49, 0x6e, + 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, + 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x2e, 0x0a, 0x12, 0x49, + 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x49, + 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, + 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x6f, 0x75, 0x63, 0x68, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x6f, 0x75, 0x63, 0x68, 0x65, + 0x72, 0x22, 0x4b, 0x0a, 0x19, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, + 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, + 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x27, + 0x0a, 0x13, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x49, 0x6e, 0x6e, 0x65, 0x72, + 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, + 0xc2, 0x02, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, + 0x1e, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x31, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, + 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x77, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x57, 0x78, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x77, 0x78, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x6d, 0x61, 0x69, 0x6c, 0x22, 0xb6, 0x01, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, + 0x0a, 0x49, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x22, 0x9b, 0x01, + 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x42, 0x69, 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, + 0x71, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x50, + 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x4d, 0x69, 0x6e, 0x69, 0x50, 0x68, 0x6f, + 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, + 0x6e, 0x69, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x12, 0x41, + 0x70, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7b, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x52, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x22, + 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x22, 0x32, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, + 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x48, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x53, 0x65, + 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, + 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x62, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x39, 0x0a, 0x15, 0x41, 0x70, 0x70, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, + 0x68, 0x65, 0x72, 0x2a, 0x7e, 0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x4f, 0x47, 0x49, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x16, + 0x0a, 0x12, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x58, 0x5f, + 0x4d, 0x49, 0x4e, 0x49, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x58, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x03, 0x12, 0x14, 0x0a, + 0x10, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x4c, + 0x45, 0x10, 0x04, 0x2a, 0x75, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x16, + 0x0a, 0x12, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x47, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, + 0x52, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x58, 0x5f, 0x4d, 0x49, 0x4e, 0x49, 0x10, + 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x03, 0x32, 0x89, 0x06, 0x0a, 0x0a, 0x54, + 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0e, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x2e, 0x49, 0x6e, + 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x13, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x15, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x12, + 0x19, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, + 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x10, 0x49, 0x6e, 0x6e, 0x65, + 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x14, 0x2e, 0x49, + 0x6e, 0x6e, 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x66, + 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x08, 0x41, + 0x70, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x0c, 0x2e, 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, + 0x17, 0x2f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x6f, 0x70, + 0x65, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x58, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x42, + 0x69, 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x10, 0x2e, 0x41, 0x70, 0x70, 0x42, 0x69, + 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x41, 0x70, 0x70, + 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2d, 0x70, 0x61, 0x72, + 0x74, 0x79, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x69, + 0x6e, 0x64, 0x12, 0x68, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x13, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x41, 0x70, 0x70, + 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x74, 0x68, + 0x69, 0x72, 0x64, 0x2d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x72, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4f, 0x0a, 0x09, + 0x41, 0x70, 0x70, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x0d, 0x2e, 0x41, 0x70, 0x70, 0x4c, + 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x41, 0x70, 0x70, 0x4c, 0x6f, + 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, + 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2d, 0x70, 0x61, 0x72, 0x74, + 0x79, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x58, 0x0a, + 0x0b, 0x41, 0x70, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x2e, 0x41, + 0x70, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, + 0x41, 0x70, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x74, 0x68, 0x69, + 0x72, 0x64, 0x2d, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x73, 0x65, + 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x6d, 0x0a, 0x11, 0x41, 0x70, 0x70, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x41, + 0x70, 0x70, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x41, 0x70, 0x70, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x56, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2d, 0x70, + 0x61, 0x72, 0x74, 0x79, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x76, + 0x6f, 0x75, 0x63, 0x68, 0x65, 0x72, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, + 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, 0x72, 0x73, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_third_party_proto_rawDescOnce sync.Once + file_service_third_party_proto_rawDescData = file_service_third_party_proto_rawDesc +) + +func file_service_third_party_proto_rawDescGZIP() []byte { + file_service_third_party_proto_rawDescOnce.Do(func() { + file_service_third_party_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_third_party_proto_rawDescData) + }) + return file_service_third_party_proto_rawDescData +} + +var file_service_third_party_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_service_third_party_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_service_third_party_proto_goTypes = []interface{}{ + (LoginType)(0), // 0: LoginType + (PlatformType)(0), // 1: PlatformType + (*InnerCheckCodeReq)(nil), // 2: InnerCheckCodeReq + (*InnerCheckCodeResp)(nil), // 3: InnerCheckCodeResp + (*InnerCheckCodeVoucherReq)(nil), // 4: InnerCheckCodeVoucherReq + (*InnerCheckCodeVoucherResp)(nil), // 5: InnerCheckCodeVoucherResp + (*InnerKickOfflineReq)(nil), // 6: InnerKickOfflineReq + (*InnerKickOfflineResp)(nil), // 7: InnerKickOfflineResp + (*AppLoginReq)(nil), // 8: AppLoginReq + (*AppLoginResp)(nil), // 9: AppLoginResp + (*AppBindPhoneReq)(nil), // 10: AppBindPhoneReq + (*AppRefreshTokenReq)(nil), // 11: AppRefreshTokenReq + (*AppRefreshTokenResp)(nil), // 12: AppRefreshTokenResp + (*AppLogoutReq)(nil), // 13: AppLogoutReq + (*AppLogoutResp)(nil), // 14: AppLogoutResp + (*AppSendCodeReq)(nil), // 15: AppSendCodeReq + (*AppSendCodeResp)(nil), // 16: AppSendCodeResp + (*AppGetCodeVoucherReq)(nil), // 17: AppGetCodeVoucherReq + (*AppGetCodeVoucherResp)(nil), // 18: AppGetCodeVoucherResp +} +var file_service_third_party_proto_depIdxs = []int32{ + 0, // 0: AppLoginReq.Type:type_name -> LoginType + 1, // 1: AppLoginReq.PlatformType:type_name -> PlatformType + 2, // 2: ThirdParty.InnerCheckCode:input_type -> InnerCheckCodeReq + 4, // 3: ThirdParty.InnerCheckCodeVoucher:input_type -> InnerCheckCodeVoucherReq + 6, // 4: ThirdParty.InnerKickOffline:input_type -> InnerKickOfflineReq + 8, // 5: ThirdParty.AppLogin:input_type -> AppLoginReq + 10, // 6: ThirdParty.AppBindPhone:input_type -> AppBindPhoneReq + 11, // 7: ThirdParty.AppRefreshToken:input_type -> AppRefreshTokenReq + 13, // 8: ThirdParty.AppLogout:input_type -> AppLogoutReq + 15, // 9: ThirdParty.AppSendCode:input_type -> AppSendCodeReq + 17, // 10: ThirdParty.AppGetCodeVoucher:input_type -> AppGetCodeVoucherReq + 3, // 11: ThirdParty.InnerCheckCode:output_type -> InnerCheckCodeResp + 5, // 12: ThirdParty.InnerCheckCodeVoucher:output_type -> InnerCheckCodeVoucherResp + 7, // 13: ThirdParty.InnerKickOffline:output_type -> InnerKickOfflineResp + 9, // 14: ThirdParty.AppLogin:output_type -> AppLoginResp + 9, // 15: ThirdParty.AppBindPhone:output_type -> AppLoginResp + 12, // 16: ThirdParty.AppRefreshToken:output_type -> AppRefreshTokenResp + 14, // 17: ThirdParty.AppLogout:output_type -> AppLogoutResp + 16, // 18: ThirdParty.AppSendCode:output_type -> AppSendCodeResp + 18, // 19: ThirdParty.AppGetCodeVoucher:output_type -> AppGetCodeVoucherResp + 11, // [11:20] is the sub-list for method output_type + 2, // [2:11] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_service_third_party_proto_init() } +func file_service_third_party_proto_init() { + if File_service_third_party_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_third_party_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCheckCodeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCheckCodeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCheckCodeVoucherReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCheckCodeVoucherResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerKickOfflineReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerKickOfflineResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppLoginReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppLoginResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppBindPhoneReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppRefreshTokenReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppRefreshTokenResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppLogoutReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppLogoutResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppSendCodeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppSendCodeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppGetCodeVoucherReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_third_party_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppGetCodeVoucherResp); 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_service_third_party_proto_rawDesc, + NumEnums: 2, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_third_party_proto_goTypes, + DependencyIndexes: file_service_third_party_proto_depIdxs, + EnumInfos: file_service_third_party_proto_enumTypes, + MessageInfos: file_service_third_party_proto_msgTypes, + }.Build() + File_service_third_party_proto = out.File + file_service_third_party_proto_rawDesc = nil + file_service_third_party_proto_goTypes = nil + file_service_third_party_proto_depIdxs = nil +} diff --git a/proto/rs/rspb/service_third-party.pb.gw.go b/proto/rs/rspb/service_third-party.pb.gw.go new file mode 100644 index 0000000..6665f3e --- /dev/null +++ b/proto/rs/rspb/service_third-party.pb.gw.go @@ -0,0 +1,469 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service_third-party.proto + +/* +Package rspb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rspb + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +func request_ThirdParty_AppLogin_0(ctx context.Context, marshaler runtime.Marshaler, client ThirdPartyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppLoginReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppLogin(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ThirdParty_AppLogin_0(ctx context.Context, marshaler runtime.Marshaler, server ThirdPartyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppLoginReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppLogin(ctx, &protoReq) + return msg, metadata, err +} + +func request_ThirdParty_AppBindPhone_0(ctx context.Context, marshaler runtime.Marshaler, client ThirdPartyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppBindPhoneReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppBindPhone(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ThirdParty_AppBindPhone_0(ctx context.Context, marshaler runtime.Marshaler, server ThirdPartyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppBindPhoneReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppBindPhone(ctx, &protoReq) + return msg, metadata, err +} + +func request_ThirdParty_AppRefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, client ThirdPartyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppRefreshTokenReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppRefreshToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ThirdParty_AppRefreshToken_0(ctx context.Context, marshaler runtime.Marshaler, server ThirdPartyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppRefreshTokenReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppRefreshToken(ctx, &protoReq) + return msg, metadata, err +} + +func request_ThirdParty_AppLogout_0(ctx context.Context, marshaler runtime.Marshaler, client ThirdPartyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppLogoutReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppLogout(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ThirdParty_AppLogout_0(ctx context.Context, marshaler runtime.Marshaler, server ThirdPartyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppLogoutReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppLogout(ctx, &protoReq) + return msg, metadata, err +} + +func request_ThirdParty_AppSendCode_0(ctx context.Context, marshaler runtime.Marshaler, client ThirdPartyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppSendCodeReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppSendCode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ThirdParty_AppSendCode_0(ctx context.Context, marshaler runtime.Marshaler, server ThirdPartyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppSendCodeReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppSendCode(ctx, &protoReq) + return msg, metadata, err +} + +func request_ThirdParty_AppGetCodeVoucher_0(ctx context.Context, marshaler runtime.Marshaler, client ThirdPartyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppGetCodeVoucherReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppGetCodeVoucher(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ThirdParty_AppGetCodeVoucher_0(ctx context.Context, marshaler runtime.Marshaler, server ThirdPartyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppGetCodeVoucherReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppGetCodeVoucher(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterThirdPartyHandlerServer registers the http handlers for service ThirdParty to "mux". +// UnaryRPC :call ThirdPartyServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterThirdPartyHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterThirdPartyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ThirdPartyServer) error { + mux.Handle(http.MethodPost, pattern_ThirdParty_AppLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.ThirdParty/AppLogin", runtime.WithHTTPPathPattern("/third-party/open/login")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ThirdParty_AppLogin_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppBindPhone_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.ThirdParty/AppBindPhone", runtime.WithHTTPPathPattern("/third-party/open/login_bind")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ThirdParty_AppBindPhone_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppBindPhone_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppRefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.ThirdParty/AppRefreshToken", runtime.WithHTTPPathPattern("/third-party/open/refresh_token")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ThirdParty_AppRefreshToken_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppRefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppLogout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.ThirdParty/AppLogout", runtime.WithHTTPPathPattern("/third-party/open/logout")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ThirdParty_AppLogout_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppLogout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppSendCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.ThirdParty/AppSendCode", runtime.WithHTTPPathPattern("/third-party/open/send_code")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ThirdParty_AppSendCode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppSendCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppGetCodeVoucher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.ThirdParty/AppGetCodeVoucher", runtime.WithHTTPPathPattern("/third-party/open/code_voucher")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ThirdParty_AppGetCodeVoucher_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppGetCodeVoucher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterThirdPartyHandlerFromEndpoint is same as RegisterThirdPartyHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterThirdPartyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterThirdPartyHandler(ctx, mux, conn) +} + +// RegisterThirdPartyHandler registers the http handlers for service ThirdParty to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterThirdPartyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterThirdPartyHandlerClient(ctx, mux, NewThirdPartyClient(conn)) +} + +// RegisterThirdPartyHandlerClient registers the http handlers for service ThirdParty +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ThirdPartyClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ThirdPartyClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ThirdPartyClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterThirdPartyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ThirdPartyClient) error { + mux.Handle(http.MethodPost, pattern_ThirdParty_AppLogin_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.ThirdParty/AppLogin", runtime.WithHTTPPathPattern("/third-party/open/login")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ThirdParty_AppLogin_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppLogin_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppBindPhone_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.ThirdParty/AppBindPhone", runtime.WithHTTPPathPattern("/third-party/open/login_bind")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ThirdParty_AppBindPhone_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppBindPhone_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppRefreshToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.ThirdParty/AppRefreshToken", runtime.WithHTTPPathPattern("/third-party/open/refresh_token")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ThirdParty_AppRefreshToken_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppRefreshToken_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppLogout_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.ThirdParty/AppLogout", runtime.WithHTTPPathPattern("/third-party/open/logout")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ThirdParty_AppLogout_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppLogout_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppSendCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.ThirdParty/AppSendCode", runtime.WithHTTPPathPattern("/third-party/open/send_code")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ThirdParty_AppSendCode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppSendCode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ThirdParty_AppGetCodeVoucher_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.ThirdParty/AppGetCodeVoucher", runtime.WithHTTPPathPattern("/third-party/open/code_voucher")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ThirdParty_AppGetCodeVoucher_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ThirdParty_AppGetCodeVoucher_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_ThirdParty_AppLogin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"third-party", "open", "login"}, "")) + pattern_ThirdParty_AppBindPhone_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"third-party", "open", "login_bind"}, "")) + pattern_ThirdParty_AppRefreshToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"third-party", "open", "refresh_token"}, "")) + pattern_ThirdParty_AppLogout_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"third-party", "open", "logout"}, "")) + pattern_ThirdParty_AppSendCode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"third-party", "open", "send_code"}, "")) + pattern_ThirdParty_AppGetCodeVoucher_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"third-party", "open", "code_voucher"}, "")) +) + +var ( + forward_ThirdParty_AppLogin_0 = runtime.ForwardResponseMessage + forward_ThirdParty_AppBindPhone_0 = runtime.ForwardResponseMessage + forward_ThirdParty_AppRefreshToken_0 = runtime.ForwardResponseMessage + forward_ThirdParty_AppLogout_0 = runtime.ForwardResponseMessage + forward_ThirdParty_AppSendCode_0 = runtime.ForwardResponseMessage + forward_ThirdParty_AppGetCodeVoucher_0 = runtime.ForwardResponseMessage +) diff --git a/proto/rs/rspb/service_third-party_grpc.pb.go b/proto/rs/rspb/service_third-party_grpc.pb.go new file mode 100644 index 0000000..9e92993 --- /dev/null +++ b/proto/rs/rspb/service_third-party_grpc.pb.go @@ -0,0 +1,411 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.25.1 +// source: service_third-party.proto + +package rspb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// ThirdPartyClient is the client API for ThirdParty service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ThirdPartyClient interface { + // 校验验证码 + InnerCheckCode(ctx context.Context, in *InnerCheckCodeReq, opts ...grpc.CallOption) (*InnerCheckCodeResp, error) + // 校验验证码凭证 + InnerCheckCodeVoucher(ctx context.Context, in *InnerCheckCodeVoucherReq, opts ...grpc.CallOption) (*InnerCheckCodeVoucherResp, error) + // 踢所有端下线 + InnerKickOffline(ctx context.Context, in *InnerKickOfflineReq, opts ...grpc.CallOption) (*InnerKickOfflineResp, error) + // 登录 + AppLogin(ctx context.Context, in *AppLoginReq, opts ...grpc.CallOption) (*AppLoginResp, error) + // 绑定手机号 + AppBindPhone(ctx context.Context, in *AppBindPhoneReq, opts ...grpc.CallOption) (*AppLoginResp, error) + // 刷新令牌 + AppRefreshToken(ctx context.Context, in *AppRefreshTokenReq, opts ...grpc.CallOption) (*AppRefreshTokenResp, error) + // 登出 + AppLogout(ctx context.Context, in *AppLogoutReq, opts ...grpc.CallOption) (*AppLogoutResp, error) + // 发送验证码 + AppSendCode(ctx context.Context, in *AppSendCodeReq, opts ...grpc.CallOption) (*AppSendCodeResp, error) + // 获取验证码凭证 + AppGetCodeVoucher(ctx context.Context, in *AppGetCodeVoucherReq, opts ...grpc.CallOption) (*AppGetCodeVoucherResp, error) +} + +type thirdPartyClient struct { + cc grpc.ClientConnInterface +} + +func NewThirdPartyClient(cc grpc.ClientConnInterface) ThirdPartyClient { + return &thirdPartyClient{cc} +} + +func (c *thirdPartyClient) InnerCheckCode(ctx context.Context, in *InnerCheckCodeReq, opts ...grpc.CallOption) (*InnerCheckCodeResp, error) { + out := new(InnerCheckCodeResp) + err := c.cc.Invoke(ctx, "/ThirdParty/InnerCheckCode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) InnerCheckCodeVoucher(ctx context.Context, in *InnerCheckCodeVoucherReq, opts ...grpc.CallOption) (*InnerCheckCodeVoucherResp, error) { + out := new(InnerCheckCodeVoucherResp) + err := c.cc.Invoke(ctx, "/ThirdParty/InnerCheckCodeVoucher", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) InnerKickOffline(ctx context.Context, in *InnerKickOfflineReq, opts ...grpc.CallOption) (*InnerKickOfflineResp, error) { + out := new(InnerKickOfflineResp) + err := c.cc.Invoke(ctx, "/ThirdParty/InnerKickOffline", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) AppLogin(ctx context.Context, in *AppLoginReq, opts ...grpc.CallOption) (*AppLoginResp, error) { + out := new(AppLoginResp) + err := c.cc.Invoke(ctx, "/ThirdParty/AppLogin", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) AppBindPhone(ctx context.Context, in *AppBindPhoneReq, opts ...grpc.CallOption) (*AppLoginResp, error) { + out := new(AppLoginResp) + err := c.cc.Invoke(ctx, "/ThirdParty/AppBindPhone", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) AppRefreshToken(ctx context.Context, in *AppRefreshTokenReq, opts ...grpc.CallOption) (*AppRefreshTokenResp, error) { + out := new(AppRefreshTokenResp) + err := c.cc.Invoke(ctx, "/ThirdParty/AppRefreshToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) AppLogout(ctx context.Context, in *AppLogoutReq, opts ...grpc.CallOption) (*AppLogoutResp, error) { + out := new(AppLogoutResp) + err := c.cc.Invoke(ctx, "/ThirdParty/AppLogout", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) AppSendCode(ctx context.Context, in *AppSendCodeReq, opts ...grpc.CallOption) (*AppSendCodeResp, error) { + out := new(AppSendCodeResp) + err := c.cc.Invoke(ctx, "/ThirdParty/AppSendCode", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *thirdPartyClient) AppGetCodeVoucher(ctx context.Context, in *AppGetCodeVoucherReq, opts ...grpc.CallOption) (*AppGetCodeVoucherResp, error) { + out := new(AppGetCodeVoucherResp) + err := c.cc.Invoke(ctx, "/ThirdParty/AppGetCodeVoucher", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ThirdPartyServer is the server API for ThirdParty service. +// All implementations must embed UnimplementedThirdPartyServer +// for forward compatibility +type ThirdPartyServer interface { + // 校验验证码 + InnerCheckCode(context.Context, *InnerCheckCodeReq) (*InnerCheckCodeResp, error) + // 校验验证码凭证 + InnerCheckCodeVoucher(context.Context, *InnerCheckCodeVoucherReq) (*InnerCheckCodeVoucherResp, error) + // 踢所有端下线 + InnerKickOffline(context.Context, *InnerKickOfflineReq) (*InnerKickOfflineResp, error) + // 登录 + AppLogin(context.Context, *AppLoginReq) (*AppLoginResp, error) + // 绑定手机号 + AppBindPhone(context.Context, *AppBindPhoneReq) (*AppLoginResp, error) + // 刷新令牌 + AppRefreshToken(context.Context, *AppRefreshTokenReq) (*AppRefreshTokenResp, error) + // 登出 + AppLogout(context.Context, *AppLogoutReq) (*AppLogoutResp, error) + // 发送验证码 + AppSendCode(context.Context, *AppSendCodeReq) (*AppSendCodeResp, error) + // 获取验证码凭证 + AppGetCodeVoucher(context.Context, *AppGetCodeVoucherReq) (*AppGetCodeVoucherResp, error) + mustEmbedUnimplementedThirdPartyServer() +} + +// UnimplementedThirdPartyServer must be embedded to have forward compatible implementations. +type UnimplementedThirdPartyServer struct { +} + +func (UnimplementedThirdPartyServer) InnerCheckCode(context.Context, *InnerCheckCodeReq) (*InnerCheckCodeResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerCheckCode not implemented") +} +func (UnimplementedThirdPartyServer) InnerCheckCodeVoucher(context.Context, *InnerCheckCodeVoucherReq) (*InnerCheckCodeVoucherResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerCheckCodeVoucher not implemented") +} +func (UnimplementedThirdPartyServer) InnerKickOffline(context.Context, *InnerKickOfflineReq) (*InnerKickOfflineResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerKickOffline not implemented") +} +func (UnimplementedThirdPartyServer) AppLogin(context.Context, *AppLoginReq) (*AppLoginResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppLogin not implemented") +} +func (UnimplementedThirdPartyServer) AppBindPhone(context.Context, *AppBindPhoneReq) (*AppLoginResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppBindPhone not implemented") +} +func (UnimplementedThirdPartyServer) AppRefreshToken(context.Context, *AppRefreshTokenReq) (*AppRefreshTokenResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppRefreshToken not implemented") +} +func (UnimplementedThirdPartyServer) AppLogout(context.Context, *AppLogoutReq) (*AppLogoutResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppLogout not implemented") +} +func (UnimplementedThirdPartyServer) AppSendCode(context.Context, *AppSendCodeReq) (*AppSendCodeResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppSendCode not implemented") +} +func (UnimplementedThirdPartyServer) AppGetCodeVoucher(context.Context, *AppGetCodeVoucherReq) (*AppGetCodeVoucherResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppGetCodeVoucher not implemented") +} +func (UnimplementedThirdPartyServer) mustEmbedUnimplementedThirdPartyServer() {} + +// UnsafeThirdPartyServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ThirdPartyServer will +// result in compilation errors. +type UnsafeThirdPartyServer interface { + mustEmbedUnimplementedThirdPartyServer() +} + +func RegisterThirdPartyServer(s grpc.ServiceRegistrar, srv ThirdPartyServer) { + s.RegisterService(&ThirdParty_ServiceDesc, srv) +} + +func _ThirdParty_InnerCheckCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerCheckCodeReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).InnerCheckCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/InnerCheckCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).InnerCheckCode(ctx, req.(*InnerCheckCodeReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_InnerCheckCodeVoucher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerCheckCodeVoucherReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).InnerCheckCodeVoucher(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/InnerCheckCodeVoucher", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).InnerCheckCodeVoucher(ctx, req.(*InnerCheckCodeVoucherReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_InnerKickOffline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerKickOfflineReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).InnerKickOffline(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/InnerKickOffline", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).InnerKickOffline(ctx, req.(*InnerKickOfflineReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_AppLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppLoginReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).AppLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/AppLogin", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).AppLogin(ctx, req.(*AppLoginReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_AppBindPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppBindPhoneReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).AppBindPhone(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/AppBindPhone", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).AppBindPhone(ctx, req.(*AppBindPhoneReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_AppRefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppRefreshTokenReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).AppRefreshToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/AppRefreshToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).AppRefreshToken(ctx, req.(*AppRefreshTokenReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_AppLogout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppLogoutReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).AppLogout(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/AppLogout", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).AppLogout(ctx, req.(*AppLogoutReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_AppSendCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppSendCodeReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).AppSendCode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/AppSendCode", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).AppSendCode(ctx, req.(*AppSendCodeReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _ThirdParty_AppGetCodeVoucher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppGetCodeVoucherReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ThirdPartyServer).AppGetCodeVoucher(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ThirdParty/AppGetCodeVoucher", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ThirdPartyServer).AppGetCodeVoucher(ctx, req.(*AppGetCodeVoucherReq)) + } + return interceptor(ctx, in, info, handler) +} + +// ThirdParty_ServiceDesc is the grpc.ServiceDesc for ThirdParty service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ThirdParty_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ThirdParty", + HandlerType: (*ThirdPartyServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InnerCheckCode", + Handler: _ThirdParty_InnerCheckCode_Handler, + }, + { + MethodName: "InnerCheckCodeVoucher", + Handler: _ThirdParty_InnerCheckCodeVoucher_Handler, + }, + { + MethodName: "InnerKickOffline", + Handler: _ThirdParty_InnerKickOffline_Handler, + }, + { + MethodName: "AppLogin", + Handler: _ThirdParty_AppLogin_Handler, + }, + { + MethodName: "AppBindPhone", + Handler: _ThirdParty_AppBindPhone_Handler, + }, + { + MethodName: "AppRefreshToken", + Handler: _ThirdParty_AppRefreshToken_Handler, + }, + { + MethodName: "AppLogout", + Handler: _ThirdParty_AppLogout_Handler, + }, + { + MethodName: "AppSendCode", + Handler: _ThirdParty_AppSendCode_Handler, + }, + { + MethodName: "AppGetCodeVoucher", + Handler: _ThirdParty_AppGetCodeVoucher_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_third-party.proto", +} diff --git a/proto/rs/rspb/service_user.pb.go b/proto/rs/rspb/service_user.pb.go new file mode 100644 index 0000000..3582e74 --- /dev/null +++ b/proto/rs/rspb/service_user.pb.go @@ -0,0 +1,1113 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: service_user.proto + +package rspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/rs/rscommon" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// 用户基础信息 +type UserBaseInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID + IsBindPhone bool `protobuf:"varint,2,opt,name=IsBindPhone,proto3" json:"IsBindPhone,omitempty"` // 是否绑定手机号 +} + +func (x *UserBaseInfo) Reset() { + *x = UserBaseInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserBaseInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserBaseInfo) ProtoMessage() {} + +func (x *UserBaseInfo) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[0] + 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 UserBaseInfo.ProtoReflect.Descriptor instead. +func (*UserBaseInfo) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{0} +} + +func (x *UserBaseInfo) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +func (x *UserBaseInfo) GetIsBindPhone() bool { + if x != nil { + return x.IsBindPhone + } + return false +} + +// ---------- InnerFindOrCreateUserByPhone ---------- +type InnerFindOrCreateUserByPhoneReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phone string `protobuf:"bytes,1,opt,name=Phone,proto3" json:"Phone,omitempty"` // 手机号 + CountryCode string `protobuf:"bytes,2,opt,name=CountryCode,proto3" json:"CountryCode,omitempty"` // 国家码 +} + +func (x *InnerFindOrCreateUserByPhoneReq) Reset() { + *x = InnerFindOrCreateUserByPhoneReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerFindOrCreateUserByPhoneReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerFindOrCreateUserByPhoneReq) ProtoMessage() {} + +func (x *InnerFindOrCreateUserByPhoneReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[1] + 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 InnerFindOrCreateUserByPhoneReq.ProtoReflect.Descriptor instead. +func (*InnerFindOrCreateUserByPhoneReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{1} +} + +func (x *InnerFindOrCreateUserByPhoneReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *InnerFindOrCreateUserByPhoneReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +// ---------- InnerFindUserByWxMini ---------- +type InnerFindUserByWxMiniReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UnionID string `protobuf:"bytes,1,opt,name=UnionID,proto3" json:"UnionID,omitempty"` // 微信小程序的UnionID + OpenID string `protobuf:"bytes,2,opt,name=OpenID,proto3" json:"OpenID,omitempty"` // 微信小程序的OpenID +} + +func (x *InnerFindUserByWxMiniReq) Reset() { + *x = InnerFindUserByWxMiniReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerFindUserByWxMiniReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerFindUserByWxMiniReq) ProtoMessage() {} + +func (x *InnerFindUserByWxMiniReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[2] + 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 InnerFindUserByWxMiniReq.ProtoReflect.Descriptor instead. +func (*InnerFindUserByWxMiniReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{2} +} + +func (x *InnerFindUserByWxMiniReq) GetUnionID() string { + if x != nil { + return x.UnionID + } + return "" +} + +func (x *InnerFindUserByWxMiniReq) GetOpenID() string { + if x != nil { + return x.OpenID + } + return "" +} + +// ---------- InnerCreateUserByWxMini ---------- +type InnerCreateUserByWxMiniReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phone string `protobuf:"bytes,1,opt,name=Phone,proto3" json:"Phone,omitempty"` // 手机号 + CountryCode string `protobuf:"bytes,2,opt,name=CountryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + UnionID string `protobuf:"bytes,3,opt,name=UnionID,proto3" json:"UnionID,omitempty"` // 微信小程序的UnionID + OpenID string `protobuf:"bytes,4,opt,name=OpenID,proto3" json:"OpenID,omitempty"` // 微信小程序的OpenID +} + +func (x *InnerCreateUserByWxMiniReq) Reset() { + *x = InnerCreateUserByWxMiniReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCreateUserByWxMiniReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCreateUserByWxMiniReq) ProtoMessage() {} + +func (x *InnerCreateUserByWxMiniReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[3] + 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 InnerCreateUserByWxMiniReq.ProtoReflect.Descriptor instead. +func (*InnerCreateUserByWxMiniReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{3} +} + +func (x *InnerCreateUserByWxMiniReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *InnerCreateUserByWxMiniReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *InnerCreateUserByWxMiniReq) GetUnionID() string { + if x != nil { + return x.UnionID + } + return "" +} + +func (x *InnerCreateUserByWxMiniReq) GetOpenID() string { + if x != nil { + return x.OpenID + } + return "" +} + +// ---------- InnerFindUserByWxApp ---------- +type InnerFindUserByWxAppReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UnionID string `protobuf:"bytes,1,opt,name=UnionID,proto3" json:"UnionID,omitempty"` + OpenID string `protobuf:"bytes,2,opt,name=OpenID,proto3" json:"OpenID,omitempty"` +} + +func (x *InnerFindUserByWxAppReq) Reset() { + *x = InnerFindUserByWxAppReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerFindUserByWxAppReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerFindUserByWxAppReq) ProtoMessage() {} + +func (x *InnerFindUserByWxAppReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[4] + 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 InnerFindUserByWxAppReq.ProtoReflect.Descriptor instead. +func (*InnerFindUserByWxAppReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{4} +} + +func (x *InnerFindUserByWxAppReq) GetUnionID() string { + if x != nil { + return x.UnionID + } + return "" +} + +func (x *InnerFindUserByWxAppReq) GetOpenID() string { + if x != nil { + return x.OpenID + } + return "" +} + +// ---------- InnerCreateUserByWxApp ---------- +type InnerCreateUserByWxAppReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phone string `protobuf:"bytes,1,opt,name=Phone,proto3" json:"Phone,omitempty"` // 手机号 + CountryCode string `protobuf:"bytes,2,opt,name=CountryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + UnionID string `protobuf:"bytes,3,opt,name=UnionID,proto3" json:"UnionID,omitempty"` + OpenID string `protobuf:"bytes,4,opt,name=OpenID,proto3" json:"OpenID,omitempty"` + NickName string `protobuf:"bytes,5,opt,name=NickName,proto3" json:"NickName,omitempty"` + HeadImgURL string `protobuf:"bytes,6,opt,name=HeadImgURL,proto3" json:"HeadImgURL,omitempty"` +} + +func (x *InnerCreateUserByWxAppReq) Reset() { + *x = InnerCreateUserByWxAppReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCreateUserByWxAppReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCreateUserByWxAppReq) ProtoMessage() {} + +func (x *InnerCreateUserByWxAppReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[5] + 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 InnerCreateUserByWxAppReq.ProtoReflect.Descriptor instead. +func (*InnerCreateUserByWxAppReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{5} +} + +func (x *InnerCreateUserByWxAppReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *InnerCreateUserByWxAppReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *InnerCreateUserByWxAppReq) GetUnionID() string { + if x != nil { + return x.UnionID + } + return "" +} + +func (x *InnerCreateUserByWxAppReq) GetOpenID() string { + if x != nil { + return x.OpenID + } + return "" +} + +func (x *InnerCreateUserByWxAppReq) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +func (x *InnerCreateUserByWxAppReq) GetHeadImgURL() string { + if x != nil { + return x.HeadImgURL + } + return "" +} + +// ---------- InnerFindUserByAppleID ---------- +type InnerFindUserByAppleIDReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppleID string `protobuf:"bytes,1,opt,name=AppleID,proto3" json:"AppleID,omitempty"` // 苹果ID +} + +func (x *InnerFindUserByAppleIDReq) Reset() { + *x = InnerFindUserByAppleIDReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerFindUserByAppleIDReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerFindUserByAppleIDReq) ProtoMessage() {} + +func (x *InnerFindUserByAppleIDReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[6] + 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 InnerFindUserByAppleIDReq.ProtoReflect.Descriptor instead. +func (*InnerFindUserByAppleIDReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{6} +} + +func (x *InnerFindUserByAppleIDReq) GetAppleID() string { + if x != nil { + return x.AppleID + } + return "" +} + +// ---------- InnerCreateUserByAppleID ---------- +type InnerCreateUserByAppleIDReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Phone string `protobuf:"bytes,1,opt,name=Phone,proto3" json:"Phone,omitempty"` // 手机号 + CountryCode string `protobuf:"bytes,2,opt,name=CountryCode,proto3" json:"CountryCode,omitempty"` // 国家码 + AppleID string `protobuf:"bytes,3,opt,name=AppleID,proto3" json:"AppleID,omitempty"` // 苹果ID + FullName string `protobuf:"bytes,4,opt,name=FullName,proto3" json:"FullName,omitempty"` // 全称 + Email string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"` // 邮箱 +} + +func (x *InnerCreateUserByAppleIDReq) Reset() { + *x = InnerCreateUserByAppleIDReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InnerCreateUserByAppleIDReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InnerCreateUserByAppleIDReq) ProtoMessage() {} + +func (x *InnerCreateUserByAppleIDReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[7] + 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 InnerCreateUserByAppleIDReq.ProtoReflect.Descriptor instead. +func (*InnerCreateUserByAppleIDReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{7} +} + +func (x *InnerCreateUserByAppleIDReq) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *InnerCreateUserByAppleIDReq) GetCountryCode() string { + if x != nil { + return x.CountryCode + } + return "" +} + +func (x *InnerCreateUserByAppleIDReq) GetAppleID() string { + if x != nil { + return x.AppleID + } + return "" +} + +func (x *InnerCreateUserByAppleIDReq) GetFullName() string { + if x != nil { + return x.FullName + } + return "" +} + +func (x *InnerCreateUserByAppleIDReq) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +// ---------- AppFindUser ---------- +type AppFindUserReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AppFindUserReq) Reset() { + *x = AppFindUserReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppFindUserReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppFindUserReq) ProtoMessage() {} + +func (x *AppFindUserReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[8] + 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 AppFindUserReq.ProtoReflect.Descriptor instead. +func (*AppFindUserReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{8} +} + +type AppFindUserResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"` + UID string `protobuf:"bytes,2,opt,name=UID,json=uid,proto3" json:"UID,omitempty"` // 用户唯一编号,仅用于展示 + Name string `protobuf:"bytes,3,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名 + HeadURL string `protobuf:"bytes,4,opt,name=HeadURL,json=headURL,proto3" json:"HeadURL,omitempty"` // 头像 + IsDefaultName bool `protobuf:"varint,5,opt,name=IsDefaultName,json=isDefaultName,proto3" json:"IsDefaultName,omitempty"` // 是否是默认头像 +} + +func (x *AppFindUserResp) Reset() { + *x = AppFindUserResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppFindUserResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppFindUserResp) ProtoMessage() {} + +func (x *AppFindUserResp) ProtoReflect() protoreflect.Message { + mi := &file_service_user_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 AppFindUserResp.ProtoReflect.Descriptor instead. +func (*AppFindUserResp) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{9} +} + +func (x *AppFindUserResp) GetUSN() int64 { + if x != nil { + return x.USN + } + return 0 +} + +func (x *AppFindUserResp) GetUID() string { + if x != nil { + return x.UID + } + return "" +} + +func (x *AppFindUserResp) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AppFindUserResp) GetHeadURL() string { + if x != nil { + return x.HeadURL + } + return "" +} + +func (x *AppFindUserResp) GetIsDefaultName() bool { + if x != nil { + return x.IsDefaultName + } + return false +} + +// ---------- AppUpdateUserNickAndAvatar ---------- +type AppUpdateUserNickAndAvatarReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NickName string `protobuf:"bytes,1,opt,name=NickName,json=nickName,proto3" json:"NickName,omitempty"` // 昵称 + IsUpdateAvatar bool `protobuf:"varint,2,opt,name=IsUpdateAvatar,json=isUpdateAvatar,proto3" json:"IsUpdateAvatar,omitempty"` // 是否更新头像 +} + +func (x *AppUpdateUserNickAndAvatarReq) Reset() { + *x = AppUpdateUserNickAndAvatarReq{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppUpdateUserNickAndAvatarReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppUpdateUserNickAndAvatarReq) ProtoMessage() {} + +func (x *AppUpdateUserNickAndAvatarReq) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[10] + 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 AppUpdateUserNickAndAvatarReq.ProtoReflect.Descriptor instead. +func (*AppUpdateUserNickAndAvatarReq) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{10} +} + +func (x *AppUpdateUserNickAndAvatarReq) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +func (x *AppUpdateUserNickAndAvatarReq) GetIsUpdateAvatar() bool { + if x != nil { + return x.IsUpdateAvatar + } + return false +} + +type AppUpdateUserNickAndAvatarResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UploadURL string `protobuf:"bytes,1,opt,name=UploadURL,json=uploadURL,proto3" json:"UploadURL,omitempty"` // 头像上传URL +} + +func (x *AppUpdateUserNickAndAvatarResp) Reset() { + *x = AppUpdateUserNickAndAvatarResp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_user_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AppUpdateUserNickAndAvatarResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AppUpdateUserNickAndAvatarResp) ProtoMessage() {} + +func (x *AppUpdateUserNickAndAvatarResp) ProtoReflect() protoreflect.Message { + mi := &file_service_user_proto_msgTypes[11] + 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 AppUpdateUserNickAndAvatarResp.ProtoReflect.Descriptor instead. +func (*AppUpdateUserNickAndAvatarResp) Descriptor() ([]byte, []int) { + return file_service_user_proto_rawDescGZIP(), []int{11} +} + +func (x *AppUpdateUserNickAndAvatarResp) GetUploadURL() string { + if x != nil { + return x.UploadURL + } + return "" +} + +var File_service_user_proto protoreflect.FileDescriptor + +var file_service_user_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x50, + 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x49, 0x73, 0x42, 0x69, + 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x59, 0x0a, 0x1f, 0x49, 0x6e, 0x6e, 0x65, 0x72, + 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, + 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x22, 0x4c, 0x0a, 0x18, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, + 0x0a, 0x07, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, + 0x22, 0x86, 0x01, 0x0a, 0x1a, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x52, 0x65, 0x71, 0x12, + 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, + 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x55, 0x6e, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, + 0x44, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x22, 0x4b, 0x0a, 0x17, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x41, 0x70, + 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, + 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x22, 0xc1, 0x01, 0x0a, 0x19, 0x49, 0x6e, 0x6e, 0x65, 0x72, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x41, 0x70, + 0x70, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x55, + 0x6e, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x44, 0x12, 0x1a, + 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x48, 0x65, + 0x61, 0x64, 0x49, 0x6d, 0x67, 0x55, 0x52, 0x4c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x48, 0x65, 0x61, 0x64, 0x49, 0x6d, 0x67, 0x55, 0x52, 0x4c, 0x22, 0x35, 0x0a, 0x19, 0x49, 0x6e, + 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x70, 0x70, + 0x6c, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x6c, 0x65, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x49, + 0x44, 0x22, 0xa1, 0x01, 0x0a, 0x1b, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x70, 0x70, + 0x6c, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x70, 0x70, 0x6c, + 0x65, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6e, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x22, 0x89, 0x01, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x46, + 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x55, + 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x10, 0x0a, + 0x03, 0x55, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x12, 0x24, 0x0a, + 0x0d, 0x49, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x1d, 0x41, 0x70, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x41, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x26, 0x0a, 0x0e, 0x49, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x73, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x3e, 0x0a, 0x1e, 0x41, 0x70, 0x70, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x41, 0x6e, 0x64, + 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x55, 0x70, + 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x52, 0x4c, 0x32, 0xdf, 0x05, 0x0a, 0x04, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x51, 0x0a, 0x1c, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x72, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, + 0x65, 0x12, 0x20, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x72, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, + 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x15, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x12, 0x19, 0x2e, + 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, + 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, + 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x17, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, + 0x4d, 0x69, 0x6e, 0x69, 0x12, 0x1b, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x4d, 0x69, 0x6e, 0x69, 0x52, 0x65, + 0x71, 0x1a, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x00, 0x12, 0x41, 0x0a, 0x14, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x41, 0x70, 0x70, 0x12, 0x18, 0x2e, 0x49, 0x6e, 0x6e, + 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x41, 0x70, + 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x16, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x57, 0x78, 0x41, 0x70, 0x70, 0x12, + 0x1a, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x57, 0x78, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x16, + 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, + 0x70, 0x70, 0x6c, 0x65, 0x49, 0x44, 0x12, 0x1a, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x46, 0x69, + 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x49, 0x44, 0x52, + 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x18, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x49, 0x44, 0x12, + 0x1c, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x42, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00, 0x12, 0x4c, + 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0f, 0x2e, + 0x41, 0x70, 0x70, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x10, + 0x2e, 0x41, 0x70, 0x70, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x8b, 0x01, 0x0a, + 0x1a, 0x41, 0x70, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x69, + 0x63, 0x6b, 0x41, 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1e, 0x2e, 0x41, 0x70, + 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x41, + 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x41, 0x70, + 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x41, + 0x6e, 0x64, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01, 0x2a, 0x22, 0x21, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x2f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x2f, 0x6e, 0x69, 0x63, 0x6b, 0x5f, + 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, + 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x73, 0x2f, + 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_user_proto_rawDescOnce sync.Once + file_service_user_proto_rawDescData = file_service_user_proto_rawDesc +) + +func file_service_user_proto_rawDescGZIP() []byte { + file_service_user_proto_rawDescOnce.Do(func() { + file_service_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_user_proto_rawDescData) + }) + return file_service_user_proto_rawDescData +} + +var file_service_user_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_service_user_proto_goTypes = []interface{}{ + (*UserBaseInfo)(nil), // 0: UserBaseInfo + (*InnerFindOrCreateUserByPhoneReq)(nil), // 1: InnerFindOrCreateUserByPhoneReq + (*InnerFindUserByWxMiniReq)(nil), // 2: InnerFindUserByWxMiniReq + (*InnerCreateUserByWxMiniReq)(nil), // 3: InnerCreateUserByWxMiniReq + (*InnerFindUserByWxAppReq)(nil), // 4: InnerFindUserByWxAppReq + (*InnerCreateUserByWxAppReq)(nil), // 5: InnerCreateUserByWxAppReq + (*InnerFindUserByAppleIDReq)(nil), // 6: InnerFindUserByAppleIDReq + (*InnerCreateUserByAppleIDReq)(nil), // 7: InnerCreateUserByAppleIDReq + (*AppFindUserReq)(nil), // 8: AppFindUserReq + (*AppFindUserResp)(nil), // 9: AppFindUserResp + (*AppUpdateUserNickAndAvatarReq)(nil), // 10: AppUpdateUserNickAndAvatarReq + (*AppUpdateUserNickAndAvatarResp)(nil), // 11: AppUpdateUserNickAndAvatarResp +} +var file_service_user_proto_depIdxs = []int32{ + 1, // 0: User.InnerFindOrCreateUserByPhone:input_type -> InnerFindOrCreateUserByPhoneReq + 2, // 1: User.InnerFindUserByWxMini:input_type -> InnerFindUserByWxMiniReq + 3, // 2: User.InnerCreateUserByWxMini:input_type -> InnerCreateUserByWxMiniReq + 4, // 3: User.InnerFindUserByWxApp:input_type -> InnerFindUserByWxAppReq + 5, // 4: User.InnerCreateUserByWxApp:input_type -> InnerCreateUserByWxAppReq + 6, // 5: User.InnerFindUserByAppleID:input_type -> InnerFindUserByAppleIDReq + 7, // 6: User.InnerCreateUserByAppleID:input_type -> InnerCreateUserByAppleIDReq + 8, // 7: User.AppFindUser:input_type -> AppFindUserReq + 10, // 8: User.AppUpdateUserNickAndAvatar:input_type -> AppUpdateUserNickAndAvatarReq + 0, // 9: User.InnerFindOrCreateUserByPhone:output_type -> UserBaseInfo + 0, // 10: User.InnerFindUserByWxMini:output_type -> UserBaseInfo + 0, // 11: User.InnerCreateUserByWxMini:output_type -> UserBaseInfo + 0, // 12: User.InnerFindUserByWxApp:output_type -> UserBaseInfo + 0, // 13: User.InnerCreateUserByWxApp:output_type -> UserBaseInfo + 0, // 14: User.InnerFindUserByAppleID:output_type -> UserBaseInfo + 0, // 15: User.InnerCreateUserByAppleID:output_type -> UserBaseInfo + 9, // 16: User.AppFindUser:output_type -> AppFindUserResp + 11, // 17: User.AppUpdateUserNickAndAvatar:output_type -> AppUpdateUserNickAndAvatarResp + 9, // [9:18] is the sub-list for method output_type + 0, // [0:9] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_service_user_proto_init() } +func file_service_user_proto_init() { + if File_service_user_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserBaseInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerFindOrCreateUserByPhoneReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerFindUserByWxMiniReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCreateUserByWxMiniReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerFindUserByWxAppReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCreateUserByWxAppReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerFindUserByAppleIDReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InnerCreateUserByAppleIDReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppFindUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppFindUserResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppUpdateUserNickAndAvatarReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AppUpdateUserNickAndAvatarResp); 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_service_user_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_service_user_proto_goTypes, + DependencyIndexes: file_service_user_proto_depIdxs, + MessageInfos: file_service_user_proto_msgTypes, + }.Build() + File_service_user_proto = out.File + file_service_user_proto_rawDesc = nil + file_service_user_proto_goTypes = nil + file_service_user_proto_depIdxs = nil +} diff --git a/proto/rs/rspb/service_user.pb.gw.go b/proto/rs/rspb/service_user.pb.gw.go new file mode 100644 index 0000000..9bc9af9 --- /dev/null +++ b/proto/rs/rspb/service_user.pb.gw.go @@ -0,0 +1,217 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: service_user.proto + +/* +Package rspb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rspb + +import ( + "context" + "errors" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) + +func request_User_AppFindUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppFindUserReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppFindUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_User_AppFindUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppFindUserReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppFindUser(ctx, &protoReq) + return msg, metadata, err +} + +func request_User_AppUpdateUserNickAndAvatar_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppUpdateUserNickAndAvatarReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.AppUpdateUserNickAndAvatar(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_User_AppUpdateUserNickAndAvatar_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AppUpdateUserNickAndAvatarReq + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AppUpdateUserNickAndAvatar(ctx, &protoReq) + return msg, metadata, err +} + +// RegisterUserHandlerServer registers the http handlers for service User to "mux". +// UnaryRPC :call UserServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. +func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error { + mux.Handle(http.MethodPost, pattern_User_AppFindUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.User/AppFindUser", runtime.WithHTTPPathPattern("/user/auth/info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_AppFindUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_User_AppFindUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_User_AppUpdateUserNickAndAvatar_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/.User/AppUpdateUserNickAndAvatar", runtime.WithHTTPPathPattern("/user/auth/modify/nick_and_avatar")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_User_AppUpdateUserNickAndAvatar_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_User_AppUpdateUserNickAndAvatar_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + return nil +} + +// RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + return RegisterUserHandler(ctx, mux, conn) +} + +// RegisterUserHandler registers the http handlers for service User to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterUserHandlerClient(ctx, mux, NewUserClient(conn)) +} + +// RegisterUserHandlerClient registers the http handlers for service User +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "UserClient" to call the correct interceptors. This client ignores the HTTP middlewares. +func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error { + mux.Handle(http.MethodPost, pattern_User_AppFindUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.User/AppFindUser", runtime.WithHTTPPathPattern("/user/auth/info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_AppFindUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_User_AppFindUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_User_AppUpdateUserNickAndAvatar_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/.User/AppUpdateUserNickAndAvatar", runtime.WithHTTPPathPattern("/user/auth/modify/nick_and_avatar")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_User_AppUpdateUserNickAndAvatar_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_User_AppUpdateUserNickAndAvatar_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + return nil +} + +var ( + pattern_User_AppFindUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"user", "auth", "info"}, "")) + pattern_User_AppUpdateUserNickAndAvatar_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"user", "auth", "modify", "nick_and_avatar"}, "")) +) + +var ( + forward_User_AppFindUser_0 = runtime.ForwardResponseMessage + forward_User_AppUpdateUserNickAndAvatar_0 = runtime.ForwardResponseMessage +) diff --git a/proto/rs/rspb/service_user_grpc.pb.go b/proto/rs/rspb/service_user_grpc.pb.go new file mode 100644 index 0000000..7a6e40f --- /dev/null +++ b/proto/rs/rspb/service_user_grpc.pb.go @@ -0,0 +1,411 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v4.25.1 +// source: service_user.proto + +package rspb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// UserClient is the client API for User service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type UserClient interface { + // 根据手机号查找或创建用户 + InnerFindOrCreateUserByPhone(ctx context.Context, in *InnerFindOrCreateUserByPhoneReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 根据微信小程序号查找用户 + InnerFindUserByWxMini(ctx context.Context, in *InnerFindUserByWxMiniReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 根据微信小程序号创建用户 + InnerCreateUserByWxMini(ctx context.Context, in *InnerCreateUserByWxMiniReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 根据微信App号查找用户 + InnerFindUserByWxApp(ctx context.Context, in *InnerFindUserByWxAppReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 根据微信App号创建用户 + InnerCreateUserByWxApp(ctx context.Context, in *InnerCreateUserByWxAppReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 根据苹果ID查找用户 + InnerFindUserByAppleID(ctx context.Context, in *InnerFindUserByAppleIDReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 根据苹果ID创建用户 + InnerCreateUserByAppleID(ctx context.Context, in *InnerCreateUserByAppleIDReq, opts ...grpc.CallOption) (*UserBaseInfo, error) + // 查询用户信息 + AppFindUser(ctx context.Context, in *AppFindUserReq, opts ...grpc.CallOption) (*AppFindUserResp, error) + // 更新用户昵称和头像 + AppUpdateUserNickAndAvatar(ctx context.Context, in *AppUpdateUserNickAndAvatarReq, opts ...grpc.CallOption) (*AppUpdateUserNickAndAvatarResp, error) +} + +type userClient struct { + cc grpc.ClientConnInterface +} + +func NewUserClient(cc grpc.ClientConnInterface) UserClient { + return &userClient{cc} +} + +func (c *userClient) InnerFindOrCreateUserByPhone(ctx context.Context, in *InnerFindOrCreateUserByPhoneReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerFindOrCreateUserByPhone", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) InnerFindUserByWxMini(ctx context.Context, in *InnerFindUserByWxMiniReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerFindUserByWxMini", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) InnerCreateUserByWxMini(ctx context.Context, in *InnerCreateUserByWxMiniReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerCreateUserByWxMini", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) InnerFindUserByWxApp(ctx context.Context, in *InnerFindUserByWxAppReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerFindUserByWxApp", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) InnerCreateUserByWxApp(ctx context.Context, in *InnerCreateUserByWxAppReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerCreateUserByWxApp", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) InnerFindUserByAppleID(ctx context.Context, in *InnerFindUserByAppleIDReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerFindUserByAppleID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) InnerCreateUserByAppleID(ctx context.Context, in *InnerCreateUserByAppleIDReq, opts ...grpc.CallOption) (*UserBaseInfo, error) { + out := new(UserBaseInfo) + err := c.cc.Invoke(ctx, "/User/InnerCreateUserByAppleID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) AppFindUser(ctx context.Context, in *AppFindUserReq, opts ...grpc.CallOption) (*AppFindUserResp, error) { + out := new(AppFindUserResp) + err := c.cc.Invoke(ctx, "/User/AppFindUser", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) AppUpdateUserNickAndAvatar(ctx context.Context, in *AppUpdateUserNickAndAvatarReq, opts ...grpc.CallOption) (*AppUpdateUserNickAndAvatarResp, error) { + out := new(AppUpdateUserNickAndAvatarResp) + err := c.cc.Invoke(ctx, "/User/AppUpdateUserNickAndAvatar", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserServer is the server API for User service. +// All implementations must embed UnimplementedUserServer +// for forward compatibility +type UserServer interface { + // 根据手机号查找或创建用户 + InnerFindOrCreateUserByPhone(context.Context, *InnerFindOrCreateUserByPhoneReq) (*UserBaseInfo, error) + // 根据微信小程序号查找用户 + InnerFindUserByWxMini(context.Context, *InnerFindUserByWxMiniReq) (*UserBaseInfo, error) + // 根据微信小程序号创建用户 + InnerCreateUserByWxMini(context.Context, *InnerCreateUserByWxMiniReq) (*UserBaseInfo, error) + // 根据微信App号查找用户 + InnerFindUserByWxApp(context.Context, *InnerFindUserByWxAppReq) (*UserBaseInfo, error) + // 根据微信App号创建用户 + InnerCreateUserByWxApp(context.Context, *InnerCreateUserByWxAppReq) (*UserBaseInfo, error) + // 根据苹果ID查找用户 + InnerFindUserByAppleID(context.Context, *InnerFindUserByAppleIDReq) (*UserBaseInfo, error) + // 根据苹果ID创建用户 + InnerCreateUserByAppleID(context.Context, *InnerCreateUserByAppleIDReq) (*UserBaseInfo, error) + // 查询用户信息 + AppFindUser(context.Context, *AppFindUserReq) (*AppFindUserResp, error) + // 更新用户昵称和头像 + AppUpdateUserNickAndAvatar(context.Context, *AppUpdateUserNickAndAvatarReq) (*AppUpdateUserNickAndAvatarResp, error) + mustEmbedUnimplementedUserServer() +} + +// UnimplementedUserServer must be embedded to have forward compatible implementations. +type UnimplementedUserServer struct { +} + +func (UnimplementedUserServer) InnerFindOrCreateUserByPhone(context.Context, *InnerFindOrCreateUserByPhoneReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerFindOrCreateUserByPhone not implemented") +} +func (UnimplementedUserServer) InnerFindUserByWxMini(context.Context, *InnerFindUserByWxMiniReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerFindUserByWxMini not implemented") +} +func (UnimplementedUserServer) InnerCreateUserByWxMini(context.Context, *InnerCreateUserByWxMiniReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerCreateUserByWxMini not implemented") +} +func (UnimplementedUserServer) InnerFindUserByWxApp(context.Context, *InnerFindUserByWxAppReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerFindUserByWxApp not implemented") +} +func (UnimplementedUserServer) InnerCreateUserByWxApp(context.Context, *InnerCreateUserByWxAppReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerCreateUserByWxApp not implemented") +} +func (UnimplementedUserServer) InnerFindUserByAppleID(context.Context, *InnerFindUserByAppleIDReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerFindUserByAppleID not implemented") +} +func (UnimplementedUserServer) InnerCreateUserByAppleID(context.Context, *InnerCreateUserByAppleIDReq) (*UserBaseInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method InnerCreateUserByAppleID not implemented") +} +func (UnimplementedUserServer) AppFindUser(context.Context, *AppFindUserReq) (*AppFindUserResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppFindUser not implemented") +} +func (UnimplementedUserServer) AppUpdateUserNickAndAvatar(context.Context, *AppUpdateUserNickAndAvatarReq) (*AppUpdateUserNickAndAvatarResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppUpdateUserNickAndAvatar not implemented") +} +func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {} + +// UnsafeUserServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserServer will +// result in compilation errors. +type UnsafeUserServer interface { + mustEmbedUnimplementedUserServer() +} + +func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) { + s.RegisterService(&User_ServiceDesc, srv) +} + +func _User_InnerFindOrCreateUserByPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerFindOrCreateUserByPhoneReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerFindOrCreateUserByPhone(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerFindOrCreateUserByPhone", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerFindOrCreateUserByPhone(ctx, req.(*InnerFindOrCreateUserByPhoneReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_InnerFindUserByWxMini_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerFindUserByWxMiniReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerFindUserByWxMini(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerFindUserByWxMini", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerFindUserByWxMini(ctx, req.(*InnerFindUserByWxMiniReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_InnerCreateUserByWxMini_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerCreateUserByWxMiniReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerCreateUserByWxMini(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerCreateUserByWxMini", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerCreateUserByWxMini(ctx, req.(*InnerCreateUserByWxMiniReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_InnerFindUserByWxApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerFindUserByWxAppReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerFindUserByWxApp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerFindUserByWxApp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerFindUserByWxApp(ctx, req.(*InnerFindUserByWxAppReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_InnerCreateUserByWxApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerCreateUserByWxAppReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerCreateUserByWxApp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerCreateUserByWxApp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerCreateUserByWxApp(ctx, req.(*InnerCreateUserByWxAppReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_InnerFindUserByAppleID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerFindUserByAppleIDReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerFindUserByAppleID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerFindUserByAppleID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerFindUserByAppleID(ctx, req.(*InnerFindUserByAppleIDReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_InnerCreateUserByAppleID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InnerCreateUserByAppleIDReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InnerCreateUserByAppleID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/InnerCreateUserByAppleID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InnerCreateUserByAppleID(ctx, req.(*InnerCreateUserByAppleIDReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_AppFindUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppFindUserReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).AppFindUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/AppFindUser", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).AppFindUser(ctx, req.(*AppFindUserReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_AppUpdateUserNickAndAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppUpdateUserNickAndAvatarReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).AppUpdateUserNickAndAvatar(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/User/AppUpdateUserNickAndAvatar", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).AppUpdateUserNickAndAvatar(ctx, req.(*AppUpdateUserNickAndAvatarReq)) + } + return interceptor(ctx, in, info, handler) +} + +// User_ServiceDesc is the grpc.ServiceDesc for User service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var User_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "User", + HandlerType: (*UserServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "InnerFindOrCreateUserByPhone", + Handler: _User_InnerFindOrCreateUserByPhone_Handler, + }, + { + MethodName: "InnerFindUserByWxMini", + Handler: _User_InnerFindUserByWxMini_Handler, + }, + { + MethodName: "InnerCreateUserByWxMini", + Handler: _User_InnerCreateUserByWxMini_Handler, + }, + { + MethodName: "InnerFindUserByWxApp", + Handler: _User_InnerFindUserByWxApp_Handler, + }, + { + MethodName: "InnerCreateUserByWxApp", + Handler: _User_InnerCreateUserByWxApp_Handler, + }, + { + MethodName: "InnerFindUserByAppleID", + Handler: _User_InnerFindUserByAppleID_Handler, + }, + { + MethodName: "InnerCreateUserByAppleID", + Handler: _User_InnerCreateUserByAppleID_Handler, + }, + { + MethodName: "AppFindUser", + Handler: _User_AppFindUser_Handler, + }, + { + MethodName: "AppUpdateUserNickAndAvatar", + Handler: _User_AppUpdateUserNickAndAvatar_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "service_user.proto", +} diff --git a/proto/ss/sscommon/ss_common.pb.go b/proto/ss/sscommon/ss_common.pb.go new file mode 100644 index 0000000..55296ae --- /dev/null +++ b/proto/ss/sscommon/ss_common.pb.go @@ -0,0 +1,63 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: ss_common.proto + +package sscommon + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_ss_common_proto protoreflect.FileDescriptor + +var file_ss_common_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, + 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_ss_common_proto_goTypes = []interface{}{} +var file_ss_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ss_common_proto_init() } +func file_ss_common_proto_init() { + if File_ss_common_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ss_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ss_common_proto_goTypes, + DependencyIndexes: file_ss_common_proto_depIdxs, + }.Build() + File_ss_common_proto = out.File + file_ss_common_proto_rawDesc = nil + file_ss_common_proto_goTypes = nil + file_ss_common_proto_depIdxs = nil +} diff --git a/proto/ss/sspb/channel.pb.go b/proto/ss/sspb/channel.pb.go new file mode 100644 index 0000000..0640d72 --- /dev/null +++ b/proto/ss/sspb/channel.pb.go @@ -0,0 +1,389 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: channel.proto + +package sspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/ss/sscommon" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ChannelType int32 + +const ( + ChannelType_CHANNEL_TYPE_UNKNOWN ChannelType = 0 + ChannelType_CHANNEL_TYPE_PHYSICAL_ROOM ChannelType = 1 // 线下比赛房间频道 + ChannelType_CHANNEL_TYPE_BASE_COURT ChannelType = 2 // 基础球场频道 + ChannelType_CHANNEL_TYPE_HORN ChannelType = 3 // 小喇叭频道 + ChannelType_CHANNEL_TYPE_WATCH_ONLINE_COMPETITION ChannelType = 4 // 观看在线比赛频道 ( 小程序端业务 ) + ChannelType_CHANNEL_TYPE_TOURNAMENT ChannelType = 5 // 锦标赛 +) + +// Enum value maps for ChannelType. +var ( + ChannelType_name = map[int32]string{ + 0: "CHANNEL_TYPE_UNKNOWN", + 1: "CHANNEL_TYPE_PHYSICAL_ROOM", + 2: "CHANNEL_TYPE_BASE_COURT", + 3: "CHANNEL_TYPE_HORN", + 4: "CHANNEL_TYPE_WATCH_ONLINE_COMPETITION", + 5: "CHANNEL_TYPE_TOURNAMENT", + } + ChannelType_value = map[string]int32{ + "CHANNEL_TYPE_UNKNOWN": 0, + "CHANNEL_TYPE_PHYSICAL_ROOM": 1, + "CHANNEL_TYPE_BASE_COURT": 2, + "CHANNEL_TYPE_HORN": 3, + "CHANNEL_TYPE_WATCH_ONLINE_COMPETITION": 4, + "CHANNEL_TYPE_TOURNAMENT": 5, + } +) + +func (x ChannelType) Enum() *ChannelType { + p := new(ChannelType) + *p = x + return p +} + +func (x ChannelType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ChannelType) Descriptor() protoreflect.EnumDescriptor { + return file_channel_proto_enumTypes[0].Descriptor() +} + +func (ChannelType) Type() protoreflect.EnumType { + return &file_channel_proto_enumTypes[0] +} + +func (x ChannelType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ChannelType.Descriptor instead. +func (ChannelType) EnumDescriptor() ([]byte, []int) { + return file_channel_proto_rawDescGZIP(), []int{0} +} + +// MESSAGE_ID_JOIN_CHANNEL +type C2S_JoinChannel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChannelName string `protobuf:"bytes,1,opt,name=ChannelName,proto3" json:"ChannelName,omitempty"` // 频道名称 +} + +func (x *C2S_JoinChannel) Reset() { + *x = C2S_JoinChannel{} + if protoimpl.UnsafeEnabled { + mi := &file_channel_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *C2S_JoinChannel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*C2S_JoinChannel) ProtoMessage() {} + +func (x *C2S_JoinChannel) ProtoReflect() protoreflect.Message { + mi := &file_channel_proto_msgTypes[0] + 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 C2S_JoinChannel.ProtoReflect.Descriptor instead. +func (*C2S_JoinChannel) Descriptor() ([]byte, []int) { + return file_channel_proto_rawDescGZIP(), []int{0} +} + +func (x *C2S_JoinChannel) GetChannelName() string { + if x != nil { + return x.ChannelName + } + return "" +} + +type S2C_JoinChannel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *S2C_JoinChannel) Reset() { + *x = S2C_JoinChannel{} + if protoimpl.UnsafeEnabled { + mi := &file_channel_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2C_JoinChannel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2C_JoinChannel) ProtoMessage() {} + +func (x *S2C_JoinChannel) ProtoReflect() protoreflect.Message { + mi := &file_channel_proto_msgTypes[1] + 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 S2C_JoinChannel.ProtoReflect.Descriptor instead. +func (*S2C_JoinChannel) Descriptor() ([]byte, []int) { + return file_channel_proto_rawDescGZIP(), []int{1} +} + +// MESSAGE_ID_LEAVE_CHANNEL +type C2S_LeaveChannel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChannelName string `protobuf:"bytes,1,opt,name=ChannelName,proto3" json:"ChannelName,omitempty"` // 频道名称 +} + +func (x *C2S_LeaveChannel) Reset() { + *x = C2S_LeaveChannel{} + if protoimpl.UnsafeEnabled { + mi := &file_channel_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *C2S_LeaveChannel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*C2S_LeaveChannel) ProtoMessage() {} + +func (x *C2S_LeaveChannel) ProtoReflect() protoreflect.Message { + mi := &file_channel_proto_msgTypes[2] + 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 C2S_LeaveChannel.ProtoReflect.Descriptor instead. +func (*C2S_LeaveChannel) Descriptor() ([]byte, []int) { + return file_channel_proto_rawDescGZIP(), []int{2} +} + +func (x *C2S_LeaveChannel) GetChannelName() string { + if x != nil { + return x.ChannelName + } + return "" +} + +type S2C_LeaveChannel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *S2C_LeaveChannel) Reset() { + *x = S2C_LeaveChannel{} + if protoimpl.UnsafeEnabled { + mi := &file_channel_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2C_LeaveChannel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2C_LeaveChannel) ProtoMessage() {} + +func (x *S2C_LeaveChannel) ProtoReflect() protoreflect.Message { + mi := &file_channel_proto_msgTypes[3] + 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 S2C_LeaveChannel.ProtoReflect.Descriptor instead. +func (*S2C_LeaveChannel) Descriptor() ([]byte, []int) { + return file_channel_proto_rawDescGZIP(), []int{3} +} + +var File_channel_proto protoreflect.FileDescriptor + +var file_channel_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x33, 0x0a, 0x0f, 0x43, 0x32, 0x53, 0x5f, 0x4a, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x32, 0x43, 0x5f, 0x4a, 0x6f, 0x69, + 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x34, 0x0a, 0x10, 0x43, 0x32, 0x53, 0x5f, + 0x4c, 0x65, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x20, 0x0a, 0x0b, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x12, + 0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x2a, 0xc3, 0x01, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, + 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x48, 0x59, + 0x53, 0x49, 0x43, 0x41, 0x4c, 0x5f, 0x52, 0x4f, 0x4f, 0x4d, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, + 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, + 0x45, 0x5f, 0x43, 0x4f, 0x55, 0x52, 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, + 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x52, 0x4e, 0x10, 0x03, + 0x12, 0x29, 0x0a, 0x25, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x57, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4f, + 0x4d, 0x50, 0x45, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x1b, 0x0a, 0x17, 0x43, + 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x55, 0x52, + 0x4e, 0x41, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x05, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x2e, + 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_channel_proto_rawDescOnce sync.Once + file_channel_proto_rawDescData = file_channel_proto_rawDesc +) + +func file_channel_proto_rawDescGZIP() []byte { + file_channel_proto_rawDescOnce.Do(func() { + file_channel_proto_rawDescData = protoimpl.X.CompressGZIP(file_channel_proto_rawDescData) + }) + return file_channel_proto_rawDescData +} + +var file_channel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_channel_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_channel_proto_goTypes = []interface{}{ + (ChannelType)(0), // 0: ChannelType + (*C2S_JoinChannel)(nil), // 1: C2S_JoinChannel + (*S2C_JoinChannel)(nil), // 2: S2C_JoinChannel + (*C2S_LeaveChannel)(nil), // 3: C2S_LeaveChannel + (*S2C_LeaveChannel)(nil), // 4: S2C_LeaveChannel +} +var file_channel_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_channel_proto_init() } +func file_channel_proto_init() { + if File_channel_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_channel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*C2S_JoinChannel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_channel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2C_JoinChannel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_channel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*C2S_LeaveChannel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_channel_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2C_LeaveChannel); 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_channel_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_channel_proto_goTypes, + DependencyIndexes: file_channel_proto_depIdxs, + EnumInfos: file_channel_proto_enumTypes, + MessageInfos: file_channel_proto_msgTypes, + }.Build() + File_channel_proto = out.File + file_channel_proto_rawDesc = nil + file_channel_proto_goTypes = nil + file_channel_proto_depIdxs = nil +} diff --git a/proto/ss/sspb/define.pb.go b/proto/ss/sspb/define.pb.go new file mode 100644 index 0000000..682e692 --- /dev/null +++ b/proto/ss/sspb/define.pb.go @@ -0,0 +1,237 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: define.proto + +package sspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/ss/sscommon" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type MessageID int32 + +const ( + MessageID_MESSAGE_ID_INVALID MessageID = 0 + MessageID_MESSAGE_ID_KICK_OUT MessageID = 1 // 服务器踢人 + MessageID_MESSAGE_ID_QUEUE_UP MessageID = 2 // 排队中 + MessageID_MESSAGE_ID_LOGIN_SUCCESS MessageID = 3 // 登录成功 + MessageID_MESSAGE_ID_PING MessageID = 4 // Ping + MessageID_MESSAGE_ID_PONG MessageID = 5 // Pong + MessageID_MESSAGE_ID_JOIN_CHANNEL MessageID = 101 // 加入频道 + MessageID_MESSAGE_ID_LEAVE_CHANNEL MessageID = 102 // 离开频道 +) + +// Enum value maps for MessageID. +var ( + MessageID_name = map[int32]string{ + 0: "MESSAGE_ID_INVALID", + 1: "MESSAGE_ID_KICK_OUT", + 2: "MESSAGE_ID_QUEUE_UP", + 3: "MESSAGE_ID_LOGIN_SUCCESS", + 4: "MESSAGE_ID_PING", + 5: "MESSAGE_ID_PONG", + 101: "MESSAGE_ID_JOIN_CHANNEL", + 102: "MESSAGE_ID_LEAVE_CHANNEL", + } + MessageID_value = map[string]int32{ + "MESSAGE_ID_INVALID": 0, + "MESSAGE_ID_KICK_OUT": 1, + "MESSAGE_ID_QUEUE_UP": 2, + "MESSAGE_ID_LOGIN_SUCCESS": 3, + "MESSAGE_ID_PING": 4, + "MESSAGE_ID_PONG": 5, + "MESSAGE_ID_JOIN_CHANNEL": 101, + "MESSAGE_ID_LEAVE_CHANNEL": 102, + } +) + +func (x MessageID) Enum() *MessageID { + p := new(MessageID) + *p = x + return p +} + +func (x MessageID) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageID) Descriptor() protoreflect.EnumDescriptor { + return file_define_proto_enumTypes[0].Descriptor() +} + +func (MessageID) Type() protoreflect.EnumType { + return &file_define_proto_enumTypes[0] +} + +func (x MessageID) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageID.Descriptor instead. +func (MessageID) EnumDescriptor() ([]byte, []int) { + return file_define_proto_rawDescGZIP(), []int{0} +} + +type Message struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID MessageID `protobuf:"varint,1,opt,name=ID,proto3,enum=MessageID" json:"ID,omitempty"` + Payload []byte `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"` +} + +func (x *Message) Reset() { + *x = Message{} + if protoimpl.UnsafeEnabled { + mi := &file_define_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Message) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Message) ProtoMessage() {} + +func (x *Message) ProtoReflect() protoreflect.Message { + mi := &file_define_proto_msgTypes[0] + 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 Message.ProtoReflect.Descriptor instead. +func (*Message) Descriptor() ([]byte, []int) { + return file_define_proto_rawDescGZIP(), []int{0} +} + +func (x *Message) GetID() MessageID { + if x != nil { + return x.ID + } + return MessageID_MESSAGE_ID_INVALID +} + +func (x *Message) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +var File_define_proto protoreflect.FileDescriptor + +var file_define_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, + 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x3f, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x02, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x49, 0x44, 0x52, 0x02, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x2a, 0xd8, 0x01, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x16, + 0x0a, 0x12, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56, + 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, + 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, + 0x17, 0x0a, 0x13, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x51, 0x55, + 0x45, 0x55, 0x45, 0x5f, 0x55, 0x50, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, + 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, + 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x4d, + 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x50, 0x4f, 0x4e, 0x47, 0x10, 0x05, + 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x4a, + 0x4f, 0x49, 0x4e, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, 0x65, 0x12, 0x1c, 0x0a, + 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x4c, 0x45, 0x41, 0x56, + 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x4e, 0x45, 0x4c, 0x10, 0x66, 0x42, 0x34, 0x5a, 0x26, 0x67, + 0x69, 0x74, 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, + 0x78, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, + 0x2f, 0x73, 0x73, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_define_proto_rawDescOnce sync.Once + file_define_proto_rawDescData = file_define_proto_rawDesc +) + +func file_define_proto_rawDescGZIP() []byte { + file_define_proto_rawDescOnce.Do(func() { + file_define_proto_rawDescData = protoimpl.X.CompressGZIP(file_define_proto_rawDescData) + }) + return file_define_proto_rawDescData +} + +var file_define_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_define_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_define_proto_goTypes = []interface{}{ + (MessageID)(0), // 0: MessageID + (*Message)(nil), // 1: Message +} +var file_define_proto_depIdxs = []int32{ + 0, // 0: Message.ID:type_name -> MessageID + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_define_proto_init() } +func file_define_proto_init() { + if File_define_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_define_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Message); 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_define_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_define_proto_goTypes, + DependencyIndexes: file_define_proto_depIdxs, + EnumInfos: file_define_proto_enumTypes, + MessageInfos: file_define_proto_msgTypes, + }.Build() + File_define_proto = out.File + file_define_proto_rawDesc = nil + file_define_proto_goTypes = nil + file_define_proto_depIdxs = nil +} diff --git a/proto/ss/sspb/service.pb.go b/proto/ss/sspb/service.pb.go new file mode 100644 index 0000000..6a673fc --- /dev/null +++ b/proto/ss/sspb/service.pb.go @@ -0,0 +1,454 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v4.25.1 +// source: service.proto + +package sspb + +import ( + _ "git.hlsq.asia/alex/proto/proto/ss/sscommon" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MESSAGE_ID_KICK_OUT +type KickOutID int32 + +const ( + KickOutID_KICK_OUT_ID_INVALID KickOutID = 0 + KickOutID_KICK_OUT_ID_DUPLICATE_LOGIN KickOutID = 1 // 重复登录 + KickOutID_KICK_OUT_ID_SERVER_BUSY KickOutID = 2 // 服务器繁忙 + KickOutID_KICK_OUT_ID_SERVER_CLOSE KickOutID = 3 // 服务器关闭 + KickOutID_KICK_OUT_ID_QUEUE_UP_FULL KickOutID = 4 // 排队上限 + KickOutID_KICK_OUT_ID_TOKEN_INVALID KickOutID = 5 // Token无效 +) + +// Enum value maps for KickOutID. +var ( + KickOutID_name = map[int32]string{ + 0: "KICK_OUT_ID_INVALID", + 1: "KICK_OUT_ID_DUPLICATE_LOGIN", + 2: "KICK_OUT_ID_SERVER_BUSY", + 3: "KICK_OUT_ID_SERVER_CLOSE", + 4: "KICK_OUT_ID_QUEUE_UP_FULL", + 5: "KICK_OUT_ID_TOKEN_INVALID", + } + KickOutID_value = map[string]int32{ + "KICK_OUT_ID_INVALID": 0, + "KICK_OUT_ID_DUPLICATE_LOGIN": 1, + "KICK_OUT_ID_SERVER_BUSY": 2, + "KICK_OUT_ID_SERVER_CLOSE": 3, + "KICK_OUT_ID_QUEUE_UP_FULL": 4, + "KICK_OUT_ID_TOKEN_INVALID": 5, + } +) + +func (x KickOutID) Enum() *KickOutID { + p := new(KickOutID) + *p = x + return p +} + +func (x KickOutID) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KickOutID) Descriptor() protoreflect.EnumDescriptor { + return file_service_proto_enumTypes[0].Descriptor() +} + +func (KickOutID) Type() protoreflect.EnumType { + return &file_service_proto_enumTypes[0] +} + +func (x KickOutID) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KickOutID.Descriptor instead. +func (KickOutID) EnumDescriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{0} +} + +type S2C_KickOut struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID KickOutID `protobuf:"varint,1,opt,name=ID,proto3,enum=KickOutID" json:"ID,omitempty"` +} + +func (x *S2C_KickOut) Reset() { + *x = S2C_KickOut{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2C_KickOut) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2C_KickOut) ProtoMessage() {} + +func (x *S2C_KickOut) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[0] + 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 S2C_KickOut.ProtoReflect.Descriptor instead. +func (*S2C_KickOut) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{0} +} + +func (x *S2C_KickOut) GetID() KickOutID { + if x != nil { + return x.ID + } + return KickOutID_KICK_OUT_ID_INVALID +} + +// MESSAGE_ID_QUEUE_UP +type S2C_QueueUp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + QueueUpCount int32 `protobuf:"varint,1,opt,name=QueueUpCount,proto3" json:"QueueUpCount,omitempty"` // 排队人数 +} + +func (x *S2C_QueueUp) Reset() { + *x = S2C_QueueUp{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2C_QueueUp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2C_QueueUp) ProtoMessage() {} + +func (x *S2C_QueueUp) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[1] + 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 S2C_QueueUp.ProtoReflect.Descriptor instead. +func (*S2C_QueueUp) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{1} +} + +func (x *S2C_QueueUp) GetQueueUpCount() int32 { + if x != nil { + return x.QueueUpCount + } + return 0 +} + +// MESSAGE_ID_LOGIN_SUCCESS +type S2C_LoginSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GatewayID int64 `protobuf:"varint,1,opt,name=GatewayID,proto3" json:"GatewayID,omitempty"` // 网关ID +} + +func (x *S2C_LoginSuccess) Reset() { + *x = S2C_LoginSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2C_LoginSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2C_LoginSuccess) ProtoMessage() {} + +func (x *S2C_LoginSuccess) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[2] + 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 S2C_LoginSuccess.ProtoReflect.Descriptor instead. +func (*S2C_LoginSuccess) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{2} +} + +func (x *S2C_LoginSuccess) GetGatewayID() int64 { + if x != nil { + return x.GatewayID + } + return 0 +} + +// MESSAGE_ID_PING +type C2S_Ping struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *C2S_Ping) Reset() { + *x = C2S_Ping{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *C2S_Ping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*C2S_Ping) ProtoMessage() {} + +func (x *C2S_Ping) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[3] + 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 C2S_Ping.ProtoReflect.Descriptor instead. +func (*C2S_Ping) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{3} +} + +// MESSAGE_ID_PONG +type S2C_Pong struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *S2C_Pong) Reset() { + *x = S2C_Pong{} + if protoimpl.UnsafeEnabled { + mi := &file_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *S2C_Pong) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2C_Pong) ProtoMessage() {} + +func (x *S2C_Pong) ProtoReflect() protoreflect.Message { + mi := &file_service_proto_msgTypes[4] + 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 S2C_Pong.ProtoReflect.Descriptor instead. +func (*S2C_Pong) Descriptor() ([]byte, []int) { + return file_service_proto_rawDescGZIP(), []int{4} +} + +var File_service_proto protoreflect.FileDescriptor + +var file_service_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x29, 0x0a, 0x0b, 0x53, 0x32, 0x43, 0x5f, 0x4b, 0x69, 0x63, 0x6b, 0x4f, 0x75, 0x74, 0x12, + 0x1a, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x4b, 0x69, + 0x63, 0x6b, 0x4f, 0x75, 0x74, 0x49, 0x44, 0x52, 0x02, 0x49, 0x44, 0x22, 0x31, 0x0a, 0x0b, 0x53, + 0x32, 0x43, 0x5f, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x12, 0x22, 0x0a, 0x0c, 0x51, 0x75, + 0x65, 0x75, 0x65, 0x55, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0c, 0x51, 0x75, 0x65, 0x75, 0x65, 0x55, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x30, + 0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x44, + 0x22, 0x0a, 0x0a, 0x08, 0x43, 0x32, 0x53, 0x5f, 0x50, 0x69, 0x6e, 0x67, 0x22, 0x0a, 0x0a, 0x08, + 0x53, 0x32, 0x43, 0x5f, 0x50, 0x6f, 0x6e, 0x67, 0x2a, 0xbe, 0x01, 0x0a, 0x09, 0x4b, 0x69, 0x63, + 0x6b, 0x4f, 0x75, 0x74, 0x49, 0x44, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, + 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, + 0x1f, 0x0a, 0x1b, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x44, + 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, + 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x42, 0x55, 0x53, 0x59, 0x10, 0x02, 0x12, 0x1c, 0x0a, + 0x18, 0x4b, 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x53, 0x45, 0x52, + 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x4b, + 0x49, 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, + 0x5f, 0x55, 0x50, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x4b, 0x49, + 0x43, 0x4b, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x05, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, + 0x2e, 0x68, 0x6c, 0x73, 0x71, 0x2e, 0x61, 0x73, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x65, 0x78, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, + 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_service_proto_rawDescOnce sync.Once + file_service_proto_rawDescData = file_service_proto_rawDesc +) + +func file_service_proto_rawDescGZIP() []byte { + file_service_proto_rawDescOnce.Do(func() { + file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_proto_rawDescData) + }) + return file_service_proto_rawDescData +} + +var file_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_service_proto_goTypes = []interface{}{ + (KickOutID)(0), // 0: KickOutID + (*S2C_KickOut)(nil), // 1: S2C_KickOut + (*S2C_QueueUp)(nil), // 2: S2C_QueueUp + (*S2C_LoginSuccess)(nil), // 3: S2C_LoginSuccess + (*C2S_Ping)(nil), // 4: C2S_Ping + (*S2C_Pong)(nil), // 5: S2C_Pong +} +var file_service_proto_depIdxs = []int32{ + 0, // 0: S2C_KickOut.ID:type_name -> KickOutID + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_service_proto_init() } +func file_service_proto_init() { + if File_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2C_KickOut); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2C_QueueUp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2C_LoginSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*C2S_Ping); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*S2C_Pong); 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_service_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_service_proto_goTypes, + DependencyIndexes: file_service_proto_depIdxs, + EnumInfos: file_service_proto_enumTypes, + MessageInfos: file_service_proto_msgTypes, + }.Build() + File_service_proto = out.File + file_service_proto_rawDesc = nil + file_service_proto_goTypes = nil + file_service_proto_depIdxs = nil +} diff --git a/protofile/RpcServer/gen/api.swagger.json b/protofile/RpcServer/gen/api.swagger.json new file mode 100644 index 0000000..0ddef08 --- /dev/null +++ b/protofile/RpcServer/gen/api.swagger.json @@ -0,0 +1,546 @@ +{ + "swagger": "2.0", + "info": { + "title": "rs_common.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Gateway" + }, + { + "name": "ThirdParty" + }, + { + "name": "User" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/third-party/open/code_voucher": { + "post": { + "summary": "获取验证码凭证", + "operationId": "ThirdParty_AppGetCodeVoucher", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppGetCodeVoucherResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppGetCodeVoucherReq" + } + } + ], + "tags": [ + "ThirdParty" + ] + } + }, + "/third-party/open/login": { + "post": { + "summary": "登录", + "operationId": "ThirdParty_AppLogin", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppLoginResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppLoginReq" + } + } + ], + "tags": [ + "ThirdParty" + ] + } + }, + "/third-party/open/login_bind": { + "post": { + "summary": "绑定手机号", + "operationId": "ThirdParty_AppBindPhone", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppLoginResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppBindPhoneReq" + } + } + ], + "tags": [ + "ThirdParty" + ] + } + }, + "/third-party/open/logout": { + "post": { + "summary": "登出", + "operationId": "ThirdParty_AppLogout", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppLogoutResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppLogoutReq" + } + } + ], + "tags": [ + "ThirdParty" + ] + } + }, + "/third-party/open/refresh_token": { + "post": { + "summary": "刷新令牌", + "operationId": "ThirdParty_AppRefreshToken", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppRefreshTokenResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppRefreshTokenReq" + } + } + ], + "tags": [ + "ThirdParty" + ] + } + }, + "/third-party/open/send_code": { + "post": { + "summary": "发送验证码", + "operationId": "ThirdParty_AppSendCode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppSendCodeResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppSendCodeReq" + } + } + ], + "tags": [ + "ThirdParty" + ] + } + }, + "/user/auth/info": { + "post": { + "summary": "查询用户信息", + "operationId": "User_AppFindUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppFindUserResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppFindUserReq" + } + } + ], + "tags": [ + "User" + ] + } + }, + "/user/auth/modify/nick_and_avatar": { + "post": { + "summary": "更新用户昵称和头像", + "operationId": "User_AppUpdateUserNickAndAvatar", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AppUpdateUserNickAndAvatarResp" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AppUpdateUserNickAndAvatarReq" + } + } + ], + "tags": [ + "User" + ] + } + } + }, + "definitions": { + "AppBindPhoneReq": { + "type": "object", + "properties": { + "ticket": { + "type": "string", + "title": "凭证" + }, + "countryCode": { + "type": "string", + "title": "国家码" + }, + "phone": { + "type": "string", + "title": "手机号" + }, + "code": { + "type": "string", + "title": "验证码" + }, + "miniPhoneCode": { + "type": "string", + "title": "微信小程序手机凭证" + } + }, + "title": "---------- AppBindPhone ----------" + }, + "AppFindUserReq": { + "type": "object", + "title": "---------- AppFindUser ----------" + }, + "AppFindUserResp": { + "type": "object", + "properties": { + "usn": { + "type": "string", + "format": "int64" + }, + "uid": { + "type": "string", + "title": "用户唯一编号,仅用于展示" + }, + "name": { + "type": "string", + "title": "用户名" + }, + "headURL": { + "type": "string", + "title": "头像" + }, + "isDefaultName": { + "type": "boolean", + "title": "是否是默认头像" + } + } + }, + "AppGetCodeVoucherReq": { + "type": "object", + "properties": { + "countryCode": { + "type": "string", + "title": "国家码" + }, + "phone": { + "type": "string", + "title": "手机号" + }, + "code": { + "type": "string", + "title": "验证码" + } + }, + "title": "---------- AppGetCodeVoucher ----------" + }, + "AppGetCodeVoucherResp": { + "type": "object", + "properties": { + "codeVoucher": { + "type": "string", + "title": "凭证" + } + } + }, + "AppLoginReq": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/LoginType", + "title": "登录方式" + }, + "platformType": { + "$ref": "#/definitions/PlatformType", + "title": "平台类型" + }, + "countryCode": { + "type": "string", + "title": "国家码" + }, + "phone": { + "type": "string", + "title": "手机号" + }, + "code": { + "type": "string", + "title": "验证码" + }, + "wxMiniCode": { + "type": "string", + "title": "微信小程序登录凭证" + }, + "wxAppCode": { + "type": "string", + "title": "微信App登录凭证" + }, + "identityToken": { + "type": "string", + "title": "苹果登录凭证" + }, + "fullName": { + "type": "string", + "title": "苹果全称" + }, + "email": { + "type": "string", + "title": "邮箱" + } + }, + "title": "---------- AppLogin ----------" + }, + "AppLoginResp": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "format": "int32", + "title": "状态 0 成功 1 需要绑定手机号" + }, + "ticket": { + "type": "string", + "title": "凭证" + }, + "usn": { + "type": "string", + "format": "int64", + "title": "用户ID" + }, + "accessToken": { + "type": "string" + }, + "refreshToken": { + "type": "string" + }, + "isMaintain": { + "type": "boolean", + "title": "服务器是否在维护" + } + } + }, + "AppLogoutReq": { + "type": "object", + "properties": { + "refreshToken": { + "type": "string" + } + }, + "title": "---------- AppLogout ----------" + }, + "AppLogoutResp": { + "type": "object" + }, + "AppRefreshTokenReq": { + "type": "object", + "properties": { + "refreshToken": { + "type": "string" + } + }, + "title": "---------- AppRefreshToken ----------" + }, + "AppRefreshTokenResp": { + "type": "object", + "properties": { + "accessToken": { + "type": "string" + }, + "refreshToken": { + "type": "string" + }, + "isMaintain": { + "type": "boolean" + } + } + }, + "AppSendCodeReq": { + "type": "object", + "properties": { + "phone": { + "type": "string" + }, + "countryCode": { + "type": "string" + } + }, + "title": "---------- AppSendCode ----------" + }, + "AppSendCodeResp": { + "type": "object" + }, + "AppUpdateUserNickAndAvatarReq": { + "type": "object", + "properties": { + "nickName": { + "type": "string", + "title": "昵称" + }, + "isUpdateAvatar": { + "type": "boolean", + "title": "是否更新头像" + } + }, + "title": "---------- AppUpdateUserNickAndAvatar ----------" + }, + "AppUpdateUserNickAndAvatarResp": { + "type": "object", + "properties": { + "uploadURL": { + "type": "string", + "title": "头像上传URL" + } + } + }, + "InnerBroadcastChannelResp": { + "type": "object" + }, + "InnerBroadcastClientResp": { + "type": "object" + }, + "InnerCheckCodeResp": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + } + }, + "InnerCheckCodeVoucherResp": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "phone": { + "type": "string" + } + } + }, + "InnerKickOfflineResp": { + "type": "object" + }, + "InnerKickUserResp": { + "type": "object" + }, + "InnerToClientResp": { + "type": "object" + }, + "LoginType": { + "type": "string", + "enum": [ + "LOGIN_TYPE_UNKNOWN", + "LOGIN_TYPE_PHONE", + "LOGIN_TYPE_WX_MINI", + "LOGIN_TYPE_WX_APP", + "LOGIN_TYPE_APPLE" + ], + "default": "LOGIN_TYPE_UNKNOWN", + "title": "- LOGIN_TYPE_PHONE: 手机号\n - LOGIN_TYPE_WX_MINI: 微信小程序\n - LOGIN_TYPE_WX_APP: 微信App\n - LOGIN_TYPE_APPLE: 苹果" + }, + "PlatformType": { + "type": "string", + "enum": [ + "PLATFORM_TYPE_UNKNOWN", + "PLATFORM_TYPE_GAME", + "PLATFORM_TYPE_WX_MINI", + "PLATFORM_TYPE_ADMIN" + ], + "default": "PLATFORM_TYPE_UNKNOWN", + "title": "- PLATFORM_TYPE_GAME: 游戏(APP)\n - PLATFORM_TYPE_WX_MINI: 微信小程序\n - PLATFORM_TYPE_ADMIN: 后台" + }, + "UserBaseInfo": { + "type": "object", + "properties": { + "USN": { + "type": "string", + "format": "int64", + "title": "用户ID" + }, + "IsBindPhone": { + "type": "boolean", + "title": "是否绑定手机号" + } + }, + "title": "用户基础信息" + } + } +} diff --git a/protofile/RpcServer/gen_proto.ps1 b/protofile/RpcServer/gen_proto.ps1 new file mode 100644 index 0000000..7da55b8 --- /dev/null +++ b/protofile/RpcServer/gen_proto.ps1 @@ -0,0 +1,22 @@ +$gen = "gen" +if (!(Test-Path $gen)) +{ + mkdir $gen | Out-Null +} + +$files = Get-ChildItem sources/*.proto | ForEach-Object { $_.Name } + +protoc ` + --proto_path=sources ` + --go_out=$gen ` + --go-grpc_out=$gen ` + --grpc-gateway_out=$gen ` + --openapiv2_out=$gen ` + --openapiv2_opt=allow_merge=true,merge_file_name=api,disable_default_errors=true ` + $files + +$sourcePath = "$gen/git.hlsq.asia/alex/proto/proto/rs" +$targetPath = "../../proto" + +Copy-Item -Path $sourcePath -Destination $targetPath -Recurse -Force +Remove-Item -Path "$gen/git.hlsq.asia" -Recurse -Force \ No newline at end of file diff --git a/protofile/RpcServer/sources/google/api/annotations.proto b/protofile/RpcServer/sources/google/api/annotations.proto new file mode 100644 index 0000000..417edd8 --- /dev/null +++ b/protofile/RpcServer/sources/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/protofile/RpcServer/sources/google/api/http.proto b/protofile/RpcServer/sources/google/api/http.proto new file mode 100644 index 0000000..57621b5 --- /dev/null +++ b/protofile/RpcServer/sources/google/api/http.proto @@ -0,0 +1,370 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// - HTTP: `GET /v1/messages/123456` +// - gRPC: `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` +// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: +// SubMessage(subfield: "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// - HTTP: `GET /v1/messages/123456` +// - gRPC: `GetMessage(message_id: "123456")` +// +// - HTTP: `GET /v1/users/me/messages/123456` +// - gRPC: `GetMessage(user_id: "me" message_id: "123456")` +// +// Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They +// are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL +// query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP +// request body, all +// fields are passed via URL path and URL query parameters. +// +// Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// The following example selects a gRPC method and applies an `HttpRule` to it: +// +// http: +// rules: +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/protofile/RpcServer/sources/google/protobuf/any.proto b/protofile/RpcServer/sources/google/protobuf/any.proto new file mode 100644 index 0000000..eff44e5 --- /dev/null +++ b/protofile/RpcServer/sources/google/protobuf/any.proto @@ -0,0 +1,162 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option go_package = "google.golang.org/protobuf/types/known/anypb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/protofile/RpcServer/sources/google/protobuf/descriptor.proto b/protofile/RpcServer/sources/google/protobuf/descriptor.proto new file mode 100644 index 0000000..e5683a2 --- /dev/null +++ b/protofile/RpcServer/sources/google/protobuf/descriptor.proto @@ -0,0 +1,1448 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + +syntax = "proto2"; + +package google.protobuf; + +option go_package = "google.golang.org/protobuf/types/descriptorpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; + + // Extensions for tooling. + extensions 536000000 [declaration = { + number: 536000000 + type: ".buf.descriptor.v1.FileDescriptorSetExtension" + full_name: ".buf.descriptor.v1.buf_file_descriptor_set_extension" + }]; +} + +// The full set of known editions. +enum Edition { + // A placeholder for an unknown edition value. + EDITION_UNKNOWN = 0; + + // A placeholder edition for specifying default behaviors *before* a feature + // was first introduced. This is effectively an "infinite past". + EDITION_LEGACY = 900; + + // Legacy syntax "editions". These pre-date editions, but behave much like + // distinct editions. These can't be used to specify the edition of proto + // files, but feature definitions must supply proto2/proto3 defaults for + // backwards compatibility. + EDITION_PROTO2 = 998; + EDITION_PROTO3 = 999; + + // Editions that have been released. The specific values are arbitrary and + // should not be depended on, but they will always be time-ordered for easy + // comparison. + EDITION_2023 = 1000; + EDITION_2024 = 1001; + + // A placeholder edition for developing and testing unscheduled features. + EDITION_UNSTABLE = 9999; + + // Placeholder editions for testing feature resolution. These should not be + // used or relied on outside of tests. + EDITION_1_TEST_ONLY = 1; + EDITION_2_TEST_ONLY = 2; + EDITION_99997_TEST_ONLY = 99997; + EDITION_99998_TEST_ONLY = 99998; + EDITION_99999_TEST_ONLY = 99999; + + // Placeholder for specifying unbounded edition support. This should only + // ever be used by plugins that can expect to never require any changes to + // support a new edition. + EDITION_MAX = 0x7FFFFFFF; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // Names of files imported by this file purely for the purpose of providing + // option extensions. These are excluded from the dependency list above. + repeated string option_dependency = 15; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional string syntax = 12; + + // The edition of the proto file. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional Edition edition = 14; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; + + // Support for `export` and `local` keywords on enums. + optional SymbolVisibility visibility = 11; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + message Declaration { + // The extension number declared within the extension range. + optional int32 number = 1; + + // The fully-qualified name of the extension field. There must be a leading + // dot in front of the full name. + optional string full_name = 2; + + // The fully-qualified type name of the extension field. Unlike + // Metadata.type, Declaration.type must have a leading dot for messages + // and enums. + optional string type = 3; + + // If true, indicates that the number is reserved in the extension range, + // and any extension field with the number will fail to compile. Set this + // when a declared extension field is deleted. + optional bool reserved = 5; + + // If true, indicates that the extension must be defined as repeated. + // Otherwise the extension must be defined as optional. + optional bool repeated = 6; + + reserved 4; // removed is_repeated + } + + // For external users: DO NOT USE. We are in the process of open sourcing + // extension declaration and executing internal cleanups before it can be + // used externally. + repeated Declaration declaration = 2 [retention = RETENTION_SOURCE]; + + // Any features defined in the specific edition. + optional FeatureSet features = 50; + + // The verification state of the extension range. + enum VerificationState { + // All the extensions of the range must be declared. + DECLARATION = 0; + UNVERIFIED = 1; + } + + // The verification state of the range. + // TODO: flip the default to DECLARATION once all empty ranges + // are marked as UNVERIFIED. + optional VerificationState verification = 3 + [default = UNVERIFIED, retention = RETENTION_SOURCE]; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported after google.protobuf. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. In Editions, the group wire format + // can be enabled via the `message_encoding` feature. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REPEATED = 3; + // The required label is only allowed in google.protobuf. In proto3 and Editions + // it's explicitly prohibited. In Editions, the `field_presence` feature + // can be used to get this behavior. + LABEL_REQUIRED = 2; + } + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; + + // If true, this is a proto3 "optional". When a proto3 field is optional, it + // tracks presence regardless of field type. + // + // When proto3_optional is true, this field must belong to a oneof to signal + // to old proto3 clients that presence is tracked for this field. This oneof + // is known as a "synthetic" oneof, and this field must be its sole member + // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs + // exist in the descriptor only, and do not generate any API. Synthetic oneofs + // must be ordered after all "real" oneofs. + // + // For message fields, proto3_optional doesn't create any semantic change, + // since non-repeated message fields always track presence. However it still + // indicates the semantic detail of whether the user wrote "optional" or not. + // This can be useful for round-tripping the .proto file. For consistency we + // give message fields a synthetic oneof also, even though it is not required + // to track presence. This is especially important because the parser can't + // tell if a field is a message or an enum, so it must always create a + // synthetic oneof. + // + // Proto2 optional fields do not set this flag, because they already indicate + // optional with `LABEL_OPTIONAL`. + optional bool proto3_optional = 17; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; + + // Support for `export` and `local` keywords on enums. + optional SymbolVisibility visibility = 6; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; + + reserved 4; + reserved "stream"; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default = false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default = false]; +} + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +message FileOptions { + + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. + optional string java_outer_classname = 8; + + // If enabled, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [ + default = false, + feature_support = { + edition_introduced: EDITION_PROTO2 + edition_removed: EDITION_2024 + removal_error: "This behavior is enabled by default in editions 2024 and above. " + "To disable it, you can set `features.(pb.java).nest_in_file_class = YES` " + "on individual messages, enums, or services." + + } + ]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // A proto2 file can set this to true to opt in to UTF-8 checking for Java, + // which will throw an exception if invalid UTF-8 is parsed from the wire or + // assigned to a string field. + // + // TODO: clarify exactly what kinds of field types this option + // applies to, and update these docs accordingly. + // + // Proto3 files already perform these checks. Setting the option explicitly to + // false has no effect: it cannot be used to opt proto3 files out of UTF-8 + // checks. + optional bool java_string_check_utf8 = 27 [default = false]; + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default = SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + reserved 42; // removed php_generic_services + reserved "php_generic_services"; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default = false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default = true]; + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. + optional string php_metadata_namespace = 44; + + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + optional string ruby_package = 45; + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 50; + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default = false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default = false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default = false]; + + reserved 4, 5, 6; + + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementations still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + optional bool map_entry = 7; + + reserved 8; // javalite_serializable + reserved 9; // javanano_as_lite + + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 12; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is only implemented to support use of + // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + // type "bytes" in the open source release. + // TODO: make ctype actually deprecated. + optional CType ctype = 1 [/*deprecated = true,*/ default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + // The option [ctype=CORD] may be applied to a non-repeated field of type + // "bytes". It indicates that in C++, the data should be stored in a Cord + // instead of a string. For very large strings, this may reduce memory + // fragmentation. It may also allow better performance when parsing from a + // Cord, or when parsing with aliasing enabled, as the parsed Cord may then + // alias the original buffer. + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. This option is prohibited in + // Editions, but the `repeated_field_encoding` feature can be used to control + // the behavior. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // Note that lazy message fields are still eagerly verified to check + // ill-formed wireformat or missing required fields. Calling IsInitialized() + // on the outer message would fail if the inner message has missing required + // fields. Failed verification would result in parsing failure (except when + // uninitialized messages are acceptable). + optional bool lazy = 5 [default = false]; + + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + optional bool unverified_lazy = 15 [default = false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default = false]; + + // DEPRECATED. DO NOT USE! + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default = false, deprecated = true]; + + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + optional bool debug_redact = 16 [default = false]; + + // If set to RETENTION_SOURCE, the option will be omitted from the binary. + enum OptionRetention { + RETENTION_UNKNOWN = 0; + RETENTION_RUNTIME = 1; + RETENTION_SOURCE = 2; + } + + optional OptionRetention retention = 17; + + // This indicates the types of entities that the field may apply to when used + // as an option. If it is unset, then the field may be freely used as an + // option on any kind of entity. + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0; + TARGET_TYPE_FILE = 1; + TARGET_TYPE_EXTENSION_RANGE = 2; + TARGET_TYPE_MESSAGE = 3; + TARGET_TYPE_FIELD = 4; + TARGET_TYPE_ONEOF = 5; + TARGET_TYPE_ENUM = 6; + TARGET_TYPE_ENUM_ENTRY = 7; + TARGET_TYPE_SERVICE = 8; + TARGET_TYPE_METHOD = 9; + } + + repeated OptionTargetType targets = 19; + + message EditionDefault { + optional Edition edition = 3; + optional string value = 2; // Textproto value. + } + repeated EditionDefault edition_defaults = 20; + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 21; + + // Information about the support window of a feature. + message FeatureSupport { + // The edition that this feature was first available in. In editions + // earlier than this one, the default assigned to EDITION_LEGACY will be + // used, and proto files will not be able to override it. + optional Edition edition_introduced = 1; + + // The edition this feature becomes deprecated in. Using this after this + // edition may trigger warnings. + optional Edition edition_deprecated = 2; + + // The deprecation warning text if this feature is used after the edition it + // was marked deprecated in. + optional string deprecation_warning = 3; + + // The edition this feature is no longer available in. In editions after + // this one, the last default assigned will be used, and proto files will + // not be able to override it. + optional Edition edition_removed = 4; + + // The removal error text if this feature is used after the edition it was + // removed in. + optional string removal_error = 5; + } + optional FeatureSupport feature_support = 22; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + reserved 4; // removed jtype + reserved 18; // reserve target, target_obsolete_do_not_use +} + +message OneofOptions { + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 1; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default = false]; + + reserved 5; // javanano_as_lite + + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO Remove this legacy behavior once downstream teams have + // had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 7; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default = false]; + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 2; + + // Indicate that fields annotated with this enum value should not be printed + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + optional bool debug_redact = 3 [default = false]; + + // Information about the support window of a feature value. + optional FieldOptions.FeatureSupport feature_support = 4; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 34; + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default = false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = 34 + [default = IDEMPOTENCY_UNKNOWN]; + + // Any features defined in the specific edition. + // WARNING: This field should only be used by protobuf plugins or special + // cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. + optional FeatureSet features = 35; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + // "foo.(bar.baz).moo". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Features + +// TODO Enums in C++ gencode (and potentially other languages) are +// not well scoped. This means that each of the feature enums below can clash +// with each other. The short names we've chosen maximize call-site +// readability, but leave us very open to this scenario. A future feature will +// be designed and implemented to handle this, hopefully before we ever hit a +// conflict here. +message FeatureSet { + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0; + EXPLICIT = 1; + IMPLICIT = 2; + LEGACY_REQUIRED = 3; + } + optional FieldPresence field_presence = 1 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPLICIT" }, + edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" }, + edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" } + ]; + + enum EnumType { + ENUM_TYPE_UNKNOWN = 0; + OPEN = 1; + CLOSED = 2; + } + optional EnumType enum_type = 2 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "CLOSED" }, + edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" } + ]; + + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0; + PACKED = 1; + EXPANDED = 2; + } + optional RepeatedFieldEncoding repeated_field_encoding = 3 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPANDED" }, + edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" } + ]; + + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0; + VERIFY = 2; + NONE = 3; + reserved 1; + } + optional Utf8Validation utf8_validation = 4 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "NONE" }, + edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" } + ]; + + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0; + LENGTH_PREFIXED = 1; + DELIMITED = 2; + } + optional MessageEncoding message_encoding = 5 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "LENGTH_PREFIXED" } + ]; + + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0; + ALLOW = 1; + LEGACY_BEST_EFFORT = 2; + } + optional JsonFormat json_format = 6 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_MESSAGE, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY_BEST_EFFORT" }, + edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" } + ]; + + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0; + STYLE2024 = 1; + STYLE_LEGACY = 2; + } + optional EnforceNamingStyle enforce_naming_style = 7 [ + retention = RETENTION_SOURCE, + targets = TARGET_TYPE_FILE, + targets = TARGET_TYPE_EXTENSION_RANGE, + targets = TARGET_TYPE_MESSAGE, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_ONEOF, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_ENUM_ENTRY, + targets = TARGET_TYPE_SERVICE, + targets = TARGET_TYPE_METHOD, + feature_support = { + edition_introduced: EDITION_2024, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "STYLE_LEGACY" }, + edition_defaults = { edition: EDITION_2024, value: "STYLE2024" } + ]; + + message VisibilityFeature { + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0; + + // Default pre-EDITION_2024, all UNSET visibility are export. + EXPORT_ALL = 1; + + // All top-level symbols default to export, nested default to local. + EXPORT_TOP_LEVEL = 2; + + // All symbols default to local. + LOCAL_ALL = 3; + + // All symbols local by default. Nested types cannot be exported. + // With special case caveat for message { enum {} reserved 1 to max; } + // This is the recommended setting for new protos. + STRICT = 4; + } + reserved 1 to max; + } + optional VisibilityFeature.DefaultSymbolVisibility default_symbol_visibility = + 8 [ + retention = RETENTION_SOURCE, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2024, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPORT_ALL" }, + edition_defaults = { edition: EDITION_2024, value: "EXPORT_TOP_LEVEL" } + ]; + + reserved 999; + + extensions 1000 to 9994 [ + declaration = { + number: 1000, + full_name: ".pb.cpp", + type: ".pb.CppFeatures" + }, + declaration = { + number: 1001, + full_name: ".pb.java", + type: ".pb.JavaFeatures" + }, + declaration = { number: 1002, full_name: ".pb.go", type: ".pb.GoFeatures" }, + declaration = { + number: 1003, + full_name: ".pb.python", + type: ".pb.PythonFeatures" + }, + declaration = { + number: 1100, + full_name: ".imp.impress_feature_set", + type: ".imp.ImpressFeatureSet" + }, + declaration = { + number: 9989, + full_name: ".pb.java_mutable", + type: ".pb.JavaMutableFeatures" + }, + declaration = { + number: 9990, + full_name: ".pb.proto1", + type: ".pb.Proto1Features" + } + ]; + + extensions 9995 to 9999; // For internal testing + extensions 10000; // for https://github.com/bufbuild/protobuf-es +} + +// A compiled specification for the defaults of a set of features. These +// messages are generated from FeatureSet extensions and can be used to seed +// feature resolution. The resolution with this object becomes a simple search +// for the closest matching edition, followed by proto merges. +message FeatureSetDefaults { + // A map from every known edition with a unique set of defaults to its + // defaults. Not all editions may be contained here. For a given edition, + // the defaults at the closest matching edition ordered at or before it should + // be used. This field must be in strict ascending order by edition. + message FeatureSetEditionDefault { + optional Edition edition = 3; + + // Defaults of features that can be overridden in this edition. + optional FeatureSet overridable_features = 4; + + // Defaults of features that can't be overridden in this edition. + optional FeatureSet fixed_features = 5; + + reserved 1, 2; + reserved "features"; + } + repeated FeatureSetEditionDefault defaults = 1; + + // The minimum supported edition (inclusive) when this was constructed. + // Editions before this will not have defaults. + optional Edition minimum_edition = 4; + + // The maximum known edition (inclusive) when this was constructed. Editions + // after this will not have reliable defaults. + optional Edition maximum_edition = 5; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition appears. + // For example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed = true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed = true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to moo. + // // + // // Another line attached to moo. + // optional double moo = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to moo or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } + + // Extensions for tooling. + extensions 536000000 [declaration = { + number: 536000000 + type: ".buf.descriptor.v1.SourceCodeInfoExtension" + full_name: ".buf.descriptor.v1.buf_source_code_info_extension" + }]; +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed = true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified object. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + + // Represents the identified object's effect on the element in the original + // .proto file. + enum Semantic { + // There is no effect or the effect is indescribable. + NONE = 0; + // The element is set or otherwise mutated. + SET = 1; + // An alias to the element is returned. + ALIAS = 2; + } + optional Semantic semantic = 5; + } +} + +// Describes the 'visibility' of a symbol with respect to the proto import +// system. Symbols can only be imported when the visibility rules do not prevent +// it (ex: local symbols cannot be imported). Visibility modifiers can only set +// on `message` and `enum` as they are the only types available to be referenced +// from other files. +enum SymbolVisibility { + VISIBILITY_UNSET = 0; + VISIBILITY_LOCAL = 1; + VISIBILITY_EXPORT = 2; +} diff --git a/protofile/RpcServer/sources/rs_common.proto b/protofile/RpcServer/sources/rs_common.proto new file mode 100644 index 0000000..39a94a9 --- /dev/null +++ b/protofile/RpcServer/sources/rs_common.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/rs/rscommon"; + +message ErrorInfo { + int32 Code = 1; + string Msg = 2; +} + +message PageArgs { + int32 PageIndex = 1 [json_name = "pageIndex"]; + int32 PageSize = 2 [json_name = "pageSize"]; + repeated OrderInfo OrderList = 3 [json_name = "orderList"]; +} + +message PageInfoReply { + int32 PageIndex = 1 [json_name = "pageIndex"]; + int32 PageSize = 2 [json_name = "pageSize"]; + int32 TotalCount = 3 [json_name = "totalCount"]; +} + +message OrderInfo { + string field = 1; + bool asc = 2; +} + +// 挥杆表数据(展示每个洞的详细杆数) +message AppStroke { + repeated AppHoleConfig HoleConfig = 1 [json_name = "holeConfig"]; // 球洞的配置 + repeated AppHoleItem HoleList = 2 [json_name = "holeList"]; +} +message AppHoleItem { + int64 RoundSn = 1 [json_name = "roundSn"]; // 轮次编号 + string NickName = 2 [json_name = "nickName"]; // 昵称 + string Avatar = 3 [json_name = "avatar"]; // 头像 + int32 HCP = 4 [json_name = "hcp"]; // 差点让杆 + int32 Tee = 5 [json_name = "tee"]; // 选的Tee台颜色 0 黑 1 金 2 蓝 3 白 4 红 + repeated AppHoleConfig HoleInfo = 6 [json_name = "holeInfo"]; // 球洞信息 +} +message AppHoleConfig { + int32 HoleNumber = 1 [json_name = "holeNumber"]; // 球洞编号 + int32 StrokeIndex = 2 [json_name = "strokeIndex"]; // 挥杆指数 + int32 Par = 3 [json_name = "par"]; // 球洞par + int32 Gross = 4 [json_name = "gross"]; // 球洞总杆 + int32 Net = 5 [json_name = "net"]; // 球洞净杆 +} +// 得分分布 +message AppCourtGameResultScoreType { + ScoreType Type = 1 [json_name = "type"]; // 类型 + int32 Count = 2 [json_name = "count"]; // 数量 +} +enum ScoreType { + SCORE_TYPE_UNKNOWN = 0; + SCORE_TYPE_HOLE_IN_ONE = 1; // 一杆进洞 + SCORE_TYPE_ALBATROSS = 2; // 信天翁 + SCORE_TYPE_EAGLE = 3; // 老鹰 + SCORE_TYPE_BIRDIE = 4; // 小鸟 + SCORE_TYPE_PAR = 5; // 标准杆 + SCORE_TYPE_BOGEY = 6; // 柏忌 + SCORE_TYPE_BOGEY_PLUS = 7; // 柏忌+ +} + +// 生涯中的平均成绩 +message AppCareerAveScoring { + double Par3 = 1 [json_name = "par3"]; + double Par4 = 2 [json_name = "par4"]; + double Par5 = 3 [json_name = "par5"]; +} +// 生涯中的场均成绩 +message AppCareerAvePerRound { + double Bogey = 1 [json_name = "bogey"]; // 柏忌 + double Par = 2 [json_name = "par"]; // 保帕 + double Birdie = 3 [json_name = "birdie"]; // 小鸟球 + double Eagle = 4 [json_name = "eagle"]; // 老鹰球 +} +// 生涯中的累计数据 +message AppCareerHandicapTrend { + int32 Swings = 1 [json_name = "swings"]; // 生涯总挥杆次数 + int32 Holes = 2 [json_name = "holes"]; // 完成洞数 + double Calorie = 3 [json_name = "calorie"]; // 卡路里 + double Yards = 4 [json_name = "yards"]; // 总击球距离 +} + +// 小程序首页广场的卡片结构 +message AppGetMatchData { + int64 CourtSn = 1 [json_name = "courtSn"]; // 比赛球场ID + string Avatar = 2 [json_name = "avatar"]; // 头像 + string CompetitionName = 3 [json_name = "competitionName"]; // 比赛名称 + string CompetitionLocation = 4 [json_name = "competitionLocation"]; // 比赛地点 + int32 PlayersNum = 5 [json_name = "playersNum"]; // 玩家数量 + int64 CreateAt = 6 [json_name = "createAt"]; // 创建时间 + int32 CompetitionState = 7 [json_name = "competitionState"]; // 比赛状态 (1:进行中 2:已结束 0:未开始-创建初始值) + int32 GrossScore = 8 [json_name = "grossScore"]; // 总杆 + int32 Par = 9 [json_name = "par"]; // 球场标准杆 + int32 Type = 10 [json_name = "type"]; // 类型 1线上 2线下 + bool IsParticipate = 11 [json_name = "isParticipate"]; // 当前用户是否参与此比赛 + int32 Mode = 12 [json_name = "mode"]; // 比赛模式 1 经典 2 赛事 + int32 SubMode = 13 [json_name = "subMode"]; // 子模式 1 本地比赛 2 在线比赛 3 锦标赛 + string CourtName = 14 [json_name = "courtName"]; // 球场名称 + bool IsCaddy = 15 [json_name = "isCaddy"]; // 是否是球童 + repeated SideType OpenSide = 16 [json_name = "openSide"]; // 开启了哪些玩法 + HandicapLimitMode Hcp = 17 [json_name = "hcp"]; // HCP + string Background = 18 [json_name = "background"]; // 卡片的背景图 +} + +// 玩法的枚举 +enum SideType { + SIDE_TYPE_UNKNOWN = 0; + SIDE_TYPE_TIGER = 1; // 打老虎 + SIDE_TYPE_RYDER_CUP = 2; // 莱德杯 +} + +// HandicapLimitMode 差点限制模式 +enum HandicapLimitMode { + HANDICAP_LIMIT_NONE = 0; // 无 + HANDICAP_LIMIT_36 = 1; // ≥36 + HANDICAP_LIMIT_28_TO_36 = 2; // 28-36 + HANDICAP_LIMIT_18_TO_28 = 3; // 18-28 + HANDICAP_LIMIT_8_TO_18 = 4; // 8-18 + HANDICAP_LIMIT_0_TO_8 = 5; // 0-8 + HANDICAP_LIMIT_LESS_THAN_0 = 6; // ≤8 +} diff --git a/protofile/RpcServer/sources/service_gateway.proto b/protofile/RpcServer/sources/service_gateway.proto new file mode 100644 index 0000000..882b89d --- /dev/null +++ b/protofile/RpcServer/sources/service_gateway.proto @@ -0,0 +1,59 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb"; +import "rs_common.proto"; +import "google/api/annotations.proto"; + +service Gateway { + // ---------- 内部接口 ---------- + + // 发送消息到客户端 + rpc InnerToClient(stream InnerToClientReq) returns (InnerToClientResp) {} + // 广播消息到客户端 + rpc InnerBroadcastClient(stream InnerBroadcastClientReq) returns (InnerBroadcastClientResp) {} + // 广播消息到频道 + rpc InnerBroadcastChannel(stream InnerBroadcastChannelReq) returns (InnerBroadcastChannelResp) {} + // 踢用户下线 + rpc InnerKickUser(InnerKickUserReq) returns (InnerKickUserResp) {} + + // ---------- 后台接口 ---------- + // ---------- 外部接口 ---------- +} + +// ---------- InnerToClient ---------- +message InnerToClientReq { + int64 USN = 1; + int32 Platform = 2; // 平台(这里的类型是rspb.PlatformType) + int32 MessageID = 3; // 消息ID + bytes Payload = 4; // 消息内容 +} +message InnerToClientResp { +} + +// ---------- InnerBroadcastClient ---------- +message InnerBroadcastClientReq { + repeated int64 USN = 1; + repeated int32 Platform = 2; // 平台(这里的类型是rspb.PlatformType) + int32 MessageID = 3; // 消息ID + bytes Payload = 4; // 消息内容 +} +message InnerBroadcastClientResp { +} + +// ---------- InnerBroadcastChannel ---------- +message InnerBroadcastChannelReq { + string ChannelName = 1; // 频道名称 + int32 MessageID = 2; // 消息ID + bytes Payload = 3; // 消息内容 +} +message InnerBroadcastChannelResp { +} + +// ---------- InnerKickUser ---------- +message InnerKickUserReq { + int64 USN = 1; + int32 Platform = 2; // 平台(这里的类型是rspb.PlatformType) + int32 ID = 3; // 踢出原因(这里的类型是rspb.KickOutID) +} +message InnerKickUserResp { +} diff --git a/protofile/RpcServer/sources/service_notice.proto b/protofile/RpcServer/sources/service_notice.proto new file mode 100644 index 0000000..a435865 --- /dev/null +++ b/protofile/RpcServer/sources/service_notice.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb"; +import "rs_common.proto"; +import "google/api/annotations.proto"; + +service Notice { + // ---------- 内部接口 ---------- + // ---------- 后台接口 ---------- + // ---------- 外部接口 ---------- +} diff --git a/protofile/RpcServer/sources/service_scene.proto b/protofile/RpcServer/sources/service_scene.proto new file mode 100644 index 0000000..3638765 --- /dev/null +++ b/protofile/RpcServer/sources/service_scene.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb"; +import "rs_common.proto"; +import "google/api/annotations.proto"; + +service Scene { + // ---------- 内部接口 ---------- + // ---------- 后台接口 ---------- + // ---------- 外部接口 ---------- +} \ No newline at end of file diff --git a/protofile/RpcServer/sources/service_third-party.proto b/protofile/RpcServer/sources/service_third-party.proto new file mode 100644 index 0000000..5288ecd --- /dev/null +++ b/protofile/RpcServer/sources/service_third-party.proto @@ -0,0 +1,134 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb"; +import "rs_common.proto"; +import "google/api/annotations.proto"; + +service ThirdParty { + // ---------- 内部接口 ---------- + + // 校验验证码 + rpc InnerCheckCode(InnerCheckCodeReq) returns (InnerCheckCodeResp) {} + // 校验验证码凭证 + rpc InnerCheckCodeVoucher(InnerCheckCodeVoucherReq) returns (InnerCheckCodeVoucherResp) {} + // 踢所有端下线 + rpc InnerKickOffline(InnerKickOfflineReq) returns (InnerKickOfflineResp) {} + + // ---------- 后台接口 ---------- + // ---------- 外部接口 ---------- + + // 登录 + rpc AppLogin(AppLoginReq) returns (AppLoginResp) {option (google.api.http) = {post: "/third-party/open/login" body: "*"};} + // 绑定手机号 + rpc AppBindPhone(AppBindPhoneReq) returns (AppLoginResp) {option (google.api.http) = {post: "/third-party/open/login_bind" body: "*"};} + // 刷新令牌 + rpc AppRefreshToken(AppRefreshTokenReq) returns (AppRefreshTokenResp) {option (google.api.http) = {post: "/third-party/open/refresh_token" body: "*"};} + // 登出 + rpc AppLogout(AppLogoutReq) returns (AppLogoutResp) {option (google.api.http) = {post: "/third-party/open/logout" body: "*"};} + // 发送验证码 + rpc AppSendCode(AppSendCodeReq) returns (AppSendCodeResp) {option (google.api.http) = {post: "/third-party/open/send_code" body: "*"};} + // 获取验证码凭证 + rpc AppGetCodeVoucher(AppGetCodeVoucherReq) returns (AppGetCodeVoucherResp) {option (google.api.http) = {post: "/third-party/open/code_voucher" body: "*"};} +} + +// ---------- InnerCheckCode ---------- +message InnerCheckCodeReq { + string CountryCode = 1 [json_name = "countryCode"]; // 国家码 + string Phone = 2 [json_name = "phone"]; // 手机号 + string Code = 3 [json_name = "code"]; // 验证码 +} +message InnerCheckCodeResp { + bool Success = 1 [json_name = "success"]; +} + +// ---------- InnerCheckCodeVoucher ---------- +message InnerCheckCodeVoucherReq { + string Voucher = 1 [json_name = "voucher"]; // 凭证 +} +message InnerCheckCodeVoucherResp { + bool Success = 1 [json_name = "success"]; + string Phone = 2 [json_name = "phone"]; +} + +// ---------- InnerKickOffline ---------- +message InnerKickOfflineReq { + int64 USN = 1 [json_name = "usn"]; // 用户ID +} +message InnerKickOfflineResp {} + +// ---------- AppLogin ---------- +message AppLoginReq { + LoginType Type = 1 [json_name = "type"]; // 登录方式 + PlatformType PlatformType = 2 [json_name = "platformType"]; // 平台类型 + string CountryCode = 3 [json_name = "countryCode"]; // 国家码 + string Phone = 4 [json_name = "phone"]; // 手机号 + string Code = 5 [json_name = "code"]; // 验证码 + string WxMiniCode = 6 [json_name = "wxMiniCode"]; // 微信小程序登录凭证 + string WxAppCode = 7 [json_name = "wxAppCode"]; // 微信App登录凭证 + string IdentityToken = 8 [json_name = "identityToken"]; // 苹果登录凭证 + string FullName = 9 [json_name = "fullName"]; // 苹果全称 + string Email = 10 [json_name = "email"]; // 邮箱 +} +enum LoginType { + LOGIN_TYPE_UNKNOWN = 0; + LOGIN_TYPE_PHONE = 1; // 手机号 + LOGIN_TYPE_WX_MINI = 2; // 微信小程序 + LOGIN_TYPE_WX_APP = 3; // 微信App + LOGIN_TYPE_APPLE = 4; // 苹果 +} +enum PlatformType { + PLATFORM_TYPE_UNKNOWN = 0; + PLATFORM_TYPE_GAME = 1; // 游戏(APP) + PLATFORM_TYPE_WX_MINI = 2; // 微信小程序 + PLATFORM_TYPE_ADMIN = 3; // 后台 +} +message AppLoginResp { + int32 Status = 1 [json_name = "status"]; // 状态 0 成功 1 需要绑定手机号 + string Ticket = 2 [json_name = "ticket"]; // 凭证 + int64 USN = 3 [json_name = "usn"]; // 用户ID + string AccessToken = 4 [json_name = "accessToken"]; + string RefreshToken = 5 [json_name = "refreshToken"]; + bool IsMaintain = 6 [json_name = "isMaintain"]; // 服务器是否在维护 +} + +// ---------- AppBindPhone ---------- +message AppBindPhoneReq { + string Ticket = 1 [json_name = "ticket"]; // 凭证 + string CountryCode = 2 [json_name = "countryCode"]; // 国家码 + string Phone = 3 [json_name = "phone"]; // 手机号 + string Code = 4 [json_name = "code"]; // 验证码 + string MiniPhoneCode = 5 [json_name = "miniPhoneCode"]; // 微信小程序手机凭证 +} + +// ---------- AppRefreshToken ---------- +message AppRefreshTokenReq { + string RefreshToken = 1 [json_name = "refreshToken"]; +} +message AppRefreshTokenResp { + string AccessToken = 1 [json_name = "accessToken"]; + string RefreshToken = 2 [json_name = "refreshToken"]; + bool IsMaintain = 3 [json_name = "isMaintain"]; +} + +// ---------- AppLogout ---------- +message AppLogoutReq { + string RefreshToken = 1 [json_name = "refreshToken"]; +} +message AppLogoutResp {} + +// ---------- AppSendCode ---------- +message AppSendCodeReq { + string Phone = 1 [json_name = "phone"]; + string CountryCode = 2 [json_name = "countryCode"]; +} +message AppSendCodeResp {} + +// ---------- AppGetCodeVoucher ---------- +message AppGetCodeVoucherReq { + string CountryCode = 1 [json_name = "countryCode"]; // 国家码 + string Phone = 2 [json_name = "phone"]; // 手机号 + string Code = 3 [json_name = "code"]; // 验证码 +} +message AppGetCodeVoucherResp { + string CodeVoucher = 1 [json_name = "codeVoucher"]; // 凭证 +} diff --git a/protofile/RpcServer/sources/service_user.proto b/protofile/RpcServer/sources/service_user.proto new file mode 100644 index 0000000..e2d9a1e --- /dev/null +++ b/protofile/RpcServer/sources/service_user.proto @@ -0,0 +1,108 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb"; +import "rs_common.proto"; +import "google/api/annotations.proto"; + +service User { + // ---------- 内部接口 ---------- + + // 根据手机号查找或创建用户 + rpc InnerFindOrCreateUserByPhone(InnerFindOrCreateUserByPhoneReq) returns (UserBaseInfo) {} + // 根据微信小程序号查找用户 + rpc InnerFindUserByWxMini(InnerFindUserByWxMiniReq) returns (UserBaseInfo) {} + // 根据微信小程序号创建用户 + rpc InnerCreateUserByWxMini(InnerCreateUserByWxMiniReq) returns (UserBaseInfo) {} + // 根据微信App号查找用户 + rpc InnerFindUserByWxApp(InnerFindUserByWxAppReq) returns (UserBaseInfo) {} + // 根据微信App号创建用户 + rpc InnerCreateUserByWxApp(InnerCreateUserByWxAppReq) returns (UserBaseInfo) {} + // 根据苹果ID查找用户 + rpc InnerFindUserByAppleID(InnerFindUserByAppleIDReq) returns (UserBaseInfo) {} + // 根据苹果ID创建用户 + rpc InnerCreateUserByAppleID(InnerCreateUserByAppleIDReq) returns (UserBaseInfo) {} + + // ---------- 后台接口 ---------- + // ---------- 外部接口 ---------- + + // 查询用户信息 + rpc AppFindUser(AppFindUserReq) returns (AppFindUserResp) {option (google.api.http) = {post: "/user/auth/info" body: "*"};} + // 更新用户昵称和头像 + rpc AppUpdateUserNickAndAvatar(AppUpdateUserNickAndAvatarReq) returns (AppUpdateUserNickAndAvatarResp) {option (google.api.http) = {post: "/user/auth/modify/nick_and_avatar" body: "*"};} +} + +// 用户基础信息 +message UserBaseInfo { + int64 USN = 1; // 用户ID + bool IsBindPhone = 2; // 是否绑定手机号 +} + +// ---------- InnerFindOrCreateUserByPhone ---------- +message InnerFindOrCreateUserByPhoneReq { + string Phone = 1; // 手机号 + string CountryCode = 2; // 国家码 +} + +// ---------- InnerFindUserByWxMini ---------- +message InnerFindUserByWxMiniReq { + string UnionID = 1; // 微信小程序的UnionID + string OpenID = 2; // 微信小程序的OpenID +} + +// ---------- InnerCreateUserByWxMini ---------- +message InnerCreateUserByWxMiniReq { + string Phone = 1; // 手机号 + string CountryCode = 2; // 国家码 + string UnionID = 3; // 微信小程序的UnionID + string OpenID = 4; // 微信小程序的OpenID +} + +// ---------- InnerFindUserByWxApp ---------- +message InnerFindUserByWxAppReq { + string UnionID = 1; + string OpenID = 2; +} + +// ---------- InnerCreateUserByWxApp ---------- +message InnerCreateUserByWxAppReq { + string Phone = 1; // 手机号 + string CountryCode = 2; // 国家码 + string UnionID = 3; + string OpenID = 4; + string NickName = 5; + string HeadImgURL = 6; +} + +// ---------- InnerFindUserByAppleID ---------- +message InnerFindUserByAppleIDReq { + string AppleID = 1; // 苹果ID +} + +// ---------- InnerCreateUserByAppleID ---------- +message InnerCreateUserByAppleIDReq { + string Phone = 1; // 手机号 + string CountryCode = 2; // 国家码 + string AppleID = 3; // 苹果ID + string FullName = 4; // 全称 + string Email = 5; // 邮箱 +} + +// ---------- AppFindUser ---------- +message AppFindUserReq { +} +message AppFindUserResp { + int64 USN = 1 [json_name = "usn"]; + string UID = 2 [json_name = "uid"]; // 用户唯一编号,仅用于展示 + string Name = 3 [json_name = "name"]; // 用户名 + string HeadURL = 4 [json_name = "headURL"]; // 头像 + bool IsDefaultName = 5 [json_name = "isDefaultName"]; // 是否是默认头像 +} + +// ---------- AppUpdateUserNickAndAvatar ---------- +message AppUpdateUserNickAndAvatarReq{ + string NickName = 1 [json_name = "nickName"]; // 昵称 + bool IsUpdateAvatar = 2 [json_name = "isUpdateAvatar"]; // 是否更新头像 +} +message AppUpdateUserNickAndAvatarResp { + string UploadURL = 1 [json_name = "uploadURL"]; // 头像上传URL +} diff --git a/protofile/SocketServer/gen_proto.ps1 b/protofile/SocketServer/gen_proto.ps1 new file mode 100644 index 0000000..bdcbd0f --- /dev/null +++ b/protofile/SocketServer/gen_proto.ps1 @@ -0,0 +1,18 @@ +$gen = "gen" +if (!(Test-Path $gen)) +{ + mkdir $gen | Out-Null +} + +$files = Get-ChildItem sources/*.proto | ForEach-Object { $_.Name } + +protoc ` + --proto_path=sources ` + --go_out=$gen ` + $files + +$sourcePath = "$gen/git.hlsq.asia/alex/proto/proto/ss" +$targetPath = "../../proto" + +Copy-Item -Path $sourcePath -Destination $targetPath -Recurse -Force +Remove-Item -Path "$gen/git.hlsq.asia" -Recurse -Force \ No newline at end of file diff --git a/protofile/SocketServer/sources/channel.proto b/protofile/SocketServer/sources/channel.proto new file mode 100644 index 0000000..1243f5f --- /dev/null +++ b/protofile/SocketServer/sources/channel.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/ss/sspb"; +import "ss_common.proto"; + +enum ChannelType { + CHANNEL_TYPE_UNKNOWN = 0; + CHANNEL_TYPE_PHYSICAL_ROOM = 1; // 线下比赛房间频道 + CHANNEL_TYPE_BASE_COURT = 2; // 基础球场频道 + CHANNEL_TYPE_HORN = 3; // 小喇叭频道 + CHANNEL_TYPE_WATCH_ONLINE_COMPETITION = 4; // 观看在线比赛频道 ( 小程序端业务 ) + CHANNEL_TYPE_TOURNAMENT = 5; // 锦标赛 +} + +// MESSAGE_ID_JOIN_CHANNEL +message C2S_JoinChannel { + string ChannelName = 1; // 频道名称 +} +message S2C_JoinChannel { +} + +// MESSAGE_ID_LEAVE_CHANNEL +message C2S_LeaveChannel { + string ChannelName = 1; // 频道名称 +} +message S2C_LeaveChannel { +} \ No newline at end of file diff --git a/protofile/SocketServer/sources/define.proto b/protofile/SocketServer/sources/define.proto new file mode 100644 index 0000000..2b3bb8e --- /dev/null +++ b/protofile/SocketServer/sources/define.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/ss/sspb"; +option csharp_namespace = "common_pb"; +import "ss_common.proto"; + +enum MessageID { + MESSAGE_ID_INVALID = 0; + MESSAGE_ID_KICK_OUT = 1; // 服务器踢人 + MESSAGE_ID_QUEUE_UP = 2; // 排队中 + MESSAGE_ID_LOGIN_SUCCESS = 3; // 登录成功 + MESSAGE_ID_PING = 4; // Ping + MESSAGE_ID_PONG = 5; // Pong + MESSAGE_ID_JOIN_CHANNEL = 101; // 加入频道 + MESSAGE_ID_LEAVE_CHANNEL = 102; // 离开频道 +} + +message Message { + MessageID ID = 1; + bytes Payload = 2; +} \ No newline at end of file diff --git a/protofile/SocketServer/sources/service.proto b/protofile/SocketServer/sources/service.proto new file mode 100644 index 0000000..f280323 --- /dev/null +++ b/protofile/SocketServer/sources/service.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/ss/sspb"; +import "ss_common.proto"; + +// MESSAGE_ID_KICK_OUT +enum KickOutID { + KICK_OUT_ID_INVALID = 0; + KICK_OUT_ID_DUPLICATE_LOGIN = 1; // 重复登录 + KICK_OUT_ID_SERVER_BUSY = 2; // 服务器繁忙 + KICK_OUT_ID_SERVER_CLOSE = 3; // 服务器关闭 + KICK_OUT_ID_QUEUE_UP_FULL = 4; // 排队上限 + KICK_OUT_ID_TOKEN_INVALID = 5; // Token无效 +} +message S2C_KickOut { + KickOutID ID = 1; +} + +// MESSAGE_ID_QUEUE_UP +message S2C_QueueUp { + int32 QueueUpCount = 1; // 排队人数 +} + +// MESSAGE_ID_LOGIN_SUCCESS +message S2C_LoginSuccess { + int64 GatewayID = 1; // 网关ID +} + +// MESSAGE_ID_PING +message C2S_Ping { +} + +// MESSAGE_ID_PONG +message S2C_Pong { +} \ No newline at end of file diff --git a/protofile/SocketServer/sources/ss_common.proto b/protofile/SocketServer/sources/ss_common.proto new file mode 100644 index 0000000..e9e5755 --- /dev/null +++ b/protofile/SocketServer/sources/ss_common.proto @@ -0,0 +1,3 @@ +syntax = "proto3"; + +option go_package = "git.hlsq.asia/alex/proto/proto/ss/sscommon"; \ No newline at end of file diff --git a/topic/define.go b/topic/define.go new file mode 100644 index 0000000..1f84ae0 --- /dev/null +++ b/topic/define.go @@ -0,0 +1,5 @@ +package topic + +const ( + namePostSms = "post.sms.send" // 发送短信 +) diff --git a/topic/template.go b/topic/template.go new file mode 100644 index 0000000..61e13e9 --- /dev/null +++ b/topic/template.go @@ -0,0 +1,15 @@ +package topic + +import "context" + +type Template struct { + MessageSn int64 `json:"messageSn"` // 消息序列号 +} + +func (t *Template) Name() string { + return namePostSms +} + +func (t *Template) OnMessage(_ context.Context) error { + return nil +}