gradeapi

package
v0.0.0-...-97303f7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	gradeproto.UnimplementedAPIServer
	// contains filtered or unexported fields
}

API is the API.

func New

func New(logger *zap.Logger, dialer Dialer, initStore bool) (*API, error)

New creates a new API.

func (*API) RequestGrading

RequestGrading is the gRPC endpoint for requesting grading.

func (*API) SendGradingRequest

func (a *API) SendGradingRequest(ctx context.Context, fileBytes []byte, signature []byte, studentID string) (int, error)

SendGradingRequest sends a grading request to the grader service.

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

Dialer is a dialer.

type Graders

type Graders interface {
	GradeExerciseType1(ctx context.Context, solution []byte, id int) (int, []byte, error)
}

Graders interface contains functions to access the state Graders data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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