relay-server/proto/tunnel/tunnel.pb.go
2025-12-23 16:38:32 +03:00

255 lines
8.5 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v6.33.1
// source: tunnel.proto
package tunnelpb
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 FrameType int32
const (
FrameType_FRAME_UNSPECIFIED FrameType = 0
FrameType_FRAME_OPEN FrameType = 1 // открыть TCP stream
FrameType_FRAME_DATA FrameType = 2
FrameType_FRAME_CLOSE FrameType = 3
FrameType_FRAME_PING FrameType = 4
FrameType_FRAME_PONG FrameType = 5
FrameType_FRAME_BIND_REQUEST FrameType = 10 // device → relay
FrameType_FRAME_BIND_OK FrameType = 11 // relay → device
FrameType_FRAME_BIND_REJECTED FrameType = 12 // relay → device
)
// Enum value maps for FrameType.
var (
FrameType_name = map[int32]string{
0: "FRAME_UNSPECIFIED",
1: "FRAME_OPEN",
2: "FRAME_DATA",
3: "FRAME_CLOSE",
4: "FRAME_PING",
5: "FRAME_PONG",
10: "FRAME_BIND_REQUEST",
11: "FRAME_BIND_OK",
12: "FRAME_BIND_REJECTED",
}
FrameType_value = map[string]int32{
"FRAME_UNSPECIFIED": 0,
"FRAME_OPEN": 1,
"FRAME_DATA": 2,
"FRAME_CLOSE": 3,
"FRAME_PING": 4,
"FRAME_PONG": 5,
"FRAME_BIND_REQUEST": 10,
"FRAME_BIND_OK": 11,
"FRAME_BIND_REJECTED": 12,
}
)
func (x FrameType) Enum() *FrameType {
p := new(FrameType)
*p = x
return p
}
func (x FrameType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FrameType) Descriptor() protoreflect.EnumDescriptor {
return file_tunnel_proto_enumTypes[0].Descriptor()
}
func (FrameType) Type() protoreflect.EnumType {
return &file_tunnel_proto_enumTypes[0]
}
func (x FrameType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use FrameType.Descriptor instead.
func (FrameType) EnumDescriptor() ([]byte, []int) {
return file_tunnel_proto_rawDescGZIP(), []int{0}
}
type Frame struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type FrameType `protobuf:"varint,1,opt,name=type,proto3,enum=tunnel.FrameType" json:"type,omitempty"`
StreamId uint32 `protobuf:"varint,2,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
}
func (x *Frame) Reset() {
*x = Frame{}
if protoimpl.UnsafeEnabled {
mi := &file_tunnel_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Frame) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Frame) ProtoMessage() {}
func (x *Frame) ProtoReflect() protoreflect.Message {
mi := &file_tunnel_proto_msgTypes[0]
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 Frame.ProtoReflect.Descriptor instead.
func (*Frame) Descriptor() ([]byte, []int) {
return file_tunnel_proto_rawDescGZIP(), []int{0}
}
func (x *Frame) GetType() FrameType {
if x != nil {
return x.Type
}
return FrameType_FRAME_UNSPECIFIED
}
func (x *Frame) GetStreamId() uint32 {
if x != nil {
return x.StreamId
}
return 0
}
func (x *Frame) GetPayload() []byte {
if x != nil {
return x.Payload
}
return nil
}
var File_tunnel_proto protoreflect.FileDescriptor
var file_tunnel_proto_rawDesc = []byte{
0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x65, 0x0a, 0x05, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12,
0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e,
0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0xb7, 0x01,
0x0a, 0x09, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x46,
0x52, 0x41, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x4f, 0x50, 0x45, 0x4e,
0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41,
0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x43, 0x4c, 0x4f, 0x53,
0x45, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x50, 0x49, 0x4e,
0x47, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x50, 0x4f, 0x4e,
0x47, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x49, 0x4e,
0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x46,
0x52, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x17,
0x0a, 0x13, 0x46, 0x52, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x4a,
0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x0c, 0x32, 0x3b, 0x0a, 0x0d, 0x54, 0x75, 0x6e, 0x6e, 0x65,
0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e,
0x65, 0x6c, 0x12, 0x0d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x46, 0x72, 0x61, 0x6d,
0x65, 0x1a, 0x0d, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65,
0x28, 0x01, 0x30, 0x01, 0x42, 0x46, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x6a,
0x65, 0x63, 0x74, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x61, 0x70, 0x70, 0x2e, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a,
0x1b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x75, 0x6e,
0x6e, 0x65, 0x6c, 0x3b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_tunnel_proto_rawDescOnce sync.Once
file_tunnel_proto_rawDescData = file_tunnel_proto_rawDesc
)
func file_tunnel_proto_rawDescGZIP() []byte {
file_tunnel_proto_rawDescOnce.Do(func() {
file_tunnel_proto_rawDescData = protoimpl.X.CompressGZIP(file_tunnel_proto_rawDescData)
})
return file_tunnel_proto_rawDescData
}
var file_tunnel_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_tunnel_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_tunnel_proto_goTypes = []interface{}{
(FrameType)(0), // 0: tunnel.FrameType
(*Frame)(nil), // 1: tunnel.Frame
}
var file_tunnel_proto_depIdxs = []int32{
0, // 0: tunnel.Frame.type:type_name -> tunnel.FrameType
1, // 1: tunnel.TunnelService.Tunnel:input_type -> tunnel.Frame
1, // 2: tunnel.TunnelService.Tunnel:output_type -> tunnel.Frame
2, // [2:3] is the sub-list for method output_type
1, // [1:2] 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_tunnel_proto_init() }
func file_tunnel_proto_init() {
if File_tunnel_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_tunnel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Frame); 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(),
RawDescriptor: file_tunnel_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_tunnel_proto_goTypes,
DependencyIndexes: file_tunnel_proto_depIdxs,
EnumInfos: file_tunnel_proto_enumTypes,
MessageInfos: file_tunnel_proto_msgTypes,
}.Build()
File_tunnel_proto = out.File
file_tunnel_proto_rawDesc = nil
file_tunnel_proto_goTypes = nil
file_tunnel_proto_depIdxs = nil
}