pb

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2020 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
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,
	}
)

Enum value maps for Response_Result_StatusType.

View Source
var File_judge_proto protoreflect.FileDescriptor

Functions

func RegisterExecutorServer

func RegisterExecutorServer(s *grpc.Server, srv ExecutorServer)

Types

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ExecutorClient

type ExecutorClient interface {
	Exec(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	FileList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*FileListType, error)
	FileGet(ctx context.Context, in *FileID, opts ...grpc.CallOption) (*FileContent, error)
	FileAdd(ctx context.Context, in *FileContent, opts ...grpc.CallOption) (*FileID, error)
	FileDelete(ctx context.Context, in *FileID, opts ...grpc.CallOption) (*Empty, error)
}

ExecutorClient is the client API for Executor service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewExecutorClient

func NewExecutorClient(cc grpc.ClientConnInterface) ExecutorClient

type ExecutorServer

type ExecutorServer interface {
	Exec(context.Context, *Request) (*Response, error)
	FileList(context.Context, *Empty) (*FileListType, error)
	FileGet(context.Context, *FileID) (*FileContent, error)
	FileAdd(context.Context, *FileContent) (*FileID, error)
	FileDelete(context.Context, *FileID) (*Empty, error)
}

ExecutorServer is the server API for Executor service.

type FileContent

type FileContent struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*FileContent) Descriptor deprecated

func (*FileContent) Descriptor() ([]byte, []int)

Deprecated: Use FileContent.ProtoReflect.Descriptor instead.

func (*FileContent) GetContent

func (x *FileContent) GetContent() []byte

func (*FileContent) GetName

func (x *FileContent) GetName() string

func (*FileContent) ProtoMessage

func (*FileContent) ProtoMessage()

func (*FileContent) ProtoReflect

func (x *FileContent) ProtoReflect() protoreflect.Message

func (*FileContent) Reset

func (x *FileContent) Reset()

func (*FileContent) String

func (x *FileContent) String() string

type FileID

type FileID struct {
	FileID string `protobuf:"bytes,1,opt,name=fileID,proto3" json:"fileID,omitempty"`
	// contains filtered or unexported fields
}

func (*FileID) Descriptor deprecated

func (*FileID) Descriptor() ([]byte, []int)

Deprecated: Use FileID.ProtoReflect.Descriptor instead.

func (*FileID) GetFileID

func (x *FileID) GetFileID() string

func (*FileID) ProtoMessage

func (*FileID) ProtoMessage()

func (*FileID) ProtoReflect

func (x *FileID) ProtoReflect() protoreflect.Message

func (*FileID) Reset

func (x *FileID) Reset()

func (*FileID) String

func (x *FileID) String() string

type FileListType

type FileListType struct {
	FileIDs []string `protobuf:"bytes,1,rep,name=fileIDs,proto3" json:"fileIDs,omitempty"`
	// contains filtered or unexported fields
}

func (*FileListType) Descriptor deprecated

func (*FileListType) Descriptor() ([]byte, []int)

Deprecated: Use FileListType.ProtoReflect.Descriptor instead.

func (*FileListType) GetFileIDs

func (x *FileListType) GetFileIDs() []string

func (*FileListType) ProtoMessage

func (*FileListType) ProtoMessage()

func (*FileListType) ProtoReflect

func (x *FileListType) ProtoReflect() protoreflect.Message

func (*FileListType) Reset

func (x *FileListType) Reset()

func (*FileListType) String

func (x *FileListType) String() string

type Request

type Request struct {
	RequestID   string             `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"`
	Cmd         []*Request_CmdType `protobuf:"bytes,2,rep,name=cmd,proto3" json:"cmd,omitempty"`
	PipeMapping []*Request_PipeMap `protobuf:"bytes,3,rep,name=pipeMapping,proto3" json:"pipeMapping,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetCmd

func (x *Request) GetCmd() []*Request_CmdType

func (*Request) GetPipeMapping

func (x *Request) GetPipeMapping() []*Request_PipeMap

func (*Request) GetRequestID

func (x *Request) GetRequestID() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Request_CachedFile

type Request_CachedFile struct {
	FileID string `protobuf:"bytes,1,opt,name=fileID,proto3" json:"fileID,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_CachedFile) Descriptor deprecated

func (*Request_CachedFile) Descriptor() ([]byte, []int)

Deprecated: Use Request_CachedFile.ProtoReflect.Descriptor instead.

func (*Request_CachedFile) GetFileID

func (x *Request_CachedFile) GetFileID() string

func (*Request_CachedFile) ProtoMessage

func (*Request_CachedFile) ProtoMessage()

func (*Request_CachedFile) ProtoReflect

func (x *Request_CachedFile) ProtoReflect() protoreflect.Message

func (*Request_CachedFile) Reset

func (x *Request_CachedFile) Reset()

func (*Request_CachedFile) String

func (x *Request_CachedFile) String() string

type Request_CmdType

type Request_CmdType struct {
	Args          []string                 `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
	Env           []string                 `protobuf:"bytes,2,rep,name=env,proto3" json:"env,omitempty"`
	Files         []*Request_File          `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"`
	CPULimit      uint64                   `protobuf:"varint,4,opt,name=CPULimit,proto3" json:"CPULimit,omitempty"`
	RealCPULimit  uint64                   `protobuf:"varint,5,opt,name=realCPULimit,proto3" json:"realCPULimit,omitempty"`
	MemoryLimit   uint64                   `protobuf:"varint,6,opt,name=memoryLimit,proto3" json:"memoryLimit,omitempty"`
	ProcLimit     uint64                   `protobuf:"varint,7,opt,name=procLimit,proto3" json:"procLimit,omitempty"`
	CopyIn        map[string]*Request_File `` /* 153-byte string literal not displayed */
	CopyOut       []string                 `protobuf:"bytes,9,rep,name=copyOut,proto3" json:"copyOut,omitempty"`
	CopyOutCached []string                 `protobuf:"bytes,10,rep,name=copyOutCached,proto3" json:"copyOutCached,omitempty"`
	CopyOutDir    string                   `protobuf:"bytes,11,opt,name=copyOutDir,proto3" json:"copyOutDir,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_CmdType) Descriptor deprecated

func (*Request_CmdType) Descriptor() ([]byte, []int)

Deprecated: Use Request_CmdType.ProtoReflect.Descriptor instead.

func (*Request_CmdType) GetArgs

func (x *Request_CmdType) GetArgs() []string

func (*Request_CmdType) GetCPULimit

func (x *Request_CmdType) GetCPULimit() uint64

func (*Request_CmdType) GetCopyIn

func (x *Request_CmdType) GetCopyIn() map[string]*Request_File

func (*Request_CmdType) GetCopyOut

func (x *Request_CmdType) GetCopyOut() []string

func (*Request_CmdType) GetCopyOutCached

func (x *Request_CmdType) GetCopyOutCached() []string

func (*Request_CmdType) GetCopyOutDir

func (x *Request_CmdType) GetCopyOutDir() string

func (*Request_CmdType) GetEnv

func (x *Request_CmdType) GetEnv() []string

func (*Request_CmdType) GetFiles

func (x *Request_CmdType) GetFiles() []*Request_File

func (*Request_CmdType) GetMemoryLimit

func (x *Request_CmdType) GetMemoryLimit() uint64

func (*Request_CmdType) GetProcLimit

func (x *Request_CmdType) GetProcLimit() uint64

func (*Request_CmdType) GetRealCPULimit

func (x *Request_CmdType) GetRealCPULimit() uint64

func (*Request_CmdType) ProtoMessage

func (*Request_CmdType) ProtoMessage()

func (*Request_CmdType) ProtoReflect

func (x *Request_CmdType) ProtoReflect() protoreflect.Message

func (*Request_CmdType) Reset

func (x *Request_CmdType) Reset()

func (*Request_CmdType) String

func (x *Request_CmdType) String() string

type Request_File

type Request_File struct {

	// Types that are assignable to File:
	//	*Request_File_Local
	//	*Request_File_Memory
	//	*Request_File_Cached
	//	*Request_File_Pipe
	File isRequest_File_File `protobuf_oneof:"file"`
	// contains filtered or unexported fields
}

func (*Request_File) Descriptor deprecated

func (*Request_File) Descriptor() ([]byte, []int)

Deprecated: Use Request_File.ProtoReflect.Descriptor instead.

func (*Request_File) GetCached

func (x *Request_File) GetCached() *Request_CachedFile

func (*Request_File) GetFile

func (m *Request_File) GetFile() isRequest_File_File

func (*Request_File) GetLocal

func (x *Request_File) GetLocal() *Request_LocalFile

func (*Request_File) GetMemory

func (x *Request_File) GetMemory() *Request_MemoryFile

func (*Request_File) GetPipe

func (x *Request_File) GetPipe() *Request_PipeCollector

func (*Request_File) ProtoMessage

func (*Request_File) ProtoMessage()

func (*Request_File) ProtoReflect

func (x *Request_File) ProtoReflect() protoreflect.Message

func (*Request_File) Reset

func (x *Request_File) Reset()

func (*Request_File) String

func (x *Request_File) String() string

type Request_File_Cached

type Request_File_Cached struct {
	Cached *Request_CachedFile `protobuf:"bytes,3,opt,name=cached,proto3,oneof"`
}

type Request_File_Local

type Request_File_Local struct {
	Local *Request_LocalFile `protobuf:"bytes,1,opt,name=local,proto3,oneof"`
}

type Request_File_Memory

type Request_File_Memory struct {
	Memory *Request_MemoryFile `protobuf:"bytes,2,opt,name=memory,proto3,oneof"`
}

type Request_File_Pipe

type Request_File_Pipe struct {
	Pipe *Request_PipeCollector `protobuf:"bytes,4,opt,name=pipe,proto3,oneof"`
}

type Request_LocalFile

type Request_LocalFile struct {
	Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_LocalFile) Descriptor deprecated

func (*Request_LocalFile) Descriptor() ([]byte, []int)

Deprecated: Use Request_LocalFile.ProtoReflect.Descriptor instead.

func (*Request_LocalFile) GetSrc

func (x *Request_LocalFile) GetSrc() string

func (*Request_LocalFile) ProtoMessage

func (*Request_LocalFile) ProtoMessage()

func (*Request_LocalFile) ProtoReflect

func (x *Request_LocalFile) ProtoReflect() protoreflect.Message

func (*Request_LocalFile) Reset

func (x *Request_LocalFile) Reset()

func (*Request_LocalFile) String

func (x *Request_LocalFile) String() string

type Request_MemoryFile

type Request_MemoryFile struct {
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_MemoryFile) Descriptor deprecated

func (*Request_MemoryFile) Descriptor() ([]byte, []int)

Deprecated: Use Request_MemoryFile.ProtoReflect.Descriptor instead.

func (*Request_MemoryFile) GetContent

func (x *Request_MemoryFile) GetContent() []byte

func (*Request_MemoryFile) ProtoMessage

func (*Request_MemoryFile) ProtoMessage()

func (*Request_MemoryFile) ProtoReflect

func (x *Request_MemoryFile) ProtoReflect() protoreflect.Message

func (*Request_MemoryFile) Reset

func (x *Request_MemoryFile) Reset()

func (*Request_MemoryFile) String

func (x *Request_MemoryFile) String() string

type Request_PipeCollector

type Request_PipeCollector struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Max  int64  `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_PipeCollector) Descriptor deprecated

func (*Request_PipeCollector) Descriptor() ([]byte, []int)

Deprecated: Use Request_PipeCollector.ProtoReflect.Descriptor instead.

func (*Request_PipeCollector) GetMax

func (x *Request_PipeCollector) GetMax() int64

func (*Request_PipeCollector) GetName

func (x *Request_PipeCollector) GetName() string

func (*Request_PipeCollector) ProtoMessage

func (*Request_PipeCollector) ProtoMessage()

func (*Request_PipeCollector) ProtoReflect

func (x *Request_PipeCollector) ProtoReflect() protoreflect.Message

func (*Request_PipeCollector) Reset

func (x *Request_PipeCollector) Reset()

func (*Request_PipeCollector) String

func (x *Request_PipeCollector) String() string

type Request_PipeMap

type Request_PipeMap struct {
	In  *Request_PipeMap_PipeIndex `protobuf:"bytes,1,opt,name=in,proto3" json:"in,omitempty"`
	Out *Request_PipeMap_PipeIndex `protobuf:"bytes,2,opt,name=out,proto3" json:"out,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_PipeMap) Descriptor deprecated

func (*Request_PipeMap) Descriptor() ([]byte, []int)

Deprecated: Use Request_PipeMap.ProtoReflect.Descriptor instead.

func (*Request_PipeMap) GetIn

func (*Request_PipeMap) GetOut

func (*Request_PipeMap) ProtoMessage

func (*Request_PipeMap) ProtoMessage()

func (*Request_PipeMap) ProtoReflect

func (x *Request_PipeMap) ProtoReflect() protoreflect.Message

func (*Request_PipeMap) Reset

func (x *Request_PipeMap) Reset()

func (*Request_PipeMap) String

func (x *Request_PipeMap) String() string

type Request_PipeMap_PipeIndex

type Request_PipeMap_PipeIndex struct {
	Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Fd    int32 `protobuf:"varint,2,opt,name=fd,proto3" json:"fd,omitempty"`
	// contains filtered or unexported fields
}

func (*Request_PipeMap_PipeIndex) Descriptor deprecated

func (*Request_PipeMap_PipeIndex) Descriptor() ([]byte, []int)

Deprecated: Use Request_PipeMap_PipeIndex.ProtoReflect.Descriptor instead.

func (*Request_PipeMap_PipeIndex) GetFd

func (x *Request_PipeMap_PipeIndex) GetFd() int32

func (*Request_PipeMap_PipeIndex) GetIndex

func (x *Request_PipeMap_PipeIndex) GetIndex() int32

func (*Request_PipeMap_PipeIndex) ProtoMessage

func (*Request_PipeMap_PipeIndex) ProtoMessage()

func (*Request_PipeMap_PipeIndex) ProtoReflect

func (*Request_PipeMap_PipeIndex) Reset

func (x *Request_PipeMap_PipeIndex) Reset()

func (*Request_PipeMap_PipeIndex) String

func (x *Request_PipeMap_PipeIndex) String() string

type Response

type Response struct {
	RequestID string             `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"`
	Results   []*Response_Result `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
	Error     string             `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetError

func (x *Response) GetError() string

func (*Response) GetRequestID

func (x *Response) GetRequestID() string

func (*Response) GetResults

func (x *Response) GetResults() []*Response_Result

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Response_Result

type Response_Result struct {
	Status     Response_Result_StatusType `protobuf:"varint,1,opt,name=status,proto3,enum=pb.Response_Result_StatusType" json:"status,omitempty"`
	ExitStatus int32                      `protobuf:"varint,2,opt,name=exitStatus,proto3" json:"exitStatus,omitempty"`
	Error      string                     `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Time       uint64                     `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"`
	Memory     uint64                     `protobuf:"varint,5,opt,name=memory,proto3" json:"memory,omitempty"`
	Files      map[string][]byte          `` /* 151-byte string literal not displayed */
	FileIDs    map[string]string          `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Response_Result) Descriptor deprecated

func (*Response_Result) Descriptor() ([]byte, []int)

Deprecated: Use Response_Result.ProtoReflect.Descriptor instead.

func (*Response_Result) GetError

func (x *Response_Result) GetError() string

func (*Response_Result) GetExitStatus

func (x *Response_Result) GetExitStatus() int32

func (*Response_Result) GetFileIDs

func (x *Response_Result) GetFileIDs() map[string]string

func (*Response_Result) GetFiles

func (x *Response_Result) GetFiles() map[string][]byte

func (*Response_Result) GetMemory

func (x *Response_Result) GetMemory() uint64

func (*Response_Result) GetStatus

func (*Response_Result) GetTime

func (x *Response_Result) GetTime() uint64

func (*Response_Result) ProtoMessage

func (*Response_Result) ProtoMessage()

func (*Response_Result) ProtoReflect

func (x *Response_Result) ProtoReflect() protoreflect.Message

func (*Response_Result) Reset

func (x *Response_Result) Reset()

func (*Response_Result) String

func (x *Response_Result) String() string

type Response_Result_StatusType

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
	Response_Result_InvalidInteraction  Response_Result_StatusType = 12 // Not used
	Response_Result_InternalError       Response_Result_StatusType = 13
)

func (Response_Result_StatusType) Descriptor

func (Response_Result_StatusType) Enum

func (Response_Result_StatusType) EnumDescriptor deprecated

func (Response_Result_StatusType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Response_Result_StatusType.Descriptor instead.

func (Response_Result_StatusType) Number

func (Response_Result_StatusType) String

func (Response_Result_StatusType) Type

type UnimplementedExecutorServer

type UnimplementedExecutorServer struct {
}

UnimplementedExecutorServer can be embedded to have forward compatible implementations.

func (*UnimplementedExecutorServer) Exec

func (*UnimplementedExecutorServer) FileAdd

func (*UnimplementedExecutorServer) FileDelete

func (*UnimplementedExecutorServer) FileGet

func (*UnimplementedExecutorServer) FileList

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL