envexec: add detailed file error message

This commit is contained in:
criyle 2021-09-20 00:43:05 -07:00
parent b54becc32d
commit 915cbaccbb
12 changed files with 643 additions and 251 deletions

View File

@ -270,6 +270,24 @@ interface PipeMap {
max: number;
}
enum FileErrorType {
CopyInOpenFile,
CopyInCreateFile,
CopyInCopyContent,
CopyOutOpen,
CopyOutNotRegularFile,
CopyOutSizeExceeded,
CopyOutCreateFile,
CopyOutCopyContent,
CollectSizeExceeded,
}
interface FileError {
name: string; // 错误文件名称
type: FileErrorType; // 错误代码
message?: string; // 错误信息
}
interface Request {
requestId?: string; // 给 WebSocket 使用
cmd: Cmd[];
@ -287,6 +305,8 @@ interface Result {
files?: {[name:string]:string};
// copyFileCached 指定的文件 id
fileIds?: {[name:string]:string};
// 文件错误详细信息
fileError?: []FileError;
}
// WebSocket 结果

View File

@ -316,6 +316,24 @@ interface PipeMap {
max: number;
}
enum FileErrorType {
CopyInOpenFile,
CopyInCreateFile,
CopyInCopyContent,
CopyOutOpen,
CopyOutNotRegularFile,
CopyOutSizeExceeded,
CopyOutCreateFile,
CopyOutCopyContent,
CollectSizeExceeded,
}
interface FileError {
name: string; // error file name
type: FileErrorType; // type
message?: string; // detailed message
}
interface Request {
requestId?: string; // for WebSocket requests
cmd: Cmd[];
@ -333,6 +351,8 @@ interface Result {
files?: {[name:string]:string};
// copyFileCached name -> fileId
fileIds?: {[name:string]:string};
// fileError contains detailed file errors
fileError?: []FileError;
}
// WebSocket results

View File

@ -147,9 +147,22 @@ func convertPBResult(r model.Result) (*pb.Response_Result, error) {
Memory: uint64(r.Memory),
Files: r.Buffs,
FileIDs: r.FileIDs,
FileError: convertPBFileError(r.FileError),
}, nil
}
func convertPBFileError(fe []envexec.FileError) []*pb.Response_FileError {
rt := make([]*pb.Response_FileError, 0, len(fe))
for _, e := range fe {
rt = append(rt, &pb.Response_FileError{
Name: e.Name,
Type: pb.Response_FileError_ErrorType(e.Type),
Message: e.Message,
})
}
return rt
}
func convertPBRequest(r *pb.Request, srcPrefix string) (req *worker.Request, streamIn []*fileStreamIn, streamOut []*fileStreamOut, err error) {
defer func() {
if err != nil {

View File

@ -88,14 +88,15 @@ func (s *Status) UnmarshalJSON(b []byte) error {
// Result defines single command result
type Result struct {
Status Status `json:"status"`
ExitStatus int `json:"exitStatus"`
Error string `json:"error,omitempty"`
Time uint64 `json:"time"`
Memory uint64 `json:"memory"`
RunTime uint64 `json:"runTime"`
Files map[string]string `json:"files,omitempty"`
FileIDs map[string]string `json:"fileIds,omitempty"`
Status Status `json:"status"`
ExitStatus int `json:"exitStatus"`
Error string `json:"error,omitempty"`
Time uint64 `json:"time"`
Memory uint64 `json:"memory"`
RunTime uint64 `json:"runTime"`
Files map[string]string `json:"files,omitempty"`
FileIDs map[string]string `json:"fileIds,omitempty"`
FileError []envexec.FileError `json:"fileError,omitempty"`
files []string
Buffs map[string][]byte `json:"-"`
@ -188,6 +189,7 @@ func convertResult(r worker.Result) (Result, error) {
RunTime: uint64(r.RunTime),
Memory: uint64(r.Memory),
FileIDs: r.FileIDs,
FileError: r.FileError,
}
if r.Files != nil {
res.Files = make(map[string]string)

View File

@ -2,6 +2,7 @@ package envexec
import (
"context"
"fmt"
"os"
"time"
@ -72,4 +73,69 @@ type Result struct {
// Files stores copy out files
Files map[string]*os.File
// FileError stores file errors details
FileError []FileError
}
type FileErrorType int
const (
ErrCopyInOpenFile FileErrorType = iota
ErrCopyInCreateFile
ErrCopyInCopyContent
ErrCopyOutOpen
ErrCopyOutNotRegularFile
ErrCopyOutSizeExceeded
ErrCopyOutCreateFile
ErrCopyOutCopyContent
ErrCollectSizeExceeded
)
type FileError struct {
Name string `json:"name"`
Type FileErrorType `json:"type"`
Message string `json:"message,omitempty"`
}
var fileErrorString = []string{
"CopyInOpenFile",
"CopyInCreateFile",
"CopyInCopyContent",
"CopyOutOpen",
"CopyOutNotRegularFile",
"CopyOutSizeExceeded",
"CopyOutCreateFile",
"CopyOutCopyContent",
"CollectSizeExceeded",
}
var fileErrorStringReverse = make(map[string]FileErrorType)
func (t FileErrorType) String() string {
v := int(t)
if v >= 0 && v < len(fileErrorString) {
return fileErrorString[v]
}
return ""
}
func (t FileErrorType) MarshalJSON() ([]byte, error) {
return []byte(`"` + t.String() + `"`), nil
}
func (t *FileErrorType) UnmarshalJSON(b []byte) error {
str := string(b)
if v, ok := fileErrorStringReverse[str]; ok {
return fmt.Errorf("%s is not file error type", str)
} else {
*t = v
}
return nil
}
func init() {
for i, v := range fileErrorString {
fileErrorStringReverse[`"`+v+`"`] = FileErrorType(i)
}
}

View File

@ -12,10 +12,11 @@ import (
)
// copyOutAndCollect reads file and pipes in parallel from container
func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile NewStoreFile) (map[string]*os.File, error) {
func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile NewStoreFile) (map[string]*os.File, []FileError, error) {
var (
g errgroup.Group
l sync.Mutex
g errgroup.Group
l, le sync.Mutex
fileError []FileError
)
rt := make(map[string]*os.File)
put := func(f *os.File, n string) {
@ -23,11 +24,27 @@ func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile
defer l.Unlock()
rt[n] = f
}
addError := func(e FileError) {
le.Lock()
defer le.Unlock()
fileError = append(fileError, e)
}
// copy out
for _, n := range c.CopyOut {
n := n
g.Go(func() error {
g.Go(func() (err error) {
t := ErrCopyOutOpen
defer func() {
if err != nil {
addError(FileError{
Name: n.Name,
Type: t,
Message: err.Error(),
})
}
}()
cf, err := m.Open(n.Name, os.O_RDONLY, 0777)
if err != nil {
if errors.Is(err, os.ErrNotExist) && n.Optional {
@ -43,22 +60,26 @@ func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile
}
// check regular file
if stat.Mode()&os.ModeType != 0 {
t = ErrCopyOutNotRegularFile
return fmt.Errorf("%s: not a regular file %d", n.Name, stat.Mode()&os.ModeType)
}
// check size limit
s := stat.Size()
if c.CopyOutMax > 0 && s > int64(c.CopyOutMax) {
t = ErrCopyOutSizeExceeded
return fmt.Errorf("%s: size (%d) exceeded the limit (%d)", n.Name, s, c.CopyOutMax)
}
// create store file
buf, err := newStoreFile()
if err != nil {
t = ErrCopyOutCreateFile
return fmt.Errorf("%s: failed to create store file %v", n.Name, err)
}
// Ensure not copy over file size
_, err = buf.ReadFrom(io.LimitReader(cf, s))
if err != nil {
t = ErrCopyOutCopyContent
buf.Close()
return err
}
@ -74,6 +95,10 @@ func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile
<-p.done
put(p.buffer, p.name)
if fi, err := p.buffer.Stat(); err == nil && fi.Size() > int64(p.limit) {
addError(FileError{
Name: p.name,
Type: ErrCollectSizeExceeded,
})
return runner.StatusOutputLimitExceeded
}
return nil
@ -83,50 +108,68 @@ func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile
// collect container collector
ct := make(map[string]bool)
for _, f := range c.Files {
if t, ok := f.(*FileCollector); ok {
if t.Pipe || ct[t.Name] {
continue
}
ct[t.Name] = true
g.Go(func() error {
cf, err := m.Open(t.Name, os.O_RDONLY, 0777)
if err != nil {
return err
}
defer cf.Close()
stat, err := cf.Stat()
if err != nil {
return err
}
// check regular file
if stat.Mode()&os.ModeType != 0 {
return fmt.Errorf("%s: not a regular file %d", t.Name, stat.Mode()&os.ModeType)
}
// create store file
buf, err := newStoreFile()
if err != nil {
return fmt.Errorf("%s: failed to create store file %v", t.Name, err)
}
// Ensure not copy over file size
_, err = buf.ReadFrom(io.LimitReader(cf, int64(t.Limit)+1))
if err != nil {
buf.Close()
return err
}
put(buf, t.Name)
// check size limit
s := stat.Size()
if s > int64(t.Limit) {
return runner.StatusOutputLimitExceeded
}
return nil
})
t, ok := f.(*FileCollector)
if !ok {
continue
}
if t.Pipe || ct[t.Name] || c.TTY {
continue
}
ct[t.Name] = true
g.Go(func() (err error) {
errType := ErrCopyOutOpen
defer func() {
if err != nil {
addError(FileError{
Name: t.Name,
Type: errType,
Message: err.Error(),
})
}
}()
cf, err := m.Open(t.Name, os.O_RDONLY, 0777)
if err != nil {
return err
}
defer cf.Close()
stat, err := cf.Stat()
if err != nil {
return err
}
// check regular file
if stat.Mode()&os.ModeType != 0 {
errType = ErrCopyOutNotRegularFile
return fmt.Errorf("%s: not a regular file %d", t.Name, stat.Mode()&os.ModeType)
}
// create store file
buf, err := newStoreFile()
if err != nil {
errType = ErrCopyOutCreateFile
return fmt.Errorf("%s: failed to create store file %v", t.Name, err)
}
// Ensure not copy over file size
_, err = buf.ReadFrom(io.LimitReader(cf, int64(t.Limit)+1))
if err != nil {
errType = ErrCopyOutCopyContent
buf.Close()
return err
}
put(buf, t.Name)
// check size limit
s := stat.Size()
if s > int64(t.Limit) {
errType = ErrCollectSizeExceeded
return runner.StatusOutputLimitExceeded
}
return nil
})
}
// copy out dir
@ -137,5 +180,5 @@ func copyOutAndCollect(m Environment, c *Cmd, ptc []pipeCollector, newStoreFile
}
err := g.Wait()
return rt, err
return rt, fileError, err
}

View File

@ -3,16 +3,37 @@ package envexec
import (
"fmt"
"os"
"sync"
"golang.org/x/sync/errgroup"
)
// copyIn copied file from host to container in parallel
func copyIn(m Environment, copyIn map[string]File) error {
var g errgroup.Group
func copyIn(m Environment, copyIn map[string]File) ([]FileError, error) {
var (
g errgroup.Group
fileError []FileError
l sync.Mutex
)
addError := func(e FileError) {
l.Lock()
defer l.Unlock()
fileError = append(fileError, e)
}
for n, f := range copyIn {
n, f := n, f
g.Go(func() error {
g.Go(func() (err error) {
t := ErrCopyInOpenFile
defer func() {
if err != nil {
addError(FileError{
Name: n,
Type: t,
Message: err.Error(),
})
}
}()
hf, err := FileToReader(f)
if err != nil {
return fmt.Errorf("failed to copyIn %v", err)
@ -21,16 +42,18 @@ func copyIn(m Environment, copyIn map[string]File) error {
cf, err := m.Open(n, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0777)
if err != nil {
t = ErrCopyInCreateFile
return err
}
defer cf.Close()
_, err = cf.ReadFrom(hf)
if err != nil {
t = ErrCopyInCopyContent
return err
}
return nil
})
}
return g.Wait()
return fileError, g.Wait()
}

View File

@ -11,9 +11,10 @@ import (
func runSingle(pc context.Context, c *Cmd, fds []*os.File, ptc []pipeCollector, newStoreFile NewStoreFile) (result Result, err error) {
m := c.Environment
// copyin
if err := runSingleCopyIn(m, c.CopyIn); err != nil {
if fe, err := runSingleCopyIn(m, c.CopyIn); err != nil {
result.Status = StatusFileError
result.Error = err.Error()
result.FileError = fe
closeFiles(fds...)
return result, nil
}
@ -22,7 +23,7 @@ func runSingle(pc context.Context, c *Cmd, fds []*os.File, ptc []pipeCollector,
rt := runSingleWait(pc, m, c, fds)
// collect result
files, err := copyOutAndCollect(m, c, ptc, newStoreFile)
files, fe, err := copyOutAndCollect(m, c, ptc, newStoreFile)
result = Result{
Status: convertStatus(rt.Status),
ExitStatus: rt.ExitStatus,
@ -31,6 +32,7 @@ func runSingle(pc context.Context, c *Cmd, fds []*os.File, ptc []pipeCollector,
RunTime: rt.RunningTime,
Memory: rt.Memory,
Files: files,
FileError: fe,
}
// collect error (only if the process exits normally)
if rt.Status == runner.StatusNormal && err != nil && result.Error == "" {
@ -51,9 +53,9 @@ func runSingle(pc context.Context, c *Cmd, fds []*os.File, ptc []pipeCollector,
return result, nil
}
func runSingleCopyIn(m Environment, copyInFiles map[string]File) error {
func runSingleCopyIn(m Environment, copyInFiles map[string]File) ([]FileError, error) {
if len(copyInFiles) == 0 {
return nil
return nil, nil
}
return copyIn(m, copyInFiles)
}

View File

@ -21,6 +21,73 @@ const (
_ = 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
)
// 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",
}
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,
}
)
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_judge_proto_enumTypes[0].Descriptor()
}
func (Response_FileError_ErrorType) Type() protoreflect.EnumType {
return &file_judge_proto_enumTypes[0]
}
func (x Response_FileError_ErrorType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Response_FileError_ErrorType.Descriptor instead.
func (Response_FileError_ErrorType) EnumDescriptor() ([]byte, []int) {
return file_judge_proto_rawDescGZIP(), []int{4, 0, 0}
}
type Response_Result_StatusType int32
const (
@ -87,11 +154,11 @@ func (x Response_Result_StatusType) String() string {
}
func (Response_Result_StatusType) Descriptor() protoreflect.EnumDescriptor {
return file_judge_proto_enumTypes[0].Descriptor()
return file_judge_proto_enumTypes[1].Descriptor()
}
func (Response_Result_StatusType) Type() protoreflect.EnumType {
return &file_judge_proto_enumTypes[0]
return &file_judge_proto_enumTypes[1]
}
func (x Response_Result_StatusType) Number() protoreflect.EnumNumber {
@ -100,7 +167,7 @@ func (x Response_Result_StatusType) Number() protoreflect.EnumNumber {
// Deprecated: Use Response_Result_StatusType.Descriptor instead.
func (Response_Result_StatusType) EnumDescriptor() ([]byte, []int) {
return file_judge_proto_rawDescGZIP(), []int{4, 0, 0}
return file_judge_proto_rawDescGZIP(), []int{4, 1, 0}
}
type FileID struct {
@ -1344,6 +1411,69 @@ func (x *Request_PipeMap_PipeIndex) GetFd() int32 {
return 0
}
type Response_FileError struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type Response_FileError_ErrorType `protobuf:"varint,2,opt,name=type,proto3,enum=pb.Response_FileError_ErrorType" json:"type,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
}
func (x *Response_FileError) Reset() {
*x = Response_FileError{}
if protoimpl.UnsafeEnabled {
mi := &file_judge_proto_msgTypes[20]
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_judge_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Response_FileError.ProtoReflect.Descriptor instead.
func (*Response_FileError) Descriptor() ([]byte, []int) {
return file_judge_proto_rawDescGZIP(), []int{4, 0}
}
func (x *Response_FileError) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Response_FileError) GetType() Response_FileError_ErrorType {
if x != nil {
return x.Type
}
return Response_FileError_CopyInOpenFile
}
func (x *Response_FileError) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
type Response_Result struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1357,12 +1487,13 @@ type Response_Result struct {
Memory uint64 `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"`
Files map[string][]byte `protobuf:"bytes,6,rep,name=files,proto3" json:"files,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
FileIDs map[string]string `protobuf:"bytes,7,rep,name=fileIDs,proto3" json:"fileIDs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
FileError []*Response_FileError `protobuf:"bytes,9,rep,name=fileError,proto3" json:"fileError,omitempty"`
}
func (x *Response_Result) Reset() {
*x = Response_Result{}
if protoimpl.UnsafeEnabled {
mi := &file_judge_proto_msgTypes[20]
mi := &file_judge_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1375,7 +1506,7 @@ func (x *Response_Result) String() string {
func (*Response_Result) ProtoMessage() {}
func (x *Response_Result) ProtoReflect() protoreflect.Message {
mi := &file_judge_proto_msgTypes[20]
mi := &file_judge_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1388,7 +1519,7 @@ func (x *Response_Result) ProtoReflect() protoreflect.Message {
// Deprecated: Use Response_Result.ProtoReflect.Descriptor instead.
func (*Response_Result) Descriptor() ([]byte, []int) {
return file_judge_proto_rawDescGZIP(), []int{4, 0}
return file_judge_proto_rawDescGZIP(), []int{4, 1}
}
func (x *Response_Result) GetStatus() Response_Result_StatusType {
@ -1447,6 +1578,13 @@ func (x *Response_Result) GetFileIDs() map[string]string {
return nil
}
func (x *Response_Result) GetFileError() []*Response_FileError {
if x != nil {
return x.FileError
}
return nil
}
type StreamRequest_Input struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1459,7 +1597,7 @@ type StreamRequest_Input struct {
func (x *StreamRequest_Input) Reset() {
*x = StreamRequest_Input{}
if protoimpl.UnsafeEnabled {
mi := &file_judge_proto_msgTypes[23]
mi := &file_judge_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1472,7 +1610,7 @@ func (x *StreamRequest_Input) String() string {
func (*StreamRequest_Input) ProtoMessage() {}
func (x *StreamRequest_Input) ProtoReflect() protoreflect.Message {
mi := &file_judge_proto_msgTypes[23]
mi := &file_judge_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1517,7 +1655,7 @@ type StreamRequest_Resize struct {
func (x *StreamRequest_Resize) Reset() {
*x = StreamRequest_Resize{}
if protoimpl.UnsafeEnabled {
mi := &file_judge_proto_msgTypes[24]
mi := &file_judge_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1530,7 +1668,7 @@ func (x *StreamRequest_Resize) String() string {
func (*StreamRequest_Resize) ProtoMessage() {}
func (x *StreamRequest_Resize) ProtoReflect() protoreflect.Message {
mi := &file_judge_proto_msgTypes[24]
mi := &file_judge_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1593,7 +1731,7 @@ type StreamResponse_Output struct {
func (x *StreamResponse_Output) Reset() {
*x = StreamResponse_Output{}
if protoimpl.UnsafeEnabled {
mi := &file_judge_proto_msgTypes[25]
mi := &file_judge_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1606,7 +1744,7 @@ func (x *StreamResponse_Output) String() string {
func (*StreamResponse_Output) ProtoMessage() {}
func (x *StreamResponse_Output) ProtoReflect() protoreflect.Message {
mi := &file_judge_proto_msgTypes[25]
mi := &file_judge_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1761,113 +1899,138 @@ var file_judge_proto_rawDesc = []byte{
0x61, 0x78, 0x1a, 0x31, 0x0a, 0x09, 0x50, 0x69, 0x70, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x02, 0x66, 0x64, 0x22, 0xb9, 0x06, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x05, 0x52, 0x02, 0x66, 0x64, 0x22, 0xbd, 0x09, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44,
0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12,
0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xc9, 0x05, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65,
0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x69, 0x74,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x78,
0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12,
0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x74, 0x69,
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20,
0x01, 0x28, 0x04, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x65,
0x6d, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69,
0x6c, 0x65, 0x49, 0x44, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66,
0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xcb, 0x02, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x6f, 0x70, 0x79, 0x49, 0x6e, 0x4f,
0x70, 0x65, 0x6e, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x6f, 0x70,
0x79, 0x49, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x01, 0x12,
0x15, 0x0a, 0x11, 0x43, 0x6f, 0x70, 0x79, 0x49, 0x6e, 0x43, 0x6f, 0x70, 0x79, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x6f, 0x70, 0x79, 0x4f, 0x75,
0x74, 0x4f, 0x70, 0x65, 0x6e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x6f, 0x70, 0x79, 0x4f,
0x75, 0x74, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x46, 0x69, 0x6c, 0x65,
0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x6f, 0x70, 0x79, 0x4f, 0x75, 0x74, 0x53, 0x69, 0x7a,
0x65, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x43,
0x6f, 0x70, 0x79, 0x4f, 0x75, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65,
0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x6f, 0x70, 0x79, 0x4f, 0x75, 0x74, 0x43, 0x6f, 0x70,
0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x6f,
0x6c, 0x6c, 0x65, 0x63, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65,
0x64, 0x10, 0x08, 0x1a, 0xff, 0x05, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x36,
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x69, 0x74, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x65, 0x78, 0x69, 0x74,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
0x04, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65,
0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f,
0x72, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65,
0x49, 0x44, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x46,
0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x66, 0x69, 0x6c,
0x65, 0x49, 0x44, 0x73, 0x12, 0x34, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52,
0x09, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x69,
0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x1a, 0x3a, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa2, 0x02, 0x0a,
0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49,
0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x65,
0x70, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x41,
0x6e, 0x73, 0x77, 0x65, 0x72, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x61, 0x72, 0x74, 0x69,
0x61, 0x6c, 0x6c, 0x79, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x10, 0x03, 0x12, 0x17, 0x0a,
0x13, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65,
0x65, 0x64, 0x65, 0x64, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x69, 0x6d, 0x65, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x05, 0x12, 0x17, 0x0a,
0x13, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65,
0x65, 0x64, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x6f, 0x6e, 0x5a, 0x65, 0x72, 0x6f,
0x45, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09,
0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x44,
0x61, 0x6e, 0x67, 0x65, 0x72, 0x6f, 0x75, 0x73, 0x53, 0x79, 0x73, 0x63, 0x61, 0x6c, 0x6c, 0x10,
0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x4a, 0x75, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x61,
0x69, 0x6c, 0x65, 0x64, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69,
0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x11,
0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10,
0x0d, 0x22, 0xd9, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x70, 0x75,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74,
0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3a, 0x0a,
0x0a, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x65,
0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x1a, 0x35, 0x0a, 0x05, 0x49, 0x6e, 0x70,
0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x1a, 0x60, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x6f,
0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x01, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc5, 0x01,
0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x32, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x4f, 0x75, 0x74, 0x70,
0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4f, 0x75, 0x74,
0x70, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x4f, 0x75, 0x74, 0x70, 0x75,
0x74, 0x1a, 0x36, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x02, 0x0a, 0x08, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
0x6f, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x45, 0x78, 0x65, 0x63, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65,
0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x34,
0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74,
0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x12,
0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x1a, 0x0f, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x07,
0x46, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c,
0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69,
0x6c, 0x65, 0x49, 0x44, 0x12, 0x30, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x1a, 0x16,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0xa2, 0x02, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12,
0x0b, 0x0a, 0x07, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x72,
0x6f, 0x6e, 0x67, 0x41, 0x6e, 0x73, 0x77, 0x65, 0x72, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x50,
0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x10,
0x03, 0x12, 0x17, 0x0a, 0x13, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x69,
0x6d, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10,
0x05, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x45, 0x78, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x69,
0x6c, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x07, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x6f, 0x6e,
0x5a, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0x08,
0x12, 0x0d, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x09, 0x12,
0x14, 0x0a, 0x10, 0x44, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x6f, 0x75, 0x73, 0x53, 0x79, 0x73, 0x63,
0x61, 0x6c, 0x6c, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x4a, 0x75, 0x64, 0x67, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x6e,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x10, 0x0c, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x10, 0x0d, 0x22, 0xd9, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70,
0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x78, 0x65,
0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x65, 0x78, 0x65, 0x63,
0x49, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62,
0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49,
0x6e, 0x70, 0x75, 0x74, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x70, 0x75,
0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x48,
0x00, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x1a, 0x35, 0x0a,
0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x1a, 0x60, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x05, 0x20,
0x01, 0x28, 0x0d, 0x52, 0x01, 0x79, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x22, 0xc5, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0c, 0x65, 0x78, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x65, 0x63,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63,
0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70,
0x62, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x4f,
0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x36, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0a, 0x0a,
0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x02, 0x0a, 0x08, 0x45, 0x78,
0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x0b,
0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x62,
0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x45, 0x78, 0x65,
0x63, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e,
0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01,
0x30, 0x01, 0x12, 0x34, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x69, 0x79, 0x6c, 0x65, 0x2f, 0x67, 0x6f, 0x2d, 0x6a,
0x75, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x65,
0x47, 0x65, 0x74, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x1a,
0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x12, 0x26, 0x0a, 0x07, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0f, 0x2e, 0x70, 0x62,
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x1a, 0x0a, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x12, 0x30, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x49, 0x44, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x1f, 0x5a, 0x1d, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x69, 0x79, 0x6c, 0x65, 0x2f,
0x67, 0x6f, 0x2d, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -1882,81 +2045,85 @@ func file_judge_proto_rawDescGZIP() []byte {
return file_judge_proto_rawDescData
}
var file_judge_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_judge_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
var file_judge_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_judge_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
var file_judge_proto_goTypes = []interface{}{
(Response_Result_StatusType)(0), // 0: pb.Response.Result.StatusType
(*FileID)(nil), // 1: pb.FileID
(*FileContent)(nil), // 2: pb.FileContent
(*FileListType)(nil), // 3: pb.FileListType
(*Request)(nil), // 4: pb.Request
(*Response)(nil), // 5: pb.Response
(*StreamRequest)(nil), // 6: pb.StreamRequest
(*StreamResponse)(nil), // 7: pb.StreamResponse
nil, // 8: pb.FileListType.FileIDsEntry
(*Request_LocalFile)(nil), // 9: pb.Request.LocalFile
(*Request_MemoryFile)(nil), // 10: pb.Request.MemoryFile
(*Request_CachedFile)(nil), // 11: pb.Request.CachedFile
(*Request_PipeCollector)(nil), // 12: pb.Request.PipeCollector
(*Request_StreamInput)(nil), // 13: pb.Request.StreamInput
(*Request_StreamOutput)(nil), // 14: pb.Request.StreamOutput
(*Request_File)(nil), // 15: pb.Request.File
(*Request_CmdType)(nil), // 16: pb.Request.CmdType
(*Request_CmdCopyOutFile)(nil), // 17: pb.Request.CmdCopyOutFile
(*Request_PipeMap)(nil), // 18: pb.Request.PipeMap
nil, // 19: pb.Request.CmdType.CopyInEntry
(*Request_PipeMap_PipeIndex)(nil), // 20: pb.Request.PipeMap.PipeIndex
(*Response_Result)(nil), // 21: pb.Response.Result
nil, // 22: pb.Response.Result.FilesEntry
nil, // 23: pb.Response.Result.FileIDsEntry
(*StreamRequest_Input)(nil), // 24: pb.StreamRequest.Input
(*StreamRequest_Resize)(nil), // 25: pb.StreamRequest.Resize
(*StreamResponse_Output)(nil), // 26: pb.StreamResponse.Output
(*emptypb.Empty)(nil), // 27: google.protobuf.Empty
(Response_FileError_ErrorType)(0), // 0: pb.Response.FileError.ErrorType
(Response_Result_StatusType)(0), // 1: pb.Response.Result.StatusType
(*FileID)(nil), // 2: pb.FileID
(*FileContent)(nil), // 3: pb.FileContent
(*FileListType)(nil), // 4: pb.FileListType
(*Request)(nil), // 5: pb.Request
(*Response)(nil), // 6: pb.Response
(*StreamRequest)(nil), // 7: pb.StreamRequest
(*StreamResponse)(nil), // 8: pb.StreamResponse
nil, // 9: pb.FileListType.FileIDsEntry
(*Request_LocalFile)(nil), // 10: pb.Request.LocalFile
(*Request_MemoryFile)(nil), // 11: pb.Request.MemoryFile
(*Request_CachedFile)(nil), // 12: pb.Request.CachedFile
(*Request_PipeCollector)(nil), // 13: pb.Request.PipeCollector
(*Request_StreamInput)(nil), // 14: pb.Request.StreamInput
(*Request_StreamOutput)(nil), // 15: pb.Request.StreamOutput
(*Request_File)(nil), // 16: pb.Request.File
(*Request_CmdType)(nil), // 17: pb.Request.CmdType
(*Request_CmdCopyOutFile)(nil), // 18: pb.Request.CmdCopyOutFile
(*Request_PipeMap)(nil), // 19: pb.Request.PipeMap
nil, // 20: pb.Request.CmdType.CopyInEntry
(*Request_PipeMap_PipeIndex)(nil), // 21: pb.Request.PipeMap.PipeIndex
(*Response_FileError)(nil), // 22: pb.Response.FileError
(*Response_Result)(nil), // 23: pb.Response.Result
nil, // 24: pb.Response.Result.FilesEntry
nil, // 25: pb.Response.Result.FileIDsEntry
(*StreamRequest_Input)(nil), // 26: pb.StreamRequest.Input
(*StreamRequest_Resize)(nil), // 27: pb.StreamRequest.Resize
(*StreamResponse_Output)(nil), // 28: pb.StreamResponse.Output
(*emptypb.Empty)(nil), // 29: google.protobuf.Empty
}
var file_judge_proto_depIdxs = []int32{
8, // 0: pb.FileListType.fileIDs:type_name -> pb.FileListType.FileIDsEntry
16, // 1: pb.Request.cmd:type_name -> pb.Request.CmdType
18, // 2: pb.Request.pipeMapping:type_name -> pb.Request.PipeMap
21, // 3: pb.Response.results:type_name -> pb.Response.Result
4, // 4: pb.StreamRequest.execRequest:type_name -> pb.Request
24, // 5: pb.StreamRequest.execInput:type_name -> pb.StreamRequest.Input
25, // 6: pb.StreamRequest.execResize:type_name -> pb.StreamRequest.Resize
5, // 7: pb.StreamResponse.execResponse:type_name -> pb.Response
26, // 8: pb.StreamResponse.execOutput:type_name -> pb.StreamResponse.Output
9, // 9: pb.Request.File.local:type_name -> pb.Request.LocalFile
10, // 10: pb.Request.File.memory:type_name -> pb.Request.MemoryFile
11, // 11: pb.Request.File.cached:type_name -> pb.Request.CachedFile
12, // 12: pb.Request.File.pipe:type_name -> pb.Request.PipeCollector
13, // 13: pb.Request.File.streamIn:type_name -> pb.Request.StreamInput
14, // 14: pb.Request.File.streamOut:type_name -> pb.Request.StreamOutput
15, // 15: pb.Request.CmdType.files:type_name -> pb.Request.File
19, // 16: pb.Request.CmdType.copyIn:type_name -> pb.Request.CmdType.CopyInEntry
17, // 17: pb.Request.CmdType.copyOut:type_name -> pb.Request.CmdCopyOutFile
17, // 18: pb.Request.CmdType.copyOutCached:type_name -> pb.Request.CmdCopyOutFile
20, // 19: pb.Request.PipeMap.in:type_name -> pb.Request.PipeMap.PipeIndex
20, // 20: pb.Request.PipeMap.out:type_name -> pb.Request.PipeMap.PipeIndex
15, // 21: pb.Request.CmdType.CopyInEntry.value:type_name -> pb.Request.File
0, // 22: pb.Response.Result.status:type_name -> pb.Response.Result.StatusType
22, // 23: pb.Response.Result.files:type_name -> pb.Response.Result.FilesEntry
23, // 24: pb.Response.Result.fileIDs:type_name -> pb.Response.Result.FileIDsEntry
4, // 25: pb.Executor.Exec:input_type -> pb.Request
6, // 26: pb.Executor.ExecStream:input_type -> pb.StreamRequest
27, // 27: pb.Executor.FileList:input_type -> google.protobuf.Empty
1, // 28: pb.Executor.FileGet:input_type -> pb.FileID
2, // 29: pb.Executor.FileAdd:input_type -> pb.FileContent
1, // 30: pb.Executor.FileDelete:input_type -> pb.FileID
5, // 31: pb.Executor.Exec:output_type -> pb.Response
7, // 32: pb.Executor.ExecStream:output_type -> pb.StreamResponse
3, // 33: pb.Executor.FileList:output_type -> pb.FileListType
2, // 34: pb.Executor.FileGet:output_type -> pb.FileContent
1, // 35: pb.Executor.FileAdd:output_type -> pb.FileID
27, // 36: pb.Executor.FileDelete:output_type -> google.protobuf.Empty
31, // [31:37] is the sub-list for method output_type
25, // [25:31] is the sub-list for method input_type
25, // [25:25] is the sub-list for extension type_name
25, // [25:25] is the sub-list for extension extendee
0, // [0:25] is the sub-list for field type_name
9, // 0: pb.FileListType.fileIDs:type_name -> pb.FileListType.FileIDsEntry
17, // 1: pb.Request.cmd:type_name -> pb.Request.CmdType
19, // 2: pb.Request.pipeMapping:type_name -> pb.Request.PipeMap
23, // 3: pb.Response.results:type_name -> pb.Response.Result
5, // 4: pb.StreamRequest.execRequest:type_name -> pb.Request
26, // 5: pb.StreamRequest.execInput:type_name -> pb.StreamRequest.Input
27, // 6: pb.StreamRequest.execResize:type_name -> pb.StreamRequest.Resize
6, // 7: pb.StreamResponse.execResponse:type_name -> pb.Response
28, // 8: pb.StreamResponse.execOutput:type_name -> pb.StreamResponse.Output
10, // 9: pb.Request.File.local:type_name -> pb.Request.LocalFile
11, // 10: pb.Request.File.memory:type_name -> pb.Request.MemoryFile
12, // 11: pb.Request.File.cached:type_name -> pb.Request.CachedFile
13, // 12: pb.Request.File.pipe:type_name -> pb.Request.PipeCollector
14, // 13: pb.Request.File.streamIn:type_name -> pb.Request.StreamInput
15, // 14: pb.Request.File.streamOut:type_name -> pb.Request.StreamOutput
16, // 15: pb.Request.CmdType.files:type_name -> pb.Request.File
20, // 16: pb.Request.CmdType.copyIn:type_name -> pb.Request.CmdType.CopyInEntry
18, // 17: pb.Request.CmdType.copyOut:type_name -> pb.Request.CmdCopyOutFile
18, // 18: pb.Request.CmdType.copyOutCached:type_name -> pb.Request.CmdCopyOutFile
21, // 19: pb.Request.PipeMap.in:type_name -> pb.Request.PipeMap.PipeIndex
21, // 20: pb.Request.PipeMap.out:type_name -> pb.Request.PipeMap.PipeIndex
16, // 21: pb.Request.CmdType.CopyInEntry.value:type_name -> pb.Request.File
0, // 22: pb.Response.FileError.type:type_name -> pb.Response.FileError.ErrorType
1, // 23: pb.Response.Result.status:type_name -> pb.Response.Result.StatusType
24, // 24: pb.Response.Result.files:type_name -> pb.Response.Result.FilesEntry
25, // 25: pb.Response.Result.fileIDs:type_name -> pb.Response.Result.FileIDsEntry
22, // 26: pb.Response.Result.fileError:type_name -> pb.Response.FileError
5, // 27: pb.Executor.Exec:input_type -> pb.Request
7, // 28: pb.Executor.ExecStream:input_type -> pb.StreamRequest
29, // 29: pb.Executor.FileList:input_type -> google.protobuf.Empty
2, // 30: pb.Executor.FileGet:input_type -> pb.FileID
3, // 31: pb.Executor.FileAdd:input_type -> pb.FileContent
2, // 32: pb.Executor.FileDelete:input_type -> pb.FileID
6, // 33: pb.Executor.Exec:output_type -> pb.Response
8, // 34: pb.Executor.ExecStream:output_type -> pb.StreamResponse
4, // 35: pb.Executor.FileList:output_type -> pb.FileListType
3, // 36: pb.Executor.FileGet:output_type -> pb.FileContent
2, // 37: pb.Executor.FileAdd:output_type -> pb.FileID
29, // 38: pb.Executor.FileDelete:output_type -> google.protobuf.Empty
33, // [33:39] is the sub-list for method output_type
27, // [27:33] is the sub-list for method input_type
27, // [27:27] is the sub-list for extension type_name
27, // [27:27] is the sub-list for extension extendee
0, // [0:27] is the sub-list for field type_name
}
func init() { file_judge_proto_init() }
@ -2182,6 +2349,18 @@ func file_judge_proto_init() {
}
}
file_judge_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response_FileError); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_judge_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response_Result); i {
case 0:
return &v.state
@ -2193,7 +2372,7 @@ func file_judge_proto_init() {
return nil
}
}
file_judge_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
file_judge_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamRequest_Input); i {
case 0:
return &v.state
@ -2205,7 +2384,7 @@ func file_judge_proto_init() {
return nil
}
}
file_judge_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
file_judge_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamRequest_Resize); i {
case 0:
return &v.state
@ -2217,7 +2396,7 @@ func file_judge_proto_init() {
return nil
}
}
file_judge_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
file_judge_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamResponse_Output); i {
case 0:
return &v.state
@ -2252,8 +2431,8 @@ func file_judge_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_judge_proto_rawDesc,
NumEnums: 1,
NumMessages: 26,
NumEnums: 2,
NumMessages: 27,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -117,6 +117,25 @@ message Request {
}
message Response {
message FileError {
enum ErrorType {
CopyInOpenFile = 0;
CopyInCreateFile = 1;
CopyInCopyContent = 2;
CopyOutOpen = 3;
CopyOutNotRegularFile = 4;
CopyOutSizeExceeded = 5;
CopyOutCreateFile = 6;
CopyOutCopyContent = 7;
CollectSizeExceeded = 8;
}
string name = 1;
ErrorType type = 2;
string message = 3;
}
message Result {
enum StatusType {
Invalid = 0;
@ -143,6 +162,7 @@ message Response {
uint64 memory = 5;
map<string, bytes> files = 6;
map<string, string> fileIDs = 7;
repeated FileError fileError = 9;
}
string requestID = 1;
repeated Result results = 2;

View File

@ -53,6 +53,7 @@ type Result struct {
Memory envexec.Size
Files map[string]*os.File
FileIDs map[string]string
FileError []envexec.FileError
}
// Response defines worker response for single request
@ -72,6 +73,7 @@ func (r Result) String() string {
Memory envexec.Size
Files map[string]string
FileIDs map[string]string
FileError []envexec.FileError
}
d := Result{
Status: r.Status,
@ -82,6 +84,7 @@ func (r Result) String() string {
Memory: r.Memory,
Files: make(map[string]string),
FileIDs: r.FileIDs,
FileError: r.FileError,
}
for k, v := range r.Files {
d.Files[k] = fmt.Sprintf("(path:%s)", v.Name())

View File

@ -242,6 +242,7 @@ func (w *worker) convertResult(result envexec.Result, cmd Cmd) (res Result) {
res.Time = result.Time
res.RunTime = result.RunTime
res.Memory = result.Memory
res.FileError = result.FileError
res.Files = make(map[string]*os.File)
res.FileIDs = make(map[string]string)