初始化提交
This commit is contained in:
1302
Proto/ServerClient/gen/client/Action.cs
Normal file
1302
Proto/ServerClient/gen/client/Action.cs
Normal file
File diff suppressed because it is too large
Load Diff
303
Proto/ServerClient/gen/client/Define.cs
Normal file
303
Proto/ServerClient/gen/client/Define.cs
Normal file
@@ -0,0 +1,303 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: define.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
/// <summary>Holder for reflection information generated from define.proto</summary>
|
||||
public static partial class DefineReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for define.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static DefineReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CgxkZWZpbmUucHJvdG8aD3NjX2NvbW1vbi5wcm90byIyCgdNZXNzYWdlEhYK",
|
||||
"AklEGAEgASgOMgouTWVzc2FnZUlEEg8KB1BheWxvYWQYAiABKAwqwgEKCU1l",
|
||||
"c3NhZ2VJRBIWChJNRVNTQUdFX0lEX0lOVkFMSUQQABIXChNNRVNTQUdFX0lE",
|
||||
"X0tJQ0tfT1VUEAESFwoTTUVTU0FHRV9JRF9RVUVVRV9VUBACEhwKGE1FU1NB",
|
||||
"R0VfSURfTE9HSU5fU1VDQ0VTUxADEh0KGU1FU1NBR0VfSURfRU5URVJfSU5T",
|
||||
"VEFOQ0UQZRIVChFNRVNTQUdFX0lEX0FDVElPThBmEhcKE01FU1NBR0VfSURf",
|
||||
"UE9TSVRJT04QZ0IXWhVjb21tb24vcHJvdG8vc2Mvc2NfcGJiBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::MessageID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Message), global::Message.Parser, new[]{ "ID", "Payload" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Enums
|
||||
public enum MessageID {
|
||||
[pbr::OriginalName("MESSAGE_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 服务器踢人
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_KICK_OUT")] KickOut = 1,
|
||||
/// <summary>
|
||||
/// 排队中
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_QUEUE_UP")] QueueUp = 2,
|
||||
/// <summary>
|
||||
/// 登录成功
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_LOGIN_SUCCESS")] LoginSuccess = 3,
|
||||
/// <summary>
|
||||
/// 进入副本
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_ENTER_INSTANCE")] EnterInstance = 101,
|
||||
/// <summary>
|
||||
/// 指令
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_ACTION")] Action = 102,
|
||||
/// <summary>
|
||||
/// 位置更新
|
||||
/// </summary>
|
||||
[pbr::OriginalName("MESSAGE_ID_POSITION")] Position = 103,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class Message : pb::IMessage<Message>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<Message> _parser = new pb::MessageParser<Message>(() => new Message());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<Message> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::DefineReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Message() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Message(Message other) : this() {
|
||||
iD_ = other.iD_;
|
||||
payload_ = other.payload_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public Message Clone() {
|
||||
return new Message(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "ID" field.</summary>
|
||||
public const int IDFieldNumber = 1;
|
||||
private global::MessageID iD_ = global::MessageID.Invalid;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::MessageID ID {
|
||||
get { return iD_; }
|
||||
set {
|
||||
iD_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "Payload" field.</summary>
|
||||
public const int PayloadFieldNumber = 2;
|
||||
private pb::ByteString payload_ = pb::ByteString.Empty;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public pb::ByteString Payload {
|
||||
get { return payload_; }
|
||||
set {
|
||||
payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as Message);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(Message other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (ID != other.ID) return false;
|
||||
if (Payload != other.Payload) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (ID != global::MessageID.Invalid) hash ^= ID.GetHashCode();
|
||||
if (Payload.Length != 0) hash ^= Payload.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (ID != global::MessageID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) ID);
|
||||
}
|
||||
if (Payload.Length != 0) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteBytes(Payload);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (ID != global::MessageID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) ID);
|
||||
}
|
||||
if (Payload.Length != 0) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteBytes(Payload);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (ID != global::MessageID.Invalid) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ID);
|
||||
}
|
||||
if (Payload.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(Message other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.ID != global::MessageID.Invalid) {
|
||||
ID = other.ID;
|
||||
}
|
||||
if (other.Payload.Length != 0) {
|
||||
Payload = other.Payload;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
ID = (global::MessageID) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
Payload = input.ReadBytes();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
ID = (global::MessageID) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
Payload = input.ReadBytes();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion Designer generated code
|
||||
35
Proto/ServerClient/gen/client/ScCommon.cs
Normal file
35
Proto/ServerClient/gen/client/ScCommon.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: sc_common.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
/// <summary>Holder for reflection information generated from sc_common.proto</summary>
|
||||
public static partial class ScCommonReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for sc_common.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static ScCommonReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"Cg9zY19jb21tb24ucHJvdG9CG1oZY29tbW9uL3Byb3RvL3NjL3NjX2NvbW1v",
|
||||
"bmIGcHJvdG8z"));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, null));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
661
Proto/ServerClient/gen/client/Service.cs
Normal file
661
Proto/ServerClient/gen/client/Service.cs
Normal file
@@ -0,0 +1,661 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: service.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
/// <summary>Holder for reflection information generated from service.proto</summary>
|
||||
public static partial class ServiceReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for service.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static ServiceReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"Cg1zZXJ2aWNlLnByb3RvGg9zY19jb21tb24ucHJvdG8iJQoLUzJDX0tpY2tP",
|
||||
"dXQSFgoCSUQYASABKA4yCi5LaWNrT3V0SUQiIwoLUzJDX1F1ZXVlVXASFAoM",
|
||||
"UXVldWVVcENvdW50GAEgASgFIiYKEFMyQ19Mb2dpblN1Y2Nlc3MSEgoKSW5z",
|
||||
"dGFuY2VJRBgBIAEoBSq+AQoJS2lja091dElEEhcKE0tJQ0tfT1VUX0lEX0lO",
|
||||
"VkFMSUQQABIfChtLSUNLX09VVF9JRF9EVVBMSUNBVEVfTE9HSU4QARIbChdL",
|
||||
"SUNLX09VVF9JRF9TRVJWRVJfQlVTWRACEhwKGEtJQ0tfT1VUX0lEX1NFUlZF",
|
||||
"Ul9DTE9TRRADEh0KGUtJQ0tfT1VUX0lEX1FVRVVFX1VQX0ZVTEwQBBIdChlL",
|
||||
"SUNLX09VVF9JRF9UT0tFTl9JTlZBTElEEAVCF1oVY29tbW9uL3Byb3RvL3Nj",
|
||||
"L3NjX3BiYgZwcm90bzM="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::ScCommonReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::KickOutID), }, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_KickOut), global::S2C_KickOut.Parser, new[]{ "ID" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_QueueUp), global::S2C_QueueUp.Parser, new[]{ "QueueUpCount" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::S2C_LoginSuccess), global::S2C_LoginSuccess.Parser, new[]{ "InstanceID" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Enums
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_KICK_OUT
|
||||
/// </summary>
|
||||
public enum KickOutID {
|
||||
[pbr::OriginalName("KICK_OUT_ID_INVALID")] Invalid = 0,
|
||||
/// <summary>
|
||||
/// 重复登录
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_DUPLICATE_LOGIN")] DuplicateLogin = 1,
|
||||
/// <summary>
|
||||
/// 服务器繁忙
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_SERVER_BUSY")] ServerBusy = 2,
|
||||
/// <summary>
|
||||
/// 服务器关闭
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_SERVER_CLOSE")] ServerClose = 3,
|
||||
/// <summary>
|
||||
/// 排队上限
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_QUEUE_UP_FULL")] QueueUpFull = 4,
|
||||
/// <summary>
|
||||
/// Token无效
|
||||
/// </summary>
|
||||
[pbr::OriginalName("KICK_OUT_ID_TOKEN_INVALID")] TokenInvalid = 5,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Messages
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_KickOut : pb::IMessage<S2C_KickOut>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_KickOut> _parser = new pb::MessageParser<S2C_KickOut>(() => new S2C_KickOut());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_KickOut> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut(S2C_KickOut other) : this() {
|
||||
iD_ = other.iD_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_KickOut Clone() {
|
||||
return new S2C_KickOut(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "ID" field.</summary>
|
||||
public const int IDFieldNumber = 1;
|
||||
private global::KickOutID iD_ = global::KickOutID.Invalid;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public global::KickOutID ID {
|
||||
get { return iD_; }
|
||||
set {
|
||||
iD_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_KickOut);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_KickOut other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (ID != other.ID) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (ID != global::KickOutID.Invalid) hash ^= ID.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (ID != global::KickOutID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) ID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (ID != global::KickOutID.Invalid) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteEnum((int) ID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (ID != global::KickOutID.Invalid) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_KickOut other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.ID != global::KickOutID.Invalid) {
|
||||
ID = other.ID;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
ID = (global::KickOutID) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
ID = (global::KickOutID) input.ReadEnum();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_QUEUE_UP
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_QueueUp : pb::IMessage<S2C_QueueUp>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_QueueUp> _parser = new pb::MessageParser<S2C_QueueUp>(() => new S2C_QueueUp());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_QueueUp> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.Descriptor.MessageTypes[1]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp(S2C_QueueUp other) : this() {
|
||||
queueUpCount_ = other.queueUpCount_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_QueueUp Clone() {
|
||||
return new S2C_QueueUp(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "QueueUpCount" field.</summary>
|
||||
public const int QueueUpCountFieldNumber = 1;
|
||||
private int queueUpCount_;
|
||||
/// <summary>
|
||||
/// 排队人数
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int QueueUpCount {
|
||||
get { return queueUpCount_; }
|
||||
set {
|
||||
queueUpCount_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_QueueUp);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_QueueUp other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (QueueUpCount != other.QueueUpCount) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (QueueUpCount != 0) hash ^= QueueUpCount.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (QueueUpCount != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(QueueUpCount);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (QueueUpCount != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(QueueUpCount);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (QueueUpCount != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(QueueUpCount);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_QueueUp other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.QueueUpCount != 0) {
|
||||
QueueUpCount = other.QueueUpCount;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
QueueUpCount = input.ReadInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
QueueUpCount = input.ReadInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MESSAGE_ID_LOGIN_SUCCESS
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class S2C_LoginSuccess : pb::IMessage<S2C_LoginSuccess>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<S2C_LoginSuccess> _parser = new pb::MessageParser<S2C_LoginSuccess>(() => new S2C_LoginSuccess());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<S2C_LoginSuccess> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::ServiceReflection.Descriptor.MessageTypes[2]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess(S2C_LoginSuccess other) : this() {
|
||||
instanceID_ = other.instanceID_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public S2C_LoginSuccess Clone() {
|
||||
return new S2C_LoginSuccess(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "InstanceID" field.</summary>
|
||||
public const int InstanceIDFieldNumber = 1;
|
||||
private int instanceID_;
|
||||
/// <summary>
|
||||
/// 副本ID
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int InstanceID {
|
||||
get { return instanceID_; }
|
||||
set {
|
||||
instanceID_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as S2C_LoginSuccess);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(S2C_LoginSuccess other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (InstanceID != other.InstanceID) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (InstanceID != 0) hash ^= InstanceID.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (InstanceID != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(InstanceID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (InstanceID != 0) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt32(InstanceID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (InstanceID != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt32Size(InstanceID);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(S2C_LoginSuccess other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.InstanceID != 0) {
|
||||
InstanceID = other.InstanceID;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
InstanceID = input.ReadInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
InstanceID = input.ReadInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#endregion Designer generated code
|
||||
@@ -0,0 +1,62 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v4.25.1
|
||||
// source: sc_common.proto
|
||||
|
||||
package sc_common
|
||||
|
||||
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_sc_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_sc_common_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x73, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x42, 0x1b, 0x5a, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2f, 0x73, 0x63, 0x2f, 0x73, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_sc_common_proto_goTypes = []interface{}{}
|
||||
var file_sc_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_sc_common_proto_init() }
|
||||
func file_sc_common_proto_init() {
|
||||
if File_sc_common_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_sc_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_sc_common_proto_goTypes,
|
||||
DependencyIndexes: file_sc_common_proto_depIdxs,
|
||||
}.Build()
|
||||
File_sc_common_proto = out.File
|
||||
file_sc_common_proto_rawDesc = nil
|
||||
file_sc_common_proto_goTypes = nil
|
||||
file_sc_common_proto_depIdxs = nil
|
||||
}
|
||||
525
Proto/ServerClient/gen/common/proto/sc/sc_pb/action.pb.go
Normal file
525
Proto/ServerClient/gen/common/proto/sc/sc_pb/action.pb.go
Normal file
@@ -0,0 +1,525 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v4.25.1
|
||||
// source: action.proto
|
||||
|
||||
package sc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/sc/sc_common"
|
||||
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_ACTION
|
||||
type ActionID int32
|
||||
|
||||
const (
|
||||
ActionID_ACTION_ID_INVALID ActionID = 0
|
||||
ActionID_ACTION_ID_MOVE ActionID = 1 // 移动
|
||||
ActionID_ACTION_ID_ATTACK ActionID = 2 // 攻击
|
||||
)
|
||||
|
||||
// Enum value maps for ActionID.
|
||||
var (
|
||||
ActionID_name = map[int32]string{
|
||||
0: "ACTION_ID_INVALID",
|
||||
1: "ACTION_ID_MOVE",
|
||||
2: "ACTION_ID_ATTACK",
|
||||
}
|
||||
ActionID_value = map[string]int32{
|
||||
"ACTION_ID_INVALID": 0,
|
||||
"ACTION_ID_MOVE": 1,
|
||||
"ACTION_ID_ATTACK": 2,
|
||||
}
|
||||
)
|
||||
|
||||
func (x ActionID) Enum() *ActionID {
|
||||
p := new(ActionID)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x ActionID) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (ActionID) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_action_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (ActionID) Type() protoreflect.EnumType {
|
||||
return &file_action_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x ActionID) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ActionID.Descriptor instead.
|
||||
func (ActionID) EnumDescriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// MESSAGE_ID_ENTER_INSTANCE
|
||||
type C2S_EnterInstance struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
InstanceID int32 `protobuf:"varint,1,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"`
|
||||
}
|
||||
|
||||
func (x *C2S_EnterInstance) Reset() {
|
||||
*x = C2S_EnterInstance{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_action_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *C2S_EnterInstance) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*C2S_EnterInstance) ProtoMessage() {}
|
||||
|
||||
func (x *C2S_EnterInstance) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_action_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_EnterInstance.ProtoReflect.Descriptor instead.
|
||||
func (*C2S_EnterInstance) Descriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *C2S_EnterInstance) GetInstanceID() int32 {
|
||||
if x != nil {
|
||||
return x.InstanceID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type S2C_EnterInstance struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info *PositionInfo `protobuf:"bytes,1,opt,name=Info,proto3" json:"Info,omitempty"`
|
||||
}
|
||||
|
||||
func (x *S2C_EnterInstance) Reset() {
|
||||
*x = S2C_EnterInstance{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_action_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *S2C_EnterInstance) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*S2C_EnterInstance) ProtoMessage() {}
|
||||
|
||||
func (x *S2C_EnterInstance) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_action_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_EnterInstance.ProtoReflect.Descriptor instead.
|
||||
func (*S2C_EnterInstance) Descriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *S2C_EnterInstance) GetInfo() *PositionInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type C2S_Action struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Sequence uint32 `protobuf:"varint,1,opt,name=Sequence,proto3" json:"Sequence,omitempty"` // 指令序号
|
||||
Timestamp int64 `protobuf:"varint,2,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // 时间戳(毫秒)
|
||||
Action ActionID `protobuf:"varint,3,opt,name=Action,proto3,enum=ActionID" json:"Action,omitempty"` // 指令ID
|
||||
DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×100 缩放)
|
||||
DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×100 缩放)
|
||||
SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
|
||||
}
|
||||
|
||||
func (x *C2S_Action) Reset() {
|
||||
*x = C2S_Action{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_action_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *C2S_Action) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*C2S_Action) ProtoMessage() {}
|
||||
|
||||
func (x *C2S_Action) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_action_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_Action.ProtoReflect.Descriptor instead.
|
||||
func (*C2S_Action) Descriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetSequence() uint32 {
|
||||
if x != nil {
|
||||
return x.Sequence
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetTimestamp() int64 {
|
||||
if x != nil {
|
||||
return x.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetAction() ActionID {
|
||||
if x != nil {
|
||||
return x.Action
|
||||
}
|
||||
return ActionID_ACTION_ID_INVALID
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetDirX() int32 {
|
||||
if x != nil {
|
||||
return x.DirX
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetDirY() int32 {
|
||||
if x != nil {
|
||||
return x.DirY
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *C2S_Action) GetSkillID() int32 {
|
||||
if x != nil {
|
||||
return x.SkillID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// MESSAGE_ID_POSITION
|
||||
type PositionInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
X int32 `protobuf:"zigzag32,2,opt,name=X,proto3" json:"X,omitempty"`
|
||||
Y int32 `protobuf:"zigzag32,3,opt,name=Y,proto3" json:"Y,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PositionInfo) Reset() {
|
||||
*x = PositionInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_action_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PositionInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PositionInfo) ProtoMessage() {}
|
||||
|
||||
func (x *PositionInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_action_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 PositionInfo.ProtoReflect.Descriptor instead.
|
||||
func (*PositionInfo) Descriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *PositionInfo) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PositionInfo) GetX() int32 {
|
||||
if x != nil {
|
||||
return x.X
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *PositionInfo) GetY() int32 {
|
||||
if x != nil {
|
||||
return x.Y
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type S2C_Position struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Info []*PositionInfo `protobuf:"bytes,1,rep,name=Info,proto3" json:"Info,omitempty"`
|
||||
}
|
||||
|
||||
func (x *S2C_Position) Reset() {
|
||||
*x = S2C_Position{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_action_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *S2C_Position) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*S2C_Position) ProtoMessage() {}
|
||||
|
||||
func (x *S2C_Position) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_action_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_Position.ProtoReflect.Descriptor instead.
|
||||
func (*S2C_Position) Descriptor() ([]byte, []int) {
|
||||
return file_action_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *S2C_Position) GetInfo() []*PositionInfo {
|
||||
if x != nil {
|
||||
return x.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_action_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_action_proto_rawDesc = []byte{
|
||||
0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f,
|
||||
0x73, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
|
||||
0x33, 0x0a, 0x11, 0x43, 0x32, 0x53, 0x5f, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74,
|
||||
0x61, 0x6e, 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x49, 0x44, 0x22, 0x36, 0x0a, 0x11, 0x53, 0x32, 0x43, 0x5f, 0x45, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xab, 0x01, 0x0a,
|
||||
0x0a, 0x43, 0x32, 0x53, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x53,
|
||||
0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x53,
|
||||
0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73,
|
||||
0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
|
||||
0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x69, 0x72, 0x58,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x44, 0x69, 0x72, 0x59, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x59,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x3c, 0x0a, 0x0c, 0x50, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53,
|
||||
0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x55, 0x53, 0x4e, 0x12, 0x0c, 0x0a, 0x01,
|
||||
0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x58, 0x12, 0x0c, 0x0a, 0x01, 0x59, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x01, 0x59, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x32, 0x43, 0x5f,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0x4b, 0x0a, 0x08, 0x41,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x43, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x12,
|
||||
0x0a, 0x0e, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x4d, 0x4f, 0x56, 0x45,
|
||||
0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x5f,
|
||||
0x41, 0x54, 0x54, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x42, 0x17, 0x5a, 0x15, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x63, 0x2f, 0x73, 0x63, 0x5f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_action_proto_rawDescOnce sync.Once
|
||||
file_action_proto_rawDescData = file_action_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_action_proto_rawDescGZIP() []byte {
|
||||
file_action_proto_rawDescOnce.Do(func() {
|
||||
file_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_action_proto_rawDescData)
|
||||
})
|
||||
return file_action_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_action_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_action_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_action_proto_goTypes = []interface{}{
|
||||
(ActionID)(0), // 0: ActionID
|
||||
(*C2S_EnterInstance)(nil), // 1: C2S_EnterInstance
|
||||
(*S2C_EnterInstance)(nil), // 2: S2C_EnterInstance
|
||||
(*C2S_Action)(nil), // 3: C2S_Action
|
||||
(*PositionInfo)(nil), // 4: PositionInfo
|
||||
(*S2C_Position)(nil), // 5: S2C_Position
|
||||
}
|
||||
var file_action_proto_depIdxs = []int32{
|
||||
4, // 0: S2C_EnterInstance.Info:type_name -> PositionInfo
|
||||
0, // 1: C2S_Action.Action:type_name -> ActionID
|
||||
4, // 2: S2C_Position.Info:type_name -> PositionInfo
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_action_proto_init() }
|
||||
func file_action_proto_init() {
|
||||
if File_action_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*C2S_EnterInstance); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_action_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*S2C_EnterInstance); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_action_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*C2S_Action); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_action_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PositionInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_action_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*S2C_Position); 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_action_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_action_proto_goTypes,
|
||||
DependencyIndexes: file_action_proto_depIdxs,
|
||||
EnumInfos: file_action_proto_enumTypes,
|
||||
MessageInfos: file_action_proto_msgTypes,
|
||||
}.Build()
|
||||
File_action_proto = out.File
|
||||
file_action_proto_rawDesc = nil
|
||||
file_action_proto_goTypes = nil
|
||||
file_action_proto_depIdxs = nil
|
||||
}
|
||||
231
Proto/ServerClient/gen/common/proto/sc/sc_pb/define.pb.go
Normal file
231
Proto/ServerClient/gen/common/proto/sc/sc_pb/define.pb.go
Normal file
@@ -0,0 +1,231 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v4.25.1
|
||||
// source: define.proto
|
||||
|
||||
package sc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/sc/sc_common"
|
||||
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_ENTER_INSTANCE MessageID = 101 // 进入副本
|
||||
MessageID_MESSAGE_ID_ACTION MessageID = 102 // 指令
|
||||
MessageID_MESSAGE_ID_POSITION MessageID = 103 // 位置更新
|
||||
)
|
||||
|
||||
// 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",
|
||||
101: "MESSAGE_ID_ENTER_INSTANCE",
|
||||
102: "MESSAGE_ID_ACTION",
|
||||
103: "MESSAGE_ID_POSITION",
|
||||
}
|
||||
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_ENTER_INSTANCE": 101,
|
||||
"MESSAGE_ID_ACTION": 102,
|
||||
"MESSAGE_ID_POSITION": 103,
|
||||
}
|
||||
)
|
||||
|
||||
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, 0x63, 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, 0xc2, 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, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47,
|
||||
0x45, 0x5f, 0x49, 0x44, 0x5f, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41,
|
||||
0x4e, 0x43, 0x45, 0x10, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45,
|
||||
0x5f, 0x49, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x66, 0x12, 0x17, 0x0a, 0x13,
|
||||
0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x44, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54,
|
||||
0x49, 0x4f, 0x4e, 0x10, 0x67, 0x42, 0x17, 0x5a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x63, 0x2f, 0x73, 0x63, 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
|
||||
}
|
||||
348
Proto/ServerClient/gen/common/proto/sc/sc_pb/service.pb.go
Normal file
348
Proto/ServerClient/gen/common/proto/sc/sc_pb/service.pb.go
Normal file
@@ -0,0 +1,348 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v4.25.1
|
||||
// source: service.proto
|
||||
|
||||
package sc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/sc/sc_common"
|
||||
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
|
||||
|
||||
InstanceID int32 `protobuf:"varint,1,opt,name=InstanceID,proto3" json:"InstanceID,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) GetInstanceID() int32 {
|
||||
if x != nil {
|
||||
return x.InstanceID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
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, 0x63, 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, 0x32,
|
||||
0x0a, 0x10, 0x53, 0x32, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x75, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x44,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x49, 0x44, 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, 0x17, 0x5a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x63, 0x2f, 0x73, 0x63, 0x5f, 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, 3)
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_service_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
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
|
||||
}
|
||||
14
Proto/ServerClient/gen_proto.bat
Normal file
14
Proto/ServerClient/gen_proto.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
|
||||
if not exist "./gen" (
|
||||
mkdir "./gen"
|
||||
)
|
||||
|
||||
protoc --proto_path=./sources --go_out=./gen ./sources/*.proto
|
||||
@REM xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
|
||||
|
||||
if not exist "./gen/client" (
|
||||
mkdir "./gen/client"
|
||||
)
|
||||
protoc --proto_path=./sources --csharp_out=./gen/client ./sources/*.proto
|
||||
@REM xcopy "./gen/client" "../../../Client/Point/Assets/Scripts/Proto" /E /I /Y /Q
|
||||
37
Proto/ServerClient/sources/action.proto
Normal file
37
Proto/ServerClient/sources/action.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_common.proto";
|
||||
|
||||
// MESSAGE_ID_ENTER_INSTANCE
|
||||
message C2S_EnterInstance {
|
||||
int32 InstanceID = 1;
|
||||
}
|
||||
message S2C_EnterInstance {
|
||||
PositionInfo Info = 1;
|
||||
}
|
||||
|
||||
// MESSAGE_ID_ACTION
|
||||
enum ActionID {
|
||||
ACTION_ID_INVALID = 0;
|
||||
ACTION_ID_MOVE = 1; // 移动
|
||||
ACTION_ID_ATTACK = 2; // 攻击
|
||||
}
|
||||
message C2S_Action {
|
||||
uint32 Sequence = 1; // 指令序号
|
||||
int64 Timestamp = 2; // 时间戳(毫秒)
|
||||
ActionID Action = 3; // 指令ID
|
||||
sint32 DirX = 4; // 移动-X方向(×100 缩放)
|
||||
sint32 DirY = 5; // 移动-Y方向(×100 缩放)
|
||||
int32 SkillID = 6; // 攻击-技能ID
|
||||
}
|
||||
|
||||
// MESSAGE_ID_POSITION
|
||||
message PositionInfo {
|
||||
int64 USN = 1;
|
||||
sint32 X = 2;
|
||||
sint32 Y = 3;
|
||||
}
|
||||
message S2C_Position {
|
||||
repeated PositionInfo Info = 1;
|
||||
}
|
||||
19
Proto/ServerClient/sources/define.proto
Normal file
19
Proto/ServerClient/sources/define.proto
Normal file
@@ -0,0 +1,19 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_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_ENTER_INSTANCE = 101; // 进入副本
|
||||
MESSAGE_ID_ACTION = 102; // 指令
|
||||
MESSAGE_ID_POSITION = 103; // 位置更新
|
||||
}
|
||||
|
||||
message Message {
|
||||
MessageID ID = 1;
|
||||
bytes Payload = 2;
|
||||
}
|
||||
3
Proto/ServerClient/sources/sc_common.proto
Normal file
3
Proto/ServerClient/sources/sc_common.proto
Normal file
@@ -0,0 +1,3 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_common";
|
||||
27
Proto/ServerClient/sources/service.proto
Normal file
27
Proto/ServerClient/sources/service.proto
Normal file
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/sc/sc_pb";
|
||||
import "sc_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 {
|
||||
int32 InstanceID = 1; // 副本ID
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
// 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 grpc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/ss/ss_common"
|
||||
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 ToClientReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
MessageID int32 `protobuf:"varint,2,opt,name=MessageID,proto3" json:"MessageID,omitempty"`
|
||||
Payload []byte `protobuf:"bytes,3,opt,name=Payload,proto3" json:"Payload,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ToClientReq) Reset() {
|
||||
*x = ToClientReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_gateway_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ToClientReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ToClientReq) ProtoMessage() {}
|
||||
|
||||
func (x *ToClientReq) 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 ToClientReq.ProtoReflect.Descriptor instead.
|
||||
func (*ToClientReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ToClientReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ToClientReq) GetMessageID() int32 {
|
||||
if x != nil {
|
||||
return x.MessageID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ToClientReq) GetPayload() []byte {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ToClientResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ToClientResp) Reset() {
|
||||
*x = ToClientResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_gateway_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ToClientResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ToClientResp) ProtoMessage() {}
|
||||
|
||||
func (x *ToClientResp) 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 ToClientResp.ProtoReflect.Descriptor instead.
|
||||
func (*ToClientResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type KickUserReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"`
|
||||
}
|
||||
|
||||
func (x *KickUserReq) Reset() {
|
||||
*x = KickUserReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_gateway_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *KickUserReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KickUserReq) ProtoMessage() {}
|
||||
|
||||
func (x *KickUserReq) 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 KickUserReq.ProtoReflect.Descriptor instead.
|
||||
func (*KickUserReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *KickUserReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type KickUserResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *KickUserResp) Reset() {
|
||||
*x = KickUserResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_gateway_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *KickUserResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*KickUserResp) ProtoMessage() {}
|
||||
|
||||
func (x *KickUserResp) 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 KickUserResp.ProtoReflect.Descriptor instead.
|
||||
func (*KickUserResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_gateway_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
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, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 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, 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, 0x0e, 0x0a, 0x0c, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x1f, 0x0a, 0x0b, 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, 0x22, 0x0e, 0x0a, 0x0c, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x32, 0x61, 0x0a, 0x07, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2b, 0x0a,
|
||||
0x08, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x54, 0x6f, 0x43, 0x6c,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x54, 0x6f, 0x43, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x12, 0x29, 0x0a, 0x08, 0x4b, 0x69,
|
||||
0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0c, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x1a, 0x0d, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52,
|
||||
0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x19, 0x5a, 0x17, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 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, 4)
|
||||
var file_service_gateway_proto_goTypes = []interface{}{
|
||||
(*ToClientReq)(nil), // 0: ToClientReq
|
||||
(*ToClientResp)(nil), // 1: ToClientResp
|
||||
(*KickUserReq)(nil), // 2: KickUserReq
|
||||
(*KickUserResp)(nil), // 3: KickUserResp
|
||||
}
|
||||
var file_service_gateway_proto_depIdxs = []int32{
|
||||
0, // 0: Gateway.ToClient:input_type -> ToClientReq
|
||||
2, // 1: Gateway.KickUser:input_type -> KickUserReq
|
||||
1, // 2: Gateway.ToClient:output_type -> ToClientResp
|
||||
3, // 3: Gateway.KickUser:output_type -> KickUserResp
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] 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.(*ToClientReq); 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.(*ToClientResp); 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.(*KickUserReq); 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.(*KickUserResp); 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: 4,
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
// 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 grpc_pb
|
||||
|
||||
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 {
|
||||
// 发送消息到客户端
|
||||
ToClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_ToClientClient, error)
|
||||
KickUser(ctx context.Context, in *KickUserReq, opts ...grpc.CallOption) (*KickUserResp, error)
|
||||
}
|
||||
|
||||
type gatewayClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient {
|
||||
return &gatewayClient{cc}
|
||||
}
|
||||
|
||||
func (c *gatewayClient) ToClient(ctx context.Context, opts ...grpc.CallOption) (Gateway_ToClientClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Gateway_ServiceDesc.Streams[0], "/Gateway/ToClient", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &gatewayToClientClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Gateway_ToClientClient interface {
|
||||
Send(*ToClientReq) error
|
||||
CloseAndRecv() (*ToClientResp, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type gatewayToClientClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *gatewayToClientClient) Send(m *ToClientReq) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *gatewayToClientClient) CloseAndRecv() (*ToClientResp, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(ToClientResp)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *gatewayClient) KickUser(ctx context.Context, in *KickUserReq, opts ...grpc.CallOption) (*KickUserResp, error) {
|
||||
out := new(KickUserResp)
|
||||
err := c.cc.Invoke(ctx, "/Gateway/KickUser", 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 {
|
||||
// 发送消息到客户端
|
||||
ToClient(Gateway_ToClientServer) error
|
||||
KickUser(context.Context, *KickUserReq) (*KickUserResp, error)
|
||||
mustEmbedUnimplementedGatewayServer()
|
||||
}
|
||||
|
||||
// UnimplementedGatewayServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedGatewayServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedGatewayServer) ToClient(Gateway_ToClientServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method ToClient not implemented")
|
||||
}
|
||||
func (UnimplementedGatewayServer) KickUser(context.Context, *KickUserReq) (*KickUserResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method KickUser 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_ToClient_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(GatewayServer).ToClient(&gatewayToClientServer{stream})
|
||||
}
|
||||
|
||||
type Gateway_ToClientServer interface {
|
||||
SendAndClose(*ToClientResp) error
|
||||
Recv() (*ToClientReq, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type gatewayToClientServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *gatewayToClientServer) SendAndClose(m *ToClientResp) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *gatewayToClientServer) Recv() (*ToClientReq, error) {
|
||||
m := new(ToClientReq)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Gateway_KickUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KickUserReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GatewayServer).KickUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Gateway/KickUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GatewayServer).KickUser(ctx, req.(*KickUserReq))
|
||||
}
|
||||
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: "KickUser",
|
||||
Handler: _Gateway_KickUser_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "ToClient",
|
||||
Handler: _Gateway_ToClient_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "service_gateway.proto",
|
||||
}
|
||||
@@ -0,0 +1,554 @@
|
||||
// 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 grpc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/ss/ss_common"
|
||||
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 EnterReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
GatewaySID int64 `protobuf:"varint,2,opt,name=GatewaySID,proto3" json:"GatewaySID,omitempty"` // 网关服务ID
|
||||
InstanceID int32 `protobuf:"varint,3,opt,name=InstanceID,proto3" json:"InstanceID,omitempty"` // 副本ID
|
||||
}
|
||||
|
||||
func (x *EnterReq) Reset() {
|
||||
*x = EnterReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_scene_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EnterReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EnterReq) ProtoMessage() {}
|
||||
|
||||
func (x *EnterReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_scene_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 EnterReq.ProtoReflect.Descriptor instead.
|
||||
func (*EnterReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *EnterReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterReq) GetGatewaySID() int64 {
|
||||
if x != nil {
|
||||
return x.GatewaySID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterReq) GetInstanceID() int32 {
|
||||
if x != nil {
|
||||
return x.InstanceID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type EnterResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SceneSID int64 `protobuf:"varint,1,opt,name=SceneSID,proto3" json:"SceneSID,omitempty"` // 场景服务ID
|
||||
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
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 *EnterResp) Reset() {
|
||||
*x = EnterResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_scene_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *EnterResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*EnterResp) ProtoMessage() {}
|
||||
|
||||
func (x *EnterResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_scene_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 EnterResp.ProtoReflect.Descriptor instead.
|
||||
func (*EnterResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetSceneSID() int64 {
|
||||
if x != nil {
|
||||
return x.SceneSID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetUniqueNo() int64 {
|
||||
if x != nil {
|
||||
return x.UniqueNo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetMessageID() int32 {
|
||||
if x != nil {
|
||||
return x.MessageID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *EnterResp) GetPayload() []byte {
|
||||
if x != nil {
|
||||
return x.Payload
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type LeaveReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
UniqueNo int64 `protobuf:"varint,2,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
}
|
||||
|
||||
func (x *LeaveReq) Reset() {
|
||||
*x = LeaveReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_scene_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LeaveReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LeaveReq) ProtoMessage() {}
|
||||
|
||||
func (x *LeaveReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_scene_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 LeaveReq.ProtoReflect.Descriptor instead.
|
||||
func (*LeaveReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *LeaveReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LeaveReq) GetUniqueNo() int64 {
|
||||
if x != nil {
|
||||
return x.UniqueNo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type LeaveResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *LeaveResp) Reset() {
|
||||
*x = LeaveResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_scene_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LeaveResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LeaveResp) ProtoMessage() {}
|
||||
|
||||
func (x *LeaveResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_scene_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 LeaveResp.ProtoReflect.Descriptor instead.
|
||||
func (*LeaveResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type ActionReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
UniqueNo int64 `protobuf:"varint,1,opt,name=UniqueNo,proto3" json:"UniqueNo,omitempty"` // 副本唯一编号
|
||||
USN int64 `protobuf:"varint,2,opt,name=USN,proto3" json:"USN,omitempty"` // 用户ID
|
||||
Action int32 `protobuf:"varint,3,opt,name=Action,proto3" json:"Action,omitempty"` // 指令ID
|
||||
DirX int32 `protobuf:"zigzag32,4,opt,name=DirX,proto3" json:"DirX,omitempty"` // 移动-X方向(×1000 缩放)
|
||||
DirY int32 `protobuf:"zigzag32,5,opt,name=DirY,proto3" json:"DirY,omitempty"` // 移动-Y方向(×1000 缩放)
|
||||
SkillID int32 `protobuf:"varint,6,opt,name=SkillID,proto3" json:"SkillID,omitempty"` // 攻击-技能ID
|
||||
}
|
||||
|
||||
func (x *ActionReq) Reset() {
|
||||
*x = ActionReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_scene_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ActionReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ActionReq) ProtoMessage() {}
|
||||
|
||||
func (x *ActionReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_scene_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 ActionReq.ProtoReflect.Descriptor instead.
|
||||
func (*ActionReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetUniqueNo() int64 {
|
||||
if x != nil {
|
||||
return x.UniqueNo
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetAction() int32 {
|
||||
if x != nil {
|
||||
return x.Action
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetDirX() int32 {
|
||||
if x != nil {
|
||||
return x.DirX
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetDirY() int32 {
|
||||
if x != nil {
|
||||
return x.DirY
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ActionReq) GetSkillID() int32 {
|
||||
if x != nil {
|
||||
return x.SkillID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ActionResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ActionResp) Reset() {
|
||||
*x = ActionResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_scene_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ActionResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ActionResp) ProtoMessage() {}
|
||||
|
||||
func (x *ActionResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_service_scene_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 ActionResp.ProtoReflect.Descriptor instead.
|
||||
func (*ActionResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_scene_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
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, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x08, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53,
|
||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x79, 0x53, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x49, 0x44, 0x22, 0x7b, 0x0a, 0x09, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x49, 0x44, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 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, 0x38, 0x0a, 0x08, 0x4c, 0x65, 0x61, 0x76, 0x65, 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, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x4e, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x4c,
|
||||
0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x93, 0x01, 0x0a, 0x09, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||
0x4e, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x55, 0x6e, 0x69, 0x71, 0x75, 0x65,
|
||||
0x4e, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x03, 0x55, 0x53, 0x4e, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x44, 0x69, 0x72, 0x58, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04, 0x44, 0x69, 0x72, 0x58,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x44, 0x69, 0x72, 0x59, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x04,
|
||||
0x44, 0x69, 0x72, 0x59, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x44, 0x22, 0x0c,
|
||||
0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x32, 0x72, 0x0a, 0x05,
|
||||
0x53, 0x63, 0x65, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x09,
|
||||
0x2e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x45, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x20, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x76, 0x65,
|
||||
0x12, 0x09, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x4c, 0x65,
|
||||
0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x25, 0x0a, 0x06, 0x41, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
|
||||
0x0b, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01,
|
||||
0x42, 0x19, 0x5a, 0x17, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2f, 0x73, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_service_scene_proto_rawDescOnce sync.Once
|
||||
file_service_scene_proto_rawDescData = file_service_scene_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_service_scene_proto_rawDescGZIP() []byte {
|
||||
file_service_scene_proto_rawDescOnce.Do(func() {
|
||||
file_service_scene_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_scene_proto_rawDescData)
|
||||
})
|
||||
return file_service_scene_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_service_scene_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_service_scene_proto_goTypes = []interface{}{
|
||||
(*EnterReq)(nil), // 0: EnterReq
|
||||
(*EnterResp)(nil), // 1: EnterResp
|
||||
(*LeaveReq)(nil), // 2: LeaveReq
|
||||
(*LeaveResp)(nil), // 3: LeaveResp
|
||||
(*ActionReq)(nil), // 4: ActionReq
|
||||
(*ActionResp)(nil), // 5: ActionResp
|
||||
}
|
||||
var file_service_scene_proto_depIdxs = []int32{
|
||||
0, // 0: Scene.Enter:input_type -> EnterReq
|
||||
2, // 1: Scene.Leave:input_type -> LeaveReq
|
||||
4, // 2: Scene.Action:input_type -> ActionReq
|
||||
1, // 3: Scene.Enter:output_type -> EnterResp
|
||||
3, // 4: Scene.Leave:output_type -> LeaveResp
|
||||
5, // 5: Scene.Action:output_type -> ActionResp
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] 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
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_service_scene_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EnterReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_scene_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EnterResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_scene_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LeaveReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_scene_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LeaveResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_scene_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ActionReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_service_scene_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ActionResp); 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_scene_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_service_scene_proto_goTypes,
|
||||
DependencyIndexes: file_service_scene_proto_depIdxs,
|
||||
MessageInfos: file_service_scene_proto_msgTypes,
|
||||
}.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
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
// 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 grpc_pb
|
||||
|
||||
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
|
||||
|
||||
// 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 {
|
||||
Enter(ctx context.Context, in *EnterReq, opts ...grpc.CallOption) (*EnterResp, error)
|
||||
Leave(ctx context.Context, in *LeaveReq, opts ...grpc.CallOption) (*LeaveResp, error)
|
||||
Action(ctx context.Context, opts ...grpc.CallOption) (Scene_ActionClient, error)
|
||||
}
|
||||
|
||||
type sceneClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSceneClient(cc grpc.ClientConnInterface) SceneClient {
|
||||
return &sceneClient{cc}
|
||||
}
|
||||
|
||||
func (c *sceneClient) Enter(ctx context.Context, in *EnterReq, opts ...grpc.CallOption) (*EnterResp, error) {
|
||||
out := new(EnterResp)
|
||||
err := c.cc.Invoke(ctx, "/Scene/Enter", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sceneClient) Leave(ctx context.Context, in *LeaveReq, opts ...grpc.CallOption) (*LeaveResp, error) {
|
||||
out := new(LeaveResp)
|
||||
err := c.cc.Invoke(ctx, "/Scene/Leave", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *sceneClient) Action(ctx context.Context, opts ...grpc.CallOption) (Scene_ActionClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Scene_ServiceDesc.Streams[0], "/Scene/Action", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &sceneActionClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Scene_ActionClient interface {
|
||||
Send(*ActionReq) error
|
||||
CloseAndRecv() (*ActionResp, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type sceneActionClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *sceneActionClient) Send(m *ActionReq) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *sceneActionClient) CloseAndRecv() (*ActionResp, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(ActionResp)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SceneServer is the server API for Scene service.
|
||||
// All implementations must embed UnimplementedSceneServer
|
||||
// for forward compatibility
|
||||
type SceneServer interface {
|
||||
Enter(context.Context, *EnterReq) (*EnterResp, error)
|
||||
Leave(context.Context, *LeaveReq) (*LeaveResp, error)
|
||||
Action(Scene_ActionServer) error
|
||||
mustEmbedUnimplementedSceneServer()
|
||||
}
|
||||
|
||||
// UnimplementedSceneServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSceneServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedSceneServer) Enter(context.Context, *EnterReq) (*EnterResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Enter not implemented")
|
||||
}
|
||||
func (UnimplementedSceneServer) Leave(context.Context, *LeaveReq) (*LeaveResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Leave not implemented")
|
||||
}
|
||||
func (UnimplementedSceneServer) Action(Scene_ActionServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Action not implemented")
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
func _Scene_Enter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(EnterReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SceneServer).Enter(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Scene/Enter",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SceneServer).Enter(ctx, req.(*EnterReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Scene_Leave_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LeaveReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SceneServer).Leave(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Scene/Leave",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SceneServer).Leave(ctx, req.(*LeaveReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Scene_Action_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SceneServer).Action(&sceneActionServer{stream})
|
||||
}
|
||||
|
||||
type Scene_ActionServer interface {
|
||||
SendAndClose(*ActionResp) error
|
||||
Recv() (*ActionReq, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type sceneActionServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *sceneActionServer) SendAndClose(m *ActionResp) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *sceneActionServer) Recv() (*ActionReq, error) {
|
||||
m := new(ActionReq)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// 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{
|
||||
{
|
||||
MethodName: "Enter",
|
||||
Handler: _Scene_Enter_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Leave",
|
||||
Handler: _Scene_Leave_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Action",
|
||||
Handler: _Scene_Action_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "service_scene.proto",
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
// 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 grpc_pb
|
||||
|
||||
import (
|
||||
_ "common/proto/ss/ss_common"
|
||||
_ "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 LoginReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Phone string `protobuf:"bytes,1,opt,name=Phone,json=phone,proto3" json:"Phone,omitempty"` // 手机号
|
||||
Code string `protobuf:"bytes,2,opt,name=Code,json=code,proto3" json:"Code,omitempty"` // 验证码
|
||||
}
|
||||
|
||||
func (x *LoginReq) Reset() {
|
||||
*x = LoginReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LoginReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginReq) ProtoMessage() {}
|
||||
|
||||
func (x *LoginReq) 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 LoginReq.ProtoReflect.Descriptor instead.
|
||||
func (*LoginReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *LoginReq) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *LoginReq) GetCode() string {
|
||||
if x != nil {
|
||||
return x.Code
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoginResp 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
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"` // 用户名
|
||||
}
|
||||
|
||||
func (x *LoginResp) Reset() {
|
||||
*x = LoginResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *LoginResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*LoginResp) ProtoMessage() {}
|
||||
|
||||
func (x *LoginResp) 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 LoginResp.ProtoReflect.Descriptor instead.
|
||||
func (*LoginResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *LoginResp) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *LoginResp) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetUserInfoReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetUserInfoReq) Reset() {
|
||||
*x = GetUserInfoReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserInfoReq) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoReq) 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 GetUserInfoReq.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoReq) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoReq) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetUserInfoResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
USN int64 `protobuf:"varint,1,opt,name=USN,json=usn,proto3" json:"USN,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=Name,json=name,proto3" json:"Name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResp) Reset() {
|
||||
*x = GetUserInfoResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_service_user_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserInfoResp) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoResp) 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 GetUserInfoResp.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoResp) Descriptor() ([]byte, []int) {
|
||||
return file_service_user_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResp) GetUSN() int64 {
|
||||
if x != nil {
|
||||
return x.USN
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResp) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
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, 0x73, 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, 0x34, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 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, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x31, 0x0a, 0x09, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x22, 0x0a, 0x0e,
|
||||
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x73, 0x6e,
|
||||
0x22, 0x37, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x53, 0x4e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x03, 0x75, 0x73, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0x71, 0x0a, 0x04, 0x55, 0x73, 0x65,
|
||||
0x72, 0x12, 0x20, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x09, 0x2e, 0x4c, 0x6f, 0x67,
|
||||
0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x0a, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73,
|
||||
0x70, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x3a, 0x01, 0x2a,
|
||||
0x22, 0x0a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0x19, 0x5a, 0x17,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f,
|
||||
0x67, 0x72, 0x70, 0x63, 0x5f, 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, 4)
|
||||
var file_service_user_proto_goTypes = []interface{}{
|
||||
(*LoginReq)(nil), // 0: LoginReq
|
||||
(*LoginResp)(nil), // 1: LoginResp
|
||||
(*GetUserInfoReq)(nil), // 2: GetUserInfoReq
|
||||
(*GetUserInfoResp)(nil), // 3: GetUserInfoResp
|
||||
}
|
||||
var file_service_user_proto_depIdxs = []int32{
|
||||
0, // 0: User.Login:input_type -> LoginReq
|
||||
2, // 1: User.GetUserInfo:input_type -> GetUserInfoReq
|
||||
1, // 2: User.Login:output_type -> LoginResp
|
||||
3, // 3: User.GetUserInfo:output_type -> GetUserInfoResp
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] 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.(*LoginReq); 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.(*LoginResp); 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.(*GetUserInfoReq); 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.(*GetUserInfoResp); 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: 4,
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: service_user.proto
|
||||
|
||||
/*
|
||||
Package grpc_pb is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package grpc_pb
|
||||
|
||||
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_GetUserInfo_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetUserInfoReq
|
||||
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.GetUserInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
func local_request_User_GetUserInfo_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var (
|
||||
protoReq GetUserInfoReq
|
||||
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.GetUserInfo(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_GetUserInfo_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/GetUserInfo", runtime.WithHTTPPathPattern("/user/info"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_User_GetUserInfo_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_GetUserInfo_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_GetUserInfo_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/GetUserInfo", runtime.WithHTTPPathPattern("/user/info"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_User_GetUserInfo_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_GetUserInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_User_GetUserInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"user", "info"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_User_GetUserInfo_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
@@ -0,0 +1,141 @@
|
||||
// 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 grpc_pb
|
||||
|
||||
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 {
|
||||
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
|
||||
GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
||||
}
|
||||
|
||||
type userClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserClient(cc grpc.ClientConnInterface) UserClient {
|
||||
return &userClient{cc}
|
||||
}
|
||||
|
||||
func (c *userClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) {
|
||||
out := new(LoginResp)
|
||||
err := c.cc.Invoke(ctx, "/User/Login", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
|
||||
out := new(GetUserInfoResp)
|
||||
err := c.cc.Invoke(ctx, "/User/GetUserInfo", 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 {
|
||||
Login(context.Context, *LoginReq) (*LoginResp, error)
|
||||
GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error)
|
||||
mustEmbedUnimplementedUserServer()
|
||||
}
|
||||
|
||||
// UnimplementedUserServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedUserServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedUserServer) Login(context.Context, *LoginReq) (*LoginResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo 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_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LoginReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).Login(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/User/Login",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).Login(ctx, req.(*LoginReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUserInfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).GetUserInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/User/GetUserInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).GetUserInfo(ctx, req.(*GetUserInfoReq))
|
||||
}
|
||||
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: "Login",
|
||||
Handler: _User_Login_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserInfo",
|
||||
Handler: _User_GetUserInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "service_user.proto",
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
// 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 ss_common
|
||||
|
||||
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 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_ss_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_ss_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_ss_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 ""
|
||||
}
|
||||
|
||||
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, 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, 0x42, 0x1b, 0x5a, 0x19, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x73, 0x2f, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_ss_common_proto_rawDescOnce sync.Once
|
||||
file_ss_common_proto_rawDescData = file_ss_common_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_ss_common_proto_rawDescGZIP() []byte {
|
||||
file_ss_common_proto_rawDescOnce.Do(func() {
|
||||
file_ss_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_ss_common_proto_rawDescData)
|
||||
})
|
||||
return file_ss_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ss_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_ss_common_proto_goTypes = []interface{}{
|
||||
(*ErrorInfo)(nil), // 0: ErrorInfo
|
||||
}
|
||||
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
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_ss_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
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_ss_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_ss_common_proto_goTypes,
|
||||
DependencyIndexes: file_ss_common_proto_depIdxs,
|
||||
MessageInfos: file_ss_common_proto_msgTypes,
|
||||
}.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
|
||||
}
|
||||
55
Proto/ServerInternal/gen/service_gateway.swagger.json
Normal file
55
Proto/ServerInternal/gen/service_gateway.swagger.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "service_gateway.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Gateway"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"KickUserResp": {
|
||||
"type": "object"
|
||||
},
|
||||
"ToClientResp": {
|
||||
"type": "object"
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Proto/ServerInternal/gen/service_scene.swagger.json
Normal file
80
Proto/ServerInternal/gen/service_scene.swagger.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "service_scene.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Scene"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"ActionResp": {
|
||||
"type": "object"
|
||||
},
|
||||
"EnterResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"SceneSID": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "场景服务ID"
|
||||
},
|
||||
"UniqueNo": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "副本唯一编号"
|
||||
},
|
||||
"MessageID": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"title": "发送给客户端的消息ID"
|
||||
},
|
||||
"Payload": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"title": "消息负载"
|
||||
}
|
||||
}
|
||||
},
|
||||
"LeaveResp": {
|
||||
"type": "object"
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
Proto/ServerInternal/gen/service_user.swagger.json
Normal file
117
Proto/ServerInternal/gen/service_user.swagger.json
Normal file
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "service_user.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "User"
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/user/info": {
|
||||
"post": {
|
||||
"operationId": "User_GetUserInfo",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetUserInfoResp"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetUserInfoReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"User"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"GetUserInfoReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetUserInfoResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"LoginResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"usn": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "用户ID"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "用户名"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Proto/ServerInternal/gen/ss_common.swagger.json
Normal file
44
Proto/ServerInternal/gen/ss_common.swagger.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "ss_common.proto",
|
||||
"version": "version not set"
|
||||
},
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {},
|
||||
"definitions": {
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
Proto/ServerInternal/gen_proto.bat
Normal file
14
Proto/ServerInternal/gen_proto.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
|
||||
if not exist "./gen" (
|
||||
mkdir "./gen"
|
||||
)
|
||||
|
||||
protoc ^
|
||||
--proto_path=./sources ^
|
||||
--go_out=./gen ^
|
||||
--go-grpc_out=./gen ^
|
||||
--grpc-gateway_out=./gen ^
|
||||
--openapiv2_out=./gen ^
|
||||
./sources/*.proto
|
||||
@REM xcopy "./gen/common" "../../../Server/common" /E /I /Y /Q
|
||||
31
Proto/ServerInternal/sources/google/api/annotations.proto
Normal file
31
Proto/ServerInternal/sources/google/api/annotations.proto
Normal file
@@ -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;
|
||||
}
|
||||
370
Proto/ServerInternal/sources/google/api/http.proto
Normal file
370
Proto/ServerInternal/sources/google/api/http.proto
Normal file
@@ -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;
|
||||
}
|
||||
162
Proto/ServerInternal/sources/google/protobuf/any.proto
Normal file
162
Proto/ServerInternal/sources/google/protobuf/any.proto
Normal file
@@ -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": <string>,
|
||||
// "lastName": <string>
|
||||
// }
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
1448
Proto/ServerInternal/sources/google/protobuf/descriptor.proto
Normal file
1448
Proto/ServerInternal/sources/google/protobuf/descriptor.proto
Normal file
File diff suppressed because it is too large
Load Diff
26
Proto/ServerInternal/sources/service_gateway.proto
Normal file
26
Proto/ServerInternal/sources/service_gateway.proto
Normal file
@@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/ss/grpc_pb";
|
||||
import "ss_common.proto";
|
||||
|
||||
service Gateway {
|
||||
// 发送消息到客户端
|
||||
rpc ToClient(stream ToClientReq) returns (ToClientResp) {}
|
||||
rpc KickUser(KickUserReq) returns (KickUserResp) {}
|
||||
}
|
||||
|
||||
message ToClientReq {
|
||||
int64 USN = 1;
|
||||
int32 MessageID = 2;
|
||||
bytes Payload = 3;
|
||||
}
|
||||
|
||||
message ToClientResp {
|
||||
}
|
||||
|
||||
message KickUserReq {
|
||||
int64 USN = 1;
|
||||
}
|
||||
|
||||
message KickUserResp {
|
||||
}
|
||||
43
Proto/ServerInternal/sources/service_scene.proto
Normal file
43
Proto/ServerInternal/sources/service_scene.proto
Normal file
@@ -0,0 +1,43 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/ss/grpc_pb";
|
||||
import "ss_common.proto";
|
||||
|
||||
service Scene {
|
||||
rpc Enter(EnterReq) returns (EnterResp) {}
|
||||
rpc Leave(LeaveReq) returns (LeaveResp) {}
|
||||
rpc Action(stream ActionReq) returns (ActionResp) {}
|
||||
}
|
||||
|
||||
message EnterReq {
|
||||
int64 USN = 1; // 用户ID
|
||||
int64 GatewaySID = 2; // 网关服务ID
|
||||
int32 InstanceID = 3; // 副本ID
|
||||
}
|
||||
|
||||
message EnterResp {
|
||||
int64 SceneSID = 1; // 场景服务ID
|
||||
int64 UniqueNo = 2; // 副本唯一编号
|
||||
int32 MessageID = 3; // 发送给客户端的消息ID
|
||||
bytes Payload = 4; // 消息负载
|
||||
}
|
||||
|
||||
message LeaveReq {
|
||||
int64 USN = 1; // 用户ID
|
||||
int64 UniqueNo = 2; // 副本唯一编号
|
||||
}
|
||||
|
||||
message LeaveResp {
|
||||
}
|
||||
|
||||
message ActionReq {
|
||||
int64 UniqueNo = 1; // 副本唯一编号
|
||||
int64 USN = 2; // 用户ID
|
||||
int32 Action = 3; // 指令ID
|
||||
sint32 DirX = 4; // 移动-X方向(×1000 缩放)
|
||||
sint32 DirY = 5; // 移动-Y方向(×1000 缩放)
|
||||
int32 SkillID = 6; // 攻击-技能ID
|
||||
}
|
||||
|
||||
message ActionResp {
|
||||
}
|
||||
34
Proto/ServerInternal/sources/service_user.proto
Normal file
34
Proto/ServerInternal/sources/service_user.proto
Normal file
@@ -0,0 +1,34 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/ss/grpc_pb";
|
||||
import "ss_common.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
service User {
|
||||
rpc Login(LoginReq) returns (LoginResp) {}
|
||||
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
|
||||
option (google.api.http) = {
|
||||
post: "/user/info"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message LoginReq {
|
||||
string Phone = 1 [json_name = "phone"]; // 手机号
|
||||
string Code = 2 [json_name = "code"]; // 验证码
|
||||
}
|
||||
|
||||
message LoginResp {
|
||||
int64 USN = 1 [json_name = "usn"]; // 用户ID
|
||||
string Name = 2 [json_name = "name"]; // 用户名
|
||||
}
|
||||
|
||||
message GetUserInfoReq {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
}
|
||||
|
||||
message GetUserInfoResp {
|
||||
int64 USN = 1 [json_name = "usn"];
|
||||
string Name = 2 [json_name = "name"];
|
||||
}
|
||||
8
Proto/ServerInternal/sources/ss_common.proto
Normal file
8
Proto/ServerInternal/sources/ss_common.proto
Normal file
@@ -0,0 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "common/proto/ss/ss_common";
|
||||
|
||||
message ErrorInfo {
|
||||
int32 Code = 1;
|
||||
string Msg = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user