Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(CreateInitControllersFn, NewController, NewService, NewRepository, )
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { CreateJudgement(c *gin.Context) GetJudgements(c *gin.Context) GetJudgement(c *gin.Context) CancelJudgement(c *gin.Context) }
func NewController ¶
func NewController(logger *zap.Logger, s Service) Controller
type DefaultController ¶
type DefaultController struct {
// contains filtered or unexported fields
}
func (*DefaultController) CancelJudgement ¶
func (d *DefaultController) CancelJudgement(c *gin.Context)
func (*DefaultController) CreateJudgement ¶
func (d *DefaultController) CreateJudgement(c *gin.Context)
func (*DefaultController) GetJudgement ¶
func (d *DefaultController) GetJudgement(c *gin.Context)
func (*DefaultController) GetJudgements ¶
func (d *DefaultController) GetJudgements(c *gin.Context)
type InitJudgementGroupFn ¶
type InitJudgementGroupFn func(r *gin.RouterGroup)
func CreateInitControllersFn ¶
func CreateInitControllersFn(jc Controller) InitJudgementGroupFn
type Repository ¶
type Repository interface { GetJudgement(judgementId string) (*models.Judgement, error) GetJudgementsByAccountId(accountId uint64) ([]*models.Judgement, error) GetPendingJudgements() ([]*models.Judgement, error) Create(submissionId, processId uint64) (*models.Judgement, error) Update(judgement *models.Judgement) error }
func NewRepository ¶
func NewRepository(logger *zap.Logger, db *gorm.DB) Repository
type Service ¶
type Service interface { GetJudgement(judgementId string) (*models.Judgement, error) GetJudgements(accountId uint64) ([]*models.Judgement, error) CreateJudgement(accountId, processId, submissionId uint64) (int, *models.Judgement, error) UpdateJudgement(judgementId string, status models.JudgeStatus, score float64, msg string) (*models.Judgement, error) }
func NewService ¶
func NewService( logger *zap.Logger, s scheduler.Scheduler, Repository Repository, ProblemRepository problems.Repository, ProcessRepository processes.Repository, SubmissionRepository submissions.Repository, ) Service
Click to show internal directories.
Click to hide internal directories.