game/common/proto/login.pb.go

246 lines
6.5 KiB
Go
Raw Normal View History

2025-05-25 22:39:54 +08:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v6.31.0
// source: login.proto
package proto
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 LoginMsgId int32
const (
LoginMsgId_Unknown LoginMsgId = 0
LoginMsgId_C2SLogin LoginMsgId = 1 // 玩家登陆
)
// Enum value maps for LoginMsgId.
var (
LoginMsgId_name = map[int32]string{
0: "Unknown",
1: "C2SLogin",
}
LoginMsgId_value = map[string]int32{
"Unknown": 0,
"C2SLogin": 1,
}
)
func (x LoginMsgId) Enum() *LoginMsgId {
p := new(LoginMsgId)
*p = x
return p
}
func (x LoginMsgId) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (LoginMsgId) Descriptor() protoreflect.EnumDescriptor {
return file_login_proto_enumTypes[0].Descriptor()
}
func (LoginMsgId) Type() protoreflect.EnumType {
return &file_login_proto_enumTypes[0]
}
func (x LoginMsgId) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use LoginMsgId.Descriptor instead.
func (LoginMsgId) EnumDescriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{0}
}
// 玩家登陆
type C2SLoginMsg struct {
state protoimpl.MessageState `protogen:"open.v1"`
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 用户名
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // 密码或token
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // 版本
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *C2SLoginMsg) Reset() {
*x = C2SLoginMsg{}
mi := &file_login_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *C2SLoginMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*C2SLoginMsg) ProtoMessage() {}
func (x *C2SLoginMsg) 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 C2SLoginMsg.ProtoReflect.Descriptor instead.
func (*C2SLoginMsg) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{0}
}
func (x *C2SLoginMsg) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *C2SLoginMsg) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *C2SLoginMsg) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
type S2CLoginMsg struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=internal.ErrCode" json:"code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *S2CLoginMsg) Reset() {
*x = S2CLoginMsg{}
mi := &file_login_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *S2CLoginMsg) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*S2CLoginMsg) ProtoMessage() {}
func (x *S2CLoginMsg) 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 S2CLoginMsg.ProtoReflect.Descriptor instead.
func (*S2CLoginMsg) Descriptor() ([]byte, []int) {
return file_login_proto_rawDescGZIP(), []int{1}
}
func (x *S2CLoginMsg) GetCode() ErrCode {
if x != nil {
return x.Code
}
return ErrCode_OK
}
var File_login_proto protoreflect.FileDescriptor
const file_login_proto_rawDesc = "" +
"\n" +
"\vlogin.proto\x12\binternal\x1a\n" +
"code.proto\"Y\n" +
"\vC2SLoginMsg\x12\x1a\n" +
"\busername\x18\x01 \x01(\tR\busername\x12\x14\n" +
"\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n" +
"\aversion\x18\x03 \x01(\tR\aversion\"4\n" +
"\vS2CLoginMsg\x12%\n" +
"\x04code\x18\x01 \x01(\x0e2\x11.internal.ErrCodeR\x04code*'\n" +
"\n" +
"LoginMsgId\x12\v\n" +
"\aUnknown\x10\x00\x12\f\n" +
"\bC2SLogin\x10\x01B\x0eZ\fcommon/protob\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_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_login_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_login_proto_goTypes = []any{
(LoginMsgId)(0), // 0: internal.LoginMsgId
(*C2SLoginMsg)(nil), // 1: internal.C2SLoginMsg
(*S2CLoginMsg)(nil), // 2: internal.S2CLoginMsg
(ErrCode)(0), // 3: internal.ErrCode
}
var file_login_proto_depIdxs = []int32{
3, // 0: internal.S2CLoginMsg.code:type_name -> internal.ErrCode
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_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: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_login_proto_goTypes,
DependencyIndexes: file_login_proto_depIdxs,
EnumInfos: file_login_proto_enumTypes,
MessageInfos: file_login_proto_msgTypes,
}.Build()
File_login_proto = out.File
file_login_proto_goTypes = nil
file_login_proto_depIdxs = nil
}