461 lines
12 KiB
Go
461 lines
12 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.31.0
|
|
// source: login.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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 ReqUserLogin struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 用户名
|
|
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 密码或token
|
|
Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
|
|
DeviceId string `protobuf:"bytes,4,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // 设备id
|
|
Version string `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` // 版本
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ReqUserLogin) Reset() {
|
|
*x = ReqUserLogin{}
|
|
mi := &file_login_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ReqUserLogin) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ReqUserLogin) ProtoMessage() {}
|
|
|
|
func (x *ReqUserLogin) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ReqUserLogin.ProtoReflect.Descriptor instead.
|
|
func (*ReqUserLogin) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *ReqUserLogin) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReqUserLogin) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReqUserLogin) GetIp() string {
|
|
if x != nil {
|
|
return x.Ip
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReqUserLogin) GetDeviceId() string {
|
|
if x != nil {
|
|
return x.DeviceId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ReqUserLogin) GetVersion() string {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RspUserLogin struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrCode" json:"code,omitempty"`
|
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` // token
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RspUserLogin) Reset() {
|
|
*x = RspUserLogin{}
|
|
mi := &file_login_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RspUserLogin) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RspUserLogin) ProtoMessage() {}
|
|
|
|
func (x *RspUserLogin) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RspUserLogin.ProtoReflect.Descriptor instead.
|
|
func (*RspUserLogin) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *RspUserLogin) GetCode() ErrCode {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return ErrCode_OK
|
|
}
|
|
|
|
func (x *RspUserLogin) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RspUserLogin) GetToken() string {
|
|
if x != nil {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 上线通知
|
|
type NtfUserOnline struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *NtfUserOnline) Reset() {
|
|
*x = NtfUserOnline{}
|
|
mi := &file_login_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *NtfUserOnline) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*NtfUserOnline) ProtoMessage() {}
|
|
|
|
func (x *NtfUserOnline) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use NtfUserOnline.ProtoReflect.Descriptor instead.
|
|
func (*NtfUserOnline) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *NtfUserOnline) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 通知玩家在哪些服务里,方便玩家重进这些服务,重连使用
|
|
type NtfUserInService struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ServiceNames []string `protobuf:"bytes,3,rep,name=serviceNames,proto3" json:"serviceNames,omitempty"` // 玩家所在玩法的服务名
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *NtfUserInService) Reset() {
|
|
*x = NtfUserInService{}
|
|
mi := &file_login_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *NtfUserInService) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*NtfUserInService) ProtoMessage() {}
|
|
|
|
func (x *NtfUserInService) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use NtfUserInService.ProtoReflect.Descriptor instead.
|
|
func (*NtfUserInService) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *NtfUserInService) GetServiceNames() []string {
|
|
if x != nil {
|
|
return x.ServiceNames
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 玩家登陆
|
|
type ReqUserLogout struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ReqUserLogout) Reset() {
|
|
*x = ReqUserLogout{}
|
|
mi := &file_login_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ReqUserLogout) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ReqUserLogout) ProtoMessage() {}
|
|
|
|
func (x *ReqUserLogout) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ReqUserLogout.ProtoReflect.Descriptor instead.
|
|
func (*ReqUserLogout) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
type RspUserLogout struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrCode" json:"code,omitempty"` // 登出原因
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RspUserLogout) Reset() {
|
|
*x = RspUserLogout{}
|
|
mi := &file_login_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RspUserLogout) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RspUserLogout) ProtoMessage() {}
|
|
|
|
func (x *RspUserLogout) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RspUserLogout.ProtoReflect.Descriptor instead.
|
|
func (*RspUserLogout) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *RspUserLogout) GetCode() ErrCode {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return ErrCode_OK
|
|
}
|
|
|
|
// 下线通知
|
|
type NtfUserOffline struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *NtfUserOffline) Reset() {
|
|
*x = NtfUserOffline{}
|
|
mi := &file_login_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *NtfUserOffline) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*NtfUserOffline) ProtoMessage() {}
|
|
|
|
func (x *NtfUserOffline) ProtoReflect() protoreflect.Message {
|
|
mi := &file_login_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use NtfUserOffline.ProtoReflect.Descriptor instead.
|
|
func (*NtfUserOffline) Descriptor() ([]byte, []int) {
|
|
return file_login_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *NtfUserOffline) GetUserId() int64 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_login_proto protoreflect.FileDescriptor
|
|
|
|
const file_login_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\vlogin.proto\x1a\n" +
|
|
"code.proto\"\x8d\x01\n" +
|
|
"\fReqUserLogin\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
|
"\bpassword\x18\x02 \x01(\tR\bpassword\x12\x0e\n" +
|
|
"\x02ip\x18\x03 \x01(\tR\x02ip\x12\x1b\n" +
|
|
"\tdevice_id\x18\x04 \x01(\tR\bdeviceId\x12\x18\n" +
|
|
"\aversion\x18\n" +
|
|
" \x01(\tR\aversion\"[\n" +
|
|
"\fRspUserLogin\x12\x1c\n" +
|
|
"\x04code\x18\x01 \x01(\x0e2\b.ErrCodeR\x04code\x12\x17\n" +
|
|
"\auser_id\x18\x02 \x01(\x03R\x06userId\x12\x14\n" +
|
|
"\x05token\x18\x03 \x01(\tR\x05token\"(\n" +
|
|
"\rNtfUserOnline\x12\x17\n" +
|
|
"\auser_id\x18\x02 \x01(\x03R\x06userId\"6\n" +
|
|
"\x10NtfUserInService\x12\"\n" +
|
|
"\fserviceNames\x18\x03 \x03(\tR\fserviceNames\"\x0f\n" +
|
|
"\rReqUserLogout\"-\n" +
|
|
"\rRspUserLogout\x12\x1c\n" +
|
|
"\x04code\x18\x01 \x01(\x0e2\b.ErrCodeR\x04code\")\n" +
|
|
"\x0eNtfUserOffline\x12\x17\n" +
|
|
"\auser_id\x18\x02 \x01(\x03R\x06userIdB\x11Z\x0fcommon/proto/pbb\x06proto3"
|
|
|
|
var (
|
|
file_login_proto_rawDescOnce sync.Once
|
|
file_login_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_login_proto_rawDescGZIP() []byte {
|
|
file_login_proto_rawDescOnce.Do(func() {
|
|
file_login_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)))
|
|
})
|
|
return file_login_proto_rawDescData
|
|
}
|
|
|
|
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
|
var file_login_proto_goTypes = []any{
|
|
(*ReqUserLogin)(nil), // 0: ReqUserLogin
|
|
(*RspUserLogin)(nil), // 1: RspUserLogin
|
|
(*NtfUserOnline)(nil), // 2: NtfUserOnline
|
|
(*NtfUserInService)(nil), // 3: NtfUserInService
|
|
(*ReqUserLogout)(nil), // 4: ReqUserLogout
|
|
(*RspUserLogout)(nil), // 5: RspUserLogout
|
|
(*NtfUserOffline)(nil), // 6: NtfUserOffline
|
|
(ErrCode)(0), // 7: ErrCode
|
|
}
|
|
var file_login_proto_depIdxs = []int32{
|
|
7, // 0: RspUserLogin.code:type_name -> ErrCode
|
|
7, // 1: RspUserLogout.code:type_name -> ErrCode
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_login_proto_init() }
|
|
func file_login_proto_init() {
|
|
if File_login_proto != nil {
|
|
return
|
|
}
|
|
file_code_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 7,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_login_proto_goTypes,
|
|
DependencyIndexes: file_login_proto_depIdxs,
|
|
MessageInfos: file_login_proto_msgTypes,
|
|
}.Build()
|
|
File_login_proto = out.File
|
|
file_login_proto_goTypes = nil
|
|
file_login_proto_depIdxs = nil
|
|
}
|