chore(pb): migrate step 2 with opaque API

This commit is contained in:
criyle 2025-08-18 00:50:33 +00:00
parent 181b110a8b
commit 95377a4fa6
18 changed files with 519 additions and 3948 deletions

View File

@ -4,8 +4,6 @@
// protoc v6.31.1
// source: file.proto
//go:build !protoopaque
package pb
import (
@ -24,8 +22,8 @@ const (
)
type FileID struct {
state protoimpl.MessageState `protogen:"hybrid.v1"`
FileID string `protobuf:"bytes,1,opt,name=fileID" json:"fileID,omitempty"`
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_FileID string `protobuf:"bytes,1,opt,name=fileID"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -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,14 +74,14 @@ 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"`
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
}
@ -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,14 +147,14 @@ 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"`
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
}
@ -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{

View File

@ -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; }

View File

@ -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
}

View File

@ -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

View File

@ -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";

View File

@ -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
}

File diff suppressed because it is too large Load Diff

View File

@ -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";

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,6 @@
// protoc v6.31.1
// source: response.proto
//go:build !protoopaque
package pb
import (
@ -166,10 +164,10 @@ 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"`
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
}
@ -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,17 +244,17 @@ 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"`
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
}
@ -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,24 +329,24 @@ 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"`
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
}
@ -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)

View File

@ -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 {

View File

@ -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
}

View File

@ -4,8 +4,6 @@
// protoc v6.31.1
// source: stream_request.proto
//go:build !protoopaque
package pb
import (
@ -25,14 +23,8 @@ 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"`
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Request isStreamRequest_Request `protobuf_oneof:"request"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -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,35 +257,35 @@ 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"`
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
}
@ -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,20 +363,20 @@ 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"`
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
}
@ -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{

View File

@ -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";

View File

@ -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
}

View File

@ -4,8 +4,6 @@
// protoc v6.31.1
// source: stream_response.proto
//go:build !protoopaque
package pb
import (
@ -24,12 +22,8 @@ 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"`
state protoimpl.MessageState `protogen:"opaque.v1"`
xxx_hidden_Response isStreamResponse_Response `protobuf_oneof:"response"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -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,23 +180,23 @@ 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"`
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
}
@ -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{

View File

@ -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";

View File

@ -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
}