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

512 lines
14 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
2025-06-06 20:02:58 +08:00
// protoc-gen-go v1.34.1
// protoc v4.25.2
// source: login.proto
package pb
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 C2SUserLogin struct {
2025-06-06 20:02:58 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
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"` // 版本
}
func (x *C2SUserLogin) Reset() {
*x = C2SUserLogin{}
2025-06-06 20:02:58 +08:00
if protoimpl.UnsafeEnabled {
mi := &file_login_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C2SUserLogin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C2SUserLogin) ProtoMessage() {}
func (x *C2SUserLogin) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[0]
2025-06-06 20:02:58 +08:00
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 C2SUserLogin.ProtoReflect.Descriptor instead.
func (*C2SUserLogin) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{0}
}
func (x *C2SUserLogin) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
2025-05-29 09:54:43 +08:00
func (x *C2SUserLogin) GetPassword() string {
if x != nil {
2025-05-29 09:54:43 +08:00
return x.Password
}
return ""
}
func (x *C2SUserLogin) GetIp() string {
if x != nil {
return x.Ip
}
return ""
}
func (x *C2SUserLogin) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
func (x *C2SUserLogin) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
type S2CUserLogin struct {
2025-06-06 20:02:58 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
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
}
func (x *S2CUserLogin) Reset() {
*x = S2CUserLogin{}
2025-06-06 20:02:58 +08:00
if protoimpl.UnsafeEnabled {
mi := &file_login_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *S2CUserLogin) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*S2CUserLogin) ProtoMessage() {}
func (x *S2CUserLogin) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[1]
2025-06-06 20:02:58 +08:00
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 S2CUserLogin.ProtoReflect.Descriptor instead.
func (*S2CUserLogin) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{1}
}
func (x *S2CUserLogin) GetCode() ErrCode {
if x != nil {
return x.Code
}
return ErrCode_OK
}
func (x *S2CUserLogin) GetUserId() int64 {
if x != nil {
return x.UserId
}
return 0
}
func (x *S2CUserLogin) GetToken() string {
2025-05-27 13:14:01 +08:00
if x != nil {
return x.Token
}
return ""
}
// 上线通知
type NtfUserOnline struct {
2025-06-06 20:02:58 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
}
func (x *NtfUserOnline) Reset() {
*x = NtfUserOnline{}
2025-06-06 20:02:58 +08:00
if protoimpl.UnsafeEnabled {
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-06 20:02:58 +08:00
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 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 C2SUserLogout struct {
2025-06-06 20:02:58 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
}
func (x *C2SUserLogout) Reset() {
*x = C2SUserLogout{}
2025-06-06 20:02:58 +08:00
if protoimpl.UnsafeEnabled {
mi := &file_login_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *C2SUserLogout) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C2SUserLogout) ProtoMessage() {}
func (x *C2SUserLogout) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[3]
2025-06-06 20:02:58 +08:00
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 C2SUserLogout.ProtoReflect.Descriptor instead.
func (*C2SUserLogout) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{3}
}
type S2CUserLogout struct {
2025-06-06 20:02:58 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=pb.ErrCode" json:"code,omitempty"` // 登出原因
}
func (x *S2CUserLogout) Reset() {
*x = S2CUserLogout{}
2025-06-06 20:02:58 +08:00
if protoimpl.UnsafeEnabled {
mi := &file_login_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *S2CUserLogout) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*S2CUserLogout) ProtoMessage() {}
func (x *S2CUserLogout) ProtoReflect() protoreflect.Message {
mi := &file_login_proto_msgTypes[4]
2025-06-06 20:02:58 +08:00
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 S2CUserLogout.ProtoReflect.Descriptor instead.
func (*S2CUserLogout) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{4}
}
func (x *S2CUserLogout) GetCode() ErrCode {
if x != nil {
return x.Code
}
return ErrCode_OK
}
// 下线通知
type NtfUserOffline struct {
2025-06-06 20:02:58 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
2025-06-06 20:02:58 +08:00
unknownFields protoimpl.UnknownFields
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 玩家id
}
func (x *NtfUserOffline) Reset() {
*x = NtfUserOffline{}
2025-06-06 20:02:58 +08:00
if protoimpl.UnsafeEnabled {
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-06 20:02:58 +08:00
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 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-06 20:02:58 +08:00
var file_login_proto_rawDesc = []byte{
0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
0x62, 0x1a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01,
0x0a, 0x0c, 0x43, 0x32, 0x53, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1a,
0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5e, 0x0a,
0x0c, 0x53, 0x32, 0x43, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1f, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x70, 0x62,
0x2e, 0x45, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x17,
0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x28, 0x0a,
0x0d, 0x4e, 0x74, 0x66, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x17,
0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x43, 0x32, 0x53, 0x55, 0x73,
0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x22, 0x30, 0x0a, 0x0d, 0x53, 0x32, 0x43, 0x55,
0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x72, 0x72,
0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x29, 0x0a, 0x0e, 0x4e, 0x74,
0x66, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x17, 0x0a, 0x07,
0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75,
0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x11, 0x5a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_login_proto_rawDescOnce sync.Once
2025-06-06 20:02:58 +08:00
file_login_proto_rawDescData = file_login_proto_rawDesc
)
func file_login_proto_rawDescGZIP() []byte {
file_login_proto_rawDescOnce.Do(func() {
2025-06-06 20:02:58 +08:00
file_login_proto_rawDescData = protoimpl.X.CompressGZIP(file_login_proto_rawDescData)
})
return file_login_proto_rawDescData
}
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
2025-06-06 20:02:58 +08:00
var file_login_proto_goTypes = []interface{}{
(*C2SUserLogin)(nil), // 0: pb.C2SUserLogin
(*S2CUserLogin)(nil), // 1: pb.S2CUserLogin
(*NtfUserOnline)(nil), // 2: pb.NtfUserOnline
(*C2SUserLogout)(nil), // 3: pb.C2SUserLogout
(*S2CUserLogout)(nil), // 4: pb.S2CUserLogout
(*NtfUserOffline)(nil), // 5: pb.NtfUserOffline
(ErrCode)(0), // 6: pb.ErrCode
}
var file_login_proto_depIdxs = []int32{
6, // 0: pb.S2CUserLogin.code:type_name -> pb.ErrCode
6, // 1: pb.S2CUserLogout.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()
2025-06-06 20:02:58 +08:00
if !protoimpl.UnsafeEnabled {
file_login_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C2SUserLogin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_login_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*S2CUserLogin); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_login_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NtfUserOnline); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_login_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*C2SUserLogout); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_login_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*S2CUserLogout); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_login_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NtfUserOffline); 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(),
2025-06-06 20:02:58 +08:00
RawDescriptor: 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
2025-06-06 20:02:58 +08:00
file_login_proto_rawDesc = nil
file_login_proto_goTypes = nil
file_login_proto_depIdxs = nil
}