mirror of
https://github.com/criyle/go-judge.git
synced 2025-09-26 22:39:12 +08:00
344 lines
9.3 KiB
Go
344 lines
9.3 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.31.1
|
|
// source: stream_response.proto
|
|
|
|
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\x03\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
|
|
}
|