396 lines
11 KiB
Go
396 lines
11 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v5.29.3
|
|
// source: server.proto
|
|
|
|
package minecraft
|
|
|
|
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 ServerPacketType int32
|
|
|
|
const (
|
|
ServerPacketType_PING ServerPacketType = 0
|
|
ServerPacketType_PONG ServerPacketType = 1
|
|
ServerPacketType_NEW ServerPacketType = 2
|
|
ServerPacketType_DELETE ServerPacketType = 3
|
|
ServerPacketType_CONNECT ServerPacketType = 4
|
|
)
|
|
|
|
// Enum value maps for ServerPacketType.
|
|
var (
|
|
ServerPacketType_name = map[int32]string{
|
|
0: "PING",
|
|
1: "PONG",
|
|
2: "NEW",
|
|
3: "DELETE",
|
|
4: "CONNECT",
|
|
}
|
|
ServerPacketType_value = map[string]int32{
|
|
"PING": 0,
|
|
"PONG": 1,
|
|
"NEW": 2,
|
|
"DELETE": 3,
|
|
"CONNECT": 4,
|
|
}
|
|
)
|
|
|
|
func (x ServerPacketType) Enum() *ServerPacketType {
|
|
p := new(ServerPacketType)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x ServerPacketType) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (ServerPacketType) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_server_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (ServerPacketType) Type() protoreflect.EnumType {
|
|
return &file_server_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x ServerPacketType) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use ServerPacketType.Descriptor instead.
|
|
func (ServerPacketType) EnumDescriptor() ([]byte, []int) {
|
|
return file_server_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type ServerPacket struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Typ ServerPacketType `protobuf:"varint,1,opt,name=typ,proto3,enum=ServerPacketType" json:"typ,omitempty"`
|
|
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3,oneof" json:"payload,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ServerPacket) Reset() {
|
|
*x = ServerPacket{}
|
|
mi := &file_server_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ServerPacket) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ServerPacket) ProtoMessage() {}
|
|
|
|
func (x *ServerPacket) ProtoReflect() protoreflect.Message {
|
|
mi := &file_server_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 ServerPacket.ProtoReflect.Descriptor instead.
|
|
func (*ServerPacket) Descriptor() ([]byte, []int) {
|
|
return file_server_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *ServerPacket) GetTyp() ServerPacketType {
|
|
if x != nil {
|
|
return x.Typ
|
|
}
|
|
return ServerPacketType_PING
|
|
}
|
|
|
|
func (x *ServerPacket) GetPayload() []byte {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ServerNewPacket struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
|
|
Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
|
|
Motd string `protobuf:"bytes,5,opt,name=motd,proto3" json:"motd,omitempty"`
|
|
Group string `protobuf:"bytes,6,opt,name=group,proto3" json:"group,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ServerNewPacket) Reset() {
|
|
*x = ServerNewPacket{}
|
|
mi := &file_server_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ServerNewPacket) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ServerNewPacket) ProtoMessage() {}
|
|
|
|
func (x *ServerNewPacket) ProtoReflect() protoreflect.Message {
|
|
mi := &file_server_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 ServerNewPacket.ProtoReflect.Descriptor instead.
|
|
func (*ServerNewPacket) Descriptor() ([]byte, []int) {
|
|
return file_server_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *ServerNewPacket) GetServerId() string {
|
|
if x != nil {
|
|
return x.ServerId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ServerNewPacket) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ServerNewPacket) GetHost() string {
|
|
if x != nil {
|
|
return x.Host
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ServerNewPacket) GetPort() int32 {
|
|
if x != nil {
|
|
return x.Port
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ServerNewPacket) GetMotd() string {
|
|
if x != nil {
|
|
return x.Motd
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ServerNewPacket) GetGroup() string {
|
|
if x != nil {
|
|
return x.Group
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ServerDeletePacket struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ServerDeletePacket) Reset() {
|
|
*x = ServerDeletePacket{}
|
|
mi := &file_server_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ServerDeletePacket) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ServerDeletePacket) ProtoMessage() {}
|
|
|
|
func (x *ServerDeletePacket) ProtoReflect() protoreflect.Message {
|
|
mi := &file_server_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 ServerDeletePacket.ProtoReflect.Descriptor instead.
|
|
func (*ServerDeletePacket) Descriptor() ([]byte, []int) {
|
|
return file_server_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *ServerDeletePacket) GetServerId() string {
|
|
if x != nil {
|
|
return x.ServerId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ServerConnectPacket struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"`
|
|
Player string `protobuf:"bytes,2,opt,name=player,proto3" json:"player,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ServerConnectPacket) Reset() {
|
|
*x = ServerConnectPacket{}
|
|
mi := &file_server_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ServerConnectPacket) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ServerConnectPacket) ProtoMessage() {}
|
|
|
|
func (x *ServerConnectPacket) ProtoReflect() protoreflect.Message {
|
|
mi := &file_server_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 ServerConnectPacket.ProtoReflect.Descriptor instead.
|
|
func (*ServerConnectPacket) Descriptor() ([]byte, []int) {
|
|
return file_server_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *ServerConnectPacket) GetServerId() string {
|
|
if x != nil {
|
|
return x.ServerId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ServerConnectPacket) GetPlayer() string {
|
|
if x != nil {
|
|
return x.Player
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_server_proto protoreflect.FileDescriptor
|
|
|
|
const file_server_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\fserver.proto\"^\n" +
|
|
"\fServerPacket\x12#\n" +
|
|
"\x03typ\x18\x01 \x01(\x0e2\x11.ServerPacketTypeR\x03typ\x12\x1d\n" +
|
|
"\apayload\x18\x02 \x01(\fH\x00R\apayload\x88\x01\x01B\n" +
|
|
"\n" +
|
|
"\b_payload\"\x93\x01\n" +
|
|
"\x0fServerNewPacket\x12\x1a\n" +
|
|
"\bserverId\x18\x01 \x01(\tR\bserverId\x12\x12\n" +
|
|
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
|
|
"\x04host\x18\x03 \x01(\tR\x04host\x12\x12\n" +
|
|
"\x04port\x18\x04 \x01(\x05R\x04port\x12\x12\n" +
|
|
"\x04motd\x18\x05 \x01(\tR\x04motd\x12\x14\n" +
|
|
"\x05group\x18\x06 \x01(\tR\x05group\"0\n" +
|
|
"\x12ServerDeletePacket\x12\x1a\n" +
|
|
"\bserverId\x18\x01 \x01(\tR\bserverId\"I\n" +
|
|
"\x13ServerConnectPacket\x12\x1a\n" +
|
|
"\bserverId\x18\x01 \x01(\tR\bserverId\x12\x16\n" +
|
|
"\x06player\x18\x02 \x01(\tR\x06player*H\n" +
|
|
"\x10ServerPacketType\x12\b\n" +
|
|
"\x04PING\x10\x00\x12\b\n" +
|
|
"\x04PONG\x10\x01\x12\a\n" +
|
|
"\x03NEW\x10\x02\x12\n" +
|
|
"\n" +
|
|
"\x06DELETE\x10\x03\x12\v\n" +
|
|
"\aCONNECT\x10\x04B\x12Z\x10router/minecraftb\x06proto3"
|
|
|
|
var (
|
|
file_server_proto_rawDescOnce sync.Once
|
|
file_server_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_server_proto_rawDescGZIP() []byte {
|
|
file_server_proto_rawDescOnce.Do(func() {
|
|
file_server_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_server_proto_rawDesc), len(file_server_proto_rawDesc)))
|
|
})
|
|
return file_server_proto_rawDescData
|
|
}
|
|
|
|
var file_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
|
var file_server_proto_goTypes = []any{
|
|
(ServerPacketType)(0), // 0: ServerPacketType
|
|
(*ServerPacket)(nil), // 1: ServerPacket
|
|
(*ServerNewPacket)(nil), // 2: ServerNewPacket
|
|
(*ServerDeletePacket)(nil), // 3: ServerDeletePacket
|
|
(*ServerConnectPacket)(nil), // 4: ServerConnectPacket
|
|
}
|
|
var file_server_proto_depIdxs = []int32{
|
|
0, // 0: ServerPacket.typ:type_name -> ServerPacketType
|
|
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_server_proto_init() }
|
|
func file_server_proto_init() {
|
|
if File_server_proto != nil {
|
|
return
|
|
}
|
|
file_server_proto_msgTypes[0].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_server_proto_rawDesc), len(file_server_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 4,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_server_proto_goTypes,
|
|
DependencyIndexes: file_server_proto_depIdxs,
|
|
EnumInfos: file_server_proto_enumTypes,
|
|
MessageInfos: file_server_proto_msgTypes,
|
|
}.Build()
|
|
File_server_proto = out.File
|
|
file_server_proto_goTypes = nil
|
|
file_server_proto_depIdxs = nil
|
|
}
|