game/common/proto/pb/login.pb.go

413 lines
11 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
2025-06-07 01:58:14 +08:00
// 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"
2025-06-07 01:58:14 +08:00
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)
)
// 玩家登陆
2025-06-08 22:42:58 +08:00
type ReqUserLogin struct {
2025-06-07 01:58:14 +08:00
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"` // 版本
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) Reset() {
*x = ReqUserLogin{}
2025-06-07 01:58:14 +08:00
mi := &file_login_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) String() string {
return protoimpl.X.MessageStringOf(x)
}
2025-06-08 22:42:58 +08:00
func (*ReqUserLogin) ProtoMessage() {}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[0]
2025-06-07 01:58:14 +08:00
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
2025-06-08 22:42:58 +08:00
// Deprecated: Use ReqUserLogin.ProtoReflect.Descriptor instead.
func (*ReqUserLogin) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{0}
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) GetPassword() string {
if x != nil {
2025-05-29 09:54:43 +08:00
return x.Password
}
return ""
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) GetIp() string {
2025-05-29 09:54:43 +08:00
if x != nil {
return x.Ip
}
return ""
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) GetDeviceId() string {
2025-05-29 09:54:43 +08:00
if x != nil {
return x.DeviceId
}
return ""
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogin) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
2025-06-08 22:42:58 +08:00
type RspUserLogin struct {
2025-06-07 01:58:14 +08:00
state protoimpl.MessageState `protogen:"open.v1"`
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.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
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogin) Reset() {
*x = RspUserLogin{}
2025-06-07 01:58:14 +08:00
mi := &file_login_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogin) String() string {
return protoimpl.X.MessageStringOf(x)
}
2025-06-08 22:42:58 +08:00
func (*RspUserLogin) ProtoMessage() {}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogin) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[1]
2025-06-07 01:58:14 +08:00
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
2025-06-08 22:42:58 +08:00
// Deprecated: Use RspUserLogin.ProtoReflect.Descriptor instead.
func (*RspUserLogin) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{1}
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogin) GetCode() ErrCode {
if x != nil {
return x.Code
}
return ErrCode_OK
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogin) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogin) GetToken() string {
2025-05-27 13:14:01 +08:00
if x != nil {
return x.Token
}
return ""
}
// 上线通知
type NtfUserOnline struct {
2025-06-07 01:58:14 +08:00
state protoimpl.MessageState `protogen:"open.v1"`
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
func (x *NtfUserOnline) Reset() {
*x = NtfUserOnline{}
2025-06-07 01:58:14 +08:00
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]
2025-06-07 01:58:14 +08:00
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
}
// 玩家登陆
2025-06-08 22:42:58 +08:00
type ReqUserLogout struct {
2025-06-07 01:58:14 +08:00
state protoimpl.MessageState `protogen:"open.v1"`
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogout) Reset() {
*x = ReqUserLogout{}
2025-06-07 01:58:14 +08:00
mi := &file_login_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogout) String() string {
return protoimpl.X.MessageStringOf(x)
}
2025-06-08 22:42:58 +08:00
func (*ReqUserLogout) ProtoMessage() {}
2025-06-08 22:42:58 +08:00
func (x *ReqUserLogout) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[3]
2025-06-07 01:58:14 +08:00
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
2025-06-08 22:42:58 +08:00
// Deprecated: Use ReqUserLogout.ProtoReflect.Descriptor instead.
func (*ReqUserLogout) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{3}
}
2025-06-08 22:42:58 +08:00
type RspUserLogout struct {
2025-06-07 01:58:14 +08:00
state protoimpl.MessageState `protogen:"open.v1"`
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` // 登出原因
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogout) Reset() {
*x = RspUserLogout{}
2025-06-07 01:58:14 +08:00
mi := &file_login_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogout) String() string {
return protoimpl.X.MessageStringOf(x)
}
2025-06-08 22:42:58 +08:00
func (*RspUserLogout) ProtoMessage() {}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogout) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[4]
2025-06-07 01:58:14 +08:00
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
2025-06-08 22:42:58 +08:00
// Deprecated: Use RspUserLogout.ProtoReflect.Descriptor instead.
func (*RspUserLogout) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{4}
}
2025-06-08 22:42:58 +08:00
func (x *RspUserLogout) GetCode() ErrCode {
if x != nil {
return x.Code
}
return ErrCode_OK
}
// 下线通知
type NtfUserOffline struct {
2025-06-07 01:58:14 +08:00
state protoimpl.MessageState `protogen:"open.v1"`
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
2025-06-07 01:58:14 +08:00
sizeCache protoimpl.SizeCache
}
func (x *NtfUserOffline) Reset() {
*x = NtfUserOffline{}
2025-06-07 01:58:14 +08:00
mi := &file_login_proto_msgTypes[5]
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[5]
2025-06-07 01:58:14 +08:00
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{5}
}
func (x *NtfUserOffline) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
var File_login_proto protoreflect.FileDescriptor
2025-06-07 01:58:14 +08:00
const file_login_proto_rawDesc = "" +
"\n" +
"\vlogin.proto\x12\x02pb\x1a\n" +
"code.proto\"\x8d\x01\n" +
2025-06-08 22:42:58 +08:00
"\fReqUserLogin\x12\x1a\n" +
2025-06-07 01:58:14 +08:00
"\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" +
2025-06-08 22:42:58 +08:00
"\fRspUserLogin\x12\x1f\n" +
2025-06-07 01:58:14 +08:00
"\x04code\x18\x01 \x01(\x0e2\v.pb.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\"\x0f\n" +
2025-06-08 22:42:58 +08:00
"\rReqUserLogout\"0\n" +
"\rRspUserLogout\x12\x1f\n" +
2025-06-07 01:58:14 +08:00
"\x04code\x18\x01 \x01(\x0e2\v.pb.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
2025-06-07 01:58:14 +08:00
file_login_proto_rawDescData []byte
)
func file_login_proto_rawDescGZIP() []byte {
file_login_proto_rawDescOnce.Do(func() {
2025-06-07 01:58:14 +08:00
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, 6)
2025-06-07 01:58:14 +08:00
var file_login_proto_goTypes = []any{
2025-06-08 22:42:58 +08:00
(*ReqUserLogin)(nil), // 0: pb.ReqUserLogin
(*RspUserLogin)(nil), // 1: pb.RspUserLogin
(*NtfUserOnline)(nil), // 2: pb.NtfUserOnline
2025-06-08 22:42:58 +08:00
(*ReqUserLogout)(nil), // 3: pb.ReqUserLogout
(*RspUserLogout)(nil), // 4: pb.RspUserLogout
(*NtfUserOffline)(nil), // 5: pb.NtfUserOffline
(ErrCode)(0), // 6: pb.ErrCode
}
var file_login_proto_depIdxs = []int32{
2025-06-08 22:42:58 +08:00
6, // 0: pb.RspUserLogin.code:type_name -> pb.ErrCode
6, // 1: pb.RspUserLogout.code:type_name -> pb.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(),
2025-06-07 01:58:14 +08:00
RawDescriptor: unsafe.Slice(unsafe.StringData(file_login_proto_rawDesc), len(file_login_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
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
}