Files
panel/proto/panel/v1/common.pb.go
T
2026-07-14 19:19:43 -07:00

425 lines
13 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: panel/v1/common.proto
package panelv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
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)
)
// RunMode selects how a game instance is launched on a Target.
type RunMode int32
const (
RunMode_RUN_MODE_UNSPECIFIED RunMode = 0
RunMode_RUN_MODE_DOCKER RunMode = 1
RunMode_RUN_MODE_HOST RunMode = 2
)
// Enum value maps for RunMode.
var (
RunMode_name = map[int32]string{
0: "RUN_MODE_UNSPECIFIED",
1: "RUN_MODE_DOCKER",
2: "RUN_MODE_HOST",
}
RunMode_value = map[string]int32{
"RUN_MODE_UNSPECIFIED": 0,
"RUN_MODE_DOCKER": 1,
"RUN_MODE_HOST": 2,
}
)
func (x RunMode) Enum() *RunMode {
p := new(RunMode)
*p = x
return p
}
func (x RunMode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RunMode) Descriptor() protoreflect.EnumDescriptor {
return file_panel_v1_common_proto_enumTypes[0].Descriptor()
}
func (RunMode) Type() protoreflect.EnumType {
return &file_panel_v1_common_proto_enumTypes[0]
}
func (x RunMode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RunMode.Descriptor instead.
func (RunMode) EnumDescriptor() ([]byte, []int) {
return file_panel_v1_common_proto_rawDescGZIP(), []int{0}
}
// InstanceStatus is the coarse lifecycle state of an instance.
type InstanceStatus int32
const (
InstanceStatus_INSTANCE_STATUS_UNSPECIFIED InstanceStatus = 0
InstanceStatus_INSTANCE_STATUS_STOPPED InstanceStatus = 1
InstanceStatus_INSTANCE_STATUS_STARTING InstanceStatus = 2
InstanceStatus_INSTANCE_STATUS_RUNNING InstanceStatus = 3
InstanceStatus_INSTANCE_STATUS_STOPPING InstanceStatus = 4
InstanceStatus_INSTANCE_STATUS_CRASHED InstanceStatus = 5
InstanceStatus_INSTANCE_STATUS_UPDATING InstanceStatus = 6
)
// Enum value maps for InstanceStatus.
var (
InstanceStatus_name = map[int32]string{
0: "INSTANCE_STATUS_UNSPECIFIED",
1: "INSTANCE_STATUS_STOPPED",
2: "INSTANCE_STATUS_STARTING",
3: "INSTANCE_STATUS_RUNNING",
4: "INSTANCE_STATUS_STOPPING",
5: "INSTANCE_STATUS_CRASHED",
6: "INSTANCE_STATUS_UPDATING",
}
InstanceStatus_value = map[string]int32{
"INSTANCE_STATUS_UNSPECIFIED": 0,
"INSTANCE_STATUS_STOPPED": 1,
"INSTANCE_STATUS_STARTING": 2,
"INSTANCE_STATUS_RUNNING": 3,
"INSTANCE_STATUS_STOPPING": 4,
"INSTANCE_STATUS_CRASHED": 5,
"INSTANCE_STATUS_UPDATING": 6,
}
)
func (x InstanceStatus) Enum() *InstanceStatus {
p := new(InstanceStatus)
*p = x
return p
}
func (x InstanceStatus) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InstanceStatus) Descriptor() protoreflect.EnumDescriptor {
return file_panel_v1_common_proto_enumTypes[1].Descriptor()
}
func (InstanceStatus) Type() protoreflect.EnumType {
return &file_panel_v1_common_proto_enumTypes[1]
}
func (x InstanceStatus) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InstanceStatus.Descriptor instead.
func (InstanceStatus) EnumDescriptor() ([]byte, []int) {
return file_panel_v1_common_proto_rawDescGZIP(), []int{1}
}
// ResourceLimits caps an instance's CPU / memory / disk usage.
type ResourceLimits struct {
state protoimpl.MessageState `protogen:"open.v1"`
CpuShares uint32 `protobuf:"varint,1,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` // relative weight, 1024 = 1 core equivalent
MemBytes uint64 `protobuf:"varint,2,opt,name=mem_bytes,json=memBytes,proto3" json:"mem_bytes,omitempty"` // hard memory ceiling
DiskBytes uint64 `protobuf:"varint,3,opt,name=disk_bytes,json=diskBytes,proto3" json:"disk_bytes,omitempty"` // data dir quota, 0 = unlimited
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ResourceLimits) Reset() {
*x = ResourceLimits{}
mi := &file_panel_v1_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ResourceLimits) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResourceLimits) ProtoMessage() {}
func (x *ResourceLimits) ProtoReflect() protoreflect.Message {
mi := &file_panel_v1_common_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 ResourceLimits.ProtoReflect.Descriptor instead.
func (*ResourceLimits) Descriptor() ([]byte, []int) {
return file_panel_v1_common_proto_rawDescGZIP(), []int{0}
}
func (x *ResourceLimits) GetCpuShares() uint32 {
if x != nil {
return x.CpuShares
}
return 0
}
func (x *ResourceLimits) GetMemBytes() uint64 {
if x != nil {
return x.MemBytes
}
return 0
}
func (x *ResourceLimits) GetDiskBytes() uint64 {
if x != nil {
return x.DiskBytes
}
return 0
}
// PortMap declares a port exposed by an instance.
type PortMap struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // logical name: "game", "rcon", "query"
Proto string `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"` // "tcp" or "udp"
ContainerPort uint32 `protobuf:"varint,3,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` // port inside the sandbox
HostPort uint32 `protobuf:"varint,4,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"` // port on the Target host (0 = same as container_port)
Internal bool `protobuf:"varint,5,opt,name=internal,proto3" json:"internal,omitempty"` // true = not exposed outside the Target
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PortMap) Reset() {
*x = PortMap{}
mi := &file_panel_v1_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PortMap) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PortMap) ProtoMessage() {}
func (x *PortMap) ProtoReflect() protoreflect.Message {
mi := &file_panel_v1_common_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 PortMap.ProtoReflect.Descriptor instead.
func (*PortMap) Descriptor() ([]byte, []int) {
return file_panel_v1_common_proto_rawDescGZIP(), []int{1}
}
func (x *PortMap) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *PortMap) GetProto() string {
if x != nil {
return x.Proto
}
return ""
}
func (x *PortMap) GetContainerPort() uint32 {
if x != nil {
return x.ContainerPort
}
return 0
}
func (x *PortMap) GetHostPort() uint32 {
if x != nil {
return x.HostPort
}
return 0
}
func (x *PortMap) GetInternal() bool {
if x != nil {
return x.Internal
}
return false
}
// Error is a structured error payload carried on the wire.
type Error struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // short machine-readable code
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // human-readable message
At *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=at,proto3" json:"at,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Error) Reset() {
*x = Error{}
mi := &file_panel_v1_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Error) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Error) ProtoMessage() {}
func (x *Error) ProtoReflect() protoreflect.Message {
mi := &file_panel_v1_common_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 Error.ProtoReflect.Descriptor instead.
func (*Error) Descriptor() ([]byte, []int) {
return file_panel_v1_common_proto_rawDescGZIP(), []int{2}
}
func (x *Error) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *Error) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *Error) GetAt() *timestamppb.Timestamp {
if x != nil {
return x.At
}
return nil
}
var File_panel_v1_common_proto protoreflect.FileDescriptor
const file_panel_v1_common_proto_rawDesc = "" +
"\n" +
"\x15panel/v1/common.proto\x12\bpanel.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"k\n" +
"\x0eResourceLimits\x12\x1d\n" +
"\n" +
"cpu_shares\x18\x01 \x01(\rR\tcpuShares\x12\x1b\n" +
"\tmem_bytes\x18\x02 \x01(\x04R\bmemBytes\x12\x1d\n" +
"\n" +
"disk_bytes\x18\x03 \x01(\x04R\tdiskBytes\"\x93\x01\n" +
"\aPortMap\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
"\x05proto\x18\x02 \x01(\tR\x05proto\x12%\n" +
"\x0econtainer_port\x18\x03 \x01(\rR\rcontainerPort\x12\x1b\n" +
"\thost_port\x18\x04 \x01(\rR\bhostPort\x12\x1a\n" +
"\binternal\x18\x05 \x01(\bR\binternal\"a\n" +
"\x05Error\x12\x12\n" +
"\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" +
"\amessage\x18\x02 \x01(\tR\amessage\x12*\n" +
"\x02at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x02at*K\n" +
"\aRunMode\x12\x18\n" +
"\x14RUN_MODE_UNSPECIFIED\x10\x00\x12\x13\n" +
"\x0fRUN_MODE_DOCKER\x10\x01\x12\x11\n" +
"\rRUN_MODE_HOST\x10\x02*\xe2\x01\n" +
"\x0eInstanceStatus\x12\x1f\n" +
"\x1bINSTANCE_STATUS_UNSPECIFIED\x10\x00\x12\x1b\n" +
"\x17INSTANCE_STATUS_STOPPED\x10\x01\x12\x1c\n" +
"\x18INSTANCE_STATUS_STARTING\x10\x02\x12\x1b\n" +
"\x17INSTANCE_STATUS_RUNNING\x10\x03\x12\x1c\n" +
"\x18INSTANCE_STATUS_STOPPING\x10\x04\x12\x1b\n" +
"\x17INSTANCE_STATUS_CRASHED\x10\x05\x12\x1c\n" +
"\x18INSTANCE_STATUS_UPDATING\x10\x06B2Z0github.com/dbledeez/panel/proto/panel/v1;panelv1b\x06proto3"
var (
file_panel_v1_common_proto_rawDescOnce sync.Once
file_panel_v1_common_proto_rawDescData []byte
)
func file_panel_v1_common_proto_rawDescGZIP() []byte {
file_panel_v1_common_proto_rawDescOnce.Do(func() {
file_panel_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_panel_v1_common_proto_rawDesc), len(file_panel_v1_common_proto_rawDesc)))
})
return file_panel_v1_common_proto_rawDescData
}
var file_panel_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_panel_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_panel_v1_common_proto_goTypes = []any{
(RunMode)(0), // 0: panel.v1.RunMode
(InstanceStatus)(0), // 1: panel.v1.InstanceStatus
(*ResourceLimits)(nil), // 2: panel.v1.ResourceLimits
(*PortMap)(nil), // 3: panel.v1.PortMap
(*Error)(nil), // 4: panel.v1.Error
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
}
var file_panel_v1_common_proto_depIdxs = []int32{
5, // 0: panel.v1.Error.at:type_name -> google.protobuf.Timestamp
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_panel_v1_common_proto_init() }
func file_panel_v1_common_proto_init() {
if File_panel_v1_common_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_panel_v1_common_proto_rawDesc), len(file_panel_v1_common_proto_rawDesc)),
NumEnums: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_panel_v1_common_proto_goTypes,
DependencyIndexes: file_panel_v1_common_proto_depIdxs,
EnumInfos: file_panel_v1_common_proto_enumTypes,
MessageInfos: file_panel_v1_common_proto_msgTypes,
}.Build()
File_panel_v1_common_proto = out.File
file_panel_v1_common_proto_goTypes = nil
file_panel_v1_common_proto_depIdxs = nil
}