Documentation ¶
Index ¶
- Variables
- func DetectContestID(taskID string) (string, 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 ¶
func DetectContestID ¶
Types ¶
type Contest ¶
type Contest struct { ID string `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 string `gorm:"primaryKey"` ContestID string `gorm:"not null"` TaskID string `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 TaskInfo ¶
func (TaskInfo) CanRestore ¶
func (TaskInfo) MoveFromTemp ¶ added in v0.0.4
func (TaskInfo) RequiredStore ¶
func (TaskInfo) RestoreFiles ¶
func (TaskInfo) StoreFiles ¶
type TaskSample ¶
type TaskSampleType ¶
type TaskSampleType int
const ( TaskSampleTypeSystem TaskSampleType = iota + 1 TaskSampleTypeUser )
Click to show internal directories.
Click to hide internal directories.