From 95377a4fa6b94d6224754d5d4fc48eafe69a8038 Mon Sep 17 00:00:00 2001 From: criyle Date: Mon, 18 Aug 2025 00:50:33 +0000 Subject: [PATCH] chore(pb): migrate step 2 with opaque API --- pb/file.pb.go | 54 +- pb/file.proto | 2 +- pb/file_protoopaque.pb.go | 269 ----- pb/judge.pb.go | 4 +- pb/judge.proto | 2 +- pb/judge_protoopaque.pb.go | 102 -- pb/request.pb.go | 537 +++++----- pb/request.proto | 2 +- pb/request_protoopaque.pb.go | 1463 -------------------------- pb/response.pb.go | 154 +-- pb/response.proto | 2 +- pb/response_protoopaque.pb.go | 636 ----------- pb/stream_request.pb.go | 207 ++-- pb/stream_request.proto | 2 +- pb/stream_request_protoopaque.pb.go | 577 ---------- pb/stream_response.pb.go | 107 +- pb/stream_response.proto | 2 +- pb/stream_response_protoopaque.pb.go | 345 ------ 18 files changed, 519 insertions(+), 3948 deletions(-) delete mode 100644 pb/file_protoopaque.pb.go delete mode 100644 pb/judge_protoopaque.pb.go delete mode 100644 pb/request_protoopaque.pb.go delete mode 100644 pb/response_protoopaque.pb.go delete mode 100644 pb/stream_request_protoopaque.pb.go delete mode 100644 pb/stream_response_protoopaque.pb.go diff --git a/pb/file.pb.go b/pb/file.pb.go index 3f4ec66..c53a46e 100644 --- a/pb/file.pb.go +++ b/pb/file.pb.go @@ -4,8 +4,6 @@ // protoc v6.31.1 // source: file.proto -//go:build !protoopaque - package pb import ( @@ -24,10 +22,10 @@ const ( ) type FileID struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - FileID string `protobuf:"bytes,1,opt,name=fileID" json:"fileID,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_FileID string `protobuf:"bytes,1,opt,name=fileID"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileID) Reset() { @@ -57,13 +55,13 @@ func (x *FileID) ProtoReflect() protoreflect.Message { func (x *FileID) GetFileID() string { if x != nil { - return x.FileID + return x.xxx_hidden_FileID } return "" } func (x *FileID) SetFileID(v string) { - x.FileID = v + x.xxx_hidden_FileID = v } type FileID_builder struct { @@ -76,16 +74,16 @@ func (b0 FileID_builder) Build() *FileID { m0 := &FileID{} b, x := &b0, m0 _, _ = b, x - x.FileID = b.FileID + x.xxx_hidden_FileID = b.FileID return m0 } type FileContent struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Content []byte `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` + xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileContent) Reset() { @@ -115,27 +113,27 @@ func (x *FileContent) ProtoReflect() protoreflect.Message { func (x *FileContent) GetName() string { if x != nil { - return x.Name + return x.xxx_hidden_Name } return "" } func (x *FileContent) GetContent() []byte { if x != nil { - return x.Content + return x.xxx_hidden_Content } return nil } func (x *FileContent) SetName(v string) { - x.Name = v + x.xxx_hidden_Name = v } func (x *FileContent) SetContent(v []byte) { if v == nil { v = []byte{} } - x.Content = v + x.xxx_hidden_Content = v } type FileContent_builder struct { @@ -149,16 +147,16 @@ func (b0 FileContent_builder) Build() *FileContent { m0 := &FileContent{} b, x := &b0, m0 _, _ = b, x - x.Name = b.Name - x.Content = b.Content + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Content = b.Content return m0 } type FileListType struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - FileIDs map[string]string `protobuf:"bytes,1,rep,name=fileIDs" json:"fileIDs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_FileIDs map[string]string `protobuf:"bytes,1,rep,name=fileIDs" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *FileListType) Reset() { @@ -188,13 +186,13 @@ func (x *FileListType) ProtoReflect() protoreflect.Message { func (x *FileListType) GetFileIDs() map[string]string { if x != nil { - return x.FileIDs + return x.xxx_hidden_FileIDs } return nil } func (x *FileListType) SetFileIDs(v map[string]string) { - x.FileIDs = v + x.xxx_hidden_FileIDs = v } type FileListType_builder struct { @@ -207,7 +205,7 @@ func (b0 FileListType_builder) Build() *FileListType { m0 := &FileListType{} b, x := &b0, m0 _, _ = b, x - x.FileIDs = b.FileIDs + x.xxx_hidden_FileIDs = b.FileIDs return m0 } @@ -226,7 +224,7 @@ const file_file_proto_rawDesc = "" + "\afileIDs\x18\x01 \x03(\v2\x1d.pb.FileListType.FileIDsEntryR\afileIDs\x1a:\n" + "\fFileIDsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a" var file_file_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_file_proto_goTypes = []any{ diff --git a/pb/file.proto b/pb/file.proto index 31b5640..ba6421b 100644 --- a/pb/file.proto +++ b/pb/file.proto @@ -5,7 +5,7 @@ import "google/protobuf/go_features.proto"; option features.field_presence = IMPLICIT; option go_package = "github.com/criyle/go-judge/pb"; -option features.(pb.go).api_level = API_HYBRID; +option features.(pb.go).api_level = API_OPAQUE; message FileID { string fileID = 1; } diff --git a/pb/file_protoopaque.pb.go b/pb/file_protoopaque.pb.go deleted file mode 100644 index 73fac10..0000000 --- a/pb/file_protoopaque.pb.go +++ /dev/null @@ -1,269 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v6.31.1 -// source: file.proto - -//go:build protoopaque - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/gofeaturespb" - reflect "reflect" - 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 FileID struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_FileID string `protobuf:"bytes,1,opt,name=fileID"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FileID) Reset() { - *x = FileID{} - mi := &file_file_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FileID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileID) ProtoMessage() {} - -func (x *FileID) ProtoReflect() protoreflect.Message { - mi := &file_file_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) -} - -func (x *FileID) GetFileID() string { - if x != nil { - return x.xxx_hidden_FileID - } - return "" -} - -func (x *FileID) SetFileID(v string) { - x.xxx_hidden_FileID = v -} - -type FileID_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - FileID string -} - -func (b0 FileID_builder) Build() *FileID { - m0 := &FileID{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_FileID = b.FileID - return m0 -} - -type FileContent struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` - xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FileContent) Reset() { - *x = FileContent{} - mi := &file_file_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FileContent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileContent) ProtoMessage() {} - -func (x *FileContent) ProtoReflect() protoreflect.Message { - mi := &file_file_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) -} - -func (x *FileContent) GetName() string { - if x != nil { - return x.xxx_hidden_Name - } - return "" -} - -func (x *FileContent) GetContent() []byte { - if x != nil { - return x.xxx_hidden_Content - } - return nil -} - -func (x *FileContent) SetName(v string) { - x.xxx_hidden_Name = v -} - -func (x *FileContent) SetContent(v []byte) { - if v == nil { - v = []byte{} - } - x.xxx_hidden_Content = v -} - -type FileContent_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Name string - Content []byte -} - -func (b0 FileContent_builder) Build() *FileContent { - m0 := &FileContent{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Name = b.Name - x.xxx_hidden_Content = b.Content - return m0 -} - -type FileListType struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_FileIDs map[string]string `protobuf:"bytes,1,rep,name=fileIDs" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FileListType) Reset() { - *x = FileListType{} - mi := &file_file_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FileListType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FileListType) ProtoMessage() {} - -func (x *FileListType) ProtoReflect() protoreflect.Message { - mi := &file_file_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) -} - -func (x *FileListType) GetFileIDs() map[string]string { - if x != nil { - return x.xxx_hidden_FileIDs - } - return nil -} - -func (x *FileListType) SetFileIDs(v map[string]string) { - x.xxx_hidden_FileIDs = v -} - -type FileListType_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - FileIDs map[string]string -} - -func (b0 FileListType_builder) Build() *FileListType { - m0 := &FileListType{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_FileIDs = b.FileIDs - return m0 -} - -var File_file_proto protoreflect.FileDescriptor - -const file_file_proto_rawDesc = "" + - "\n" + - "\n" + - "file.proto\x12\x02pb\x1a!google/protobuf/go_features.proto\" \n" + - "\x06FileID\x12\x16\n" + - "\x06fileID\x18\x01 \x01(\tR\x06fileID\";\n" + - "\vFileContent\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + - "\acontent\x18\x02 \x01(\fR\acontent\"\x83\x01\n" + - "\fFileListType\x127\n" + - "\afileIDs\x18\x01 \x03(\v2\x1d.pb.FileListType.FileIDsEntryR\afileIDs\x1a:\n" + - "\fFileIDsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" - -var file_file_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_file_proto_goTypes = []any{ - (*FileID)(nil), // 0: pb.FileID - (*FileContent)(nil), // 1: pb.FileContent - (*FileListType)(nil), // 2: pb.FileListType - nil, // 3: pb.FileListType.FileIDsEntry -} -var file_file_proto_depIdxs = []int32{ - 3, // 0: pb.FileListType.fileIDs:type_name -> pb.FileListType.FileIDsEntry - 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_file_proto_init() } -func file_file_proto_init() { - if File_file_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_file_proto_rawDesc), len(file_file_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_file_proto_goTypes, - DependencyIndexes: file_file_proto_depIdxs, - MessageInfos: file_file_proto_msgTypes, - }.Build() - File_file_proto = out.File - file_file_proto_goTypes = nil - file_file_proto_depIdxs = nil -} diff --git a/pb/judge.pb.go b/pb/judge.pb.go index 30d9594..1ec82f2 100644 --- a/pb/judge.pb.go +++ b/pb/judge.pb.go @@ -4,8 +4,6 @@ // protoc v6.31.1 // source: judge.proto -//go:build !protoopaque - package pb import ( @@ -41,7 +39,7 @@ const file_judge_proto_rawDesc = "" + ".pb.FileID\x120\n" + "\n" + "FileDelete\x12\n" + - ".pb.FileID\x1a\x16.google.protobuf.EmptyB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" + ".pb.FileID\x1a\x16.google.protobuf.EmptyB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a" var file_judge_proto_goTypes = []any{ (*Request)(nil), // 0: pb.Request diff --git a/pb/judge.proto b/pb/judge.proto index 296eb6b..fbca1ba 100644 --- a/pb/judge.proto +++ b/pb/judge.proto @@ -4,7 +4,7 @@ package pb; option features.field_presence = IMPLICIT; option go_package = "github.com/criyle/go-judge/pb"; -option features.(pb.go).api_level = API_HYBRID; +option features.(pb.go).api_level = API_OPAQUE; import "google/protobuf/empty.proto"; import "request.proto"; diff --git a/pb/judge_protoopaque.pb.go b/pb/judge_protoopaque.pb.go deleted file mode 100644 index 68c2342..0000000 --- a/pb/judge_protoopaque.pb.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v6.31.1 -// source: judge.proto - -//go:build protoopaque - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/gofeaturespb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - 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) -) - -var File_judge_proto protoreflect.FileDescriptor - -const file_judge_proto_rawDesc = "" + - "\n" + - "\vjudge.proto\x12\x02pb\x1a\x1bgoogle/protobuf/empty.proto\x1a\rrequest.proto\x1a\x0eresponse.proto\x1a\x14stream_request.proto\x1a\x15stream_response.proto\x1a\n" + - "file.proto\x1a!google/protobuf/go_features.proto2\x9e\x02\n" + - "\bExecutor\x12!\n" + - "\x04Exec\x12\v.pb.Request\x1a\f.pb.Response\x127\n" + - "\n" + - "ExecStream\x12\x11.pb.StreamRequest\x1a\x12.pb.StreamResponse(\x010\x01\x124\n" + - "\bFileList\x12\x16.google.protobuf.Empty\x1a\x10.pb.FileListType\x12&\n" + - "\aFileGet\x12\n" + - ".pb.FileID\x1a\x0f.pb.FileContent\x12&\n" + - "\aFileAdd\x12\x0f.pb.FileContent\x1a\n" + - ".pb.FileID\x120\n" + - "\n" + - "FileDelete\x12\n" + - ".pb.FileID\x1a\x16.google.protobuf.EmptyB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" - -var file_judge_proto_goTypes = []any{ - (*Request)(nil), // 0: pb.Request - (*StreamRequest)(nil), // 1: pb.StreamRequest - (*emptypb.Empty)(nil), // 2: google.protobuf.Empty - (*FileID)(nil), // 3: pb.FileID - (*FileContent)(nil), // 4: pb.FileContent - (*Response)(nil), // 5: pb.Response - (*StreamResponse)(nil), // 6: pb.StreamResponse - (*FileListType)(nil), // 7: pb.FileListType -} -var file_judge_proto_depIdxs = []int32{ - 0, // 0: pb.Executor.Exec:input_type -> pb.Request - 1, // 1: pb.Executor.ExecStream:input_type -> pb.StreamRequest - 2, // 2: pb.Executor.FileList:input_type -> google.protobuf.Empty - 3, // 3: pb.Executor.FileGet:input_type -> pb.FileID - 4, // 4: pb.Executor.FileAdd:input_type -> pb.FileContent - 3, // 5: pb.Executor.FileDelete:input_type -> pb.FileID - 5, // 6: pb.Executor.Exec:output_type -> pb.Response - 6, // 7: pb.Executor.ExecStream:output_type -> pb.StreamResponse - 7, // 8: pb.Executor.FileList:output_type -> pb.FileListType - 4, // 9: pb.Executor.FileGet:output_type -> pb.FileContent - 3, // 10: pb.Executor.FileAdd:output_type -> pb.FileID - 2, // 11: pb.Executor.FileDelete:output_type -> google.protobuf.Empty - 6, // [6:12] is the sub-list for method output_type - 0, // [0:6] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_judge_proto_init() } -func file_judge_proto_init() { - if File_judge_proto != nil { - return - } - file_request_proto_init() - file_response_proto_init() - file_stream_request_proto_init() - file_stream_response_proto_init() - file_file_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_judge_proto_rawDesc), len(file_judge_proto_rawDesc)), - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_judge_proto_goTypes, - DependencyIndexes: file_judge_proto_depIdxs, - }.Build() - File_judge_proto = out.File - file_judge_proto_goTypes = nil - file_judge_proto_depIdxs = nil -} diff --git a/pb/request.pb.go b/pb/request.pb.go index 9875bf3..b453887 100644 --- a/pb/request.pb.go +++ b/pb/request.pb.go @@ -4,8 +4,6 @@ // protoc v6.31.1 // source: request.proto -//go:build !protoopaque - package pb import ( @@ -25,12 +23,12 @@ const ( ) type Request struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - RequestID string `protobuf:"bytes,1,opt,name=requestID" json:"requestID,omitempty"` - Cmd []*Request_CmdType `protobuf:"bytes,2,rep,name=cmd" json:"cmd,omitempty"` - PipeMapping []*Request_PipeMap `protobuf:"bytes,3,rep,name=pipeMapping" json:"pipeMapping,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_RequestID string `protobuf:"bytes,1,opt,name=requestID"` + xxx_hidden_Cmd *[]*Request_CmdType `protobuf:"bytes,2,rep,name=cmd"` + xxx_hidden_PipeMapping *[]*Request_PipeMap `protobuf:"bytes,3,rep,name=pipeMapping"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request) Reset() { @@ -60,35 +58,39 @@ func (x *Request) ProtoReflect() protoreflect.Message { func (x *Request) GetRequestID() string { if x != nil { - return x.RequestID + return x.xxx_hidden_RequestID } return "" } func (x *Request) GetCmd() []*Request_CmdType { if x != nil { - return x.Cmd + if x.xxx_hidden_Cmd != nil { + return *x.xxx_hidden_Cmd + } } return nil } func (x *Request) GetPipeMapping() []*Request_PipeMap { if x != nil { - return x.PipeMapping + if x.xxx_hidden_PipeMapping != nil { + return *x.xxx_hidden_PipeMapping + } } return nil } func (x *Request) SetRequestID(v string) { - x.RequestID = v + x.xxx_hidden_RequestID = v } func (x *Request) SetCmd(v []*Request_CmdType) { - x.Cmd = v + x.xxx_hidden_Cmd = &v } func (x *Request) SetPipeMapping(v []*Request_PipeMap) { - x.PipeMapping = v + x.xxx_hidden_PipeMapping = &v } type Request_builder struct { @@ -103,17 +105,17 @@ func (b0 Request_builder) Build() *Request { m0 := &Request{} b, x := &b0, m0 _, _ = b, x - x.RequestID = b.RequestID - x.Cmd = b.Cmd - x.PipeMapping = b.PipeMapping + x.xxx_hidden_RequestID = b.RequestID + x.xxx_hidden_Cmd = &b.Cmd + x.xxx_hidden_PipeMapping = &b.PipeMapping return m0 } type Request_LocalFile struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Src string `protobuf:"bytes,1,opt,name=src" json:"src,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Src string `protobuf:"bytes,1,opt,name=src"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_LocalFile) Reset() { @@ -143,13 +145,13 @@ func (x *Request_LocalFile) ProtoReflect() protoreflect.Message { func (x *Request_LocalFile) GetSrc() string { if x != nil { - return x.Src + return x.xxx_hidden_Src } return "" } func (x *Request_LocalFile) SetSrc(v string) { - x.Src = v + x.xxx_hidden_Src = v } type Request_LocalFile_builder struct { @@ -162,15 +164,15 @@ func (b0 Request_LocalFile_builder) Build() *Request_LocalFile { m0 := &Request_LocalFile{} b, x := &b0, m0 _, _ = b, x - x.Src = b.Src + x.xxx_hidden_Src = b.Src return m0 } type Request_MemoryFile struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Content []byte `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Content []byte `protobuf:"bytes,1,opt,name=content"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_MemoryFile) Reset() { @@ -200,7 +202,7 @@ func (x *Request_MemoryFile) ProtoReflect() protoreflect.Message { func (x *Request_MemoryFile) GetContent() []byte { if x != nil { - return x.Content + return x.xxx_hidden_Content } return nil } @@ -209,7 +211,7 @@ func (x *Request_MemoryFile) SetContent(v []byte) { if v == nil { v = []byte{} } - x.Content = v + x.xxx_hidden_Content = v } type Request_MemoryFile_builder struct { @@ -222,15 +224,15 @@ func (b0 Request_MemoryFile_builder) Build() *Request_MemoryFile { m0 := &Request_MemoryFile{} b, x := &b0, m0 _, _ = b, x - x.Content = b.Content + x.xxx_hidden_Content = b.Content return m0 } type Request_CachedFile struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - FileID string `protobuf:"bytes,1,opt,name=fileID" json:"fileID,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_FileID string `protobuf:"bytes,1,opt,name=fileID"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_CachedFile) Reset() { @@ -260,13 +262,13 @@ func (x *Request_CachedFile) ProtoReflect() protoreflect.Message { func (x *Request_CachedFile) GetFileID() string { if x != nil { - return x.FileID + return x.xxx_hidden_FileID } return "" } func (x *Request_CachedFile) SetFileID(v string) { - x.FileID = v + x.xxx_hidden_FileID = v } type Request_CachedFile_builder struct { @@ -279,17 +281,17 @@ func (b0 Request_CachedFile_builder) Build() *Request_CachedFile { m0 := &Request_CachedFile{} b, x := &b0, m0 _, _ = b, x - x.FileID = b.FileID + x.xxx_hidden_FileID = b.FileID return m0 } type Request_PipeCollector struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Max int64 `protobuf:"varint,2,opt,name=max" json:"max,omitempty"` - Pipe bool `protobuf:"varint,3,opt,name=pipe" json:"pipe,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` + xxx_hidden_Max int64 `protobuf:"varint,2,opt,name=max"` + xxx_hidden_Pipe bool `protobuf:"varint,3,opt,name=pipe"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_PipeCollector) Reset() { @@ -319,35 +321,35 @@ func (x *Request_PipeCollector) ProtoReflect() protoreflect.Message { func (x *Request_PipeCollector) GetName() string { if x != nil { - return x.Name + return x.xxx_hidden_Name } return "" } func (x *Request_PipeCollector) GetMax() int64 { if x != nil { - return x.Max + return x.xxx_hidden_Max } return 0 } func (x *Request_PipeCollector) GetPipe() bool { if x != nil { - return x.Pipe + return x.xxx_hidden_Pipe } return false } func (x *Request_PipeCollector) SetName(v string) { - x.Name = v + x.xxx_hidden_Name = v } func (x *Request_PipeCollector) SetMax(v int64) { - x.Max = v + x.xxx_hidden_Max = v } func (x *Request_PipeCollector) SetPipe(v bool) { - x.Pipe = v + x.xxx_hidden_Pipe = v } type Request_PipeCollector_builder struct { @@ -362,25 +364,17 @@ func (b0 Request_PipeCollector_builder) Build() *Request_PipeCollector { m0 := &Request_PipeCollector{} b, x := &b0, m0 _, _ = b, x - x.Name = b.Name - x.Max = b.Max - x.Pipe = b.Pipe + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Max = b.Max + x.xxx_hidden_Pipe = b.Pipe return m0 } type Request_File struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - // Types that are valid to be assigned to File: - // - // *Request_File_Local - // *Request_File_Memory - // *Request_File_Cached - // *Request_File_Pipe - // *Request_File_StreamIn - // *Request_File_StreamOut - File isRequest_File_File `protobuf_oneof:"file"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_File isRequest_File_File `protobuf_oneof:"file"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_File) Reset() { @@ -408,16 +402,9 @@ func (x *Request_File) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *Request_File) GetFile() isRequest_File_File { - if x != nil { - return x.File - } - return nil -} - func (x *Request_File) GetLocal() *Request_LocalFile { if x != nil { - if x, ok := x.File.(*Request_File_Local); ok { + if x, ok := x.xxx_hidden_File.(*request_File_Local); ok { return x.Local } } @@ -426,7 +413,7 @@ func (x *Request_File) GetLocal() *Request_LocalFile { func (x *Request_File) GetMemory() *Request_MemoryFile { if x != nil { - if x, ok := x.File.(*Request_File_Memory); ok { + if x, ok := x.xxx_hidden_File.(*request_File_Memory); ok { return x.Memory } } @@ -435,7 +422,7 @@ func (x *Request_File) GetMemory() *Request_MemoryFile { func (x *Request_File) GetCached() *Request_CachedFile { if x != nil { - if x, ok := x.File.(*Request_File_Cached); ok { + if x, ok := x.xxx_hidden_File.(*request_File_Cached); ok { return x.Cached } } @@ -444,7 +431,7 @@ func (x *Request_File) GetCached() *Request_CachedFile { func (x *Request_File) GetPipe() *Request_PipeCollector { if x != nil { - if x, ok := x.File.(*Request_File_Pipe); ok { + if x, ok := x.xxx_hidden_File.(*request_File_Pipe); ok { return x.Pipe } } @@ -453,7 +440,7 @@ func (x *Request_File) GetPipe() *Request_PipeCollector { func (x *Request_File) GetStreamIn() *emptypb.Empty { if x != nil { - if x, ok := x.File.(*Request_File_StreamIn); ok { + if x, ok := x.xxx_hidden_File.(*request_File_StreamIn); ok { return x.StreamIn } } @@ -462,7 +449,7 @@ func (x *Request_File) GetStreamIn() *emptypb.Empty { func (x *Request_File) GetStreamOut() *emptypb.Empty { if x != nil { - if x, ok := x.File.(*Request_File_StreamOut); ok { + if x, ok := x.xxx_hidden_File.(*request_File_StreamOut); ok { return x.StreamOut } } @@ -471,64 +458,64 @@ func (x *Request_File) GetStreamOut() *emptypb.Empty { func (x *Request_File) SetLocal(v *Request_LocalFile) { if v == nil { - x.File = nil + x.xxx_hidden_File = nil return } - x.File = &Request_File_Local{v} + x.xxx_hidden_File = &request_File_Local{v} } func (x *Request_File) SetMemory(v *Request_MemoryFile) { if v == nil { - x.File = nil + x.xxx_hidden_File = nil return } - x.File = &Request_File_Memory{v} + x.xxx_hidden_File = &request_File_Memory{v} } func (x *Request_File) SetCached(v *Request_CachedFile) { if v == nil { - x.File = nil + x.xxx_hidden_File = nil return } - x.File = &Request_File_Cached{v} + x.xxx_hidden_File = &request_File_Cached{v} } func (x *Request_File) SetPipe(v *Request_PipeCollector) { if v == nil { - x.File = nil + x.xxx_hidden_File = nil return } - x.File = &Request_File_Pipe{v} + x.xxx_hidden_File = &request_File_Pipe{v} } func (x *Request_File) SetStreamIn(v *emptypb.Empty) { if v == nil { - x.File = nil + x.xxx_hidden_File = nil return } - x.File = &Request_File_StreamIn{v} + x.xxx_hidden_File = &request_File_StreamIn{v} } func (x *Request_File) SetStreamOut(v *emptypb.Empty) { if v == nil { - x.File = nil + x.xxx_hidden_File = nil return } - x.File = &Request_File_StreamOut{v} + x.xxx_hidden_File = &request_File_StreamOut{v} } func (x *Request_File) HasFile() bool { if x == nil { return false } - return x.File != nil + return x.xxx_hidden_File != nil } func (x *Request_File) HasLocal() bool { if x == nil { return false } - _, ok := x.File.(*Request_File_Local) + _, ok := x.xxx_hidden_File.(*request_File_Local) return ok } @@ -536,7 +523,7 @@ func (x *Request_File) HasMemory() bool { if x == nil { return false } - _, ok := x.File.(*Request_File_Memory) + _, ok := x.xxx_hidden_File.(*request_File_Memory) return ok } @@ -544,7 +531,7 @@ func (x *Request_File) HasCached() bool { if x == nil { return false } - _, ok := x.File.(*Request_File_Cached) + _, ok := x.xxx_hidden_File.(*request_File_Cached) return ok } @@ -552,7 +539,7 @@ func (x *Request_File) HasPipe() bool { if x == nil { return false } - _, ok := x.File.(*Request_File_Pipe) + _, ok := x.xxx_hidden_File.(*request_File_Pipe) return ok } @@ -560,7 +547,7 @@ func (x *Request_File) HasStreamIn() bool { if x == nil { return false } - _, ok := x.File.(*Request_File_StreamIn) + _, ok := x.xxx_hidden_File.(*request_File_StreamIn) return ok } @@ -568,47 +555,47 @@ func (x *Request_File) HasStreamOut() bool { if x == nil { return false } - _, ok := x.File.(*Request_File_StreamOut) + _, ok := x.xxx_hidden_File.(*request_File_StreamOut) return ok } func (x *Request_File) ClearFile() { - x.File = nil + x.xxx_hidden_File = nil } func (x *Request_File) ClearLocal() { - if _, ok := x.File.(*Request_File_Local); ok { - x.File = nil + if _, ok := x.xxx_hidden_File.(*request_File_Local); ok { + x.xxx_hidden_File = nil } } func (x *Request_File) ClearMemory() { - if _, ok := x.File.(*Request_File_Memory); ok { - x.File = nil + if _, ok := x.xxx_hidden_File.(*request_File_Memory); ok { + x.xxx_hidden_File = nil } } func (x *Request_File) ClearCached() { - if _, ok := x.File.(*Request_File_Cached); ok { - x.File = nil + if _, ok := x.xxx_hidden_File.(*request_File_Cached); ok { + x.xxx_hidden_File = nil } } func (x *Request_File) ClearPipe() { - if _, ok := x.File.(*Request_File_Pipe); ok { - x.File = nil + if _, ok := x.xxx_hidden_File.(*request_File_Pipe); ok { + x.xxx_hidden_File = nil } } func (x *Request_File) ClearStreamIn() { - if _, ok := x.File.(*Request_File_StreamIn); ok { - x.File = nil + if _, ok := x.xxx_hidden_File.(*request_File_StreamIn); ok { + x.xxx_hidden_File = nil } } func (x *Request_File) ClearStreamOut() { - if _, ok := x.File.(*Request_File_StreamOut); ok { - x.File = nil + if _, ok := x.xxx_hidden_File.(*request_File_StreamOut); ok { + x.xxx_hidden_File = nil } } @@ -624,18 +611,18 @@ func (x *Request_File) WhichFile() case_Request_File_File { if x == nil { return Request_File_File_not_set_case } - switch x.File.(type) { - case *Request_File_Local: + switch x.xxx_hidden_File.(type) { + case *request_File_Local: return Request_File_Local_case - case *Request_File_Memory: + case *request_File_Memory: return Request_File_Memory_case - case *Request_File_Cached: + case *request_File_Cached: return Request_File_Cached_case - case *Request_File_Pipe: + case *request_File_Pipe: return Request_File_Pipe_case - case *Request_File_StreamIn: + case *request_File_StreamIn: return Request_File_StreamIn_case - case *Request_File_StreamOut: + case *request_File_StreamOut: return Request_File_StreamOut_case default: return Request_File_File_not_set_case @@ -645,7 +632,7 @@ func (x *Request_File) WhichFile() case_Request_File_File { type Request_File_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - // Fields of oneof File: + // Fields of oneof xxx_hidden_File: Local *Request_LocalFile Memory *Request_MemoryFile Cached *Request_CachedFile @@ -654,7 +641,7 @@ type Request_File_builder struct { StreamIn *emptypb.Empty // streamOut only valid in streaming RPC StreamOut *emptypb.Empty - // -- end of File + // -- end of xxx_hidden_File } func (b0 Request_File_builder) Build() *Request_File { @@ -662,22 +649,22 @@ func (b0 Request_File_builder) Build() *Request_File { b, x := &b0, m0 _, _ = b, x if b.Local != nil { - x.File = &Request_File_Local{b.Local} + x.xxx_hidden_File = &request_File_Local{b.Local} } if b.Memory != nil { - x.File = &Request_File_Memory{b.Memory} + x.xxx_hidden_File = &request_File_Memory{b.Memory} } if b.Cached != nil { - x.File = &Request_File_Cached{b.Cached} + x.xxx_hidden_File = &request_File_Cached{b.Cached} } if b.Pipe != nil { - x.File = &Request_File_Pipe{b.Pipe} + x.xxx_hidden_File = &request_File_Pipe{b.Pipe} } if b.StreamIn != nil { - x.File = &Request_File_StreamIn{b.StreamIn} + x.xxx_hidden_File = &request_File_StreamIn{b.StreamIn} } if b.StreamOut != nil { - x.File = &Request_File_StreamOut{b.StreamOut} + x.xxx_hidden_File = &request_File_StreamOut{b.StreamOut} } return m0 } @@ -696,67 +683,67 @@ type isRequest_File_File interface { isRequest_File_File() } -type Request_File_Local struct { +type request_File_Local struct { Local *Request_LocalFile `protobuf:"bytes,1,opt,name=local,oneof"` } -type Request_File_Memory struct { +type request_File_Memory struct { Memory *Request_MemoryFile `protobuf:"bytes,2,opt,name=memory,oneof"` } -type Request_File_Cached struct { +type request_File_Cached struct { Cached *Request_CachedFile `protobuf:"bytes,3,opt,name=cached,oneof"` } -type Request_File_Pipe struct { +type request_File_Pipe struct { Pipe *Request_PipeCollector `protobuf:"bytes,4,opt,name=pipe,oneof"` } -type Request_File_StreamIn struct { +type request_File_StreamIn struct { // streamIn only valid in streaming RPC StreamIn *emptypb.Empty `protobuf:"bytes,5,opt,name=streamIn,oneof"` } -type Request_File_StreamOut struct { +type request_File_StreamOut struct { // streamOut only valid in streaming RPC StreamOut *emptypb.Empty `protobuf:"bytes,6,opt,name=streamOut,oneof"` } -func (*Request_File_Local) isRequest_File_File() {} +func (*request_File_Local) isRequest_File_File() {} -func (*Request_File_Memory) isRequest_File_File() {} +func (*request_File_Memory) isRequest_File_File() {} -func (*Request_File_Cached) isRequest_File_File() {} +func (*request_File_Cached) isRequest_File_File() {} -func (*Request_File_Pipe) isRequest_File_File() {} +func (*request_File_Pipe) isRequest_File_File() {} -func (*Request_File_StreamIn) isRequest_File_File() {} +func (*request_File_StreamIn) isRequest_File_File() {} -func (*Request_File_StreamOut) isRequest_File_File() {} +func (*request_File_StreamOut) isRequest_File_File() {} type Request_CmdType struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Args []string `protobuf:"bytes,1,rep,name=args" json:"args,omitempty"` - Env []string `protobuf:"bytes,2,rep,name=env" json:"env,omitempty"` - Files []*Request_File `protobuf:"bytes,3,rep,name=files" json:"files,omitempty"` - Tty bool `protobuf:"varint,13,opt,name=tty" json:"tty,omitempty"` - CpuTimeLimit uint64 `protobuf:"varint,4,opt,name=cpuTimeLimit" json:"cpuTimeLimit,omitempty"` - ClockTimeLimit uint64 `protobuf:"varint,5,opt,name=clockTimeLimit" json:"clockTimeLimit,omitempty"` - MemoryLimit uint64 `protobuf:"varint,6,opt,name=memoryLimit" json:"memoryLimit,omitempty"` - StackLimit uint64 `protobuf:"varint,12,opt,name=stackLimit" json:"stackLimit,omitempty"` - ProcLimit uint64 `protobuf:"varint,7,opt,name=procLimit" json:"procLimit,omitempty"` - CpuRateLimit uint64 `protobuf:"varint,15,opt,name=cpuRateLimit" json:"cpuRateLimit,omitempty"` - CpuSetLimit string `protobuf:"bytes,17,opt,name=cpuSetLimit" json:"cpuSetLimit,omitempty"` - DataSegmentLimit bool `protobuf:"varint,16,opt,name=dataSegmentLimit" json:"dataSegmentLimit,omitempty"` - AddressSpaceLimit bool `protobuf:"varint,19,opt,name=addressSpaceLimit" json:"addressSpaceLimit,omitempty"` - CopyIn map[string]*Request_File `protobuf:"bytes,8,rep,name=copyIn" json:"copyIn,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Symlinks map[string]string `protobuf:"bytes,18,rep,name=symlinks" json:"symlinks,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - CopyOut []*Request_CmdCopyOutFile `protobuf:"bytes,9,rep,name=copyOut" json:"copyOut,omitempty"` - CopyOutCached []*Request_CmdCopyOutFile `protobuf:"bytes,10,rep,name=copyOutCached" json:"copyOutCached,omitempty"` - CopyOutDir string `protobuf:"bytes,11,opt,name=copyOutDir" json:"copyOutDir,omitempty"` - CopyOutMax uint64 `protobuf:"varint,14,opt,name=copyOutMax" json:"copyOutMax,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Args []string `protobuf:"bytes,1,rep,name=args"` + xxx_hidden_Env []string `protobuf:"bytes,2,rep,name=env"` + xxx_hidden_Files *[]*Request_File `protobuf:"bytes,3,rep,name=files"` + xxx_hidden_Tty bool `protobuf:"varint,13,opt,name=tty"` + xxx_hidden_CpuTimeLimit uint64 `protobuf:"varint,4,opt,name=cpuTimeLimit"` + xxx_hidden_ClockTimeLimit uint64 `protobuf:"varint,5,opt,name=clockTimeLimit"` + xxx_hidden_MemoryLimit uint64 `protobuf:"varint,6,opt,name=memoryLimit"` + xxx_hidden_StackLimit uint64 `protobuf:"varint,12,opt,name=stackLimit"` + xxx_hidden_ProcLimit uint64 `protobuf:"varint,7,opt,name=procLimit"` + xxx_hidden_CpuRateLimit uint64 `protobuf:"varint,15,opt,name=cpuRateLimit"` + xxx_hidden_CpuSetLimit string `protobuf:"bytes,17,opt,name=cpuSetLimit"` + xxx_hidden_DataSegmentLimit bool `protobuf:"varint,16,opt,name=dataSegmentLimit"` + xxx_hidden_AddressSpaceLimit bool `protobuf:"varint,19,opt,name=addressSpaceLimit"` + xxx_hidden_CopyIn map[string]*Request_File `protobuf:"bytes,8,rep,name=copyIn" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Symlinks map[string]string `protobuf:"bytes,18,rep,name=symlinks" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_CopyOut *[]*Request_CmdCopyOutFile `protobuf:"bytes,9,rep,name=copyOut"` + xxx_hidden_CopyOutCached *[]*Request_CmdCopyOutFile `protobuf:"bytes,10,rep,name=copyOutCached"` + xxx_hidden_CopyOutDir string `protobuf:"bytes,11,opt,name=copyOutDir"` + xxx_hidden_CopyOutMax uint64 `protobuf:"varint,14,opt,name=copyOutMax"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_CmdType) Reset() { @@ -786,211 +773,217 @@ func (x *Request_CmdType) ProtoReflect() protoreflect.Message { func (x *Request_CmdType) GetArgs() []string { if x != nil { - return x.Args + return x.xxx_hidden_Args } return nil } func (x *Request_CmdType) GetEnv() []string { if x != nil { - return x.Env + return x.xxx_hidden_Env } return nil } func (x *Request_CmdType) GetFiles() []*Request_File { if x != nil { - return x.Files + if x.xxx_hidden_Files != nil { + return *x.xxx_hidden_Files + } } return nil } func (x *Request_CmdType) GetTty() bool { if x != nil { - return x.Tty + return x.xxx_hidden_Tty } return false } func (x *Request_CmdType) GetCpuTimeLimit() uint64 { if x != nil { - return x.CpuTimeLimit + return x.xxx_hidden_CpuTimeLimit } return 0 } func (x *Request_CmdType) GetClockTimeLimit() uint64 { if x != nil { - return x.ClockTimeLimit + return x.xxx_hidden_ClockTimeLimit } return 0 } func (x *Request_CmdType) GetMemoryLimit() uint64 { if x != nil { - return x.MemoryLimit + return x.xxx_hidden_MemoryLimit } return 0 } func (x *Request_CmdType) GetStackLimit() uint64 { if x != nil { - return x.StackLimit + return x.xxx_hidden_StackLimit } return 0 } func (x *Request_CmdType) GetProcLimit() uint64 { if x != nil { - return x.ProcLimit + return x.xxx_hidden_ProcLimit } return 0 } func (x *Request_CmdType) GetCpuRateLimit() uint64 { if x != nil { - return x.CpuRateLimit + return x.xxx_hidden_CpuRateLimit } return 0 } func (x *Request_CmdType) GetCpuSetLimit() string { if x != nil { - return x.CpuSetLimit + return x.xxx_hidden_CpuSetLimit } return "" } func (x *Request_CmdType) GetDataSegmentLimit() bool { if x != nil { - return x.DataSegmentLimit + return x.xxx_hidden_DataSegmentLimit } return false } func (x *Request_CmdType) GetAddressSpaceLimit() bool { if x != nil { - return x.AddressSpaceLimit + return x.xxx_hidden_AddressSpaceLimit } return false } func (x *Request_CmdType) GetCopyIn() map[string]*Request_File { if x != nil { - return x.CopyIn + return x.xxx_hidden_CopyIn } return nil } func (x *Request_CmdType) GetSymlinks() map[string]string { if x != nil { - return x.Symlinks + return x.xxx_hidden_Symlinks } return nil } func (x *Request_CmdType) GetCopyOut() []*Request_CmdCopyOutFile { if x != nil { - return x.CopyOut + if x.xxx_hidden_CopyOut != nil { + return *x.xxx_hidden_CopyOut + } } return nil } func (x *Request_CmdType) GetCopyOutCached() []*Request_CmdCopyOutFile { if x != nil { - return x.CopyOutCached + if x.xxx_hidden_CopyOutCached != nil { + return *x.xxx_hidden_CopyOutCached + } } return nil } func (x *Request_CmdType) GetCopyOutDir() string { if x != nil { - return x.CopyOutDir + return x.xxx_hidden_CopyOutDir } return "" } func (x *Request_CmdType) GetCopyOutMax() uint64 { if x != nil { - return x.CopyOutMax + return x.xxx_hidden_CopyOutMax } return 0 } func (x *Request_CmdType) SetArgs(v []string) { - x.Args = v + x.xxx_hidden_Args = v } func (x *Request_CmdType) SetEnv(v []string) { - x.Env = v + x.xxx_hidden_Env = v } func (x *Request_CmdType) SetFiles(v []*Request_File) { - x.Files = v + x.xxx_hidden_Files = &v } func (x *Request_CmdType) SetTty(v bool) { - x.Tty = v + x.xxx_hidden_Tty = v } func (x *Request_CmdType) SetCpuTimeLimit(v uint64) { - x.CpuTimeLimit = v + x.xxx_hidden_CpuTimeLimit = v } func (x *Request_CmdType) SetClockTimeLimit(v uint64) { - x.ClockTimeLimit = v + x.xxx_hidden_ClockTimeLimit = v } func (x *Request_CmdType) SetMemoryLimit(v uint64) { - x.MemoryLimit = v + x.xxx_hidden_MemoryLimit = v } func (x *Request_CmdType) SetStackLimit(v uint64) { - x.StackLimit = v + x.xxx_hidden_StackLimit = v } func (x *Request_CmdType) SetProcLimit(v uint64) { - x.ProcLimit = v + x.xxx_hidden_ProcLimit = v } func (x *Request_CmdType) SetCpuRateLimit(v uint64) { - x.CpuRateLimit = v + x.xxx_hidden_CpuRateLimit = v } func (x *Request_CmdType) SetCpuSetLimit(v string) { - x.CpuSetLimit = v + x.xxx_hidden_CpuSetLimit = v } func (x *Request_CmdType) SetDataSegmentLimit(v bool) { - x.DataSegmentLimit = v + x.xxx_hidden_DataSegmentLimit = v } func (x *Request_CmdType) SetAddressSpaceLimit(v bool) { - x.AddressSpaceLimit = v + x.xxx_hidden_AddressSpaceLimit = v } func (x *Request_CmdType) SetCopyIn(v map[string]*Request_File) { - x.CopyIn = v + x.xxx_hidden_CopyIn = v } func (x *Request_CmdType) SetSymlinks(v map[string]string) { - x.Symlinks = v + x.xxx_hidden_Symlinks = v } func (x *Request_CmdType) SetCopyOut(v []*Request_CmdCopyOutFile) { - x.CopyOut = v + x.xxx_hidden_CopyOut = &v } func (x *Request_CmdType) SetCopyOutCached(v []*Request_CmdCopyOutFile) { - x.CopyOutCached = v + x.xxx_hidden_CopyOutCached = &v } func (x *Request_CmdType) SetCopyOutDir(v string) { - x.CopyOutDir = v + x.xxx_hidden_CopyOutDir = v } func (x *Request_CmdType) SetCopyOutMax(v uint64) { - x.CopyOutMax = v + x.xxx_hidden_CopyOutMax = v } type Request_CmdType_builder struct { @@ -1021,34 +1014,34 @@ func (b0 Request_CmdType_builder) Build() *Request_CmdType { m0 := &Request_CmdType{} b, x := &b0, m0 _, _ = b, x - x.Args = b.Args - x.Env = b.Env - x.Files = b.Files - x.Tty = b.Tty - x.CpuTimeLimit = b.CpuTimeLimit - x.ClockTimeLimit = b.ClockTimeLimit - x.MemoryLimit = b.MemoryLimit - x.StackLimit = b.StackLimit - x.ProcLimit = b.ProcLimit - x.CpuRateLimit = b.CpuRateLimit - x.CpuSetLimit = b.CpuSetLimit - x.DataSegmentLimit = b.DataSegmentLimit - x.AddressSpaceLimit = b.AddressSpaceLimit - x.CopyIn = b.CopyIn - x.Symlinks = b.Symlinks - x.CopyOut = b.CopyOut - x.CopyOutCached = b.CopyOutCached - x.CopyOutDir = b.CopyOutDir - x.CopyOutMax = b.CopyOutMax + x.xxx_hidden_Args = b.Args + x.xxx_hidden_Env = b.Env + x.xxx_hidden_Files = &b.Files + x.xxx_hidden_Tty = b.Tty + x.xxx_hidden_CpuTimeLimit = b.CpuTimeLimit + x.xxx_hidden_ClockTimeLimit = b.ClockTimeLimit + x.xxx_hidden_MemoryLimit = b.MemoryLimit + x.xxx_hidden_StackLimit = b.StackLimit + x.xxx_hidden_ProcLimit = b.ProcLimit + x.xxx_hidden_CpuRateLimit = b.CpuRateLimit + x.xxx_hidden_CpuSetLimit = b.CpuSetLimit + x.xxx_hidden_DataSegmentLimit = b.DataSegmentLimit + x.xxx_hidden_AddressSpaceLimit = b.AddressSpaceLimit + x.xxx_hidden_CopyIn = b.CopyIn + x.xxx_hidden_Symlinks = b.Symlinks + x.xxx_hidden_CopyOut = &b.CopyOut + x.xxx_hidden_CopyOutCached = &b.CopyOutCached + x.xxx_hidden_CopyOutDir = b.CopyOutDir + x.xxx_hidden_CopyOutMax = b.CopyOutMax return m0 } type Request_CmdCopyOutFile struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Optional bool `protobuf:"varint,2,opt,name=optional" json:"optional,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` + xxx_hidden_Optional bool `protobuf:"varint,2,opt,name=optional"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_CmdCopyOutFile) Reset() { @@ -1078,24 +1071,24 @@ func (x *Request_CmdCopyOutFile) ProtoReflect() protoreflect.Message { func (x *Request_CmdCopyOutFile) GetName() string { if x != nil { - return x.Name + return x.xxx_hidden_Name } return "" } func (x *Request_CmdCopyOutFile) GetOptional() bool { if x != nil { - return x.Optional + return x.xxx_hidden_Optional } return false } func (x *Request_CmdCopyOutFile) SetName(v string) { - x.Name = v + x.xxx_hidden_Name = v } func (x *Request_CmdCopyOutFile) SetOptional(v bool) { - x.Optional = v + x.xxx_hidden_Optional = v } type Request_CmdCopyOutFile_builder struct { @@ -1109,20 +1102,20 @@ func (b0 Request_CmdCopyOutFile_builder) Build() *Request_CmdCopyOutFile { m0 := &Request_CmdCopyOutFile{} b, x := &b0, m0 _, _ = b, x - x.Name = b.Name - x.Optional = b.Optional + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Optional = b.Optional return m0 } type Request_PipeMap struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - In *Request_PipeMap_PipeIndex `protobuf:"bytes,1,opt,name=in" json:"in,omitempty"` - Out *Request_PipeMap_PipeIndex `protobuf:"bytes,2,opt,name=out" json:"out,omitempty"` - Proxy bool `protobuf:"varint,3,opt,name=proxy" json:"proxy,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` - Max uint64 `protobuf:"varint,5,opt,name=max" json:"max,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_In *Request_PipeMap_PipeIndex `protobuf:"bytes,1,opt,name=in"` + xxx_hidden_Out *Request_PipeMap_PipeIndex `protobuf:"bytes,2,opt,name=out"` + xxx_hidden_Proxy bool `protobuf:"varint,3,opt,name=proxy"` + xxx_hidden_Name string `protobuf:"bytes,4,opt,name=name"` + xxx_hidden_Max uint64 `protobuf:"varint,5,opt,name=max"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_PipeMap) Reset() { @@ -1152,79 +1145,79 @@ func (x *Request_PipeMap) ProtoReflect() protoreflect.Message { func (x *Request_PipeMap) GetIn() *Request_PipeMap_PipeIndex { if x != nil { - return x.In + return x.xxx_hidden_In } return nil } func (x *Request_PipeMap) GetOut() *Request_PipeMap_PipeIndex { if x != nil { - return x.Out + return x.xxx_hidden_Out } return nil } func (x *Request_PipeMap) GetProxy() bool { if x != nil { - return x.Proxy + return x.xxx_hidden_Proxy } return false } func (x *Request_PipeMap) GetName() string { if x != nil { - return x.Name + return x.xxx_hidden_Name } return "" } func (x *Request_PipeMap) GetMax() uint64 { if x != nil { - return x.Max + return x.xxx_hidden_Max } return 0 } func (x *Request_PipeMap) SetIn(v *Request_PipeMap_PipeIndex) { - x.In = v + x.xxx_hidden_In = v } func (x *Request_PipeMap) SetOut(v *Request_PipeMap_PipeIndex) { - x.Out = v + x.xxx_hidden_Out = v } func (x *Request_PipeMap) SetProxy(v bool) { - x.Proxy = v + x.xxx_hidden_Proxy = v } func (x *Request_PipeMap) SetName(v string) { - x.Name = v + x.xxx_hidden_Name = v } func (x *Request_PipeMap) SetMax(v uint64) { - x.Max = v + x.xxx_hidden_Max = v } func (x *Request_PipeMap) HasIn() bool { if x == nil { return false } - return x.In != nil + return x.xxx_hidden_In != nil } func (x *Request_PipeMap) HasOut() bool { if x == nil { return false } - return x.Out != nil + return x.xxx_hidden_Out != nil } func (x *Request_PipeMap) ClearIn() { - x.In = nil + x.xxx_hidden_In = nil } func (x *Request_PipeMap) ClearOut() { - x.Out = nil + x.xxx_hidden_Out = nil } type Request_PipeMap_builder struct { @@ -1241,20 +1234,20 @@ func (b0 Request_PipeMap_builder) Build() *Request_PipeMap { m0 := &Request_PipeMap{} b, x := &b0, m0 _, _ = b, x - x.In = b.In - x.Out = b.Out - x.Proxy = b.Proxy - x.Name = b.Name - x.Max = b.Max + x.xxx_hidden_In = b.In + x.xxx_hidden_Out = b.Out + x.xxx_hidden_Proxy = b.Proxy + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Max = b.Max return m0 } type Request_PipeMap_PipeIndex struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Index int32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` - Fd int32 `protobuf:"varint,2,opt,name=fd" json:"fd,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Index int32 `protobuf:"varint,1,opt,name=index"` + xxx_hidden_Fd int32 `protobuf:"varint,2,opt,name=fd"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Request_PipeMap_PipeIndex) Reset() { @@ -1284,24 +1277,24 @@ func (x *Request_PipeMap_PipeIndex) ProtoReflect() protoreflect.Message { func (x *Request_PipeMap_PipeIndex) GetIndex() int32 { if x != nil { - return x.Index + return x.xxx_hidden_Index } return 0 } func (x *Request_PipeMap_PipeIndex) GetFd() int32 { if x != nil { - return x.Fd + return x.xxx_hidden_Fd } return 0 } func (x *Request_PipeMap_PipeIndex) SetIndex(v int32) { - x.Index = v + x.xxx_hidden_Index = v } func (x *Request_PipeMap_PipeIndex) SetFd(v int32) { - x.Fd = v + x.xxx_hidden_Fd = v } type Request_PipeMap_PipeIndex_builder struct { @@ -1315,8 +1308,8 @@ func (b0 Request_PipeMap_PipeIndex_builder) Build() *Request_PipeMap_PipeIndex { m0 := &Request_PipeMap_PipeIndex{} b, x := &b0, m0 _, _ = b, x - x.Index = b.Index - x.Fd = b.Fd + x.xxx_hidden_Index = b.Index + x.xxx_hidden_Fd = b.Fd return m0 } @@ -1393,7 +1386,7 @@ const file_request_proto_rawDesc = "" + "\x03max\x18\x05 \x01(\x04R\x03max\x1a1\n" + "\tPipeIndex\x12\x14\n" + "\x05index\x18\x01 \x01(\x05R\x05index\x12\x0e\n" + - "\x02fd\x18\x02 \x01(\x05R\x02fdB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" + "\x02fd\x18\x02 \x01(\x05R\x02fdB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a" var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_request_proto_goTypes = []any{ @@ -1441,12 +1434,12 @@ func file_request_proto_init() { return } file_request_proto_msgTypes[5].OneofWrappers = []any{ - (*Request_File_Local)(nil), - (*Request_File_Memory)(nil), - (*Request_File_Cached)(nil), - (*Request_File_Pipe)(nil), - (*Request_File_StreamIn)(nil), - (*Request_File_StreamOut)(nil), + (*request_File_Local)(nil), + (*request_File_Memory)(nil), + (*request_File_Cached)(nil), + (*request_File_Pipe)(nil), + (*request_File_StreamIn)(nil), + (*request_File_StreamOut)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pb/request.proto b/pb/request.proto index b2bcf19..8e2eeca 100644 --- a/pb/request.proto +++ b/pb/request.proto @@ -4,7 +4,7 @@ package pb; option features.field_presence = IMPLICIT; option go_package = "github.com/criyle/go-judge/pb"; -option features.(pb.go).api_level = API_HYBRID; +option features.(pb.go).api_level = API_OPAQUE; import "google/protobuf/empty.proto"; import "google/protobuf/go_features.proto"; diff --git a/pb/request_protoopaque.pb.go b/pb/request_protoopaque.pb.go deleted file mode 100644 index df4da61..0000000 --- a/pb/request_protoopaque.pb.go +++ /dev/null @@ -1,1463 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v6.31.1 -// source: request.proto - -//go:build protoopaque - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/gofeaturespb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - 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 Request struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_RequestID string `protobuf:"bytes,1,opt,name=requestID"` - xxx_hidden_Cmd *[]*Request_CmdType `protobuf:"bytes,2,rep,name=cmd"` - xxx_hidden_PipeMapping *[]*Request_PipeMap `protobuf:"bytes,3,rep,name=pipeMapping"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request) Reset() { - *x = Request{} - mi := &file_request_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request) ProtoMessage() {} - -func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_request_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) -} - -func (x *Request) GetRequestID() string { - if x != nil { - return x.xxx_hidden_RequestID - } - return "" -} - -func (x *Request) GetCmd() []*Request_CmdType { - if x != nil { - if x.xxx_hidden_Cmd != nil { - return *x.xxx_hidden_Cmd - } - } - return nil -} - -func (x *Request) GetPipeMapping() []*Request_PipeMap { - if x != nil { - if x.xxx_hidden_PipeMapping != nil { - return *x.xxx_hidden_PipeMapping - } - } - return nil -} - -func (x *Request) SetRequestID(v string) { - x.xxx_hidden_RequestID = v -} - -func (x *Request) SetCmd(v []*Request_CmdType) { - x.xxx_hidden_Cmd = &v -} - -func (x *Request) SetPipeMapping(v []*Request_PipeMap) { - x.xxx_hidden_PipeMapping = &v -} - -type Request_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - RequestID string - Cmd []*Request_CmdType - PipeMapping []*Request_PipeMap -} - -func (b0 Request_builder) Build() *Request { - m0 := &Request{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_RequestID = b.RequestID - x.xxx_hidden_Cmd = &b.Cmd - x.xxx_hidden_PipeMapping = &b.PipeMapping - return m0 -} - -type Request_LocalFile struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Src string `protobuf:"bytes,1,opt,name=src"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_LocalFile) Reset() { - *x = Request_LocalFile{} - mi := &file_request_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_LocalFile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_LocalFile) ProtoMessage() {} - -func (x *Request_LocalFile) ProtoReflect() protoreflect.Message { - mi := &file_request_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) -} - -func (x *Request_LocalFile) GetSrc() string { - if x != nil { - return x.xxx_hidden_Src - } - return "" -} - -func (x *Request_LocalFile) SetSrc(v string) { - x.xxx_hidden_Src = v -} - -type Request_LocalFile_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Src string -} - -func (b0 Request_LocalFile_builder) Build() *Request_LocalFile { - m0 := &Request_LocalFile{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Src = b.Src - return m0 -} - -type Request_MemoryFile struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Content []byte `protobuf:"bytes,1,opt,name=content"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_MemoryFile) Reset() { - *x = Request_MemoryFile{} - mi := &file_request_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_MemoryFile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_MemoryFile) ProtoMessage() {} - -func (x *Request_MemoryFile) ProtoReflect() protoreflect.Message { - mi := &file_request_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) -} - -func (x *Request_MemoryFile) GetContent() []byte { - if x != nil { - return x.xxx_hidden_Content - } - return nil -} - -func (x *Request_MemoryFile) SetContent(v []byte) { - if v == nil { - v = []byte{} - } - x.xxx_hidden_Content = v -} - -type Request_MemoryFile_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Content []byte -} - -func (b0 Request_MemoryFile_builder) Build() *Request_MemoryFile { - m0 := &Request_MemoryFile{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Content = b.Content - return m0 -} - -type Request_CachedFile struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_FileID string `protobuf:"bytes,1,opt,name=fileID"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_CachedFile) Reset() { - *x = Request_CachedFile{} - mi := &file_request_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_CachedFile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_CachedFile) ProtoMessage() {} - -func (x *Request_CachedFile) ProtoReflect() protoreflect.Message { - mi := &file_request_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) -} - -func (x *Request_CachedFile) GetFileID() string { - if x != nil { - return x.xxx_hidden_FileID - } - return "" -} - -func (x *Request_CachedFile) SetFileID(v string) { - x.xxx_hidden_FileID = v -} - -type Request_CachedFile_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - FileID string -} - -func (b0 Request_CachedFile_builder) Build() *Request_CachedFile { - m0 := &Request_CachedFile{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_FileID = b.FileID - return m0 -} - -type Request_PipeCollector struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` - xxx_hidden_Max int64 `protobuf:"varint,2,opt,name=max"` - xxx_hidden_Pipe bool `protobuf:"varint,3,opt,name=pipe"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_PipeCollector) Reset() { - *x = Request_PipeCollector{} - mi := &file_request_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_PipeCollector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_PipeCollector) ProtoMessage() {} - -func (x *Request_PipeCollector) ProtoReflect() protoreflect.Message { - mi := &file_request_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *Request_PipeCollector) GetName() string { - if x != nil { - return x.xxx_hidden_Name - } - return "" -} - -func (x *Request_PipeCollector) GetMax() int64 { - if x != nil { - return x.xxx_hidden_Max - } - return 0 -} - -func (x *Request_PipeCollector) GetPipe() bool { - if x != nil { - return x.xxx_hidden_Pipe - } - return false -} - -func (x *Request_PipeCollector) SetName(v string) { - x.xxx_hidden_Name = v -} - -func (x *Request_PipeCollector) SetMax(v int64) { - x.xxx_hidden_Max = v -} - -func (x *Request_PipeCollector) SetPipe(v bool) { - x.xxx_hidden_Pipe = v -} - -type Request_PipeCollector_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Name string - Max int64 - Pipe bool -} - -func (b0 Request_PipeCollector_builder) Build() *Request_PipeCollector { - m0 := &Request_PipeCollector{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Name = b.Name - x.xxx_hidden_Max = b.Max - x.xxx_hidden_Pipe = b.Pipe - return m0 -} - -type Request_File struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_File isRequest_File_File `protobuf_oneof:"file"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_File) Reset() { - *x = Request_File{} - mi := &file_request_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_File) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_File) ProtoMessage() {} - -func (x *Request_File) ProtoReflect() protoreflect.Message { - mi := &file_request_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *Request_File) GetLocal() *Request_LocalFile { - if x != nil { - if x, ok := x.xxx_hidden_File.(*request_File_Local); ok { - return x.Local - } - } - return nil -} - -func (x *Request_File) GetMemory() *Request_MemoryFile { - if x != nil { - if x, ok := x.xxx_hidden_File.(*request_File_Memory); ok { - return x.Memory - } - } - return nil -} - -func (x *Request_File) GetCached() *Request_CachedFile { - if x != nil { - if x, ok := x.xxx_hidden_File.(*request_File_Cached); ok { - return x.Cached - } - } - return nil -} - -func (x *Request_File) GetPipe() *Request_PipeCollector { - if x != nil { - if x, ok := x.xxx_hidden_File.(*request_File_Pipe); ok { - return x.Pipe - } - } - return nil -} - -func (x *Request_File) GetStreamIn() *emptypb.Empty { - if x != nil { - if x, ok := x.xxx_hidden_File.(*request_File_StreamIn); ok { - return x.StreamIn - } - } - return nil -} - -func (x *Request_File) GetStreamOut() *emptypb.Empty { - if x != nil { - if x, ok := x.xxx_hidden_File.(*request_File_StreamOut); ok { - return x.StreamOut - } - } - return nil -} - -func (x *Request_File) SetLocal(v *Request_LocalFile) { - if v == nil { - x.xxx_hidden_File = nil - return - } - x.xxx_hidden_File = &request_File_Local{v} -} - -func (x *Request_File) SetMemory(v *Request_MemoryFile) { - if v == nil { - x.xxx_hidden_File = nil - return - } - x.xxx_hidden_File = &request_File_Memory{v} -} - -func (x *Request_File) SetCached(v *Request_CachedFile) { - if v == nil { - x.xxx_hidden_File = nil - return - } - x.xxx_hidden_File = &request_File_Cached{v} -} - -func (x *Request_File) SetPipe(v *Request_PipeCollector) { - if v == nil { - x.xxx_hidden_File = nil - return - } - x.xxx_hidden_File = &request_File_Pipe{v} -} - -func (x *Request_File) SetStreamIn(v *emptypb.Empty) { - if v == nil { - x.xxx_hidden_File = nil - return - } - x.xxx_hidden_File = &request_File_StreamIn{v} -} - -func (x *Request_File) SetStreamOut(v *emptypb.Empty) { - if v == nil { - x.xxx_hidden_File = nil - return - } - x.xxx_hidden_File = &request_File_StreamOut{v} -} - -func (x *Request_File) HasFile() bool { - if x == nil { - return false - } - return x.xxx_hidden_File != nil -} - -func (x *Request_File) HasLocal() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_File.(*request_File_Local) - return ok -} - -func (x *Request_File) HasMemory() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_File.(*request_File_Memory) - return ok -} - -func (x *Request_File) HasCached() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_File.(*request_File_Cached) - return ok -} - -func (x *Request_File) HasPipe() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_File.(*request_File_Pipe) - return ok -} - -func (x *Request_File) HasStreamIn() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_File.(*request_File_StreamIn) - return ok -} - -func (x *Request_File) HasStreamOut() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_File.(*request_File_StreamOut) - return ok -} - -func (x *Request_File) ClearFile() { - x.xxx_hidden_File = nil -} - -func (x *Request_File) ClearLocal() { - if _, ok := x.xxx_hidden_File.(*request_File_Local); ok { - x.xxx_hidden_File = nil - } -} - -func (x *Request_File) ClearMemory() { - if _, ok := x.xxx_hidden_File.(*request_File_Memory); ok { - x.xxx_hidden_File = nil - } -} - -func (x *Request_File) ClearCached() { - if _, ok := x.xxx_hidden_File.(*request_File_Cached); ok { - x.xxx_hidden_File = nil - } -} - -func (x *Request_File) ClearPipe() { - if _, ok := x.xxx_hidden_File.(*request_File_Pipe); ok { - x.xxx_hidden_File = nil - } -} - -func (x *Request_File) ClearStreamIn() { - if _, ok := x.xxx_hidden_File.(*request_File_StreamIn); ok { - x.xxx_hidden_File = nil - } -} - -func (x *Request_File) ClearStreamOut() { - if _, ok := x.xxx_hidden_File.(*request_File_StreamOut); ok { - x.xxx_hidden_File = nil - } -} - -const Request_File_File_not_set_case case_Request_File_File = 0 -const Request_File_Local_case case_Request_File_File = 1 -const Request_File_Memory_case case_Request_File_File = 2 -const Request_File_Cached_case case_Request_File_File = 3 -const Request_File_Pipe_case case_Request_File_File = 4 -const Request_File_StreamIn_case case_Request_File_File = 5 -const Request_File_StreamOut_case case_Request_File_File = 6 - -func (x *Request_File) WhichFile() case_Request_File_File { - if x == nil { - return Request_File_File_not_set_case - } - switch x.xxx_hidden_File.(type) { - case *request_File_Local: - return Request_File_Local_case - case *request_File_Memory: - return Request_File_Memory_case - case *request_File_Cached: - return Request_File_Cached_case - case *request_File_Pipe: - return Request_File_Pipe_case - case *request_File_StreamIn: - return Request_File_StreamIn_case - case *request_File_StreamOut: - return Request_File_StreamOut_case - default: - return Request_File_File_not_set_case - } -} - -type Request_File_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - // Fields of oneof xxx_hidden_File: - Local *Request_LocalFile - Memory *Request_MemoryFile - Cached *Request_CachedFile - Pipe *Request_PipeCollector - // streamIn only valid in streaming RPC - StreamIn *emptypb.Empty - // streamOut only valid in streaming RPC - StreamOut *emptypb.Empty - // -- end of xxx_hidden_File -} - -func (b0 Request_File_builder) Build() *Request_File { - m0 := &Request_File{} - b, x := &b0, m0 - _, _ = b, x - if b.Local != nil { - x.xxx_hidden_File = &request_File_Local{b.Local} - } - if b.Memory != nil { - x.xxx_hidden_File = &request_File_Memory{b.Memory} - } - if b.Cached != nil { - x.xxx_hidden_File = &request_File_Cached{b.Cached} - } - if b.Pipe != nil { - x.xxx_hidden_File = &request_File_Pipe{b.Pipe} - } - if b.StreamIn != nil { - x.xxx_hidden_File = &request_File_StreamIn{b.StreamIn} - } - if b.StreamOut != nil { - x.xxx_hidden_File = &request_File_StreamOut{b.StreamOut} - } - return m0 -} - -type case_Request_File_File protoreflect.FieldNumber - -func (x case_Request_File_File) String() string { - md := file_request_proto_msgTypes[5].Descriptor() - if x == 0 { - return "not set" - } - return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) -} - -type isRequest_File_File interface { - isRequest_File_File() -} - -type request_File_Local struct { - Local *Request_LocalFile `protobuf:"bytes,1,opt,name=local,oneof"` -} - -type request_File_Memory struct { - Memory *Request_MemoryFile `protobuf:"bytes,2,opt,name=memory,oneof"` -} - -type request_File_Cached struct { - Cached *Request_CachedFile `protobuf:"bytes,3,opt,name=cached,oneof"` -} - -type request_File_Pipe struct { - Pipe *Request_PipeCollector `protobuf:"bytes,4,opt,name=pipe,oneof"` -} - -type request_File_StreamIn struct { - // streamIn only valid in streaming RPC - StreamIn *emptypb.Empty `protobuf:"bytes,5,opt,name=streamIn,oneof"` -} - -type request_File_StreamOut struct { - // streamOut only valid in streaming RPC - StreamOut *emptypb.Empty `protobuf:"bytes,6,opt,name=streamOut,oneof"` -} - -func (*request_File_Local) isRequest_File_File() {} - -func (*request_File_Memory) isRequest_File_File() {} - -func (*request_File_Cached) isRequest_File_File() {} - -func (*request_File_Pipe) isRequest_File_File() {} - -func (*request_File_StreamIn) isRequest_File_File() {} - -func (*request_File_StreamOut) isRequest_File_File() {} - -type Request_CmdType struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Args []string `protobuf:"bytes,1,rep,name=args"` - xxx_hidden_Env []string `protobuf:"bytes,2,rep,name=env"` - xxx_hidden_Files *[]*Request_File `protobuf:"bytes,3,rep,name=files"` - xxx_hidden_Tty bool `protobuf:"varint,13,opt,name=tty"` - xxx_hidden_CpuTimeLimit uint64 `protobuf:"varint,4,opt,name=cpuTimeLimit"` - xxx_hidden_ClockTimeLimit uint64 `protobuf:"varint,5,opt,name=clockTimeLimit"` - xxx_hidden_MemoryLimit uint64 `protobuf:"varint,6,opt,name=memoryLimit"` - xxx_hidden_StackLimit uint64 `protobuf:"varint,12,opt,name=stackLimit"` - xxx_hidden_ProcLimit uint64 `protobuf:"varint,7,opt,name=procLimit"` - xxx_hidden_CpuRateLimit uint64 `protobuf:"varint,15,opt,name=cpuRateLimit"` - xxx_hidden_CpuSetLimit string `protobuf:"bytes,17,opt,name=cpuSetLimit"` - xxx_hidden_DataSegmentLimit bool `protobuf:"varint,16,opt,name=dataSegmentLimit"` - xxx_hidden_AddressSpaceLimit bool `protobuf:"varint,19,opt,name=addressSpaceLimit"` - xxx_hidden_CopyIn map[string]*Request_File `protobuf:"bytes,8,rep,name=copyIn" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - xxx_hidden_Symlinks map[string]string `protobuf:"bytes,18,rep,name=symlinks" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - xxx_hidden_CopyOut *[]*Request_CmdCopyOutFile `protobuf:"bytes,9,rep,name=copyOut"` - xxx_hidden_CopyOutCached *[]*Request_CmdCopyOutFile `protobuf:"bytes,10,rep,name=copyOutCached"` - xxx_hidden_CopyOutDir string `protobuf:"bytes,11,opt,name=copyOutDir"` - xxx_hidden_CopyOutMax uint64 `protobuf:"varint,14,opt,name=copyOutMax"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_CmdType) Reset() { - *x = Request_CmdType{} - mi := &file_request_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_CmdType) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_CmdType) ProtoMessage() {} - -func (x *Request_CmdType) ProtoReflect() protoreflect.Message { - mi := &file_request_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *Request_CmdType) GetArgs() []string { - if x != nil { - return x.xxx_hidden_Args - } - return nil -} - -func (x *Request_CmdType) GetEnv() []string { - if x != nil { - return x.xxx_hidden_Env - } - return nil -} - -func (x *Request_CmdType) GetFiles() []*Request_File { - if x != nil { - if x.xxx_hidden_Files != nil { - return *x.xxx_hidden_Files - } - } - return nil -} - -func (x *Request_CmdType) GetTty() bool { - if x != nil { - return x.xxx_hidden_Tty - } - return false -} - -func (x *Request_CmdType) GetCpuTimeLimit() uint64 { - if x != nil { - return x.xxx_hidden_CpuTimeLimit - } - return 0 -} - -func (x *Request_CmdType) GetClockTimeLimit() uint64 { - if x != nil { - return x.xxx_hidden_ClockTimeLimit - } - return 0 -} - -func (x *Request_CmdType) GetMemoryLimit() uint64 { - if x != nil { - return x.xxx_hidden_MemoryLimit - } - return 0 -} - -func (x *Request_CmdType) GetStackLimit() uint64 { - if x != nil { - return x.xxx_hidden_StackLimit - } - return 0 -} - -func (x *Request_CmdType) GetProcLimit() uint64 { - if x != nil { - return x.xxx_hidden_ProcLimit - } - return 0 -} - -func (x *Request_CmdType) GetCpuRateLimit() uint64 { - if x != nil { - return x.xxx_hidden_CpuRateLimit - } - return 0 -} - -func (x *Request_CmdType) GetCpuSetLimit() string { - if x != nil { - return x.xxx_hidden_CpuSetLimit - } - return "" -} - -func (x *Request_CmdType) GetDataSegmentLimit() bool { - if x != nil { - return x.xxx_hidden_DataSegmentLimit - } - return false -} - -func (x *Request_CmdType) GetAddressSpaceLimit() bool { - if x != nil { - return x.xxx_hidden_AddressSpaceLimit - } - return false -} - -func (x *Request_CmdType) GetCopyIn() map[string]*Request_File { - if x != nil { - return x.xxx_hidden_CopyIn - } - return nil -} - -func (x *Request_CmdType) GetSymlinks() map[string]string { - if x != nil { - return x.xxx_hidden_Symlinks - } - return nil -} - -func (x *Request_CmdType) GetCopyOut() []*Request_CmdCopyOutFile { - if x != nil { - if x.xxx_hidden_CopyOut != nil { - return *x.xxx_hidden_CopyOut - } - } - return nil -} - -func (x *Request_CmdType) GetCopyOutCached() []*Request_CmdCopyOutFile { - if x != nil { - if x.xxx_hidden_CopyOutCached != nil { - return *x.xxx_hidden_CopyOutCached - } - } - return nil -} - -func (x *Request_CmdType) GetCopyOutDir() string { - if x != nil { - return x.xxx_hidden_CopyOutDir - } - return "" -} - -func (x *Request_CmdType) GetCopyOutMax() uint64 { - if x != nil { - return x.xxx_hidden_CopyOutMax - } - return 0 -} - -func (x *Request_CmdType) SetArgs(v []string) { - x.xxx_hidden_Args = v -} - -func (x *Request_CmdType) SetEnv(v []string) { - x.xxx_hidden_Env = v -} - -func (x *Request_CmdType) SetFiles(v []*Request_File) { - x.xxx_hidden_Files = &v -} - -func (x *Request_CmdType) SetTty(v bool) { - x.xxx_hidden_Tty = v -} - -func (x *Request_CmdType) SetCpuTimeLimit(v uint64) { - x.xxx_hidden_CpuTimeLimit = v -} - -func (x *Request_CmdType) SetClockTimeLimit(v uint64) { - x.xxx_hidden_ClockTimeLimit = v -} - -func (x *Request_CmdType) SetMemoryLimit(v uint64) { - x.xxx_hidden_MemoryLimit = v -} - -func (x *Request_CmdType) SetStackLimit(v uint64) { - x.xxx_hidden_StackLimit = v -} - -func (x *Request_CmdType) SetProcLimit(v uint64) { - x.xxx_hidden_ProcLimit = v -} - -func (x *Request_CmdType) SetCpuRateLimit(v uint64) { - x.xxx_hidden_CpuRateLimit = v -} - -func (x *Request_CmdType) SetCpuSetLimit(v string) { - x.xxx_hidden_CpuSetLimit = v -} - -func (x *Request_CmdType) SetDataSegmentLimit(v bool) { - x.xxx_hidden_DataSegmentLimit = v -} - -func (x *Request_CmdType) SetAddressSpaceLimit(v bool) { - x.xxx_hidden_AddressSpaceLimit = v -} - -func (x *Request_CmdType) SetCopyIn(v map[string]*Request_File) { - x.xxx_hidden_CopyIn = v -} - -func (x *Request_CmdType) SetSymlinks(v map[string]string) { - x.xxx_hidden_Symlinks = v -} - -func (x *Request_CmdType) SetCopyOut(v []*Request_CmdCopyOutFile) { - x.xxx_hidden_CopyOut = &v -} - -func (x *Request_CmdType) SetCopyOutCached(v []*Request_CmdCopyOutFile) { - x.xxx_hidden_CopyOutCached = &v -} - -func (x *Request_CmdType) SetCopyOutDir(v string) { - x.xxx_hidden_CopyOutDir = v -} - -func (x *Request_CmdType) SetCopyOutMax(v uint64) { - x.xxx_hidden_CopyOutMax = v -} - -type Request_CmdType_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Args []string - Env []string - Files []*Request_File - Tty bool - CpuTimeLimit uint64 - ClockTimeLimit uint64 - MemoryLimit uint64 - StackLimit uint64 - ProcLimit uint64 - CpuRateLimit uint64 - CpuSetLimit string - DataSegmentLimit bool - AddressSpaceLimit bool - CopyIn map[string]*Request_File - Symlinks map[string]string - CopyOut []*Request_CmdCopyOutFile - CopyOutCached []*Request_CmdCopyOutFile - CopyOutDir string - CopyOutMax uint64 -} - -func (b0 Request_CmdType_builder) Build() *Request_CmdType { - m0 := &Request_CmdType{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Args = b.Args - x.xxx_hidden_Env = b.Env - x.xxx_hidden_Files = &b.Files - x.xxx_hidden_Tty = b.Tty - x.xxx_hidden_CpuTimeLimit = b.CpuTimeLimit - x.xxx_hidden_ClockTimeLimit = b.ClockTimeLimit - x.xxx_hidden_MemoryLimit = b.MemoryLimit - x.xxx_hidden_StackLimit = b.StackLimit - x.xxx_hidden_ProcLimit = b.ProcLimit - x.xxx_hidden_CpuRateLimit = b.CpuRateLimit - x.xxx_hidden_CpuSetLimit = b.CpuSetLimit - x.xxx_hidden_DataSegmentLimit = b.DataSegmentLimit - x.xxx_hidden_AddressSpaceLimit = b.AddressSpaceLimit - x.xxx_hidden_CopyIn = b.CopyIn - x.xxx_hidden_Symlinks = b.Symlinks - x.xxx_hidden_CopyOut = &b.CopyOut - x.xxx_hidden_CopyOutCached = &b.CopyOutCached - x.xxx_hidden_CopyOutDir = b.CopyOutDir - x.xxx_hidden_CopyOutMax = b.CopyOutMax - return m0 -} - -type Request_CmdCopyOutFile struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` - xxx_hidden_Optional bool `protobuf:"varint,2,opt,name=optional"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_CmdCopyOutFile) Reset() { - *x = Request_CmdCopyOutFile{} - mi := &file_request_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_CmdCopyOutFile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_CmdCopyOutFile) ProtoMessage() {} - -func (x *Request_CmdCopyOutFile) ProtoReflect() protoreflect.Message { - mi := &file_request_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *Request_CmdCopyOutFile) GetName() string { - if x != nil { - return x.xxx_hidden_Name - } - return "" -} - -func (x *Request_CmdCopyOutFile) GetOptional() bool { - if x != nil { - return x.xxx_hidden_Optional - } - return false -} - -func (x *Request_CmdCopyOutFile) SetName(v string) { - x.xxx_hidden_Name = v -} - -func (x *Request_CmdCopyOutFile) SetOptional(v bool) { - x.xxx_hidden_Optional = v -} - -type Request_CmdCopyOutFile_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Name string - Optional bool -} - -func (b0 Request_CmdCopyOutFile_builder) Build() *Request_CmdCopyOutFile { - m0 := &Request_CmdCopyOutFile{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Name = b.Name - x.xxx_hidden_Optional = b.Optional - return m0 -} - -type Request_PipeMap struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_In *Request_PipeMap_PipeIndex `protobuf:"bytes,1,opt,name=in"` - xxx_hidden_Out *Request_PipeMap_PipeIndex `protobuf:"bytes,2,opt,name=out"` - xxx_hidden_Proxy bool `protobuf:"varint,3,opt,name=proxy"` - xxx_hidden_Name string `protobuf:"bytes,4,opt,name=name"` - xxx_hidden_Max uint64 `protobuf:"varint,5,opt,name=max"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_PipeMap) Reset() { - *x = Request_PipeMap{} - mi := &file_request_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_PipeMap) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_PipeMap) ProtoMessage() {} - -func (x *Request_PipeMap) ProtoReflect() protoreflect.Message { - mi := &file_request_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *Request_PipeMap) GetIn() *Request_PipeMap_PipeIndex { - if x != nil { - return x.xxx_hidden_In - } - return nil -} - -func (x *Request_PipeMap) GetOut() *Request_PipeMap_PipeIndex { - if x != nil { - return x.xxx_hidden_Out - } - return nil -} - -func (x *Request_PipeMap) GetProxy() bool { - if x != nil { - return x.xxx_hidden_Proxy - } - return false -} - -func (x *Request_PipeMap) GetName() string { - if x != nil { - return x.xxx_hidden_Name - } - return "" -} - -func (x *Request_PipeMap) GetMax() uint64 { - if x != nil { - return x.xxx_hidden_Max - } - return 0 -} - -func (x *Request_PipeMap) SetIn(v *Request_PipeMap_PipeIndex) { - x.xxx_hidden_In = v -} - -func (x *Request_PipeMap) SetOut(v *Request_PipeMap_PipeIndex) { - x.xxx_hidden_Out = v -} - -func (x *Request_PipeMap) SetProxy(v bool) { - x.xxx_hidden_Proxy = v -} - -func (x *Request_PipeMap) SetName(v string) { - x.xxx_hidden_Name = v -} - -func (x *Request_PipeMap) SetMax(v uint64) { - x.xxx_hidden_Max = v -} - -func (x *Request_PipeMap) HasIn() bool { - if x == nil { - return false - } - return x.xxx_hidden_In != nil -} - -func (x *Request_PipeMap) HasOut() bool { - if x == nil { - return false - } - return x.xxx_hidden_Out != nil -} - -func (x *Request_PipeMap) ClearIn() { - x.xxx_hidden_In = nil -} - -func (x *Request_PipeMap) ClearOut() { - x.xxx_hidden_Out = nil -} - -type Request_PipeMap_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - In *Request_PipeMap_PipeIndex - Out *Request_PipeMap_PipeIndex - Proxy bool - Name string - Max uint64 -} - -func (b0 Request_PipeMap_builder) Build() *Request_PipeMap { - m0 := &Request_PipeMap{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_In = b.In - x.xxx_hidden_Out = b.Out - x.xxx_hidden_Proxy = b.Proxy - x.xxx_hidden_Name = b.Name - x.xxx_hidden_Max = b.Max - return m0 -} - -type Request_PipeMap_PipeIndex struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Index int32 `protobuf:"varint,1,opt,name=index"` - xxx_hidden_Fd int32 `protobuf:"varint,2,opt,name=fd"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Request_PipeMap_PipeIndex) Reset() { - *x = Request_PipeMap_PipeIndex{} - mi := &file_request_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Request_PipeMap_PipeIndex) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Request_PipeMap_PipeIndex) ProtoMessage() {} - -func (x *Request_PipeMap_PipeIndex) ProtoReflect() protoreflect.Message { - mi := &file_request_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -func (x *Request_PipeMap_PipeIndex) GetIndex() int32 { - if x != nil { - return x.xxx_hidden_Index - } - return 0 -} - -func (x *Request_PipeMap_PipeIndex) GetFd() int32 { - if x != nil { - return x.xxx_hidden_Fd - } - return 0 -} - -func (x *Request_PipeMap_PipeIndex) SetIndex(v int32) { - x.xxx_hidden_Index = v -} - -func (x *Request_PipeMap_PipeIndex) SetFd(v int32) { - x.xxx_hidden_Fd = v -} - -type Request_PipeMap_PipeIndex_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Index int32 - Fd int32 -} - -func (b0 Request_PipeMap_PipeIndex_builder) Build() *Request_PipeMap_PipeIndex { - m0 := &Request_PipeMap_PipeIndex{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Index = b.Index - x.xxx_hidden_Fd = b.Fd - return m0 -} - -var File_request_proto protoreflect.FileDescriptor - -const file_request_proto_rawDesc = "" + - "\n" + - "\rrequest.proto\x12\x02pb\x1a\x1bgoogle/protobuf/empty.proto\x1a!google/protobuf/go_features.proto\"\x8f\x0e\n" + - "\aRequest\x12\x1c\n" + - "\trequestID\x18\x01 \x01(\tR\trequestID\x12%\n" + - "\x03cmd\x18\x02 \x03(\v2\x13.pb.Request.CmdTypeR\x03cmd\x125\n" + - "\vpipeMapping\x18\x03 \x03(\v2\x13.pb.Request.PipeMapR\vpipeMapping\x1a\x1d\n" + - "\tLocalFile\x12\x10\n" + - "\x03src\x18\x01 \x01(\tR\x03src\x1a&\n" + - "\n" + - "MemoryFile\x12\x18\n" + - "\acontent\x18\x01 \x01(\fR\acontent\x1a$\n" + - "\n" + - "CachedFile\x12\x16\n" + - "\x06fileID\x18\x01 \x01(\tR\x06fileID\x1aI\n" + - "\rPipeCollector\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n" + - "\x03max\x18\x02 \x01(\x03R\x03max\x12\x12\n" + - "\x04pipe\x18\x03 \x01(\bR\x04pipe\x1a\xc0\x02\n" + - "\x04File\x12-\n" + - "\x05local\x18\x01 \x01(\v2\x15.pb.Request.LocalFileH\x00R\x05local\x120\n" + - "\x06memory\x18\x02 \x01(\v2\x16.pb.Request.MemoryFileH\x00R\x06memory\x120\n" + - "\x06cached\x18\x03 \x01(\v2\x16.pb.Request.CachedFileH\x00R\x06cached\x12/\n" + - "\x04pipe\x18\x04 \x01(\v2\x19.pb.Request.PipeCollectorH\x00R\x04pipe\x124\n" + - "\bstreamIn\x18\x05 \x01(\v2\x16.google.protobuf.EmptyH\x00R\bstreamIn\x126\n" + - "\tstreamOut\x18\x06 \x01(\v2\x16.google.protobuf.EmptyH\x00R\tstreamOutB\x06\n" + - "\x04file\x1a\xef\x06\n" + - "\aCmdType\x12\x12\n" + - "\x04args\x18\x01 \x03(\tR\x04args\x12\x10\n" + - "\x03env\x18\x02 \x03(\tR\x03env\x12&\n" + - "\x05files\x18\x03 \x03(\v2\x10.pb.Request.FileR\x05files\x12\x10\n" + - "\x03tty\x18\r \x01(\bR\x03tty\x12\"\n" + - "\fcpuTimeLimit\x18\x04 \x01(\x04R\fcpuTimeLimit\x12&\n" + - "\x0eclockTimeLimit\x18\x05 \x01(\x04R\x0eclockTimeLimit\x12 \n" + - "\vmemoryLimit\x18\x06 \x01(\x04R\vmemoryLimit\x12\x1e\n" + - "\n" + - "stackLimit\x18\f \x01(\x04R\n" + - "stackLimit\x12\x1c\n" + - "\tprocLimit\x18\a \x01(\x04R\tprocLimit\x12\"\n" + - "\fcpuRateLimit\x18\x0f \x01(\x04R\fcpuRateLimit\x12 \n" + - "\vcpuSetLimit\x18\x11 \x01(\tR\vcpuSetLimit\x12*\n" + - "\x10dataSegmentLimit\x18\x10 \x01(\bR\x10dataSegmentLimit\x12,\n" + - "\x11addressSpaceLimit\x18\x13 \x01(\bR\x11addressSpaceLimit\x127\n" + - "\x06copyIn\x18\b \x03(\v2\x1f.pb.Request.CmdType.CopyInEntryR\x06copyIn\x12=\n" + - "\bsymlinks\x18\x12 \x03(\v2!.pb.Request.CmdType.SymlinksEntryR\bsymlinks\x124\n" + - "\acopyOut\x18\t \x03(\v2\x1a.pb.Request.CmdCopyOutFileR\acopyOut\x12@\n" + - "\rcopyOutCached\x18\n" + - " \x03(\v2\x1a.pb.Request.CmdCopyOutFileR\rcopyOutCached\x12\x1e\n" + - "\n" + - "copyOutDir\x18\v \x01(\tR\n" + - "copyOutDir\x12\x1e\n" + - "\n" + - "copyOutMax\x18\x0e \x01(\x04R\n" + - "copyOutMax\x1aK\n" + - "\vCopyInEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12&\n" + - "\x05value\x18\x02 \x01(\v2\x10.pb.Request.FileR\x05value:\x028\x01\x1a;\n" + - "\rSymlinksEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a@\n" + - "\x0eCmdCopyOutFile\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" + - "\boptional\x18\x02 \x01(\bR\boptional\x1a\xd8\x01\n" + - "\aPipeMap\x12-\n" + - "\x02in\x18\x01 \x01(\v2\x1d.pb.Request.PipeMap.PipeIndexR\x02in\x12/\n" + - "\x03out\x18\x02 \x01(\v2\x1d.pb.Request.PipeMap.PipeIndexR\x03out\x12\x14\n" + - "\x05proxy\x18\x03 \x01(\bR\x05proxy\x12\x12\n" + - "\x04name\x18\x04 \x01(\tR\x04name\x12\x10\n" + - "\x03max\x18\x05 \x01(\x04R\x03max\x1a1\n" + - "\tPipeIndex\x12\x14\n" + - "\x05index\x18\x01 \x01(\x05R\x05index\x12\x0e\n" + - "\x02fd\x18\x02 \x01(\x05R\x02fdB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" - -var file_request_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_request_proto_goTypes = []any{ - (*Request)(nil), // 0: pb.Request - (*Request_LocalFile)(nil), // 1: pb.Request.LocalFile - (*Request_MemoryFile)(nil), // 2: pb.Request.MemoryFile - (*Request_CachedFile)(nil), // 3: pb.Request.CachedFile - (*Request_PipeCollector)(nil), // 4: pb.Request.PipeCollector - (*Request_File)(nil), // 5: pb.Request.File - (*Request_CmdType)(nil), // 6: pb.Request.CmdType - (*Request_CmdCopyOutFile)(nil), // 7: pb.Request.CmdCopyOutFile - (*Request_PipeMap)(nil), // 8: pb.Request.PipeMap - nil, // 9: pb.Request.CmdType.CopyInEntry - nil, // 10: pb.Request.CmdType.SymlinksEntry - (*Request_PipeMap_PipeIndex)(nil), // 11: pb.Request.PipeMap.PipeIndex - (*emptypb.Empty)(nil), // 12: google.protobuf.Empty -} -var file_request_proto_depIdxs = []int32{ - 6, // 0: pb.Request.cmd:type_name -> pb.Request.CmdType - 8, // 1: pb.Request.pipeMapping:type_name -> pb.Request.PipeMap - 1, // 2: pb.Request.File.local:type_name -> pb.Request.LocalFile - 2, // 3: pb.Request.File.memory:type_name -> pb.Request.MemoryFile - 3, // 4: pb.Request.File.cached:type_name -> pb.Request.CachedFile - 4, // 5: pb.Request.File.pipe:type_name -> pb.Request.PipeCollector - 12, // 6: pb.Request.File.streamIn:type_name -> google.protobuf.Empty - 12, // 7: pb.Request.File.streamOut:type_name -> google.protobuf.Empty - 5, // 8: pb.Request.CmdType.files:type_name -> pb.Request.File - 9, // 9: pb.Request.CmdType.copyIn:type_name -> pb.Request.CmdType.CopyInEntry - 10, // 10: pb.Request.CmdType.symlinks:type_name -> pb.Request.CmdType.SymlinksEntry - 7, // 11: pb.Request.CmdType.copyOut:type_name -> pb.Request.CmdCopyOutFile - 7, // 12: pb.Request.CmdType.copyOutCached:type_name -> pb.Request.CmdCopyOutFile - 11, // 13: pb.Request.PipeMap.in:type_name -> pb.Request.PipeMap.PipeIndex - 11, // 14: pb.Request.PipeMap.out:type_name -> pb.Request.PipeMap.PipeIndex - 5, // 15: pb.Request.CmdType.CopyInEntry.value:type_name -> pb.Request.File - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name -} - -func init() { file_request_proto_init() } -func file_request_proto_init() { - if File_request_proto != nil { - return - } - file_request_proto_msgTypes[5].OneofWrappers = []any{ - (*request_File_Local)(nil), - (*request_File_Memory)(nil), - (*request_File_Cached)(nil), - (*request_File_Pipe)(nil), - (*request_File_StreamIn)(nil), - (*request_File_StreamOut)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_request_proto_rawDesc), len(file_request_proto_rawDesc)), - NumEnums: 0, - NumMessages: 12, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_request_proto_goTypes, - DependencyIndexes: file_request_proto_depIdxs, - MessageInfos: file_request_proto_msgTypes, - }.Build() - File_request_proto = out.File - file_request_proto_goTypes = nil - file_request_proto_depIdxs = nil -} diff --git a/pb/response.pb.go b/pb/response.pb.go index 2e42073..c052338 100644 --- a/pb/response.pb.go +++ b/pb/response.pb.go @@ -4,8 +4,6 @@ // protoc v6.31.1 // source: response.proto -//go:build !protoopaque - package pb import ( @@ -166,12 +164,12 @@ func (x Response_Result_StatusType) Number() protoreflect.EnumNumber { } type Response struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - RequestID string `protobuf:"bytes,1,opt,name=requestID" json:"requestID,omitempty"` - Results []*Response_Result `protobuf:"bytes,2,rep,name=results" json:"results,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_RequestID string `protobuf:"bytes,1,opt,name=requestID"` + xxx_hidden_Results *[]*Response_Result `protobuf:"bytes,2,rep,name=results"` + xxx_hidden_Error string `protobuf:"bytes,3,opt,name=error"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Response) Reset() { @@ -201,35 +199,37 @@ func (x *Response) ProtoReflect() protoreflect.Message { func (x *Response) GetRequestID() string { if x != nil { - return x.RequestID + return x.xxx_hidden_RequestID } return "" } func (x *Response) GetResults() []*Response_Result { if x != nil { - return x.Results + if x.xxx_hidden_Results != nil { + return *x.xxx_hidden_Results + } } return nil } func (x *Response) GetError() string { if x != nil { - return x.Error + return x.xxx_hidden_Error } return "" } func (x *Response) SetRequestID(v string) { - x.RequestID = v + x.xxx_hidden_RequestID = v } func (x *Response) SetResults(v []*Response_Result) { - x.Results = v + x.xxx_hidden_Results = &v } func (x *Response) SetError(v string) { - x.Error = v + x.xxx_hidden_Error = v } type Response_builder struct { @@ -244,19 +244,19 @@ func (b0 Response_builder) Build() *Response { m0 := &Response{} b, x := &b0, m0 _, _ = b, x - x.RequestID = b.RequestID - x.Results = b.Results - x.Error = b.Error + x.xxx_hidden_RequestID = b.RequestID + x.xxx_hidden_Results = &b.Results + x.xxx_hidden_Error = b.Error return m0 } type Response_FileError struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Type Response_FileError_ErrorType `protobuf:"varint,2,opt,name=type,enum=pb.Response_FileError_ErrorType" json:"type,omitempty"` - Message string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` + xxx_hidden_Type Response_FileError_ErrorType `protobuf:"varint,2,opt,name=type,enum=pb.Response_FileError_ErrorType"` + xxx_hidden_Message string `protobuf:"bytes,3,opt,name=message"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Response_FileError) Reset() { @@ -286,35 +286,35 @@ func (x *Response_FileError) ProtoReflect() protoreflect.Message { func (x *Response_FileError) GetName() string { if x != nil { - return x.Name + return x.xxx_hidden_Name } return "" } func (x *Response_FileError) GetType() Response_FileError_ErrorType { if x != nil { - return x.Type + return x.xxx_hidden_Type } return Response_FileError_CopyInOpenFile } func (x *Response_FileError) GetMessage() string { if x != nil { - return x.Message + return x.xxx_hidden_Message } return "" } func (x *Response_FileError) SetName(v string) { - x.Name = v + x.xxx_hidden_Name = v } func (x *Response_FileError) SetType(v Response_FileError_ErrorType) { - x.Type = v + x.xxx_hidden_Type = v } func (x *Response_FileError) SetMessage(v string) { - x.Message = v + x.xxx_hidden_Message = v } type Response_FileError_builder struct { @@ -329,26 +329,26 @@ func (b0 Response_FileError_builder) Build() *Response_FileError { m0 := &Response_FileError{} b, x := &b0, m0 _, _ = b, x - x.Name = b.Name - x.Type = b.Type - x.Message = b.Message + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Type = b.Type + x.xxx_hidden_Message = b.Message return m0 } type Response_Result struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Status Response_Result_StatusType `protobuf:"varint,1,opt,name=status,enum=pb.Response_Result_StatusType" json:"status,omitempty"` - ExitStatus int32 `protobuf:"varint,2,opt,name=exitStatus" json:"exitStatus,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"` - Time uint64 `protobuf:"varint,4,opt,name=time" json:"time,omitempty"` - RunTime uint64 `protobuf:"varint,8,opt,name=runTime" json:"runTime,omitempty"` - ProcPeak uint64 `protobuf:"varint,10,opt,name=procPeak" json:"procPeak,omitempty"` - Memory uint64 `protobuf:"varint,5,opt,name=memory" json:"memory,omitempty"` - Files map[string][]byte `protobuf:"bytes,6,rep,name=files" json:"files,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - FileIDs map[string]string `protobuf:"bytes,7,rep,name=fileIDs" json:"fileIDs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - FileError []*Response_FileError `protobuf:"bytes,9,rep,name=fileError" json:"fileError,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Status Response_Result_StatusType `protobuf:"varint,1,opt,name=status,enum=pb.Response_Result_StatusType"` + xxx_hidden_ExitStatus int32 `protobuf:"varint,2,opt,name=exitStatus"` + xxx_hidden_Error string `protobuf:"bytes,3,opt,name=error"` + xxx_hidden_Time uint64 `protobuf:"varint,4,opt,name=time"` + xxx_hidden_RunTime uint64 `protobuf:"varint,8,opt,name=runTime"` + xxx_hidden_ProcPeak uint64 `protobuf:"varint,10,opt,name=procPeak"` + xxx_hidden_Memory uint64 `protobuf:"varint,5,opt,name=memory"` + xxx_hidden_Files map[string][]byte `protobuf:"bytes,6,rep,name=files" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_FileIDs map[string]string `protobuf:"bytes,7,rep,name=fileIDs" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_FileError *[]*Response_FileError `protobuf:"bytes,9,rep,name=fileError"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Response_Result) Reset() { @@ -378,112 +378,114 @@ func (x *Response_Result) ProtoReflect() protoreflect.Message { func (x *Response_Result) GetStatus() Response_Result_StatusType { if x != nil { - return x.Status + return x.xxx_hidden_Status } return Response_Result_Invalid } func (x *Response_Result) GetExitStatus() int32 { if x != nil { - return x.ExitStatus + return x.xxx_hidden_ExitStatus } return 0 } func (x *Response_Result) GetError() string { if x != nil { - return x.Error + return x.xxx_hidden_Error } return "" } func (x *Response_Result) GetTime() uint64 { if x != nil { - return x.Time + return x.xxx_hidden_Time } return 0 } func (x *Response_Result) GetRunTime() uint64 { if x != nil { - return x.RunTime + return x.xxx_hidden_RunTime } return 0 } func (x *Response_Result) GetProcPeak() uint64 { if x != nil { - return x.ProcPeak + return x.xxx_hidden_ProcPeak } return 0 } func (x *Response_Result) GetMemory() uint64 { if x != nil { - return x.Memory + return x.xxx_hidden_Memory } return 0 } func (x *Response_Result) GetFiles() map[string][]byte { if x != nil { - return x.Files + return x.xxx_hidden_Files } return nil } func (x *Response_Result) GetFileIDs() map[string]string { if x != nil { - return x.FileIDs + return x.xxx_hidden_FileIDs } return nil } func (x *Response_Result) GetFileError() []*Response_FileError { if x != nil { - return x.FileError + if x.xxx_hidden_FileError != nil { + return *x.xxx_hidden_FileError + } } return nil } func (x *Response_Result) SetStatus(v Response_Result_StatusType) { - x.Status = v + x.xxx_hidden_Status = v } func (x *Response_Result) SetExitStatus(v int32) { - x.ExitStatus = v + x.xxx_hidden_ExitStatus = v } func (x *Response_Result) SetError(v string) { - x.Error = v + x.xxx_hidden_Error = v } func (x *Response_Result) SetTime(v uint64) { - x.Time = v + x.xxx_hidden_Time = v } func (x *Response_Result) SetRunTime(v uint64) { - x.RunTime = v + x.xxx_hidden_RunTime = v } func (x *Response_Result) SetProcPeak(v uint64) { - x.ProcPeak = v + x.xxx_hidden_ProcPeak = v } func (x *Response_Result) SetMemory(v uint64) { - x.Memory = v + x.xxx_hidden_Memory = v } func (x *Response_Result) SetFiles(v map[string][]byte) { - x.Files = v + x.xxx_hidden_Files = v } func (x *Response_Result) SetFileIDs(v map[string]string) { - x.FileIDs = v + x.xxx_hidden_FileIDs = v } func (x *Response_Result) SetFileError(v []*Response_FileError) { - x.FileError = v + x.xxx_hidden_FileError = &v } type Response_Result_builder struct { @@ -505,16 +507,16 @@ func (b0 Response_Result_builder) Build() *Response_Result { m0 := &Response_Result{} b, x := &b0, m0 _, _ = b, x - x.Status = b.Status - x.ExitStatus = b.ExitStatus - x.Error = b.Error - x.Time = b.Time - x.RunTime = b.RunTime - x.ProcPeak = b.ProcPeak - x.Memory = b.Memory - x.Files = b.Files - x.FileIDs = b.FileIDs - x.FileError = b.FileError + x.xxx_hidden_Status = b.Status + x.xxx_hidden_ExitStatus = b.ExitStatus + x.xxx_hidden_Error = b.Error + x.xxx_hidden_Time = b.Time + x.xxx_hidden_RunTime = b.RunTime + x.xxx_hidden_ProcPeak = b.ProcPeak + x.xxx_hidden_Memory = b.Memory + x.xxx_hidden_Files = b.Files + x.xxx_hidden_FileIDs = b.FileIDs + x.xxx_hidden_FileError = &b.FileError return m0 } @@ -579,7 +581,7 @@ const file_response_proto_rawDesc = "" + "\x12\x13\n" + "\x0fJudgementFailed\x10\v\x12\x16\n" + "\x12InvalidInteraction\x10\f\x12\x11\n" + - "\rInternalError\x10\rB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" + "\rInternalError\x10\rB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a" var file_response_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_response_proto_msgTypes = make([]protoimpl.MessageInfo, 5) diff --git a/pb/response.proto b/pb/response.proto index d9f9298..57a16f9 100644 --- a/pb/response.proto +++ b/pb/response.proto @@ -5,7 +5,7 @@ import "google/protobuf/go_features.proto"; option features.field_presence = IMPLICIT; option go_package = "github.com/criyle/go-judge/pb"; -option features.(pb.go).api_level = API_HYBRID; +option features.(pb.go).api_level = API_OPAQUE; message Response { message FileError { diff --git a/pb/response_protoopaque.pb.go b/pb/response_protoopaque.pb.go deleted file mode 100644 index e77aa84..0000000 --- a/pb/response_protoopaque.pb.go +++ /dev/null @@ -1,636 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v6.31.1 -// source: response.proto - -//go:build protoopaque - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/gofeaturespb" - reflect "reflect" - 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 Response_FileError_ErrorType int32 - -const ( - Response_FileError_CopyInOpenFile Response_FileError_ErrorType = 0 - Response_FileError_CopyInCreateFile Response_FileError_ErrorType = 1 - Response_FileError_CopyInCopyContent Response_FileError_ErrorType = 2 - Response_FileError_CopyOutOpen Response_FileError_ErrorType = 3 - Response_FileError_CopyOutNotRegularFile Response_FileError_ErrorType = 4 - Response_FileError_CopyOutSizeExceeded Response_FileError_ErrorType = 5 - Response_FileError_CopyOutCreateFile Response_FileError_ErrorType = 6 - Response_FileError_CopyOutCopyContent Response_FileError_ErrorType = 7 - Response_FileError_CollectSizeExceeded Response_FileError_ErrorType = 8 - Response_FileError_Symlink Response_FileError_ErrorType = 9 -) - -// Enum value maps for Response_FileError_ErrorType. -var ( - Response_FileError_ErrorType_name = map[int32]string{ - 0: "CopyInOpenFile", - 1: "CopyInCreateFile", - 2: "CopyInCopyContent", - 3: "CopyOutOpen", - 4: "CopyOutNotRegularFile", - 5: "CopyOutSizeExceeded", - 6: "CopyOutCreateFile", - 7: "CopyOutCopyContent", - 8: "CollectSizeExceeded", - 9: "Symlink", - } - Response_FileError_ErrorType_value = map[string]int32{ - "CopyInOpenFile": 0, - "CopyInCreateFile": 1, - "CopyInCopyContent": 2, - "CopyOutOpen": 3, - "CopyOutNotRegularFile": 4, - "CopyOutSizeExceeded": 5, - "CopyOutCreateFile": 6, - "CopyOutCopyContent": 7, - "CollectSizeExceeded": 8, - "Symlink": 9, - } -) - -func (x Response_FileError_ErrorType) Enum() *Response_FileError_ErrorType { - p := new(Response_FileError_ErrorType) - *p = x - return p -} - -func (x Response_FileError_ErrorType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Response_FileError_ErrorType) Descriptor() protoreflect.EnumDescriptor { - return file_response_proto_enumTypes[0].Descriptor() -} - -func (Response_FileError_ErrorType) Type() protoreflect.EnumType { - return &file_response_proto_enumTypes[0] -} - -func (x Response_FileError_ErrorType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -type Response_Result_StatusType int32 - -const ( - Response_Result_Invalid Response_Result_StatusType = 0 - Response_Result_Accepted Response_Result_StatusType = 1 - Response_Result_WrongAnswer Response_Result_StatusType = 2 // Not used - Response_Result_PartiallyCorrect Response_Result_StatusType = 3 // Not used - Response_Result_MemoryLimitExceeded Response_Result_StatusType = 4 - Response_Result_TimeLimitExceeded Response_Result_StatusType = 5 - Response_Result_OutputLimitExceeded Response_Result_StatusType = 6 - Response_Result_FileError Response_Result_StatusType = 7 - Response_Result_NonZeroExitStatus Response_Result_StatusType = 8 - Response_Result_Signalled Response_Result_StatusType = 9 - Response_Result_DangerousSyscall Response_Result_StatusType = 10 - Response_Result_JudgementFailed Response_Result_StatusType = 11 // Not used - Response_Result_InvalidInteraction Response_Result_StatusType = 12 // Not used - Response_Result_InternalError Response_Result_StatusType = 13 -) - -// Enum value maps for Response_Result_StatusType. -var ( - Response_Result_StatusType_name = map[int32]string{ - 0: "Invalid", - 1: "Accepted", - 2: "WrongAnswer", - 3: "PartiallyCorrect", - 4: "MemoryLimitExceeded", - 5: "TimeLimitExceeded", - 6: "OutputLimitExceeded", - 7: "FileError", - 8: "NonZeroExitStatus", - 9: "Signalled", - 10: "DangerousSyscall", - 11: "JudgementFailed", - 12: "InvalidInteraction", - 13: "InternalError", - } - Response_Result_StatusType_value = map[string]int32{ - "Invalid": 0, - "Accepted": 1, - "WrongAnswer": 2, - "PartiallyCorrect": 3, - "MemoryLimitExceeded": 4, - "TimeLimitExceeded": 5, - "OutputLimitExceeded": 6, - "FileError": 7, - "NonZeroExitStatus": 8, - "Signalled": 9, - "DangerousSyscall": 10, - "JudgementFailed": 11, - "InvalidInteraction": 12, - "InternalError": 13, - } -) - -func (x Response_Result_StatusType) Enum() *Response_Result_StatusType { - p := new(Response_Result_StatusType) - *p = x - return p -} - -func (x Response_Result_StatusType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Response_Result_StatusType) Descriptor() protoreflect.EnumDescriptor { - return file_response_proto_enumTypes[1].Descriptor() -} - -func (Response_Result_StatusType) Type() protoreflect.EnumType { - return &file_response_proto_enumTypes[1] -} - -func (x Response_Result_StatusType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -type Response struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_RequestID string `protobuf:"bytes,1,opt,name=requestID"` - xxx_hidden_Results *[]*Response_Result `protobuf:"bytes,2,rep,name=results"` - xxx_hidden_Error string `protobuf:"bytes,3,opt,name=error"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Response) Reset() { - *x = Response{} - mi := &file_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Response) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response) ProtoMessage() {} - -func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_response_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) -} - -func (x *Response) GetRequestID() string { - if x != nil { - return x.xxx_hidden_RequestID - } - return "" -} - -func (x *Response) GetResults() []*Response_Result { - if x != nil { - if x.xxx_hidden_Results != nil { - return *x.xxx_hidden_Results - } - } - return nil -} - -func (x *Response) GetError() string { - if x != nil { - return x.xxx_hidden_Error - } - return "" -} - -func (x *Response) SetRequestID(v string) { - x.xxx_hidden_RequestID = v -} - -func (x *Response) SetResults(v []*Response_Result) { - x.xxx_hidden_Results = &v -} - -func (x *Response) SetError(v string) { - x.xxx_hidden_Error = v -} - -type Response_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - RequestID string - Results []*Response_Result - Error string -} - -func (b0 Response_builder) Build() *Response { - m0 := &Response{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_RequestID = b.RequestID - x.xxx_hidden_Results = &b.Results - x.xxx_hidden_Error = b.Error - return m0 -} - -type Response_FileError struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Name string `protobuf:"bytes,1,opt,name=name"` - xxx_hidden_Type Response_FileError_ErrorType `protobuf:"varint,2,opt,name=type,enum=pb.Response_FileError_ErrorType"` - xxx_hidden_Message string `protobuf:"bytes,3,opt,name=message"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Response_FileError) Reset() { - *x = Response_FileError{} - mi := &file_response_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Response_FileError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response_FileError) ProtoMessage() {} - -func (x *Response_FileError) ProtoReflect() protoreflect.Message { - mi := &file_response_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) -} - -func (x *Response_FileError) GetName() string { - if x != nil { - return x.xxx_hidden_Name - } - return "" -} - -func (x *Response_FileError) GetType() Response_FileError_ErrorType { - if x != nil { - return x.xxx_hidden_Type - } - return Response_FileError_CopyInOpenFile -} - -func (x *Response_FileError) GetMessage() string { - if x != nil { - return x.xxx_hidden_Message - } - return "" -} - -func (x *Response_FileError) SetName(v string) { - x.xxx_hidden_Name = v -} - -func (x *Response_FileError) SetType(v Response_FileError_ErrorType) { - x.xxx_hidden_Type = v -} - -func (x *Response_FileError) SetMessage(v string) { - x.xxx_hidden_Message = v -} - -type Response_FileError_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Name string - Type Response_FileError_ErrorType - Message string -} - -func (b0 Response_FileError_builder) Build() *Response_FileError { - m0 := &Response_FileError{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Name = b.Name - x.xxx_hidden_Type = b.Type - x.xxx_hidden_Message = b.Message - return m0 -} - -type Response_Result struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Status Response_Result_StatusType `protobuf:"varint,1,opt,name=status,enum=pb.Response_Result_StatusType"` - xxx_hidden_ExitStatus int32 `protobuf:"varint,2,opt,name=exitStatus"` - xxx_hidden_Error string `protobuf:"bytes,3,opt,name=error"` - xxx_hidden_Time uint64 `protobuf:"varint,4,opt,name=time"` - xxx_hidden_RunTime uint64 `protobuf:"varint,8,opt,name=runTime"` - xxx_hidden_ProcPeak uint64 `protobuf:"varint,10,opt,name=procPeak"` - xxx_hidden_Memory uint64 `protobuf:"varint,5,opt,name=memory"` - xxx_hidden_Files map[string][]byte `protobuf:"bytes,6,rep,name=files" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - xxx_hidden_FileIDs map[string]string `protobuf:"bytes,7,rep,name=fileIDs" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - xxx_hidden_FileError *[]*Response_FileError `protobuf:"bytes,9,rep,name=fileError"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Response_Result) Reset() { - *x = Response_Result{} - mi := &file_response_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Response_Result) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Response_Result) ProtoMessage() {} - -func (x *Response_Result) ProtoReflect() protoreflect.Message { - mi := &file_response_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) -} - -func (x *Response_Result) GetStatus() Response_Result_StatusType { - if x != nil { - return x.xxx_hidden_Status - } - return Response_Result_Invalid -} - -func (x *Response_Result) GetExitStatus() int32 { - if x != nil { - return x.xxx_hidden_ExitStatus - } - return 0 -} - -func (x *Response_Result) GetError() string { - if x != nil { - return x.xxx_hidden_Error - } - return "" -} - -func (x *Response_Result) GetTime() uint64 { - if x != nil { - return x.xxx_hidden_Time - } - return 0 -} - -func (x *Response_Result) GetRunTime() uint64 { - if x != nil { - return x.xxx_hidden_RunTime - } - return 0 -} - -func (x *Response_Result) GetProcPeak() uint64 { - if x != nil { - return x.xxx_hidden_ProcPeak - } - return 0 -} - -func (x *Response_Result) GetMemory() uint64 { - if x != nil { - return x.xxx_hidden_Memory - } - return 0 -} - -func (x *Response_Result) GetFiles() map[string][]byte { - if x != nil { - return x.xxx_hidden_Files - } - return nil -} - -func (x *Response_Result) GetFileIDs() map[string]string { - if x != nil { - return x.xxx_hidden_FileIDs - } - return nil -} - -func (x *Response_Result) GetFileError() []*Response_FileError { - if x != nil { - if x.xxx_hidden_FileError != nil { - return *x.xxx_hidden_FileError - } - } - return nil -} - -func (x *Response_Result) SetStatus(v Response_Result_StatusType) { - x.xxx_hidden_Status = v -} - -func (x *Response_Result) SetExitStatus(v int32) { - x.xxx_hidden_ExitStatus = v -} - -func (x *Response_Result) SetError(v string) { - x.xxx_hidden_Error = v -} - -func (x *Response_Result) SetTime(v uint64) { - x.xxx_hidden_Time = v -} - -func (x *Response_Result) SetRunTime(v uint64) { - x.xxx_hidden_RunTime = v -} - -func (x *Response_Result) SetProcPeak(v uint64) { - x.xxx_hidden_ProcPeak = v -} - -func (x *Response_Result) SetMemory(v uint64) { - x.xxx_hidden_Memory = v -} - -func (x *Response_Result) SetFiles(v map[string][]byte) { - x.xxx_hidden_Files = v -} - -func (x *Response_Result) SetFileIDs(v map[string]string) { - x.xxx_hidden_FileIDs = v -} - -func (x *Response_Result) SetFileError(v []*Response_FileError) { - x.xxx_hidden_FileError = &v -} - -type Response_Result_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Status Response_Result_StatusType - ExitStatus int32 - Error string - Time uint64 - RunTime uint64 - ProcPeak uint64 - Memory uint64 - Files map[string][]byte - FileIDs map[string]string - FileError []*Response_FileError -} - -func (b0 Response_Result_builder) Build() *Response_Result { - m0 := &Response_Result{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Status = b.Status - x.xxx_hidden_ExitStatus = b.ExitStatus - x.xxx_hidden_Error = b.Error - x.xxx_hidden_Time = b.Time - x.xxx_hidden_RunTime = b.RunTime - x.xxx_hidden_ProcPeak = b.ProcPeak - x.xxx_hidden_Memory = b.Memory - x.xxx_hidden_Files = b.Files - x.xxx_hidden_FileIDs = b.FileIDs - x.xxx_hidden_FileError = &b.FileError - return m0 -} - -var File_response_proto protoreflect.FileDescriptor - -const file_response_proto_rawDesc = "" + - "\n" + - "\x0eresponse.proto\x12\x02pb\x1a!google/protobuf/go_features.proto\"\xe6\t\n" + - "\bResponse\x12\x1c\n" + - "\trequestID\x18\x01 \x01(\tR\trequestID\x12-\n" + - "\aresults\x18\x02 \x03(\v2\x13.pb.Response.ResultR\aresults\x12\x14\n" + - "\x05error\x18\x03 \x01(\tR\x05error\x1a\xd8\x02\n" + - "\tFileError\x12\x12\n" + - "\x04name\x18\x01 \x01(\tR\x04name\x124\n" + - "\x04type\x18\x02 \x01(\x0e2 .pb.Response.FileError.ErrorTypeR\x04type\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\"\xe6\x01\n" + - "\tErrorType\x12\x12\n" + - "\x0eCopyInOpenFile\x10\x00\x12\x14\n" + - "\x10CopyInCreateFile\x10\x01\x12\x15\n" + - "\x11CopyInCopyContent\x10\x02\x12\x0f\n" + - "\vCopyOutOpen\x10\x03\x12\x19\n" + - "\x15CopyOutNotRegularFile\x10\x04\x12\x17\n" + - "\x13CopyOutSizeExceeded\x10\x05\x12\x15\n" + - "\x11CopyOutCreateFile\x10\x06\x12\x16\n" + - "\x12CopyOutCopyContent\x10\a\x12\x17\n" + - "\x13CollectSizeExceeded\x10\b\x12\v\n" + - "\aSymlink\x10\t\x1a\x9b\x06\n" + - "\x06Result\x126\n" + - "\x06status\x18\x01 \x01(\x0e2\x1e.pb.Response.Result.StatusTypeR\x06status\x12\x1e\n" + - "\n" + - "exitStatus\x18\x02 \x01(\x05R\n" + - "exitStatus\x12\x14\n" + - "\x05error\x18\x03 \x01(\tR\x05error\x12\x12\n" + - "\x04time\x18\x04 \x01(\x04R\x04time\x12\x18\n" + - "\arunTime\x18\b \x01(\x04R\arunTime\x12\x1a\n" + - "\bprocPeak\x18\n" + - " \x01(\x04R\bprocPeak\x12\x16\n" + - "\x06memory\x18\x05 \x01(\x04R\x06memory\x124\n" + - "\x05files\x18\x06 \x03(\v2\x1e.pb.Response.Result.FilesEntryR\x05files\x12:\n" + - "\afileIDs\x18\a \x03(\v2 .pb.Response.Result.FileIDsEntryR\afileIDs\x124\n" + - "\tfileError\x18\t \x03(\v2\x16.pb.Response.FileErrorR\tfileError\x1a8\n" + - "\n" + - "FilesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1a:\n" + - "\fFileIDsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa2\x02\n" + - "\n" + - "StatusType\x12\v\n" + - "\aInvalid\x10\x00\x12\f\n" + - "\bAccepted\x10\x01\x12\x0f\n" + - "\vWrongAnswer\x10\x02\x12\x14\n" + - "\x10PartiallyCorrect\x10\x03\x12\x17\n" + - "\x13MemoryLimitExceeded\x10\x04\x12\x15\n" + - "\x11TimeLimitExceeded\x10\x05\x12\x17\n" + - "\x13OutputLimitExceeded\x10\x06\x12\r\n" + - "\tFileError\x10\a\x12\x15\n" + - "\x11NonZeroExitStatus\x10\b\x12\r\n" + - "\tSignalled\x10\t\x12\x14\n" + - "\x10DangerousSyscall\x10\n" + - "\x12\x13\n" + - "\x0fJudgementFailed\x10\v\x12\x16\n" + - "\x12InvalidInteraction\x10\f\x12\x11\n" + - "\rInternalError\x10\rB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" - -var file_response_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_response_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_response_proto_goTypes = []any{ - (Response_FileError_ErrorType)(0), // 0: pb.Response.FileError.ErrorType - (Response_Result_StatusType)(0), // 1: pb.Response.Result.StatusType - (*Response)(nil), // 2: pb.Response - (*Response_FileError)(nil), // 3: pb.Response.FileError - (*Response_Result)(nil), // 4: pb.Response.Result - nil, // 5: pb.Response.Result.FilesEntry - nil, // 6: pb.Response.Result.FileIDsEntry -} -var file_response_proto_depIdxs = []int32{ - 4, // 0: pb.Response.results:type_name -> pb.Response.Result - 0, // 1: pb.Response.FileError.type:type_name -> pb.Response.FileError.ErrorType - 1, // 2: pb.Response.Result.status:type_name -> pb.Response.Result.StatusType - 5, // 3: pb.Response.Result.files:type_name -> pb.Response.Result.FilesEntry - 6, // 4: pb.Response.Result.fileIDs:type_name -> pb.Response.Result.FileIDsEntry - 3, // 5: pb.Response.Result.fileError:type_name -> pb.Response.FileError - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_response_proto_init() } -func file_response_proto_init() { - if File_response_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_response_proto_rawDesc), len(file_response_proto_rawDesc)), - NumEnums: 2, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_response_proto_goTypes, - DependencyIndexes: file_response_proto_depIdxs, - EnumInfos: file_response_proto_enumTypes, - MessageInfos: file_response_proto_msgTypes, - }.Build() - File_response_proto = out.File - file_response_proto_goTypes = nil - file_response_proto_depIdxs = nil -} diff --git a/pb/stream_request.pb.go b/pb/stream_request.pb.go index 19520df..340f967 100644 --- a/pb/stream_request.pb.go +++ b/pb/stream_request.pb.go @@ -4,8 +4,6 @@ // protoc v6.31.1 // source: stream_request.proto -//go:build !protoopaque - package pb import ( @@ -25,16 +23,10 @@ const ( ) type StreamRequest struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - // Types that are valid to be assigned to Request: - // - // *StreamRequest_ExecRequest - // *StreamRequest_ExecInput - // *StreamRequest_ExecResize - // *StreamRequest_ExecCancel - Request isStreamRequest_Request `protobuf_oneof:"request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Request isStreamRequest_Request `protobuf_oneof:"request"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StreamRequest) Reset() { @@ -62,16 +54,9 @@ func (x *StreamRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *StreamRequest) GetRequest() isStreamRequest_Request { - if x != nil { - return x.Request - } - return nil -} - func (x *StreamRequest) GetExecRequest() *Request { if x != nil { - if x, ok := x.Request.(*StreamRequest_ExecRequest); ok { + if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest); ok { return x.ExecRequest } } @@ -80,7 +65,7 @@ func (x *StreamRequest) GetExecRequest() *Request { func (x *StreamRequest) GetExecInput() *StreamRequest_Input { if x != nil { - if x, ok := x.Request.(*StreamRequest_ExecInput); ok { + if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput); ok { return x.ExecInput } } @@ -89,7 +74,7 @@ func (x *StreamRequest) GetExecInput() *StreamRequest_Input { func (x *StreamRequest) GetExecResize() *StreamRequest_Resize { if x != nil { - if x, ok := x.Request.(*StreamRequest_ExecResize); ok { + if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize); ok { return x.ExecResize } } @@ -98,7 +83,7 @@ func (x *StreamRequest) GetExecResize() *StreamRequest_Resize { func (x *StreamRequest) GetExecCancel() *emptypb.Empty { if x != nil { - if x, ok := x.Request.(*StreamRequest_ExecCancel); ok { + if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel); ok { return x.ExecCancel } } @@ -107,48 +92,48 @@ func (x *StreamRequest) GetExecCancel() *emptypb.Empty { func (x *StreamRequest) SetExecRequest(v *Request) { if v == nil { - x.Request = nil + x.xxx_hidden_Request = nil return } - x.Request = &StreamRequest_ExecRequest{v} + x.xxx_hidden_Request = &streamRequest_ExecRequest{v} } func (x *StreamRequest) SetExecInput(v *StreamRequest_Input) { if v == nil { - x.Request = nil + x.xxx_hidden_Request = nil return } - x.Request = &StreamRequest_ExecInput{v} + x.xxx_hidden_Request = &streamRequest_ExecInput{v} } func (x *StreamRequest) SetExecResize(v *StreamRequest_Resize) { if v == nil { - x.Request = nil + x.xxx_hidden_Request = nil return } - x.Request = &StreamRequest_ExecResize{v} + x.xxx_hidden_Request = &streamRequest_ExecResize{v} } func (x *StreamRequest) SetExecCancel(v *emptypb.Empty) { if v == nil { - x.Request = nil + x.xxx_hidden_Request = nil return } - x.Request = &StreamRequest_ExecCancel{v} + x.xxx_hidden_Request = &streamRequest_ExecCancel{v} } func (x *StreamRequest) HasRequest() bool { if x == nil { return false } - return x.Request != nil + return x.xxx_hidden_Request != nil } func (x *StreamRequest) HasExecRequest() bool { if x == nil { return false } - _, ok := x.Request.(*StreamRequest_ExecRequest) + _, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest) return ok } @@ -156,7 +141,7 @@ func (x *StreamRequest) HasExecInput() bool { if x == nil { return false } - _, ok := x.Request.(*StreamRequest_ExecInput) + _, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput) return ok } @@ -164,7 +149,7 @@ func (x *StreamRequest) HasExecResize() bool { if x == nil { return false } - _, ok := x.Request.(*StreamRequest_ExecResize) + _, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize) return ok } @@ -172,35 +157,35 @@ func (x *StreamRequest) HasExecCancel() bool { if x == nil { return false } - _, ok := x.Request.(*StreamRequest_ExecCancel) + _, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel) return ok } func (x *StreamRequest) ClearRequest() { - x.Request = nil + x.xxx_hidden_Request = nil } func (x *StreamRequest) ClearExecRequest() { - if _, ok := x.Request.(*StreamRequest_ExecRequest); ok { - x.Request = nil + if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest); ok { + x.xxx_hidden_Request = nil } } func (x *StreamRequest) ClearExecInput() { - if _, ok := x.Request.(*StreamRequest_ExecInput); ok { - x.Request = nil + if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput); ok { + x.xxx_hidden_Request = nil } } func (x *StreamRequest) ClearExecResize() { - if _, ok := x.Request.(*StreamRequest_ExecResize); ok { - x.Request = nil + if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize); ok { + x.xxx_hidden_Request = nil } } func (x *StreamRequest) ClearExecCancel() { - if _, ok := x.Request.(*StreamRequest_ExecCancel); ok { - x.Request = nil + if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel); ok { + x.xxx_hidden_Request = nil } } @@ -214,14 +199,14 @@ func (x *StreamRequest) WhichRequest() case_StreamRequest_Request { if x == nil { return StreamRequest_Request_not_set_case } - switch x.Request.(type) { - case *StreamRequest_ExecRequest: + switch x.xxx_hidden_Request.(type) { + case *streamRequest_ExecRequest: return StreamRequest_ExecRequest_case - case *StreamRequest_ExecInput: + case *streamRequest_ExecInput: return StreamRequest_ExecInput_case - case *StreamRequest_ExecResize: + case *streamRequest_ExecResize: return StreamRequest_ExecResize_case - case *StreamRequest_ExecCancel: + case *streamRequest_ExecCancel: return StreamRequest_ExecCancel_case default: return StreamRequest_Request_not_set_case @@ -231,12 +216,12 @@ func (x *StreamRequest) WhichRequest() case_StreamRequest_Request { type StreamRequest_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - // Fields of oneof Request: + // Fields of oneof xxx_hidden_Request: ExecRequest *Request ExecInput *StreamRequest_Input ExecResize *StreamRequest_Resize ExecCancel *emptypb.Empty - // -- end of Request + // -- end of xxx_hidden_Request } func (b0 StreamRequest_builder) Build() *StreamRequest { @@ -244,16 +229,16 @@ func (b0 StreamRequest_builder) Build() *StreamRequest { b, x := &b0, m0 _, _ = b, x if b.ExecRequest != nil { - x.Request = &StreamRequest_ExecRequest{b.ExecRequest} + x.xxx_hidden_Request = &streamRequest_ExecRequest{b.ExecRequest} } if b.ExecInput != nil { - x.Request = &StreamRequest_ExecInput{b.ExecInput} + x.xxx_hidden_Request = &streamRequest_ExecInput{b.ExecInput} } if b.ExecResize != nil { - x.Request = &StreamRequest_ExecResize{b.ExecResize} + x.xxx_hidden_Request = &streamRequest_ExecResize{b.ExecResize} } if b.ExecCancel != nil { - x.Request = &StreamRequest_ExecCancel{b.ExecCancel} + x.xxx_hidden_Request = &streamRequest_ExecCancel{b.ExecCancel} } return m0 } @@ -272,37 +257,37 @@ type isStreamRequest_Request interface { isStreamRequest_Request() } -type StreamRequest_ExecRequest struct { +type streamRequest_ExecRequest struct { ExecRequest *Request `protobuf:"bytes,1,opt,name=execRequest,oneof"` } -type StreamRequest_ExecInput struct { +type streamRequest_ExecInput struct { ExecInput *StreamRequest_Input `protobuf:"bytes,2,opt,name=execInput,oneof"` } -type StreamRequest_ExecResize struct { +type streamRequest_ExecResize struct { ExecResize *StreamRequest_Resize `protobuf:"bytes,3,opt,name=execResize,oneof"` } -type StreamRequest_ExecCancel struct { +type streamRequest_ExecCancel struct { ExecCancel *emptypb.Empty `protobuf:"bytes,4,opt,name=execCancel,oneof"` } -func (*StreamRequest_ExecRequest) isStreamRequest_Request() {} +func (*streamRequest_ExecRequest) isStreamRequest_Request() {} -func (*StreamRequest_ExecInput) isStreamRequest_Request() {} +func (*streamRequest_ExecInput) isStreamRequest_Request() {} -func (*StreamRequest_ExecResize) isStreamRequest_Request() {} +func (*streamRequest_ExecResize) isStreamRequest_Request() {} -func (*StreamRequest_ExecCancel) isStreamRequest_Request() {} +func (*streamRequest_ExecCancel) isStreamRequest_Request() {} type StreamRequest_Input struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Index uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` - Fd uint32 `protobuf:"varint,3,opt,name=fd" json:"fd,omitempty"` - Content []byte `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"` + xxx_hidden_Fd uint32 `protobuf:"varint,3,opt,name=fd"` + xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StreamRequest_Input) Reset() { @@ -332,38 +317,38 @@ func (x *StreamRequest_Input) ProtoReflect() protoreflect.Message { func (x *StreamRequest_Input) GetIndex() uint32 { if x != nil { - return x.Index + return x.xxx_hidden_Index } return 0 } func (x *StreamRequest_Input) GetFd() uint32 { if x != nil { - return x.Fd + return x.xxx_hidden_Fd } return 0 } func (x *StreamRequest_Input) GetContent() []byte { if x != nil { - return x.Content + return x.xxx_hidden_Content } return nil } func (x *StreamRequest_Input) SetIndex(v uint32) { - x.Index = v + x.xxx_hidden_Index = v } func (x *StreamRequest_Input) SetFd(v uint32) { - x.Fd = v + x.xxx_hidden_Fd = v } func (x *StreamRequest_Input) SetContent(v []byte) { if v == nil { v = []byte{} } - x.Content = v + x.xxx_hidden_Content = v } type StreamRequest_Input_builder struct { @@ -378,22 +363,22 @@ func (b0 StreamRequest_Input_builder) Build() *StreamRequest_Input { m0 := &StreamRequest_Input{} b, x := &b0, m0 _, _ = b, x - x.Index = b.Index - x.Fd = b.Fd - x.Content = b.Content + x.xxx_hidden_Index = b.Index + x.xxx_hidden_Fd = b.Fd + x.xxx_hidden_Content = b.Content return m0 } type StreamRequest_Resize struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Index uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` - Fd uint32 `protobuf:"varint,6,opt,name=fd" json:"fd,omitempty"` - Rows uint32 `protobuf:"varint,2,opt,name=rows" json:"rows,omitempty"` - Cols uint32 `protobuf:"varint,3,opt,name=cols" json:"cols,omitempty"` - X uint32 `protobuf:"varint,4,opt,name=x" json:"x,omitempty"` - Y uint32 `protobuf:"varint,5,opt,name=y" json:"y,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"` + xxx_hidden_Fd uint32 `protobuf:"varint,6,opt,name=fd"` + xxx_hidden_Rows uint32 `protobuf:"varint,2,opt,name=rows"` + xxx_hidden_Cols uint32 `protobuf:"varint,3,opt,name=cols"` + xxx_hidden_X uint32 `protobuf:"varint,4,opt,name=x"` + xxx_hidden_Y uint32 `protobuf:"varint,5,opt,name=y"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StreamRequest_Resize) Reset() { @@ -423,68 +408,68 @@ func (x *StreamRequest_Resize) ProtoReflect() protoreflect.Message { func (x *StreamRequest_Resize) GetIndex() uint32 { if x != nil { - return x.Index + return x.xxx_hidden_Index } return 0 } func (x *StreamRequest_Resize) GetFd() uint32 { if x != nil { - return x.Fd + return x.xxx_hidden_Fd } return 0 } func (x *StreamRequest_Resize) GetRows() uint32 { if x != nil { - return x.Rows + return x.xxx_hidden_Rows } return 0 } func (x *StreamRequest_Resize) GetCols() uint32 { if x != nil { - return x.Cols + return x.xxx_hidden_Cols } return 0 } func (x *StreamRequest_Resize) GetX() uint32 { if x != nil { - return x.X + return x.xxx_hidden_X } return 0 } func (x *StreamRequest_Resize) GetY() uint32 { if x != nil { - return x.Y + return x.xxx_hidden_Y } return 0 } func (x *StreamRequest_Resize) SetIndex(v uint32) { - x.Index = v + x.xxx_hidden_Index = v } func (x *StreamRequest_Resize) SetFd(v uint32) { - x.Fd = v + x.xxx_hidden_Fd = v } func (x *StreamRequest_Resize) SetRows(v uint32) { - x.Rows = v + x.xxx_hidden_Rows = v } func (x *StreamRequest_Resize) SetCols(v uint32) { - x.Cols = v + x.xxx_hidden_Cols = v } func (x *StreamRequest_Resize) SetX(v uint32) { - x.X = v + x.xxx_hidden_X = v } func (x *StreamRequest_Resize) SetY(v uint32) { - x.Y = v + x.xxx_hidden_Y = v } type StreamRequest_Resize_builder struct { @@ -502,12 +487,12 @@ func (b0 StreamRequest_Resize_builder) Build() *StreamRequest_Resize { m0 := &StreamRequest_Resize{} b, x := &b0, m0 _, _ = b, x - x.Index = b.Index - x.Fd = b.Fd - x.Rows = b.Rows - x.Cols = b.Cols - x.X = b.X - x.Y = b.Y + x.xxx_hidden_Index = b.Index + x.xxx_hidden_Fd = b.Fd + x.xxx_hidden_Rows = b.Rows + x.xxx_hidden_Cols = b.Cols + x.xxx_hidden_X = b.X + x.xxx_hidden_Y = b.Y return m0 } @@ -536,7 +521,7 @@ const file_stream_request_proto_rawDesc = "" + "\x04cols\x18\x03 \x01(\rR\x04cols\x12\f\n" + "\x01x\x18\x04 \x01(\rR\x01x\x12\f\n" + "\x01y\x18\x05 \x01(\rR\x01yB\t\n" + - "\arequestB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" + "\arequestB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a" var file_stream_request_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_stream_request_proto_goTypes = []any{ @@ -565,10 +550,10 @@ func file_stream_request_proto_init() { } file_request_proto_init() file_stream_request_proto_msgTypes[0].OneofWrappers = []any{ - (*StreamRequest_ExecRequest)(nil), - (*StreamRequest_ExecInput)(nil), - (*StreamRequest_ExecResize)(nil), - (*StreamRequest_ExecCancel)(nil), + (*streamRequest_ExecRequest)(nil), + (*streamRequest_ExecInput)(nil), + (*streamRequest_ExecResize)(nil), + (*streamRequest_ExecCancel)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pb/stream_request.proto b/pb/stream_request.proto index 246bbd1..b840b5e 100644 --- a/pb/stream_request.proto +++ b/pb/stream_request.proto @@ -4,7 +4,7 @@ package pb; option features.field_presence = IMPLICIT; option go_package = "github.com/criyle/go-judge/pb"; -option features.(pb.go).api_level = API_HYBRID; +option features.(pb.go).api_level = API_OPAQUE; import "google/protobuf/empty.proto"; import "request.proto"; diff --git a/pb/stream_request_protoopaque.pb.go b/pb/stream_request_protoopaque.pb.go deleted file mode 100644 index 424250c..0000000 --- a/pb/stream_request_protoopaque.pb.go +++ /dev/null @@ -1,577 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v6.31.1 -// source: stream_request.proto - -//go:build protoopaque - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/gofeaturespb" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - 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 StreamRequest struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Request isStreamRequest_Request `protobuf_oneof:"request"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamRequest) Reset() { - *x = StreamRequest{} - mi := &file_stream_request_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamRequest) ProtoMessage() {} - -func (x *StreamRequest) ProtoReflect() protoreflect.Message { - mi := &file_stream_request_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) -} - -func (x *StreamRequest) GetExecRequest() *Request { - if x != nil { - if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest); ok { - return x.ExecRequest - } - } - return nil -} - -func (x *StreamRequest) GetExecInput() *StreamRequest_Input { - if x != nil { - if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput); ok { - return x.ExecInput - } - } - return nil -} - -func (x *StreamRequest) GetExecResize() *StreamRequest_Resize { - if x != nil { - if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize); ok { - return x.ExecResize - } - } - return nil -} - -func (x *StreamRequest) GetExecCancel() *emptypb.Empty { - if x != nil { - if x, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel); ok { - return x.ExecCancel - } - } - return nil -} - -func (x *StreamRequest) SetExecRequest(v *Request) { - if v == nil { - x.xxx_hidden_Request = nil - return - } - x.xxx_hidden_Request = &streamRequest_ExecRequest{v} -} - -func (x *StreamRequest) SetExecInput(v *StreamRequest_Input) { - if v == nil { - x.xxx_hidden_Request = nil - return - } - x.xxx_hidden_Request = &streamRequest_ExecInput{v} -} - -func (x *StreamRequest) SetExecResize(v *StreamRequest_Resize) { - if v == nil { - x.xxx_hidden_Request = nil - return - } - x.xxx_hidden_Request = &streamRequest_ExecResize{v} -} - -func (x *StreamRequest) SetExecCancel(v *emptypb.Empty) { - if v == nil { - x.xxx_hidden_Request = nil - return - } - x.xxx_hidden_Request = &streamRequest_ExecCancel{v} -} - -func (x *StreamRequest) HasRequest() bool { - if x == nil { - return false - } - return x.xxx_hidden_Request != nil -} - -func (x *StreamRequest) HasExecRequest() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest) - return ok -} - -func (x *StreamRequest) HasExecInput() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput) - return ok -} - -func (x *StreamRequest) HasExecResize() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize) - return ok -} - -func (x *StreamRequest) HasExecCancel() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel) - return ok -} - -func (x *StreamRequest) ClearRequest() { - x.xxx_hidden_Request = nil -} - -func (x *StreamRequest) ClearExecRequest() { - if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecRequest); ok { - x.xxx_hidden_Request = nil - } -} - -func (x *StreamRequest) ClearExecInput() { - if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecInput); ok { - x.xxx_hidden_Request = nil - } -} - -func (x *StreamRequest) ClearExecResize() { - if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecResize); ok { - x.xxx_hidden_Request = nil - } -} - -func (x *StreamRequest) ClearExecCancel() { - if _, ok := x.xxx_hidden_Request.(*streamRequest_ExecCancel); ok { - x.xxx_hidden_Request = nil - } -} - -const StreamRequest_Request_not_set_case case_StreamRequest_Request = 0 -const StreamRequest_ExecRequest_case case_StreamRequest_Request = 1 -const StreamRequest_ExecInput_case case_StreamRequest_Request = 2 -const StreamRequest_ExecResize_case case_StreamRequest_Request = 3 -const StreamRequest_ExecCancel_case case_StreamRequest_Request = 4 - -func (x *StreamRequest) WhichRequest() case_StreamRequest_Request { - if x == nil { - return StreamRequest_Request_not_set_case - } - switch x.xxx_hidden_Request.(type) { - case *streamRequest_ExecRequest: - return StreamRequest_ExecRequest_case - case *streamRequest_ExecInput: - return StreamRequest_ExecInput_case - case *streamRequest_ExecResize: - return StreamRequest_ExecResize_case - case *streamRequest_ExecCancel: - return StreamRequest_ExecCancel_case - default: - return StreamRequest_Request_not_set_case - } -} - -type StreamRequest_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - // Fields of oneof xxx_hidden_Request: - ExecRequest *Request - ExecInput *StreamRequest_Input - ExecResize *StreamRequest_Resize - ExecCancel *emptypb.Empty - // -- end of xxx_hidden_Request -} - -func (b0 StreamRequest_builder) Build() *StreamRequest { - m0 := &StreamRequest{} - b, x := &b0, m0 - _, _ = b, x - if b.ExecRequest != nil { - x.xxx_hidden_Request = &streamRequest_ExecRequest{b.ExecRequest} - } - if b.ExecInput != nil { - x.xxx_hidden_Request = &streamRequest_ExecInput{b.ExecInput} - } - if b.ExecResize != nil { - x.xxx_hidden_Request = &streamRequest_ExecResize{b.ExecResize} - } - if b.ExecCancel != nil { - x.xxx_hidden_Request = &streamRequest_ExecCancel{b.ExecCancel} - } - return m0 -} - -type case_StreamRequest_Request protoreflect.FieldNumber - -func (x case_StreamRequest_Request) String() string { - md := file_stream_request_proto_msgTypes[0].Descriptor() - if x == 0 { - return "not set" - } - return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) -} - -type isStreamRequest_Request interface { - isStreamRequest_Request() -} - -type streamRequest_ExecRequest struct { - ExecRequest *Request `protobuf:"bytes,1,opt,name=execRequest,oneof"` -} - -type streamRequest_ExecInput struct { - ExecInput *StreamRequest_Input `protobuf:"bytes,2,opt,name=execInput,oneof"` -} - -type streamRequest_ExecResize struct { - ExecResize *StreamRequest_Resize `protobuf:"bytes,3,opt,name=execResize,oneof"` -} - -type streamRequest_ExecCancel struct { - ExecCancel *emptypb.Empty `protobuf:"bytes,4,opt,name=execCancel,oneof"` -} - -func (*streamRequest_ExecRequest) isStreamRequest_Request() {} - -func (*streamRequest_ExecInput) isStreamRequest_Request() {} - -func (*streamRequest_ExecResize) isStreamRequest_Request() {} - -func (*streamRequest_ExecCancel) isStreamRequest_Request() {} - -type StreamRequest_Input struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"` - xxx_hidden_Fd uint32 `protobuf:"varint,3,opt,name=fd"` - xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamRequest_Input) Reset() { - *x = StreamRequest_Input{} - mi := &file_stream_request_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamRequest_Input) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamRequest_Input) ProtoMessage() {} - -func (x *StreamRequest_Input) ProtoReflect() protoreflect.Message { - mi := &file_stream_request_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) -} - -func (x *StreamRequest_Input) GetIndex() uint32 { - if x != nil { - return x.xxx_hidden_Index - } - return 0 -} - -func (x *StreamRequest_Input) GetFd() uint32 { - if x != nil { - return x.xxx_hidden_Fd - } - return 0 -} - -func (x *StreamRequest_Input) GetContent() []byte { - if x != nil { - return x.xxx_hidden_Content - } - return nil -} - -func (x *StreamRequest_Input) SetIndex(v uint32) { - x.xxx_hidden_Index = v -} - -func (x *StreamRequest_Input) SetFd(v uint32) { - x.xxx_hidden_Fd = v -} - -func (x *StreamRequest_Input) SetContent(v []byte) { - if v == nil { - v = []byte{} - } - x.xxx_hidden_Content = v -} - -type StreamRequest_Input_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Index uint32 - Fd uint32 - Content []byte -} - -func (b0 StreamRequest_Input_builder) Build() *StreamRequest_Input { - m0 := &StreamRequest_Input{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Index = b.Index - x.xxx_hidden_Fd = b.Fd - x.xxx_hidden_Content = b.Content - return m0 -} - -type StreamRequest_Resize struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"` - xxx_hidden_Fd uint32 `protobuf:"varint,6,opt,name=fd"` - xxx_hidden_Rows uint32 `protobuf:"varint,2,opt,name=rows"` - xxx_hidden_Cols uint32 `protobuf:"varint,3,opt,name=cols"` - xxx_hidden_X uint32 `protobuf:"varint,4,opt,name=x"` - xxx_hidden_Y uint32 `protobuf:"varint,5,opt,name=y"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamRequest_Resize) Reset() { - *x = StreamRequest_Resize{} - mi := &file_stream_request_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamRequest_Resize) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamRequest_Resize) ProtoMessage() {} - -func (x *StreamRequest_Resize) ProtoReflect() protoreflect.Message { - mi := &file_stream_request_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) -} - -func (x *StreamRequest_Resize) GetIndex() uint32 { - if x != nil { - return x.xxx_hidden_Index - } - return 0 -} - -func (x *StreamRequest_Resize) GetFd() uint32 { - if x != nil { - return x.xxx_hidden_Fd - } - return 0 -} - -func (x *StreamRequest_Resize) GetRows() uint32 { - if x != nil { - return x.xxx_hidden_Rows - } - return 0 -} - -func (x *StreamRequest_Resize) GetCols() uint32 { - if x != nil { - return x.xxx_hidden_Cols - } - return 0 -} - -func (x *StreamRequest_Resize) GetX() uint32 { - if x != nil { - return x.xxx_hidden_X - } - return 0 -} - -func (x *StreamRequest_Resize) GetY() uint32 { - if x != nil { - return x.xxx_hidden_Y - } - return 0 -} - -func (x *StreamRequest_Resize) SetIndex(v uint32) { - x.xxx_hidden_Index = v -} - -func (x *StreamRequest_Resize) SetFd(v uint32) { - x.xxx_hidden_Fd = v -} - -func (x *StreamRequest_Resize) SetRows(v uint32) { - x.xxx_hidden_Rows = v -} - -func (x *StreamRequest_Resize) SetCols(v uint32) { - x.xxx_hidden_Cols = v -} - -func (x *StreamRequest_Resize) SetX(v uint32) { - x.xxx_hidden_X = v -} - -func (x *StreamRequest_Resize) SetY(v uint32) { - x.xxx_hidden_Y = v -} - -type StreamRequest_Resize_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Index uint32 - Fd uint32 - Rows uint32 - Cols uint32 - X uint32 - Y uint32 -} - -func (b0 StreamRequest_Resize_builder) Build() *StreamRequest_Resize { - m0 := &StreamRequest_Resize{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Index = b.Index - x.xxx_hidden_Fd = b.Fd - x.xxx_hidden_Rows = b.Rows - x.xxx_hidden_Cols = b.Cols - x.xxx_hidden_X = b.X - x.xxx_hidden_Y = b.Y - return m0 -} - -var File_stream_request_proto protoreflect.FileDescriptor - -const file_stream_request_proto_rawDesc = "" + - "\n" + - "\x14stream_request.proto\x12\x02pb\x1a\x1bgoogle/protobuf/empty.proto\x1a\rrequest.proto\x1a!google/protobuf/go_features.proto\"\xb7\x03\n" + - "\rStreamRequest\x12/\n" + - "\vexecRequest\x18\x01 \x01(\v2\v.pb.RequestH\x00R\vexecRequest\x127\n" + - "\texecInput\x18\x02 \x01(\v2\x17.pb.StreamRequest.InputH\x00R\texecInput\x12:\n" + - "\n" + - "execResize\x18\x03 \x01(\v2\x18.pb.StreamRequest.ResizeH\x00R\n" + - "execResize\x128\n" + - "\n" + - "execCancel\x18\x04 \x01(\v2\x16.google.protobuf.EmptyH\x00R\n" + - "execCancel\x1aG\n" + - "\x05Input\x12\x14\n" + - "\x05index\x18\x01 \x01(\rR\x05index\x12\x0e\n" + - "\x02fd\x18\x03 \x01(\rR\x02fd\x12\x18\n" + - "\acontent\x18\x02 \x01(\fR\acontent\x1ar\n" + - "\x06Resize\x12\x14\n" + - "\x05index\x18\x01 \x01(\rR\x05index\x12\x0e\n" + - "\x02fd\x18\x06 \x01(\rR\x02fd\x12\x12\n" + - "\x04rows\x18\x02 \x01(\rR\x04rows\x12\x12\n" + - "\x04cols\x18\x03 \x01(\rR\x04cols\x12\f\n" + - "\x01x\x18\x04 \x01(\rR\x01x\x12\f\n" + - "\x01y\x18\x05 \x01(\rR\x01yB\t\n" + - "\arequestB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" - -var file_stream_request_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_stream_request_proto_goTypes = []any{ - (*StreamRequest)(nil), // 0: pb.StreamRequest - (*StreamRequest_Input)(nil), // 1: pb.StreamRequest.Input - (*StreamRequest_Resize)(nil), // 2: pb.StreamRequest.Resize - (*Request)(nil), // 3: pb.Request - (*emptypb.Empty)(nil), // 4: google.protobuf.Empty -} -var file_stream_request_proto_depIdxs = []int32{ - 3, // 0: pb.StreamRequest.execRequest:type_name -> pb.Request - 1, // 1: pb.StreamRequest.execInput:type_name -> pb.StreamRequest.Input - 2, // 2: pb.StreamRequest.execResize:type_name -> pb.StreamRequest.Resize - 4, // 3: pb.StreamRequest.execCancel:type_name -> google.protobuf.Empty - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_stream_request_proto_init() } -func file_stream_request_proto_init() { - if File_stream_request_proto != nil { - return - } - file_request_proto_init() - file_stream_request_proto_msgTypes[0].OneofWrappers = []any{ - (*streamRequest_ExecRequest)(nil), - (*streamRequest_ExecInput)(nil), - (*streamRequest_ExecResize)(nil), - (*streamRequest_ExecCancel)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_stream_request_proto_rawDesc), len(file_stream_request_proto_rawDesc)), - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stream_request_proto_goTypes, - DependencyIndexes: file_stream_request_proto_depIdxs, - MessageInfos: file_stream_request_proto_msgTypes, - }.Build() - File_stream_request_proto = out.File - file_stream_request_proto_goTypes = nil - file_stream_request_proto_depIdxs = nil -} diff --git a/pb/stream_response.pb.go b/pb/stream_response.pb.go index 94ecacc..e5e04d7 100644 --- a/pb/stream_response.pb.go +++ b/pb/stream_response.pb.go @@ -4,8 +4,6 @@ // protoc v6.31.1 // source: stream_response.proto -//go:build !protoopaque - package pb import ( @@ -24,14 +22,10 @@ const ( ) type StreamResponse struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - // Types that are valid to be assigned to Response: - // - // *StreamResponse_ExecResponse - // *StreamResponse_ExecOutput - Response isStreamResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Response isStreamResponse_Response `protobuf_oneof:"response"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StreamResponse) Reset() { @@ -59,16 +53,9 @@ func (x *StreamResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -func (x *StreamResponse) GetResponse() isStreamResponse_Response { - if x != nil { - return x.Response - } - return nil -} - func (x *StreamResponse) GetExecResponse() *Response { if x != nil { - if x, ok := x.Response.(*StreamResponse_ExecResponse); ok { + if x, ok := x.xxx_hidden_Response.(*streamResponse_ExecResponse); ok { return x.ExecResponse } } @@ -77,7 +64,7 @@ func (x *StreamResponse) GetExecResponse() *Response { func (x *StreamResponse) GetExecOutput() *StreamResponse_Output { if x != nil { - if x, ok := x.Response.(*StreamResponse_ExecOutput); ok { + if x, ok := x.xxx_hidden_Response.(*streamResponse_ExecOutput); ok { return x.ExecOutput } } @@ -86,32 +73,32 @@ func (x *StreamResponse) GetExecOutput() *StreamResponse_Output { func (x *StreamResponse) SetExecResponse(v *Response) { if v == nil { - x.Response = nil + x.xxx_hidden_Response = nil return } - x.Response = &StreamResponse_ExecResponse{v} + x.xxx_hidden_Response = &streamResponse_ExecResponse{v} } func (x *StreamResponse) SetExecOutput(v *StreamResponse_Output) { if v == nil { - x.Response = nil + x.xxx_hidden_Response = nil return } - x.Response = &StreamResponse_ExecOutput{v} + x.xxx_hidden_Response = &streamResponse_ExecOutput{v} } func (x *StreamResponse) HasResponse() bool { if x == nil { return false } - return x.Response != nil + return x.xxx_hidden_Response != nil } func (x *StreamResponse) HasExecResponse() bool { if x == nil { return false } - _, ok := x.Response.(*StreamResponse_ExecResponse) + _, ok := x.xxx_hidden_Response.(*streamResponse_ExecResponse) return ok } @@ -119,23 +106,23 @@ func (x *StreamResponse) HasExecOutput() bool { if x == nil { return false } - _, ok := x.Response.(*StreamResponse_ExecOutput) + _, ok := x.xxx_hidden_Response.(*streamResponse_ExecOutput) return ok } func (x *StreamResponse) ClearResponse() { - x.Response = nil + x.xxx_hidden_Response = nil } func (x *StreamResponse) ClearExecResponse() { - if _, ok := x.Response.(*StreamResponse_ExecResponse); ok { - x.Response = nil + if _, ok := x.xxx_hidden_Response.(*streamResponse_ExecResponse); ok { + x.xxx_hidden_Response = nil } } func (x *StreamResponse) ClearExecOutput() { - if _, ok := x.Response.(*StreamResponse_ExecOutput); ok { - x.Response = nil + if _, ok := x.xxx_hidden_Response.(*streamResponse_ExecOutput); ok { + x.xxx_hidden_Response = nil } } @@ -147,10 +134,10 @@ func (x *StreamResponse) WhichResponse() case_StreamResponse_Response { if x == nil { return StreamResponse_Response_not_set_case } - switch x.Response.(type) { - case *StreamResponse_ExecResponse: + switch x.xxx_hidden_Response.(type) { + case *streamResponse_ExecResponse: return StreamResponse_ExecResponse_case - case *StreamResponse_ExecOutput: + case *streamResponse_ExecOutput: return StreamResponse_ExecOutput_case default: return StreamResponse_Response_not_set_case @@ -160,10 +147,10 @@ func (x *StreamResponse) WhichResponse() case_StreamResponse_Response { type StreamResponse_builder struct { _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - // Fields of oneof Response: + // Fields of oneof xxx_hidden_Response: ExecResponse *Response ExecOutput *StreamResponse_Output - // -- end of Response + // -- end of xxx_hidden_Response } func (b0 StreamResponse_builder) Build() *StreamResponse { @@ -171,10 +158,10 @@ func (b0 StreamResponse_builder) Build() *StreamResponse { b, x := &b0, m0 _, _ = b, x if b.ExecResponse != nil { - x.Response = &StreamResponse_ExecResponse{b.ExecResponse} + x.xxx_hidden_Response = &streamResponse_ExecResponse{b.ExecResponse} } if b.ExecOutput != nil { - x.Response = &StreamResponse_ExecOutput{b.ExecOutput} + x.xxx_hidden_Response = &streamResponse_ExecOutput{b.ExecOutput} } return m0 } @@ -193,25 +180,25 @@ type isStreamResponse_Response interface { isStreamResponse_Response() } -type StreamResponse_ExecResponse struct { +type streamResponse_ExecResponse struct { ExecResponse *Response `protobuf:"bytes,1,opt,name=execResponse,oneof"` } -type StreamResponse_ExecOutput struct { +type streamResponse_ExecOutput struct { ExecOutput *StreamResponse_Output `protobuf:"bytes,2,opt,name=execOutput,oneof"` } -func (*StreamResponse_ExecResponse) isStreamResponse_Response() {} +func (*streamResponse_ExecResponse) isStreamResponse_Response() {} -func (*StreamResponse_ExecOutput) isStreamResponse_Response() {} +func (*streamResponse_ExecOutput) isStreamResponse_Response() {} type StreamResponse_Output struct { - state protoimpl.MessageState `protogen:"hybrid.v1"` - Index uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` - Fd uint32 `protobuf:"varint,3,opt,name=fd" json:"fd,omitempty"` - Content []byte `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"` + xxx_hidden_Fd uint32 `protobuf:"varint,3,opt,name=fd"` + xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *StreamResponse_Output) Reset() { @@ -241,38 +228,38 @@ func (x *StreamResponse_Output) ProtoReflect() protoreflect.Message { func (x *StreamResponse_Output) GetIndex() uint32 { if x != nil { - return x.Index + return x.xxx_hidden_Index } return 0 } func (x *StreamResponse_Output) GetFd() uint32 { if x != nil { - return x.Fd + return x.xxx_hidden_Fd } return 0 } func (x *StreamResponse_Output) GetContent() []byte { if x != nil { - return x.Content + return x.xxx_hidden_Content } return nil } func (x *StreamResponse_Output) SetIndex(v uint32) { - x.Index = v + x.xxx_hidden_Index = v } func (x *StreamResponse_Output) SetFd(v uint32) { - x.Fd = v + x.xxx_hidden_Fd = v } func (x *StreamResponse_Output) SetContent(v []byte) { if v == nil { v = []byte{} } - x.Content = v + x.xxx_hidden_Content = v } type StreamResponse_Output_builder struct { @@ -287,9 +274,9 @@ func (b0 StreamResponse_Output_builder) Build() *StreamResponse_Output { m0 := &StreamResponse_Output{} b, x := &b0, m0 _, _ = b, x - x.Index = b.Index - x.Fd = b.Fd - x.Content = b.Content + x.xxx_hidden_Index = b.Index + x.xxx_hidden_Fd = b.Fd + x.xxx_hidden_Content = b.Content return m0 } @@ -308,7 +295,7 @@ const file_stream_response_proto_rawDesc = "" + "\x02fd\x18\x03 \x01(\rR\x02fd\x12\x18\n" + "\acontent\x18\x02 \x01(\fR\acontentB\n" + "\n" + - "\bresponseB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" + "\bresponseB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x03\b\x02b\beditionsp\xe8\a" var file_stream_response_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_stream_response_proto_goTypes = []any{ @@ -333,8 +320,8 @@ func file_stream_response_proto_init() { } file_response_proto_init() file_stream_response_proto_msgTypes[0].OneofWrappers = []any{ - (*StreamResponse_ExecResponse)(nil), - (*StreamResponse_ExecOutput)(nil), + (*streamResponse_ExecResponse)(nil), + (*streamResponse_ExecOutput)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pb/stream_response.proto b/pb/stream_response.proto index ccaa36b..41d78a4 100644 --- a/pb/stream_response.proto +++ b/pb/stream_response.proto @@ -4,7 +4,7 @@ package pb; option features.field_presence = IMPLICIT; option go_package = "github.com/criyle/go-judge/pb"; -option features.(pb.go).api_level = API_HYBRID; +option features.(pb.go).api_level = API_OPAQUE; import "response.proto"; import "google/protobuf/go_features.proto"; diff --git a/pb/stream_response_protoopaque.pb.go b/pb/stream_response_protoopaque.pb.go deleted file mode 100644 index d8f2164..0000000 --- a/pb/stream_response_protoopaque.pb.go +++ /dev/null @@ -1,345 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v6.31.1 -// source: stream_response.proto - -//go:build protoopaque - -package pb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/gofeaturespb" - reflect "reflect" - 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 StreamResponse struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Response isStreamResponse_Response `protobuf_oneof:"response"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamResponse) Reset() { - *x = StreamResponse{} - mi := &file_stream_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamResponse) ProtoMessage() {} - -func (x *StreamResponse) ProtoReflect() protoreflect.Message { - mi := &file_stream_response_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) -} - -func (x *StreamResponse) GetExecResponse() *Response { - if x != nil { - if x, ok := x.xxx_hidden_Response.(*streamResponse_ExecResponse); ok { - return x.ExecResponse - } - } - return nil -} - -func (x *StreamResponse) GetExecOutput() *StreamResponse_Output { - if x != nil { - if x, ok := x.xxx_hidden_Response.(*streamResponse_ExecOutput); ok { - return x.ExecOutput - } - } - return nil -} - -func (x *StreamResponse) SetExecResponse(v *Response) { - if v == nil { - x.xxx_hidden_Response = nil - return - } - x.xxx_hidden_Response = &streamResponse_ExecResponse{v} -} - -func (x *StreamResponse) SetExecOutput(v *StreamResponse_Output) { - if v == nil { - x.xxx_hidden_Response = nil - return - } - x.xxx_hidden_Response = &streamResponse_ExecOutput{v} -} - -func (x *StreamResponse) HasResponse() bool { - if x == nil { - return false - } - return x.xxx_hidden_Response != nil -} - -func (x *StreamResponse) HasExecResponse() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_Response.(*streamResponse_ExecResponse) - return ok -} - -func (x *StreamResponse) HasExecOutput() bool { - if x == nil { - return false - } - _, ok := x.xxx_hidden_Response.(*streamResponse_ExecOutput) - return ok -} - -func (x *StreamResponse) ClearResponse() { - x.xxx_hidden_Response = nil -} - -func (x *StreamResponse) ClearExecResponse() { - if _, ok := x.xxx_hidden_Response.(*streamResponse_ExecResponse); ok { - x.xxx_hidden_Response = nil - } -} - -func (x *StreamResponse) ClearExecOutput() { - if _, ok := x.xxx_hidden_Response.(*streamResponse_ExecOutput); ok { - x.xxx_hidden_Response = nil - } -} - -const StreamResponse_Response_not_set_case case_StreamResponse_Response = 0 -const StreamResponse_ExecResponse_case case_StreamResponse_Response = 1 -const StreamResponse_ExecOutput_case case_StreamResponse_Response = 2 - -func (x *StreamResponse) WhichResponse() case_StreamResponse_Response { - if x == nil { - return StreamResponse_Response_not_set_case - } - switch x.xxx_hidden_Response.(type) { - case *streamResponse_ExecResponse: - return StreamResponse_ExecResponse_case - case *streamResponse_ExecOutput: - return StreamResponse_ExecOutput_case - default: - return StreamResponse_Response_not_set_case - } -} - -type StreamResponse_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - // Fields of oneof xxx_hidden_Response: - ExecResponse *Response - ExecOutput *StreamResponse_Output - // -- end of xxx_hidden_Response -} - -func (b0 StreamResponse_builder) Build() *StreamResponse { - m0 := &StreamResponse{} - b, x := &b0, m0 - _, _ = b, x - if b.ExecResponse != nil { - x.xxx_hidden_Response = &streamResponse_ExecResponse{b.ExecResponse} - } - if b.ExecOutput != nil { - x.xxx_hidden_Response = &streamResponse_ExecOutput{b.ExecOutput} - } - return m0 -} - -type case_StreamResponse_Response protoreflect.FieldNumber - -func (x case_StreamResponse_Response) String() string { - md := file_stream_response_proto_msgTypes[0].Descriptor() - if x == 0 { - return "not set" - } - return protoimpl.X.MessageFieldStringOf(md, protoreflect.FieldNumber(x)) -} - -type isStreamResponse_Response interface { - isStreamResponse_Response() -} - -type streamResponse_ExecResponse struct { - ExecResponse *Response `protobuf:"bytes,1,opt,name=execResponse,oneof"` -} - -type streamResponse_ExecOutput struct { - ExecOutput *StreamResponse_Output `protobuf:"bytes,2,opt,name=execOutput,oneof"` -} - -func (*streamResponse_ExecResponse) isStreamResponse_Response() {} - -func (*streamResponse_ExecOutput) isStreamResponse_Response() {} - -type StreamResponse_Output struct { - state protoimpl.MessageState `protogen:"opaque.v1"` - xxx_hidden_Index uint32 `protobuf:"varint,1,opt,name=index"` - xxx_hidden_Fd uint32 `protobuf:"varint,3,opt,name=fd"` - xxx_hidden_Content []byte `protobuf:"bytes,2,opt,name=content"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StreamResponse_Output) Reset() { - *x = StreamResponse_Output{} - mi := &file_stream_response_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StreamResponse_Output) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StreamResponse_Output) ProtoMessage() {} - -func (x *StreamResponse_Output) ProtoReflect() protoreflect.Message { - mi := &file_stream_response_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) -} - -func (x *StreamResponse_Output) GetIndex() uint32 { - if x != nil { - return x.xxx_hidden_Index - } - return 0 -} - -func (x *StreamResponse_Output) GetFd() uint32 { - if x != nil { - return x.xxx_hidden_Fd - } - return 0 -} - -func (x *StreamResponse_Output) GetContent() []byte { - if x != nil { - return x.xxx_hidden_Content - } - return nil -} - -func (x *StreamResponse_Output) SetIndex(v uint32) { - x.xxx_hidden_Index = v -} - -func (x *StreamResponse_Output) SetFd(v uint32) { - x.xxx_hidden_Fd = v -} - -func (x *StreamResponse_Output) SetContent(v []byte) { - if v == nil { - v = []byte{} - } - x.xxx_hidden_Content = v -} - -type StreamResponse_Output_builder struct { - _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. - - Index uint32 - Fd uint32 - Content []byte -} - -func (b0 StreamResponse_Output_builder) Build() *StreamResponse_Output { - m0 := &StreamResponse_Output{} - b, x := &b0, m0 - _, _ = b, x - x.xxx_hidden_Index = b.Index - x.xxx_hidden_Fd = b.Fd - x.xxx_hidden_Content = b.Content - return m0 -} - -var File_stream_response_proto protoreflect.FileDescriptor - -const file_stream_response_proto_rawDesc = "" + - "\n" + - "\x15stream_response.proto\x12\x02pb\x1a\x0eresponse.proto\x1a!google/protobuf/go_features.proto\"\xd7\x01\n" + - "\x0eStreamResponse\x122\n" + - "\fexecResponse\x18\x01 \x01(\v2\f.pb.ResponseH\x00R\fexecResponse\x12;\n" + - "\n" + - "execOutput\x18\x02 \x01(\v2\x19.pb.StreamResponse.OutputH\x00R\n" + - "execOutput\x1aH\n" + - "\x06Output\x12\x14\n" + - "\x05index\x18\x01 \x01(\rR\x05index\x12\x0e\n" + - "\x02fd\x18\x03 \x01(\rR\x02fd\x12\x18\n" + - "\acontent\x18\x02 \x01(\fR\acontentB\n" + - "\n" + - "\bresponseB)Z\x1dgithub.com/criyle/go-judge/pb\x92\x03\a\xd2>\x02\x10\x02\b\x02b\beditionsp\xe8\a" - -var file_stream_response_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stream_response_proto_goTypes = []any{ - (*StreamResponse)(nil), // 0: pb.StreamResponse - (*StreamResponse_Output)(nil), // 1: pb.StreamResponse.Output - (*Response)(nil), // 2: pb.Response -} -var file_stream_response_proto_depIdxs = []int32{ - 2, // 0: pb.StreamResponse.execResponse:type_name -> pb.Response - 1, // 1: pb.StreamResponse.execOutput:type_name -> pb.StreamResponse.Output - 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_stream_response_proto_init() } -func file_stream_response_proto_init() { - if File_stream_response_proto != nil { - return - } - file_response_proto_init() - file_stream_response_proto_msgTypes[0].OneofWrappers = []any{ - (*streamResponse_ExecResponse)(nil), - (*streamResponse_ExecOutput)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_stream_response_proto_rawDesc), len(file_stream_response_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stream_response_proto_goTypes, - DependencyIndexes: file_stream_response_proto_depIdxs, - MessageInfos: file_stream_response_proto_msgTypes, - }.Build() - File_stream_response_proto = out.File - file_stream_response_proto_goTypes = nil - file_stream_response_proto_depIdxs = nil -}