workers

package
v0.0.0-...-0060bda Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown int = iota
	PendingCheck
	Accepted
	ExecutionError
	RestrictionViolated
	IncorrectColumnCount
	IncorrectColumnNames
	IncorrectContent
	IncorrectOrder
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

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

func NewPipeline

func NewPipeline(cfg config.Config) (*Pipeline, error)

func (*Pipeline) CheckRestrictions

func (p *Pipeline) CheckRestrictions(s Submission) (Submission, error)

func (*Pipeline) CheckSelectionColumns

func (p *Pipeline) CheckSelectionColumns(s Submission) (Submission, error)

func (*Pipeline) CheckSelectionContent

func (p *Pipeline) CheckSelectionContent(s Submission) (Submission, error)

func (*Pipeline) CheckSelectionSolution

func (p *Pipeline) CheckSelectionSolution(s Submission) (Submission, error)

func (*Pipeline) Checker

func (p *Pipeline) Checker(kind string, unchecked <-chan Submission, check func(s Submission) Submission) <-chan Submission

func (*Pipeline) FetchRestrictions

func (p *Pipeline) FetchRestrictions(s Submission) (Submission, error)

func (*Pipeline) FetchSelectionInfo

func (p *Pipeline) FetchSelectionInfo(s Submission) (Submission, error)

func (*Pipeline) RestrictionChecker

func (p *Pipeline) RestrictionChecker(unchecked <-chan Submission) <-chan Submission

func (*Pipeline) SelectionChecker

func (p *Pipeline) SelectionChecker(unchecked <-chan Submission) <-chan Submission

func (*Pipeline) Start

func (p *Pipeline) Start() error

func (*Pipeline) Stop

func (p *Pipeline) Stop()

func (*Pipeline) SubmissionProvider

func (p *Pipeline) SubmissionProvider() <-chan Submission

func (*Pipeline) UpdateSubmission

func (p *Pipeline) UpdateSubmission(s Submission) error

type Restriction

type Restriction struct {
	Type       string `db:"RESTRICTION_TYPE"`
	Definition string `db:"DEFINITION"`
}

type RestrictionInfo

type RestrictionInfo []Restriction

type SelectionInfo

type SelectionInfo struct {
	ReferenceSolution string `db:"REFERENCE_SOLUTION"`
	DefaultSchema     string `db:"DEFAULT_SCHEMA"`
	CheckOrder        string `db:"CHECK_ORDER"`
	CheckColumnNames  string `db:"CHECK_COLUMN_NAMES"`
	Schemas           []string
}

type Submission

type Submission struct {
	ID             int    `db:"ID"`
	StatusID       int    `db:"STATUS_ID"`
	Solution       string `db:"SOLUTION"`
	CheckerMessage string `db:"CHECKER_MESSAGE"`

	// used by various checkers
	CheckerInfo interface{}
}

func (*Submission) IsChecked

func (s *Submission) IsChecked() bool

func (*Submission) PutCheckerError

func (s *Submission) PutCheckerError(err error)

Jump to

Keyboard shortcuts

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