db

package
v0.0.0-...-77f4496 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompilerNotFoundError

type CompilerNotFoundError struct {
	CompilerId string
}

func (*CompilerNotFoundError) Error

func (e *CompilerNotFoundError) Error() string

type MarshalError

type MarshalError struct {
	Err error
}

func (*MarshalError) Error

func (e *MarshalError) Error() string

type ProblemNotFoundError

type ProblemNotFoundError struct {
	ProblemId string
}

func (*ProblemNotFoundError) Error

func (e *ProblemNotFoundError) Error() string

type QueryError

type QueryError struct{}

func (*QueryError) Error

func (e *QueryError) Error() string

type ScanError

type ScanError struct{}

func (*ScanError) Error

func (e *ScanError) Error() string

type Service

type Service interface {
	GetProblem(problemId string) (*model.Problem, error)
	ListProblems() ([]model.Problem, error)

	GetCompiler(compilerId string) (*model.Compiler, error)
	ListCompilers() ([]model.Compiler, error)

	CreateSubmission(submission model.Submission) error
	UpdateSubmission(submission model.Submission) error
	GetSubmission(submissionId string) (*model.Submission, error)
	GetSubmissionByProblem(problemId string) ([]model.Submission, error)
	ListSubmissions() ([]model.Submission, error)
}

func NewStore

func NewStore(conn *connection.Connection) Service

type Store

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

func (*Store) CreateSubmission

func (st *Store) CreateSubmission(submission model.Submission) error

func (*Store) GetCompiler

func (st *Store) GetCompiler(compilerId string) (*model.Compiler, error)

func (*Store) GetProblem

func (st *Store) GetProblem(problemId string) (*model.Problem, error)

func (*Store) GetSubmission

func (st *Store) GetSubmission(submissionId string) (*model.Submission, error)

func (*Store) GetSubmissionByProblem

func (st *Store) GetSubmissionByProblem(problemId string) ([]model.Submission, error)

func (*Store) ListCompilers

func (st *Store) ListCompilers() ([]model.Compiler, error)

func (*Store) ListProblems

func (st *Store) ListProblems() ([]model.Problem, error)

func (*Store) ListSubmissions

func (st *Store) ListSubmissions() ([]model.Submission, error)

func (*Store) UpdateSubmission

func (st *Store) UpdateSubmission(submission model.Submission) error

type SubmissionNotFoundError

type SubmissionNotFoundError struct {
	SubmissionId string
}

func (*SubmissionNotFoundError) Error

func (e *SubmissionNotFoundError) Error() string

type UnmarshalError

type UnmarshalError struct {
	Err error
}

func (*UnmarshalError) Error

func (e *UnmarshalError) Error() string

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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