mirror of
https://github.com/criyle/go-judge.git
synced 2025-09-26 22:39:12 +08:00
Compare commits
5 Commits
2bc4a4fcee
...
7e9bf4b84b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7e9bf4b84b | ||
![]() |
48a47dabb8 | ||
![]() |
51423d7110 | ||
![]() |
6582aaea4f | ||
![]() |
28fd2eaef3 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.24"
|
||||
go-version: "1.25"
|
||||
cache-dependency-path: |
|
||||
go.sum
|
||||
- name: Remove unsupported tags
|
||||
@ -78,5 +78,3 @@ jobs:
|
||||
with:
|
||||
name: go-judge-shell_${{ matrix.os == 'darwin' && 'macos' || matrix.os }}_${{ matrix.arch }}
|
||||
path: dist/go-judge-shell_${{ matrix.os }}_${{ matrix.arch }}/go-judge-shell${{ matrix.os == 'windows' && '.exe' || ''}}
|
||||
|
||||
|
||||
|
@ -66,9 +66,9 @@ func (p *execProxy) FileGet(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
fid := &pb.FileID{
|
||||
fid := pb.FileID_builder{
|
||||
FileID: uri.FileID,
|
||||
}
|
||||
}.Build()
|
||||
rep, err := p.client.FileGet(c, fid)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusInternalServerError, err)
|
||||
@ -95,10 +95,10 @@ func (p *execProxy) FilePost(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
req := &pb.FileContent{
|
||||
req := pb.FileContent_builder{
|
||||
Name: fh.Filename,
|
||||
Content: b,
|
||||
}
|
||||
}.Build()
|
||||
rep, err := p.client.FileAdd(c, req)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusInternalServerError, err)
|
||||
@ -117,9 +117,9 @@ func (p *execProxy) FileDelete(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
fid := &pb.FileID{
|
||||
fid := pb.FileID_builder{
|
||||
FileID: uri.FileID,
|
||||
}
|
||||
}.Build()
|
||||
rep, err := p.client.FileDelete(c, fid)
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusInternalServerError, err)
|
||||
|
@ -13,6 +13,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
var _ Stream = &grpcWrapper{}
|
||||
@ -45,22 +46,22 @@ func (w *grpcWrapper) Send(req *stream.Request) error {
|
||||
case req.Request != nil:
|
||||
w.sc.Send(convertPBRequest(req.Request))
|
||||
case req.Input != nil:
|
||||
w.sc.Send(&pb.StreamRequest{Request: &pb.StreamRequest_ExecInput{ExecInput: &pb.StreamRequest_Input{
|
||||
w.sc.Send(pb.StreamRequest_builder{ExecInput: pb.StreamRequest_Input_builder{
|
||||
Index: uint32(req.Input.Index),
|
||||
Fd: uint32(req.Input.Fd),
|
||||
Content: req.Input.Content,
|
||||
}}})
|
||||
}.Build()}.Build())
|
||||
case req.Resize != nil:
|
||||
w.sc.Send(&pb.StreamRequest{Request: &pb.StreamRequest_ExecResize{ExecResize: &pb.StreamRequest_Resize{
|
||||
w.sc.Send(pb.StreamRequest_builder{ExecResize: pb.StreamRequest_Resize_builder{
|
||||
Index: uint32(req.Resize.Index),
|
||||
Fd: uint32(req.Resize.Fd),
|
||||
Rows: uint32(req.Resize.Rows),
|
||||
Cols: uint32(req.Resize.Cols),
|
||||
X: uint32(req.Resize.X),
|
||||
Y: uint32(req.Resize.Y),
|
||||
}}})
|
||||
}.Build()}.Build())
|
||||
case req.Cancel != nil:
|
||||
w.sc.Send(&pb.StreamRequest{Request: &pb.StreamRequest_ExecCancel{}})
|
||||
w.sc.Send(pb.StreamRequest_builder{ExecCancel: &emptypb.Empty{}}.Build())
|
||||
default:
|
||||
return errors.New("send: unknown operation")
|
||||
}
|
||||
@ -72,18 +73,18 @@ func (w *grpcWrapper) Recv() (*stream.Response, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
switch i := resp.Response.(type) {
|
||||
case *pb.StreamResponse_ExecOutput:
|
||||
switch resp.WhichResponse() {
|
||||
case pb.StreamResponse_ExecOutput_case:
|
||||
return &stream.Response{Output: &stream.OutputResponse{
|
||||
Index: int(i.ExecOutput.Index),
|
||||
Fd: int(i.ExecOutput.Fd),
|
||||
Content: i.ExecOutput.Content,
|
||||
Index: int(resp.GetExecOutput().GetIndex()),
|
||||
Fd: int(resp.GetExecOutput().GetFd()),
|
||||
Content: resp.GetExecOutput().GetContent(),
|
||||
}}, nil
|
||||
case *pb.StreamResponse_ExecResponse:
|
||||
case pb.StreamResponse_ExecResponse_case:
|
||||
return &stream.Response{Response: &model.Response{
|
||||
RequestID: i.ExecResponse.RequestID,
|
||||
Results: convertPBResult(i.ExecResponse.Results),
|
||||
ErrorMsg: i.ExecResponse.Error,
|
||||
RequestID: resp.GetExecResponse().GetRequestID(),
|
||||
Results: convertPBResult(resp.GetExecResponse().GetResults()),
|
||||
ErrorMsg: resp.GetExecResponse().GetError(),
|
||||
}}, nil
|
||||
}
|
||||
return nil, errors.New("recv: invalid response")
|
||||
@ -93,16 +94,16 @@ func convertPBResult(res []*pb.Response_Result) []model.Result {
|
||||
var ret []model.Result
|
||||
for _, r := range res {
|
||||
ret = append(ret, model.Result{
|
||||
Status: model.Status(r.Status),
|
||||
ExitStatus: int(r.ExitStatus),
|
||||
Error: r.Error,
|
||||
Time: r.Time,
|
||||
RunTime: r.RunTime,
|
||||
Memory: r.Memory,
|
||||
Files: convertFiles(r.Files),
|
||||
Buffs: r.Files,
|
||||
FileIDs: r.FileIDs,
|
||||
FileError: convertPBFileError(r.FileError),
|
||||
Status: model.Status(r.GetStatus()),
|
||||
ExitStatus: int(r.GetExitStatus()),
|
||||
Error: r.GetError(),
|
||||
Time: r.GetTime(),
|
||||
RunTime: r.GetRunTime(),
|
||||
Memory: r.GetMemory(),
|
||||
Files: convertFiles(r.GetFiles()),
|
||||
Buffs: r.GetFiles(),
|
||||
FileIDs: r.GetFileIDs(),
|
||||
FileError: convertPBFileError(r.GetFileError()),
|
||||
})
|
||||
}
|
||||
return ret
|
||||
@ -117,15 +118,13 @@ func convertFiles(buf map[string][]byte) map[string]string {
|
||||
}
|
||||
|
||||
func convertPBRequest(req *model.Request) *pb.StreamRequest {
|
||||
ret := &pb.StreamRequest{
|
||||
Request: &pb.StreamRequest_ExecRequest{
|
||||
ExecRequest: &pb.Request{
|
||||
RequestID: req.RequestID,
|
||||
Cmd: convertPBCmd(req.Cmd),
|
||||
PipeMapping: convertPBPipeMapping(req.PipeMapping),
|
||||
},
|
||||
},
|
||||
}
|
||||
ret := pb.StreamRequest_builder{
|
||||
ExecRequest: pb.Request_builder{
|
||||
RequestID: req.RequestID,
|
||||
Cmd: convertPBCmd(req.Cmd),
|
||||
PipeMapping: convertPBPipeMapping(req.PipeMapping),
|
||||
}.Build(),
|
||||
}.Build()
|
||||
return ret
|
||||
}
|
||||
|
||||
@ -133,9 +132,9 @@ func convertPBFileError(fe []*pb.Response_FileError) []model.FileError {
|
||||
var ret []model.FileError
|
||||
for _, v := range fe {
|
||||
ret = append(ret, model.FileError{
|
||||
Name: v.Name,
|
||||
Type: model.FileErrorType(v.Type),
|
||||
Message: v.Message,
|
||||
Name: v.GetName(),
|
||||
Type: model.FileErrorType(v.GetType()),
|
||||
Message: v.GetMessage(),
|
||||
})
|
||||
}
|
||||
return ret
|
||||
@ -144,7 +143,7 @@ func convertPBFileError(fe []*pb.Response_FileError) []model.FileError {
|
||||
func convertPBCmd(cmd []model.Cmd) []*pb.Request_CmdType {
|
||||
var ret []*pb.Request_CmdType
|
||||
for _, c := range cmd {
|
||||
ret = append(ret, &pb.Request_CmdType{
|
||||
ret = append(ret, pb.Request_CmdType_builder{
|
||||
Args: c.Args,
|
||||
Env: c.Env,
|
||||
Tty: c.TTY,
|
||||
@ -164,7 +163,7 @@ func convertPBCmd(cmd []model.Cmd) []*pb.Request_CmdType {
|
||||
CopyOutMax: c.CopyOutMax,
|
||||
CopyOutDir: c.CopyOutDir,
|
||||
Symlinks: convertSymlink(c.CopyIn),
|
||||
})
|
||||
}.Build())
|
||||
}
|
||||
return ret
|
||||
}
|
||||
@ -188,10 +187,10 @@ func convertPBCopyOut(copyOut []string) []*pb.Request_CmdCopyOutFile {
|
||||
optional = true
|
||||
n = strings.TrimSuffix(n, "?")
|
||||
}
|
||||
rt = append(rt, &pb.Request_CmdCopyOutFile{
|
||||
rt = append(rt, pb.Request_CmdCopyOutFile_builder{
|
||||
Name: n,
|
||||
Optional: optional,
|
||||
})
|
||||
}.Build())
|
||||
}
|
||||
return rt
|
||||
}
|
||||
@ -222,18 +221,18 @@ func convertPBFiles(files []*model.CmdFile) []*pb.Request_File {
|
||||
func convertPBFile(i model.CmdFile) *pb.Request_File {
|
||||
switch {
|
||||
case i.Src != nil:
|
||||
return &pb.Request_File{File: &pb.Request_File_Local{Local: &pb.Request_LocalFile{Src: *i.Src}}}
|
||||
return pb.Request_File_builder{Local: pb.Request_LocalFile_builder{Src: *i.Src}.Build()}.Build()
|
||||
case i.Content != nil:
|
||||
s := strToBytes(*i.Content)
|
||||
return &pb.Request_File{File: &pb.Request_File_Memory{Memory: &pb.Request_MemoryFile{Content: s}}}
|
||||
return pb.Request_File_builder{Memory: pb.Request_MemoryFile_builder{Content: s}.Build()}.Build()
|
||||
case i.FileID != nil:
|
||||
return &pb.Request_File{File: &pb.Request_File_Cached{Cached: &pb.Request_CachedFile{FileID: *i.FileID}}}
|
||||
return pb.Request_File_builder{Cached: pb.Request_CachedFile_builder{FileID: *i.FileID}.Build()}.Build()
|
||||
case i.Name != nil && i.Max != nil:
|
||||
return &pb.Request_File{File: &pb.Request_File_Pipe{Pipe: &pb.Request_PipeCollector{Name: *i.Name, Max: *i.Max, Pipe: i.Pipe}}}
|
||||
return pb.Request_File_builder{Pipe: pb.Request_PipeCollector_builder{Name: *i.Name, Max: *i.Max, Pipe: i.Pipe}.Build()}.Build()
|
||||
case i.StreamIn:
|
||||
return &pb.Request_File{File: &pb.Request_File_StreamIn{}}
|
||||
return pb.Request_File_builder{StreamIn: &emptypb.Empty{}}.Build()
|
||||
case i.StreamOut:
|
||||
return &pb.Request_File{File: &pb.Request_File_StreamOut{}}
|
||||
return pb.Request_File_builder{StreamOut: &emptypb.Empty{}}.Build()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -241,19 +240,19 @@ func convertPBFile(i model.CmdFile) *pb.Request_File {
|
||||
func convertPBPipeMapping(pm []model.PipeMap) []*pb.Request_PipeMap {
|
||||
var ret []*pb.Request_PipeMap
|
||||
for _, p := range pm {
|
||||
ret = append(ret, &pb.Request_PipeMap{
|
||||
ret = append(ret, pb.Request_PipeMap_builder{
|
||||
In: convertPBPipeIndex(p.In),
|
||||
Out: convertPBPipeIndex(p.Out),
|
||||
Name: p.Name,
|
||||
Proxy: p.Proxy,
|
||||
Max: uint64(p.Max),
|
||||
})
|
||||
}.Build())
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func convertPBPipeIndex(pi model.PipeIndex) *pb.Request_PipeMap_PipeIndex {
|
||||
return &pb.Request_PipeMap_PipeIndex{Index: int32(pi.Index), Fd: int32(pi.Fd)}
|
||||
return pb.Request_PipeMap_PipeIndex_builder{Index: int32(pi.Index), Fd: int32(pi.Fd)}.Build()
|
||||
}
|
||||
|
||||
type tokenAuth struct {
|
||||
|
@ -63,9 +63,9 @@ func (e *execServer) Exec(ctx context.Context, req *pb.Request) (*pb.Response, e
|
||||
}
|
||||
|
||||
func (e *execServer) FileList(c context.Context, n *emptypb.Empty) (*pb.FileListType, error) {
|
||||
return &pb.FileListType{
|
||||
return pb.FileListType_builder{
|
||||
FileIDs: e.fs.List(),
|
||||
}, nil
|
||||
}.Build(), nil
|
||||
}
|
||||
|
||||
func (e *execServer) FileGet(c context.Context, f *pb.FileID) (*pb.FileContent, error) {
|
||||
@ -83,10 +83,10 @@ func (e *execServer) FileGet(c context.Context, f *pb.FileID) (*pb.FileContent,
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
return &pb.FileContent{
|
||||
return pb.FileContent_builder{
|
||||
Name: name,
|
||||
Content: content,
|
||||
}, nil
|
||||
}.Build(), nil
|
||||
}
|
||||
|
||||
func (e *execServer) FileAdd(c context.Context, fc *pb.FileContent) (*pb.FileID, error) {
|
||||
@ -103,9 +103,9 @@ func (e *execServer) FileAdd(c context.Context, fc *pb.FileContent) (*pb.FileID,
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
return &pb.FileID{
|
||||
return pb.FileID_builder{
|
||||
FileID: fid,
|
||||
}, nil
|
||||
}.Build(), nil
|
||||
}
|
||||
|
||||
func (e *execServer) FileDelete(c context.Context, f *pb.FileID) (*emptypb.Empty, error) {
|
||||
@ -117,23 +117,23 @@ func (e *execServer) FileDelete(c context.Context, f *pb.FileID) (*emptypb.Empty
|
||||
}
|
||||
|
||||
func convertPBResponse(r model.Response) (*pb.Response, error) {
|
||||
res := &pb.Response{
|
||||
res := pb.Response_builder{
|
||||
RequestID: r.RequestID,
|
||||
Results: make([]*pb.Response_Result, 0, len(r.Results)),
|
||||
Error: r.ErrorMsg,
|
||||
}
|
||||
}.Build()
|
||||
for _, c := range r.Results {
|
||||
rt, err := convertPBResult(c)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
res.Results = append(res.Results, rt)
|
||||
res.SetResults(append(res.GetResults(), rt))
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func convertPBResult(r model.Result) (*pb.Response_Result, error) {
|
||||
return &pb.Response_Result{
|
||||
return pb.Response_Result_builder{
|
||||
Status: pb.Response_Result_StatusType(r.Status),
|
||||
ExitStatus: int32(r.ExitStatus),
|
||||
Error: r.Error,
|
||||
@ -144,35 +144,35 @@ func convertPBResult(r model.Result) (*pb.Response_Result, error) {
|
||||
Files: r.Buffs,
|
||||
FileIDs: r.FileIDs,
|
||||
FileError: convertPBFileError(r.FileError),
|
||||
}, nil
|
||||
}.Build(), 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{
|
||||
rt = append(rt, pb.Response_FileError_builder{
|
||||
Name: e.Name,
|
||||
Type: pb.Response_FileError_ErrorType(e.Type),
|
||||
Message: e.Message,
|
||||
})
|
||||
}.Build())
|
||||
}
|
||||
return rt
|
||||
}
|
||||
|
||||
func convertPBRequest(r *pb.Request, srcPrefix []string) (req *worker.Request, err error) {
|
||||
req = &worker.Request{
|
||||
RequestID: r.RequestID,
|
||||
Cmd: make([]worker.Cmd, 0, len(r.Cmd)),
|
||||
PipeMapping: make([]worker.PipeMap, 0, len(r.PipeMapping)),
|
||||
RequestID: r.GetRequestID(),
|
||||
Cmd: make([]worker.Cmd, 0, len(r.GetCmd())),
|
||||
PipeMapping: make([]worker.PipeMap, 0, len(r.GetPipeMapping())),
|
||||
}
|
||||
for _, c := range r.Cmd {
|
||||
for _, c := range r.GetCmd() {
|
||||
cm, err := convertPBCmd(c, srcPrefix)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Cmd = append(req.Cmd, cm)
|
||||
}
|
||||
for _, p := range r.PipeMapping {
|
||||
for _, p := range r.GetPipeMapping() {
|
||||
pm := convertPBPipeMap(p)
|
||||
req.PipeMapping = append(req.PipeMapping, pm)
|
||||
}
|
||||
@ -185,7 +185,7 @@ func convertPBPipeMap(p *pb.Request_PipeMap) worker.PipeMap {
|
||||
Out: convertPBPipeIndex(p.GetOut()),
|
||||
Proxy: p.GetProxy(),
|
||||
Name: p.GetName(),
|
||||
Limit: worker.Size(p.Max),
|
||||
Limit: worker.Size(p.GetMax()),
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,26 +234,26 @@ func convertPBCmd(c *pb.Request_CmdType, srcPrefix []string) (cm worker.Cmd, err
|
||||
}
|
||||
|
||||
func convertPBFile(c *pb.Request_File, srcPrefix []string) (worker.CmdFile, error) {
|
||||
switch c := c.File.(type) {
|
||||
case nil:
|
||||
switch c.WhichFile() {
|
||||
case 0:
|
||||
return nil, nil
|
||||
case *pb.Request_File_Local:
|
||||
case pb.Request_File_Local_case:
|
||||
if len(srcPrefix) > 0 {
|
||||
ok, err := model.CheckPathPrefixes(c.Local.GetSrc(), srcPrefix)
|
||||
ok, err := model.CheckPathPrefixes(c.GetLocal().GetSrc(), srcPrefix)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("check path prefixes: %w", err)
|
||||
}
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("file outside of prefix: %q, %q", c.Local.GetSrc(), srcPrefix)
|
||||
return nil, fmt.Errorf("file outside of prefix: %q, %q", c.GetLocal().GetSrc(), srcPrefix)
|
||||
}
|
||||
}
|
||||
return &worker.LocalFile{Src: c.Local.GetSrc()}, nil
|
||||
case *pb.Request_File_Memory:
|
||||
return &worker.MemoryFile{Content: c.Memory.GetContent()}, nil
|
||||
case *pb.Request_File_Cached:
|
||||
return &worker.CachedFile{FileID: c.Cached.GetFileID()}, nil
|
||||
case *pb.Request_File_Pipe:
|
||||
return &worker.Collector{Name: c.Pipe.GetName(), Max: envexec.Size(c.Pipe.GetMax()), Pipe: c.Pipe.GetPipe()}, nil
|
||||
return &worker.LocalFile{Src: c.GetLocal().GetSrc()}, nil
|
||||
case pb.Request_File_Memory_case:
|
||||
return &worker.MemoryFile{Content: c.GetMemory().GetContent()}, nil
|
||||
case pb.Request_File_Cached_case:
|
||||
return &worker.CachedFile{FileID: c.GetCached().GetFileID()}, nil
|
||||
case pb.Request_File_Pipe_case:
|
||||
return &worker.Collector{Name: c.GetPipe().GetName(), Max: envexec.Size(c.GetPipe().GetMax()), Pipe: c.GetPipe().GetPipe()}, nil
|
||||
}
|
||||
return nil, fmt.Errorf("request file type not supported: %T", c)
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"github.com/criyle/go-judge/pb"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
var _ stream.Stream = &streamWrapper{}
|
||||
@ -24,13 +25,13 @@ func (sw *streamWrapper) Send(r stream.Response) error {
|
||||
if err != nil {
|
||||
return status.Errorf(codes.Aborted, "response: %v", err)
|
||||
}
|
||||
res.Response = &pb.StreamResponse_ExecResponse{ExecResponse: resp}
|
||||
res.SetExecResponse(proto.ValueOrDefault(resp))
|
||||
case r.Output != nil:
|
||||
res.Response = &pb.StreamResponse_ExecOutput{ExecOutput: &pb.StreamResponse_Output{
|
||||
res.SetExecOutput(pb.StreamResponse_Output_builder{
|
||||
Index: uint32(r.Output.Index),
|
||||
Fd: uint32(r.Output.Fd),
|
||||
Content: r.Output.Content,
|
||||
}}
|
||||
}.Build())
|
||||
}
|
||||
return sw.es.Send(res)
|
||||
}
|
||||
@ -40,25 +41,25 @@ func (sw *streamWrapper) Recv() (*stream.Request, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
switch i := req.Request.(type) {
|
||||
case *pb.StreamRequest_ExecRequest:
|
||||
return &stream.Request{Request: convertPBStreamRequest(i.ExecRequest)}, nil
|
||||
case *pb.StreamRequest_ExecInput:
|
||||
switch req.WhichRequest() {
|
||||
case pb.StreamRequest_ExecRequest_case:
|
||||
return &stream.Request{Request: convertPBStreamRequest(req.GetExecRequest())}, nil
|
||||
case pb.StreamRequest_ExecInput_case:
|
||||
return &stream.Request{Input: &stream.InputRequest{
|
||||
Index: int(i.ExecInput.Index),
|
||||
Fd: int(i.ExecInput.Fd),
|
||||
Content: i.ExecInput.Content,
|
||||
Index: int(req.GetExecInput().GetIndex()),
|
||||
Fd: int(req.GetExecInput().GetFd()),
|
||||
Content: req.GetExecInput().GetContent(),
|
||||
}}, nil
|
||||
case *pb.StreamRequest_ExecResize:
|
||||
case pb.StreamRequest_ExecResize_case:
|
||||
return &stream.Request{Resize: &stream.ResizeRequest{
|
||||
Index: int(i.ExecResize.Index),
|
||||
Fd: int(i.ExecResize.Fd),
|
||||
Rows: int(i.ExecResize.Rows),
|
||||
Cols: int(i.ExecResize.Cols),
|
||||
X: int(i.ExecResize.X),
|
||||
Y: int(i.ExecResize.Y),
|
||||
Index: int(req.GetExecResize().GetIndex()),
|
||||
Fd: int(req.GetExecResize().GetFd()),
|
||||
Rows: int(req.GetExecResize().GetRows()),
|
||||
Cols: int(req.GetExecResize().GetCols()),
|
||||
X: int(req.GetExecResize().GetX()),
|
||||
Y: int(req.GetExecResize().GetY()),
|
||||
}}, nil
|
||||
case *pb.StreamRequest_ExecCancel:
|
||||
case pb.StreamRequest_ExecCancel_case:
|
||||
return &stream.Request{Cancel: &struct{}{}}, nil
|
||||
}
|
||||
return nil, errors.ErrUnsupported
|
||||
@ -66,44 +67,44 @@ func (sw *streamWrapper) Recv() (*stream.Request, error) {
|
||||
|
||||
func convertPBStreamRequest(req *pb.Request) *model.Request {
|
||||
ret := &model.Request{
|
||||
RequestID: req.RequestID,
|
||||
RequestID: req.GetRequestID(),
|
||||
}
|
||||
for _, cmd := range req.Cmd {
|
||||
for _, cmd := range req.GetCmd() {
|
||||
ret.Cmd = append(ret.Cmd, model.Cmd{
|
||||
Args: cmd.Args,
|
||||
Env: cmd.Env,
|
||||
TTY: cmd.Tty,
|
||||
Files: convertPBStreamFiles(cmd.Files),
|
||||
CPULimit: cmd.CpuTimeLimit,
|
||||
ClockLimit: cmd.ClockTimeLimit,
|
||||
MemoryLimit: cmd.MemoryLimit,
|
||||
StackLimit: cmd.StackLimit,
|
||||
ProcLimit: cmd.ProcLimit,
|
||||
CPURateLimit: cmd.CpuRateLimit,
|
||||
CPUSetLimit: cmd.CpuSetLimit,
|
||||
DataSegmentLimit: cmd.DataSegmentLimit,
|
||||
AddressSpaceLimit: cmd.AddressSpaceLimit,
|
||||
Args: cmd.GetArgs(),
|
||||
Env: cmd.GetEnv(),
|
||||
TTY: cmd.GetTty(),
|
||||
Files: convertPBStreamFiles(cmd.GetFiles()),
|
||||
CPULimit: cmd.GetCpuTimeLimit(),
|
||||
ClockLimit: cmd.GetClockTimeLimit(),
|
||||
MemoryLimit: cmd.GetMemoryLimit(),
|
||||
StackLimit: cmd.GetStackLimit(),
|
||||
ProcLimit: cmd.GetProcLimit(),
|
||||
CPURateLimit: cmd.GetCpuRateLimit(),
|
||||
CPUSetLimit: cmd.GetCpuSetLimit(),
|
||||
DataSegmentLimit: cmd.GetDataSegmentLimit(),
|
||||
AddressSpaceLimit: cmd.GetAddressSpaceLimit(),
|
||||
CopyIn: convertPBStreamCopyIn(cmd),
|
||||
CopyOut: convertStreamCopyOut(cmd.CopyOut),
|
||||
CopyOutCached: convertStreamCopyOut(cmd.CopyOutCached),
|
||||
CopyOutMax: cmd.CopyOutMax,
|
||||
CopyOutDir: cmd.CopyOutDir,
|
||||
CopyOut: convertStreamCopyOut(cmd.GetCopyOut()),
|
||||
CopyOutCached: convertStreamCopyOut(cmd.GetCopyOutCached()),
|
||||
CopyOutMax: cmd.GetCopyOutMax(),
|
||||
CopyOutDir: cmd.GetCopyOutDir(),
|
||||
})
|
||||
}
|
||||
for _, p := range req.PipeMapping {
|
||||
for _, p := range req.GetPipeMapping() {
|
||||
ret.PipeMapping = append(ret.PipeMapping, model.PipeMap{
|
||||
In: convertPBStreamPipeIndex(p.In),
|
||||
Out: convertPBStreamPipeIndex(p.Out),
|
||||
Max: int64(p.Max),
|
||||
Name: p.Name,
|
||||
Proxy: p.Proxy,
|
||||
In: convertPBStreamPipeIndex(p.GetIn()),
|
||||
Out: convertPBStreamPipeIndex(p.GetOut()),
|
||||
Max: int64(p.GetMax()),
|
||||
Name: p.GetName(),
|
||||
Proxy: p.GetProxy(),
|
||||
})
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func convertPBStreamPipeIndex(pi *pb.Request_PipeMap_PipeIndex) model.PipeIndex {
|
||||
return model.PipeIndex{Index: int(pi.Index), Fd: int(pi.Fd)}
|
||||
return model.PipeIndex{Index: int(pi.GetIndex()), Fd: int(pi.GetFd())}
|
||||
}
|
||||
|
||||
func convertPBStreamFiles(files []*pb.Request_File) []*model.CmdFile {
|
||||
@ -120,33 +121,33 @@ func convertPBStreamFiles(files []*pb.Request_File) []*model.CmdFile {
|
||||
}
|
||||
|
||||
func convertPBStreamCopyIn(cmd *pb.Request_CmdType) map[string]model.CmdFile {
|
||||
rt := make(map[string]model.CmdFile, len(cmd.CopyIn)+len(cmd.Symlinks))
|
||||
for k, i := range cmd.CopyIn {
|
||||
if i.File == nil {
|
||||
rt := make(map[string]model.CmdFile, len(cmd.GetCopyIn())+len(cmd.GetSymlinks()))
|
||||
for k, i := range cmd.GetCopyIn() {
|
||||
if !i.HasFile() {
|
||||
continue
|
||||
}
|
||||
rt[k] = convertPBStreamFile(i)
|
||||
}
|
||||
for k, v := range cmd.Symlinks {
|
||||
for k, v := range cmd.GetSymlinks() {
|
||||
rt[k] = model.CmdFile{Symlink: &v}
|
||||
}
|
||||
return rt
|
||||
}
|
||||
|
||||
func convertPBStreamFile(i *pb.Request_File) model.CmdFile {
|
||||
switch c := i.File.(type) {
|
||||
case *pb.Request_File_Local:
|
||||
return model.CmdFile{Src: &c.Local.Src}
|
||||
case *pb.Request_File_Memory:
|
||||
s := byteArrayToString(c.Memory.Content)
|
||||
switch i.WhichFile() {
|
||||
case pb.Request_File_Local_case:
|
||||
return model.CmdFile{Src: proto.String(i.GetLocal().GetSrc())}
|
||||
case pb.Request_File_Memory_case:
|
||||
s := byteArrayToString(i.GetMemory().GetContent())
|
||||
return model.CmdFile{Content: &s}
|
||||
case *pb.Request_File_Cached:
|
||||
return model.CmdFile{FileID: &c.Cached.FileID}
|
||||
case *pb.Request_File_Pipe:
|
||||
return model.CmdFile{Name: &c.Pipe.Name, Max: &c.Pipe.Max, Pipe: c.Pipe.Pipe}
|
||||
case *pb.Request_File_StreamIn:
|
||||
case pb.Request_File_Cached_case:
|
||||
return model.CmdFile{FileID: proto.String(i.GetCached().GetFileID())}
|
||||
case pb.Request_File_Pipe_case:
|
||||
return model.CmdFile{Name: proto.String(i.GetPipe().GetName()), Max: proto.Int64(i.GetPipe().GetMax()), Pipe: i.GetPipe().GetPipe()}
|
||||
case pb.Request_File_StreamIn_case:
|
||||
return model.CmdFile{StreamIn: true}
|
||||
case *pb.Request_File_StreamOut:
|
||||
case pb.Request_File_StreamOut_case:
|
||||
return model.CmdFile{StreamOut: true}
|
||||
}
|
||||
return model.CmdFile{}
|
||||
@ -155,8 +156,8 @@ func convertPBStreamFile(i *pb.Request_File) model.CmdFile {
|
||||
func convertStreamCopyOut(copyOut []*pb.Request_CmdCopyOutFile) []string {
|
||||
rt := make([]string, 0, len(copyOut))
|
||||
for _, n := range copyOut {
|
||||
name := n.Name
|
||||
if n.Optional {
|
||||
name := n.GetName()
|
||||
if n.GetOptional() {
|
||||
name += "?"
|
||||
}
|
||||
rt = append(rt, name)
|
||||
|
42
go.mod
42
go.mod
@ -5,8 +5,8 @@ go 1.24
|
||||
require (
|
||||
github.com/coreos/go-systemd/v22 v22.5.0
|
||||
github.com/creack/pty v1.1.24
|
||||
github.com/criyle/go-judge/pb v1.0.0
|
||||
github.com/criyle/go-sandbox v0.11.6
|
||||
github.com/criyle/go-judge/pb v1.1.0
|
||||
github.com/criyle/go-sandbox v0.11.7
|
||||
github.com/elastic/go-seccomp-bpf v1.6.0
|
||||
github.com/elastic/go-ucfg v0.8.8
|
||||
github.com/gin-contrib/zap v1.1.5
|
||||
@ -18,34 +18,34 @@ require (
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2
|
||||
github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7
|
||||
github.com/prometheus/client_golang v1.22.0
|
||||
github.com/zsais/go-gin-prometheus v0.1.0
|
||||
github.com/prometheus/client_golang v1.23.0
|
||||
github.com/zsais/go-gin-prometheus v1.0.1
|
||||
go.uber.org/zap v1.27.0
|
||||
golang.org/x/net v0.41.0
|
||||
golang.org/x/sync v0.15.0
|
||||
golang.org/x/sys v0.33.0
|
||||
golang.org/x/term v0.32.0
|
||||
google.golang.org/grpc v1.73.0
|
||||
google.golang.org/protobuf v1.36.6
|
||||
golang.org/x/net v0.43.0
|
||||
golang.org/x/sync v0.16.0
|
||||
golang.org/x/sys v0.35.0
|
||||
golang.org/x/term v0.34.0
|
||||
google.golang.org/grpc v1.74.2
|
||||
google.golang.org/protobuf v1.36.7
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.5.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bytedance/sonic v1.13.3 // indirect
|
||||
github.com/bytedance/sonic/loader v0.2.4 // indirect
|
||||
github.com/bytedance/sonic v1.14.0 // indirect
|
||||
github.com/bytedance/sonic/loader v0.3.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cloudwego/base64x v0.1.5 // indirect
|
||||
github.com/cloudwego/base64x v0.1.6 // indirect
|
||||
github.com/fatih/camelcase v1.0.0 // indirect
|
||||
github.com/fatih/structs v1.1.0 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.9 // indirect
|
||||
github.com/gin-contrib/sse v1.1.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.26.0 // indirect
|
||||
github.com/go-playground/validator/v10 v10.27.0 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
@ -53,16 +53,16 @@ require (
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.64.0 // indirect
|
||||
github.com/prometheus/procfs v0.16.1 // indirect
|
||||
github.com/prometheus/common v0.65.0 // indirect
|
||||
github.com/prometheus/procfs v0.17.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/ugorji/go/codec v1.3.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/arch v0.18.0 // indirect
|
||||
golang.org/x/crypto v0.39.0 // indirect
|
||||
golang.org/x/text v0.26.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
|
||||
golang.org/x/arch v0.20.0 // indirect
|
||||
golang.org/x/crypto v0.41.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
117
go.sum
117
go.sum
@ -1,27 +1,25 @@
|
||||
cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I=
|
||||
cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg=
|
||||
cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU=
|
||||
cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo=
|
||||
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
|
||||
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bytedance/sonic v1.13.3 h1:MS8gmaH16Gtirygw7jV91pDCN33NyMrPbN7qiYhEsF0=
|
||||
github.com/bytedance/sonic v1.13.3/go.mod h1:o68xyaF9u2gvVBuGHPlUVCy+ZfmNNO5ETf1+KgkJhz4=
|
||||
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
|
||||
github.com/bytedance/sonic/loader v0.2.4 h1:ZWCw4stuXUsn1/+zQDqeE7JKP+QO47tz7QCNan80NzY=
|
||||
github.com/bytedance/sonic/loader v0.2.4/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
|
||||
github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ=
|
||||
github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA=
|
||||
github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA=
|
||||
github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCyP4=
|
||||
github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||
github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
|
||||
github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
|
||||
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
|
||||
github.com/criyle/go-judge/pb v1.0.0 h1:8A4zHPPCGCDTuFY1GW5Hqpg+8ETIwzgXxiRpYKKb2zA=
|
||||
github.com/criyle/go-judge/pb v1.0.0/go.mod h1:hjgixgK9NH9ktwc29xbXVdZDOlKfEkRkEbZ4W5bOMmw=
|
||||
github.com/criyle/go-sandbox v0.11.6 h1:QfiSklKzQp5B2JT0EfcwFSwgmsV97gRuxlv+hq9Fy9c=
|
||||
github.com/criyle/go-sandbox v0.11.6/go.mod h1:rMKwRCPK2jhaTHw/X3Y8IdsMLQ0kW6dLCRwIGBFFwCg=
|
||||
github.com/criyle/go-judge/pb v1.1.0 h1:3kxlTh8NDE7ZKb3Ki6fQJS8HyXvwxYzncy61xs4a8Hc=
|
||||
github.com/criyle/go-judge/pb v1.1.0/go.mod h1:oANRvhBOHpu4WZhbWnm5IeTaLmTbGdZNUNwcnmQe6jI=
|
||||
github.com/criyle/go-sandbox v0.11.7 h1:5p8qGMlawktCGNiDiBhq/AfLnZGIith6/oZOIoyi938=
|
||||
github.com/criyle/go-sandbox v0.11.7/go.mod h1:XBP0h9fE3hexobrclZ3UtTmrETfsqUI1SR67qlUWBrk=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -41,8 +39,8 @@ github.com/gin-contrib/zap v1.1.5 h1:qKwhWb4DQgPriCl1AHLLob6hav/KUIctKXIjTmWIN3I
|
||||
github.com/gin-contrib/zap v1.1.5/go.mod h1:lAchUtGz9M2K6xDr1rwtczyDrThmSx6c9F384T45iOE=
|
||||
github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ=
|
||||
github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
@ -51,8 +49,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
|
||||
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||
github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k=
|
||||
github.com/go-playground/validator/v10 v10.26.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=
|
||||
github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4=
|
||||
github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
|
||||
@ -79,10 +77,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
||||
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7 h1:SWlt7BoQNASbhTUD0Oy5yysI2seJ7vWuGUp///OM4TM=
|
||||
github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7/go.mod h1:Y2SaZf2Rzd0pXkLVhLlCiAXFCLSXAIbTKDivVgff/AM=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
@ -109,14 +105,14 @@ github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0
|
||||
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
|
||||
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
|
||||
github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc=
|
||||
github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE=
|
||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||
github.com/prometheus/common v0.64.0 h1:pdZeA+g617P7oGv1CzdTzyeShxAGrTBsolKNOLQPGO4=
|
||||
github.com/prometheus/common v0.64.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
||||
github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg=
|
||||
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
|
||||
github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE=
|
||||
github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
|
||||
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
|
||||
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
|
||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
@ -136,50 +132,50 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA=
|
||||
github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
|
||||
github.com/zsais/go-gin-prometheus v0.1.0 h1:bkLv1XCdzqVgQ36ScgRi09MA2UC1t3tAB6nsfErsGO4=
|
||||
github.com/zsais/go-gin-prometheus v0.1.0/go.mod h1:Slirjzuz8uM8Cw0jmPNqbneoqcUtY2GGjn2bEd4NRLY=
|
||||
github.com/zsais/go-gin-prometheus v1.0.1 h1:PtTa1rQhbXEAx0gNQkXr4+SGcElSF1YR/NmO3f5s3o4=
|
||||
github.com/zsais/go-gin-prometheus v1.0.1/go.mod h1:iKBYSOHzvGfe2FyGSOC8JSwUA0MITdnYzI6v+aAbw1Q=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
|
||||
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
|
||||
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
|
||||
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
|
||||
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
|
||||
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
|
||||
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
|
||||
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
|
||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
golang.org/x/arch v0.18.0 h1:WN9poc33zL4AzGxqf8VtpKUnGvMi8O9lhNyBMF/85qc=
|
||||
golang.org/x/arch v0.18.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
|
||||
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
|
||||
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
|
||||
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||
golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c=
|
||||
golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
|
||||
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
|
||||
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
|
||||
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||
golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8=
|
||||
golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
|
||||
golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
|
||||
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
|
||||
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 h1:fc6jSaCT0vBduLYZHYrBBNY4dsWuvgyff9noRNDdBeE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
|
||||
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
|
||||
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
|
||||
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a h1:tPE/Kp+x9dMSwUm/uM0JKK0IfdiJkwAbSMSeZBXXJXc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo=
|
||||
google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
|
||||
google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
|
||||
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
|
||||
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
@ -192,4 +188,3 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||
|
18
pb/README.md
Normal file
18
pb/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# go-judge protobuf package
|
||||
|
||||
## Migration
|
||||
|
||||
Following the [Blog](https://go.dev/blog/protobuf-opaque) opaque API migration the pb package will be adapted to newer API for the future.
|
||||
|
||||
Although The client integration should stays the same giving the backwards compatibility promised by the protobuf team, it is still recommended to migrate to newer version.
|
||||
|
||||
[FAQ](https://protobuf.dev/reference/go/opaque-faq/)
|
||||
|
||||
For clients with older API, it is recommended to stick with `v1.0.1` for now.
|
||||
|
||||
To migration to newer version:
|
||||
|
||||
- Upgrade to `v1.1.0`
|
||||
- Following the [migration guide](https://protobuf.dev/reference/go/opaque-migration/) to install the `open2opaque` tool
|
||||
- Use the tool to migrate existing code to use newer version
|
||||
- Upgrade to `v1.2.0` to finish the migration
|
139
pb/file.pb.go
139
pb/file.pb.go
@ -1,16 +1,18 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.4
|
||||
// protoc v5.29.3
|
||||
// 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"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
@ -22,7 +24,7 @@ const (
|
||||
)
|
||||
|
||||
type FileID struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
FileID string `protobuf:"bytes,1,opt,name=fileID" json:"fileID,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -53,11 +55,6 @@ func (x *FileID) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileID.ProtoReflect.Descriptor instead.
|
||||
func (*FileID) Descriptor() ([]byte, []int) {
|
||||
return file_file_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FileID) GetFileID() string {
|
||||
if x != nil {
|
||||
return x.FileID
|
||||
@ -65,8 +62,26 @@ func (x *FileID) GetFileID() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *FileID) SetFileID(v string) {
|
||||
x.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.FileID = b.FileID
|
||||
return m0
|
||||
}
|
||||
|
||||
type FileContent struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||||
Content []byte `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -98,11 +113,6 @@ func (x *FileContent) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileContent.ProtoReflect.Descriptor instead.
|
||||
func (*FileContent) Descriptor() ([]byte, []int) {
|
||||
return file_file_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *FileContent) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
@ -117,8 +127,35 @@ func (x *FileContent) GetContent() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *FileContent) SetName(v string) {
|
||||
x.Name = v
|
||||
}
|
||||
|
||||
func (x *FileContent) SetContent(v []byte) {
|
||||
if v == nil {
|
||||
v = []byte{}
|
||||
}
|
||||
x.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.Name = b.Name
|
||||
x.Content = b.Content
|
||||
return m0
|
||||
}
|
||||
|
||||
type FileListType struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
FileIDs map[string]string `protobuf:"bytes,1,rep,name=fileIDs" json:"fileIDs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -149,11 +186,6 @@ func (x *FileListType) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileListType.ProtoReflect.Descriptor instead.
|
||||
func (*FileListType) Descriptor() ([]byte, []int) {
|
||||
return file_file_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FileListType) GetFileIDs() map[string]string {
|
||||
if x != nil {
|
||||
return x.FileIDs
|
||||
@ -161,41 +193,40 @@ func (x *FileListType) GetFileIDs() map[string]string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *FileListType) SetFileIDs(v map[string]string) {
|
||||
x.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.FileIDs = b.FileIDs
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_file_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_file_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62,
|
||||
0x22, 0x20, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x49, 0x44, 0x22, 0x3b, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
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, 0x22,
|
||||
0x83, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x37, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x54,
|
||||
0x79, 0x70, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x44, 0x73, 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, 0x42, 0x24, 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, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
|
||||
})
|
||||
|
||||
var (
|
||||
file_file_proto_rawDescOnce sync.Once
|
||||
file_file_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_file_proto_rawDescGZIP() []byte {
|
||||
file_file_proto_rawDescOnce.Do(func() {
|
||||
file_file_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_file_proto_rawDesc), len(file_file_proto_rawDesc)))
|
||||
})
|
||||
return file_file_proto_rawDescData
|
||||
}
|
||||
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{
|
||||
|
@ -1,9 +1,11 @@
|
||||
edition = "2023";
|
||||
|
||||
package pb;
|
||||
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;
|
||||
|
||||
message FileID { string fileID = 1; }
|
||||
|
||||
|
269
pb/file_protoopaque.pb.go
Normal file
269
pb/file_protoopaque.pb.go
Normal file
@ -0,0 +1,269 @@
|
||||
// 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
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
// Package pb stores the protobuf implementation for the go-judge gRPC interface
|
||||
package pb
|
||||
|
||||
//go:generate protoc --proto_path=./ --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative judge.proto request.proto response.proto stream_request.proto stream_response.proto file.proto
|
||||
|
12
pb/go.mod
12
pb/go.mod
@ -3,13 +3,13 @@ module github.com/criyle/go-judge/pb
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
google.golang.org/grpc v1.70.0
|
||||
google.golang.org/protobuf v1.36.5
|
||||
google.golang.org/grpc v1.74.2
|
||||
google.golang.org/protobuf v1.36.7
|
||||
)
|
||||
|
||||
require (
|
||||
golang.org/x/net v0.38.0 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
golang.org/x/text v0.23.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250227231956-55c901821b1e // indirect
|
||||
golang.org/x/net v0.43.0 // indirect
|
||||
golang.org/x/sys v0.35.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect
|
||||
)
|
||||
|
54
pb/go.sum
54
pb/go.sum
@ -1,32 +1,34 @@
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
|
||||
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
|
||||
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
|
||||
go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
|
||||
go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4=
|
||||
go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ=
|
||||
go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM=
|
||||
go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8=
|
||||
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
|
||||
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
||||
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
|
||||
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250227231956-55c901821b1e h1:YA5lmSs3zc/5w+xsRcHqpETkaYyK63ivEPzNTcUUlSA=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250227231956-55c901821b1e/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
|
||||
google.golang.org/grpc v1.70.0 h1:pWFv03aZoHzlRKHWicjsZytKAiYCtNS0dHbXnIdq7jQ=
|
||||
google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw=
|
||||
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
|
||||
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
|
||||
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
|
||||
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
|
||||
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
|
||||
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
|
||||
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
|
||||
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
|
||||
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
|
||||
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
|
||||
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
|
||||
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
|
||||
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a h1:tPE/Kp+x9dMSwUm/uM0JKK0IfdiJkwAbSMSeZBXXJXc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo=
|
||||
google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4=
|
||||
google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM=
|
||||
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
|
||||
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
|
@ -1,14 +1,17 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.4
|
||||
// protoc v5.29.3
|
||||
// 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"
|
||||
@ -23,38 +26,22 @@ const (
|
||||
|
||||
var File_judge_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_judge_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x0b, 0x6a, 0x75, 0x64, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70,
|
||||
0x62, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d,
|
||||
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x72,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x73,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x24, 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, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65,
|
||||
0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
|
||||
})
|
||||
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
|
||||
|
@ -4,6 +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;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "request.proto";
|
||||
@ -11,6 +12,7 @@ import "response.proto";
|
||||
import "stream_request.proto";
|
||||
import "stream_response.proto";
|
||||
import "file.proto";
|
||||
import "google/protobuf/go_features.proto";
|
||||
|
||||
service Executor {
|
||||
// Exec defines unary RPC to run a program with resource limitations
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.29.3
|
||||
// - protoc v6.31.1
|
||||
// source: judge.proto
|
||||
|
||||
package pb
|
||||
|
102
pb/judge_protoopaque.pb.go
Normal file
102
pb/judge_protoopaque.pb.go
Normal file
@ -0,0 +1,102 @@
|
||||
// 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
|
||||
}
|
862
pb/request.pb.go
862
pb/request.pb.go
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,10 @@ package pb;
|
||||
|
||||
option features.field_presence = IMPLICIT;
|
||||
option go_package = "github.com/criyle/go-judge/pb";
|
||||
option features.(pb.go).api_level = API_HYBRID;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/go_features.proto";
|
||||
|
||||
message Request {
|
||||
message LocalFile { string src = 1; }
|
||||
|
1463
pb/request_protoopaque.pb.go
Normal file
1463
pb/request_protoopaque.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,18 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.4
|
||||
// protoc v5.29.3
|
||||
// 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"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
@ -86,11 +88,6 @@ 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_response_proto_rawDescGZIP(), []int{0, 0, 0}
|
||||
}
|
||||
|
||||
type Response_Result_StatusType int32
|
||||
|
||||
const (
|
||||
@ -168,13 +165,8 @@ func (x Response_Result_StatusType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Response_Result_StatusType.Descriptor instead.
|
||||
func (Response_Result_StatusType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_response_proto_rawDescGZIP(), []int{0, 1, 0}
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
@ -207,11 +199,6 @@ func (x *Response) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
|
||||
func (*Response) Descriptor() ([]byte, []int) {
|
||||
return file_response_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Response) GetRequestID() string {
|
||||
if x != nil {
|
||||
return x.RequestID
|
||||
@ -233,8 +220,38 @@ func (x *Response) GetError() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Response) SetRequestID(v string) {
|
||||
x.RequestID = v
|
||||
}
|
||||
|
||||
func (x *Response) SetResults(v []*Response_Result) {
|
||||
x.Results = v
|
||||
}
|
||||
|
||||
func (x *Response) SetError(v string) {
|
||||
x.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.RequestID = b.RequestID
|
||||
x.Results = b.Results
|
||||
x.Error = b.Error
|
||||
return m0
|
||||
}
|
||||
|
||||
type Response_FileError struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
@ -267,11 +284,6 @@ func (x *Response_FileError) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Response_FileError.ProtoReflect.Descriptor instead.
|
||||
func (*Response_FileError) Descriptor() ([]byte, []int) {
|
||||
return file_response_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
func (x *Response_FileError) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
@ -293,8 +305,38 @@ func (x *Response_FileError) GetMessage() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Response_FileError) SetName(v string) {
|
||||
x.Name = v
|
||||
}
|
||||
|
||||
func (x *Response_FileError) SetType(v Response_FileError_ErrorType) {
|
||||
x.Type = v
|
||||
}
|
||||
|
||||
func (x *Response_FileError) SetMessage(v string) {
|
||||
x.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.Name = b.Name
|
||||
x.Type = b.Type
|
||||
x.Message = b.Message
|
||||
return m0
|
||||
}
|
||||
|
||||
type Response_Result struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
@ -334,11 +376,6 @@ func (x *Response_Result) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Response_Result.ProtoReflect.Descriptor instead.
|
||||
func (*Response_Result) Descriptor() ([]byte, []int) {
|
||||
return file_response_proto_rawDescGZIP(), []int{0, 1}
|
||||
}
|
||||
|
||||
func (x *Response_Result) GetStatus() Response_Result_StatusType {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
@ -409,105 +446,140 @@ func (x *Response_Result) GetFileError() []*Response_FileError {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetStatus(v Response_Result_StatusType) {
|
||||
x.Status = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetExitStatus(v int32) {
|
||||
x.ExitStatus = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetError(v string) {
|
||||
x.Error = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetTime(v uint64) {
|
||||
x.Time = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetRunTime(v uint64) {
|
||||
x.RunTime = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetProcPeak(v uint64) {
|
||||
x.ProcPeak = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetMemory(v uint64) {
|
||||
x.Memory = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetFiles(v map[string][]byte) {
|
||||
x.Files = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetFileIDs(v map[string]string) {
|
||||
x.FileIDs = v
|
||||
}
|
||||
|
||||
func (x *Response_Result) SetFileError(v []*Response_FileError) {
|
||||
x.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.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
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_response_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_response_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x02, 0x70, 0x62, 0x22, 0xe6, 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, 0xd8, 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, 0xe6, 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, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x10, 0x09, 0x1a,
|
||||
0x9b, 0x06, 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, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x50, 0x65,
|
||||
0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x50, 0x65,
|
||||
0x61, 0x6b, 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, 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, 0x42, 0x24, 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, 0x92, 0x03,
|
||||
0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
|
||||
})
|
||||
|
||||
var (
|
||||
file_response_proto_rawDescOnce sync.Once
|
||||
file_response_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_response_proto_rawDescGZIP() []byte {
|
||||
file_response_proto_rawDescOnce.Do(func() {
|
||||
file_response_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_response_proto_rawDesc), len(file_response_proto_rawDesc)))
|
||||
})
|
||||
return file_response_proto_rawDescData
|
||||
}
|
||||
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)
|
||||
|
@ -1,9 +1,11 @@
|
||||
edition = "2023";
|
||||
|
||||
package pb;
|
||||
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;
|
||||
|
||||
message Response {
|
||||
message FileError {
|
||||
|
636
pb/response_protoopaque.pb.go
Normal file
636
pb/response_protoopaque.pb.go
Normal file
@ -0,0 +1,636 @@
|
||||
// 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
|
||||
}
|
@ -1,17 +1,19 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.4
|
||||
// protoc v5.29.3
|
||||
// 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"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
@ -23,7 +25,7 @@ const (
|
||||
)
|
||||
|
||||
type StreamRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
// Types that are valid to be assigned to Request:
|
||||
//
|
||||
// *StreamRequest_ExecRequest
|
||||
@ -60,11 +62,6 @@ func (x *StreamRequest) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.
|
||||
func (*StreamRequest) Descriptor() ([]byte, []int) {
|
||||
return file_stream_request_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) GetRequest() isStreamRequest_Request {
|
||||
if x != nil {
|
||||
return x.Request
|
||||
@ -108,6 +105,169 @@ func (x *StreamRequest) GetExecCancel() *emptypb.Empty {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StreamRequest) SetExecRequest(v *Request) {
|
||||
if v == nil {
|
||||
x.Request = nil
|
||||
return
|
||||
}
|
||||
x.Request = &StreamRequest_ExecRequest{v}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) SetExecInput(v *StreamRequest_Input) {
|
||||
if v == nil {
|
||||
x.Request = nil
|
||||
return
|
||||
}
|
||||
x.Request = &StreamRequest_ExecInput{v}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) SetExecResize(v *StreamRequest_Resize) {
|
||||
if v == nil {
|
||||
x.Request = nil
|
||||
return
|
||||
}
|
||||
x.Request = &StreamRequest_ExecResize{v}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) SetExecCancel(v *emptypb.Empty) {
|
||||
if v == nil {
|
||||
x.Request = nil
|
||||
return
|
||||
}
|
||||
x.Request = &StreamRequest_ExecCancel{v}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) HasRequest() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.Request != nil
|
||||
}
|
||||
|
||||
func (x *StreamRequest) HasExecRequest() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
_, ok := x.Request.(*StreamRequest_ExecRequest)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *StreamRequest) HasExecInput() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
_, ok := x.Request.(*StreamRequest_ExecInput)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *StreamRequest) HasExecResize() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
_, ok := x.Request.(*StreamRequest_ExecResize)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *StreamRequest) HasExecCancel() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
_, ok := x.Request.(*StreamRequest_ExecCancel)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *StreamRequest) ClearRequest() {
|
||||
x.Request = nil
|
||||
}
|
||||
|
||||
func (x *StreamRequest) ClearExecRequest() {
|
||||
if _, ok := x.Request.(*StreamRequest_ExecRequest); ok {
|
||||
x.Request = nil
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) ClearExecInput() {
|
||||
if _, ok := x.Request.(*StreamRequest_ExecInput); ok {
|
||||
x.Request = nil
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) ClearExecResize() {
|
||||
if _, ok := x.Request.(*StreamRequest_ExecResize); ok {
|
||||
x.Request = nil
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StreamRequest) ClearExecCancel() {
|
||||
if _, ok := x.Request.(*StreamRequest_ExecCancel); ok {
|
||||
x.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.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 Request:
|
||||
ExecRequest *Request
|
||||
ExecInput *StreamRequest_Input
|
||||
ExecResize *StreamRequest_Resize
|
||||
ExecCancel *emptypb.Empty
|
||||
// -- end of Request
|
||||
}
|
||||
|
||||
func (b0 StreamRequest_builder) Build() *StreamRequest {
|
||||
m0 := &StreamRequest{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
if b.ExecRequest != nil {
|
||||
x.Request = &StreamRequest_ExecRequest{b.ExecRequest}
|
||||
}
|
||||
if b.ExecInput != nil {
|
||||
x.Request = &StreamRequest_ExecInput{b.ExecInput}
|
||||
}
|
||||
if b.ExecResize != nil {
|
||||
x.Request = &StreamRequest_ExecResize{b.ExecResize}
|
||||
}
|
||||
if b.ExecCancel != nil {
|
||||
x.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()
|
||||
}
|
||||
@ -137,7 +297,7 @@ func (*StreamRequest_ExecResize) isStreamRequest_Request() {}
|
||||
func (*StreamRequest_ExecCancel) isStreamRequest_Request() {}
|
||||
|
||||
type StreamRequest_Input struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
@ -170,11 +330,6 @@ func (x *StreamRequest_Input) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StreamRequest_Input.ProtoReflect.Descriptor instead.
|
||||
func (*StreamRequest_Input) Descriptor() ([]byte, []int) {
|
||||
return file_stream_request_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Input) GetIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
@ -196,8 +351,41 @@ func (x *StreamRequest_Input) GetContent() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Input) SetIndex(v uint32) {
|
||||
x.Index = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Input) SetFd(v uint32) {
|
||||
x.Fd = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Input) SetContent(v []byte) {
|
||||
if v == nil {
|
||||
v = []byte{}
|
||||
}
|
||||
x.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.Index = b.Index
|
||||
x.Fd = b.Fd
|
||||
x.Content = b.Content
|
||||
return m0
|
||||
}
|
||||
|
||||
type StreamRequest_Resize struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
@ -233,11 +421,6 @@ func (x *StreamRequest_Resize) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StreamRequest_Resize.ProtoReflect.Descriptor instead.
|
||||
func (*StreamRequest_Resize) Descriptor() ([]byte, []int) {
|
||||
return file_stream_request_proto_rawDescGZIP(), []int{0, 1}
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) GetIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
@ -280,58 +463,80 @@ func (x *StreamRequest_Resize) GetY() uint32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) SetIndex(v uint32) {
|
||||
x.Index = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) SetFd(v uint32) {
|
||||
x.Fd = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) SetRows(v uint32) {
|
||||
x.Rows = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) SetCols(v uint32) {
|
||||
x.Cols = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) SetX(v uint32) {
|
||||
x.X = v
|
||||
}
|
||||
|
||||
func (x *StreamRequest_Resize) SetY(v uint32) {
|
||||
x.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.Index = b.Index
|
||||
x.Fd = b.Fd
|
||||
x.Rows = b.Rows
|
||||
x.Cols = b.Cols
|
||||
x.X = b.X
|
||||
x.Y = b.Y
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_stream_request_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_stream_request_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x14, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74,
|
||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x03, 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, 0x12, 0x38,
|
||||
0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x65, 0x78,
|
||||
0x65, 0x63, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x1a, 0x47, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75,
|
||||
0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0d, 0x52, 0x02, 0x66, 0x64, 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, 0x72, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x12, 0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x66,
|
||||
0x64, 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,
|
||||
0x42, 0x24, 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, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x70, 0xe8, 0x07,
|
||||
})
|
||||
|
||||
var (
|
||||
file_stream_request_proto_rawDescOnce sync.Once
|
||||
file_stream_request_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_stream_request_proto_rawDescGZIP() []byte {
|
||||
file_stream_request_proto_rawDescOnce.Do(func() {
|
||||
file_stream_request_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stream_request_proto_rawDesc), len(file_stream_request_proto_rawDesc)))
|
||||
})
|
||||
return file_stream_request_proto_rawDescData
|
||||
}
|
||||
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{
|
||||
|
@ -4,9 +4,11 @@ package pb;
|
||||
|
||||
option features.field_presence = IMPLICIT;
|
||||
option go_package = "github.com/criyle/go-judge/pb";
|
||||
option features.(pb.go).api_level = API_HYBRID;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "request.proto";
|
||||
import "google/protobuf/go_features.proto";
|
||||
|
||||
message StreamRequest {
|
||||
message Input {
|
||||
|
577
pb/stream_request_protoopaque.pb.go
Normal file
577
pb/stream_request_protoopaque.pb.go
Normal file
@ -0,0 +1,577 @@
|
||||
// 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
|
||||
}
|
@ -1,16 +1,18 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.4
|
||||
// protoc v5.29.3
|
||||
// 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"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
@ -22,7 +24,7 @@ const (
|
||||
)
|
||||
|
||||
type StreamResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
state protoimpl.MessageState `protogen:"hybrid.v1"`
|
||||
// Types that are valid to be assigned to Response:
|
||||
//
|
||||
// *StreamResponse_ExecResponse
|
||||
@ -57,11 +59,6 @@ func (x *StreamResponse) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.
|
||||
func (*StreamResponse) Descriptor() ([]byte, []int) {
|
||||
return file_stream_response_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *StreamResponse) GetResponse() isStreamResponse_Response {
|
||||
if x != nil {
|
||||
return x.Response
|
||||
@ -87,6 +84,111 @@ func (x *StreamResponse) GetExecOutput() *StreamResponse_Output {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StreamResponse) SetExecResponse(v *Response) {
|
||||
if v == nil {
|
||||
x.Response = nil
|
||||
return
|
||||
}
|
||||
x.Response = &StreamResponse_ExecResponse{v}
|
||||
}
|
||||
|
||||
func (x *StreamResponse) SetExecOutput(v *StreamResponse_Output) {
|
||||
if v == nil {
|
||||
x.Response = nil
|
||||
return
|
||||
}
|
||||
x.Response = &StreamResponse_ExecOutput{v}
|
||||
}
|
||||
|
||||
func (x *StreamResponse) HasResponse() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
return x.Response != nil
|
||||
}
|
||||
|
||||
func (x *StreamResponse) HasExecResponse() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
_, ok := x.Response.(*StreamResponse_ExecResponse)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *StreamResponse) HasExecOutput() bool {
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
_, ok := x.Response.(*StreamResponse_ExecOutput)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *StreamResponse) ClearResponse() {
|
||||
x.Response = nil
|
||||
}
|
||||
|
||||
func (x *StreamResponse) ClearExecResponse() {
|
||||
if _, ok := x.Response.(*StreamResponse_ExecResponse); ok {
|
||||
x.Response = nil
|
||||
}
|
||||
}
|
||||
|
||||
func (x *StreamResponse) ClearExecOutput() {
|
||||
if _, ok := x.Response.(*StreamResponse_ExecOutput); ok {
|
||||
x.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.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 Response:
|
||||
ExecResponse *Response
|
||||
ExecOutput *StreamResponse_Output
|
||||
// -- end of Response
|
||||
}
|
||||
|
||||
func (b0 StreamResponse_builder) Build() *StreamResponse {
|
||||
m0 := &StreamResponse{}
|
||||
b, x := &b0, m0
|
||||
_, _ = b, x
|
||||
if b.ExecResponse != nil {
|
||||
x.Response = &StreamResponse_ExecResponse{b.ExecResponse}
|
||||
}
|
||||
if b.ExecOutput != nil {
|
||||
x.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()
|
||||
}
|
||||
@ -104,7 +206,7 @@ func (*StreamResponse_ExecResponse) isStreamResponse_Response() {}
|
||||
func (*StreamResponse_ExecOutput) isStreamResponse_Response() {}
|
||||
|
||||
type StreamResponse_Output struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
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"`
|
||||
@ -137,11 +239,6 @@ func (x *StreamResponse_Output) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StreamResponse_Output.ProtoReflect.Descriptor instead.
|
||||
func (*StreamResponse_Output) Descriptor() ([]byte, []int) {
|
||||
return file_stream_response_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
func (x *StreamResponse_Output) GetIndex() uint32 {
|
||||
if x != nil {
|
||||
return x.Index
|
||||
@ -163,42 +260,55 @@ func (x *StreamResponse_Output) GetContent() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StreamResponse_Output) SetIndex(v uint32) {
|
||||
x.Index = v
|
||||
}
|
||||
|
||||
func (x *StreamResponse_Output) SetFd(v uint32) {
|
||||
x.Fd = v
|
||||
}
|
||||
|
||||
func (x *StreamResponse_Output) SetContent(v []byte) {
|
||||
if v == nil {
|
||||
v = []byte{}
|
||||
}
|
||||
x.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.Index = b.Index
|
||||
x.Fd = b.Fd
|
||||
x.Content = b.Content
|
||||
return m0
|
||||
}
|
||||
|
||||
var File_stream_response_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_stream_response_proto_rawDesc = string([]byte{
|
||||
0x0a, 0x15, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0e, 0x72, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 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,
|
||||
0x48, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x66, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x66, 0x64, 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, 0x42, 0x24, 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, 0x92, 0x03, 0x02, 0x08, 0x02, 0x62, 0x08, 0x65, 0x64, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x70, 0xe8, 0x07,
|
||||
})
|
||||
|
||||
var (
|
||||
file_stream_response_proto_rawDescOnce sync.Once
|
||||
file_stream_response_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_stream_response_proto_rawDescGZIP() []byte {
|
||||
file_stream_response_proto_rawDescOnce.Do(func() {
|
||||
file_stream_response_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_stream_response_proto_rawDesc), len(file_stream_response_proto_rawDesc)))
|
||||
})
|
||||
return file_stream_response_proto_rawDescData
|
||||
}
|
||||
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{
|
||||
|
@ -4,8 +4,10 @@ package pb;
|
||||
|
||||
option features.field_presence = IMPLICIT;
|
||||
option go_package = "github.com/criyle/go-judge/pb";
|
||||
option features.(pb.go).api_level = API_HYBRID;
|
||||
|
||||
import "response.proto";
|
||||
import "google/protobuf/go_features.proto";
|
||||
|
||||
message StreamResponse {
|
||||
message Output {
|
||||
|
345
pb/stream_response_protoopaque.pb.go
Normal file
345
pb/stream_response_protoopaque.pb.go
Normal file
@ -0,0 +1,345 @@
|
||||
// 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user