judge

package
v0.0.0-...-f6108e4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_judge_proto protoreflect.FileDescriptor
View Source
var JudgeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "judge.JudgeService",
	HandlerType: (*JudgeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTestCase",
			Handler:    _JudgeService_GetTestCase_Handler,
		},
		{
			MethodName: "RunTests",
			Handler:    _JudgeService_RunTests_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "judge.proto",
}

JudgeService_ServiceDesc is the grpc.ServiceDesc for JudgeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterJudgeServiceServer

func RegisterJudgeServiceServer(s grpc.ServiceRegistrar, srv JudgeServiceServer)

Types

type GetTestCasesRequest

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

func (*GetTestCasesRequest) Descriptor deprecated

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

Deprecated: Use GetTestCasesRequest.ProtoReflect.Descriptor instead.

func (*GetTestCasesRequest) GetPath

func (x *GetTestCasesRequest) GetPath() string

func (*GetTestCasesRequest) ProtoMessage

func (*GetTestCasesRequest) ProtoMessage()

func (*GetTestCasesRequest) ProtoReflect

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

func (*GetTestCasesRequest) Reset

func (x *GetTestCasesRequest) Reset()

func (*GetTestCasesRequest) String

func (x *GetTestCasesRequest) String() string

type GetTestCasesResponse

type GetTestCasesResponse struct {
	Testcases []*TestCase `protobuf:"bytes,1,rep,name=testcases,proto3" json:"testcases,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTestCasesResponse) Descriptor deprecated

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

Deprecated: Use GetTestCasesResponse.ProtoReflect.Descriptor instead.

func (*GetTestCasesResponse) GetTestcases

func (x *GetTestCasesResponse) GetTestcases() []*TestCase

func (*GetTestCasesResponse) ProtoMessage

func (*GetTestCasesResponse) ProtoMessage()

func (*GetTestCasesResponse) ProtoReflect

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

func (*GetTestCasesResponse) Reset

func (x *GetTestCasesResponse) Reset()

func (*GetTestCasesResponse) String

func (x *GetTestCasesResponse) String() string

type JudgeServiceClient

type JudgeServiceClient interface {
	GetTestCase(ctx context.Context, in *GetTestCasesRequest, opts ...grpc.CallOption) (*GetTestCasesResponse, error)
	RunTests(ctx context.Context, in *RunTestsRequest, opts ...grpc.CallOption) (*RunTestsResponse, error)
}

JudgeServiceClient is the client API for JudgeService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type JudgeServiceServer

type JudgeServiceServer interface {
	GetTestCase(context.Context, *GetTestCasesRequest) (*GetTestCasesResponse, error)
	RunTests(context.Context, *RunTestsRequest) (*RunTestsResponse, error)
	// contains filtered or unexported methods
}

JudgeServiceServer is the server API for JudgeService service. All implementations must embed UnimplementedJudgeServiceServer for forward compatibility

type RunTestsRequest

type RunTestsRequest struct {
	Path     string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Code     string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"`
	// contains filtered or unexported fields
}

func (*RunTestsRequest) Descriptor deprecated

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

Deprecated: Use RunTestsRequest.ProtoReflect.Descriptor instead.

func (*RunTestsRequest) GetCode

func (x *RunTestsRequest) GetCode() string

func (*RunTestsRequest) GetLanguage

func (x *RunTestsRequest) GetLanguage() string

func (*RunTestsRequest) GetPath

func (x *RunTestsRequest) GetPath() string

func (*RunTestsRequest) ProtoMessage

func (*RunTestsRequest) ProtoMessage()

func (*RunTestsRequest) ProtoReflect

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

func (*RunTestsRequest) Reset

func (x *RunTestsRequest) Reset()

func (*RunTestsRequest) String

func (x *RunTestsRequest) String() string

type RunTestsResponse

type RunTestsResponse struct {
	Results []*TestResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*RunTestsResponse) Descriptor deprecated

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

Deprecated: Use RunTestsResponse.ProtoReflect.Descriptor instead.

func (*RunTestsResponse) GetResults

func (x *RunTestsResponse) GetResults() []*TestResult

func (*RunTestsResponse) ProtoMessage

func (*RunTestsResponse) ProtoMessage()

func (*RunTestsResponse) ProtoReflect

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

func (*RunTestsResponse) Reset

func (x *RunTestsResponse) Reset()

func (*RunTestsResponse) String

func (x *RunTestsResponse) String() string

type TestCase

type TestCase struct {
	Label          string   `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	Inputs         []string `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
	ExpectedOutput string   `protobuf:"bytes,3,opt,name=expected_output,json=expectedOutput,proto3" json:"expected_output,omitempty"`
	// contains filtered or unexported fields
}

func (*TestCase) Descriptor deprecated

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

Deprecated: Use TestCase.ProtoReflect.Descriptor instead.

func (*TestCase) GetExpectedOutput

func (x *TestCase) GetExpectedOutput() string

func (*TestCase) GetInputs

func (x *TestCase) GetInputs() []string

func (*TestCase) GetLabel

func (x *TestCase) GetLabel() string

func (*TestCase) ProtoMessage

func (*TestCase) ProtoMessage()

func (*TestCase) ProtoReflect

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

func (*TestCase) Reset

func (x *TestCase) Reset()

func (*TestCase) String

func (x *TestCase) String() string

type TestResult

type TestResult struct {
	Label          string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	Passed         bool   `protobuf:"varint,2,opt,name=passed,proto3" json:"passed,omitempty"`
	Output         string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"`
	ExpectedOutput string `protobuf:"bytes,4,opt,name=expected_output,json=expectedOutput,proto3" json:"expected_output,omitempty"`
	// contains filtered or unexported fields
}

func (*TestResult) Descriptor deprecated

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

Deprecated: Use TestResult.ProtoReflect.Descriptor instead.

func (*TestResult) GetExpectedOutput

func (x *TestResult) GetExpectedOutput() string

func (*TestResult) GetLabel

func (x *TestResult) GetLabel() string

func (*TestResult) GetOutput

func (x *TestResult) GetOutput() string

func (*TestResult) GetPassed

func (x *TestResult) GetPassed() bool

func (*TestResult) ProtoMessage

func (*TestResult) ProtoMessage()

func (*TestResult) ProtoReflect

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

func (*TestResult) Reset

func (x *TestResult) Reset()

func (*TestResult) String

func (x *TestResult) String() string

type UnimplementedJudgeServiceServer

type UnimplementedJudgeServiceServer struct {
}

UnimplementedJudgeServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedJudgeServiceServer) GetTestCase

func (UnimplementedJudgeServiceServer) RunTests

type UnsafeJudgeServiceServer

type UnsafeJudgeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeJudgeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JudgeServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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