Documentation ¶
Index ¶
- Variables
- func DetectContestID(taskID ids.TaskID) (ids.ContestID, error)
- type Contest
- type ContestTask
- type RatedType
- type Task
- type TaskInfo
- func (ti TaskInfo) CanRestore() bool
- func (ti TaskInfo) MoveFromTemp(tmpDir string) error
- func (t *TaskInfo) Read(r io.Reader) error
- func (t *TaskInfo) ReadFile(file string) error
- func (ti TaskInfo) RequiredStore() bool
- func (ti TaskInfo) RestoreFiles() error
- func (ti TaskInfo) StoreFiles() error
- func (ti TaskInfo) TaskDir() string
- func (ti TaskInfo) TaskURL() string
- func (t TaskInfo) Write(w io.Writer) error
- func (t TaskInfo) WriteFile(file string) error
- type TaskSample
- type TaskSampleType
Constants ¶
This section is empty.
Variables ¶
View Source
var MigrateTargets []any
Functions ¶
Types ¶
type Contest ¶
type Contest struct { ID ids.ContestID `gorm:"primaryKey"` RatedType null.String `gorm:"index"` Title string `gorm:"not null"` StartAt time.Time `gorm:"not null"` Duration time.Duration `gorm:"not null"` TargetRate string `gorm:"not null"` Loaded bool `gorm:"type:integer;not null"` ContestTasks []ContestTask `gorm:"constraint:OnDelete:CASCADE"` }
func (Contest) ContestTaskURL ¶
func (Contest) ContestURL ¶
type ContestTask ¶
type ContestTask struct { ID ids.ContestTaskID `gorm:"primaryKey"` ContestID ids.ContestID `gorm:"not null"` TaskID ids.TaskID `gorm:"not null"` Order int `gorm:"not null"` Index string `gorm:"not null"` Task Task `gorm:"constraint:OnDelete:CASCADE"` }
func (ContestTask) TaskURL ¶
func (ct ContestTask) TaskURL() string
type Task ¶
type Task struct { ID ids.TaskID `gorm:"primaryKey"` Title string `gorm:"not null"` TimeLimit time.Duration `gorm:"type:integer;not null"` Memory int `gorm:"not null"` Score null.Int Loaded bool `gorm:"type:integer;not null"` Samples []TaskSample `gorm:"foreignKey:TaskID;constraint:OnDelete:CASCADE"` }
type TaskInfo ¶
type TaskInfo struct { ContestID ids.ContestID `yaml:"contest-id"` TaskID ids.TaskID `yaml:"task-id"` }
func (TaskInfo) CanRestore ¶
func (TaskInfo) MoveFromTemp ¶ added in v0.0.4
func (TaskInfo) RequiredStore ¶
func (TaskInfo) RestoreFiles ¶
func (TaskInfo) StoreFiles ¶
type TaskSample ¶
type TaskSample struct { ID ids.TaskSampleID `gorm:"primaryKey"` TaskID ids.TaskID `gorm:"not null"` Index string `gorm:"not null"` Input string `gorm:"not null"` Output string `gorm:"not null"` Type TaskSampleType `gorm:"not null"` }
type TaskSampleType ¶
type TaskSampleType int
const ( TaskSampleTypeSystem TaskSampleType = iota + 1 TaskSampleTypeUser )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.