Documentation ¶
Index ¶
- Constants
- func Commit(labId string) error
- type CheckPoint
- type CheckPoints
- func (CheckPoints) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (CheckPoints) GormDataType() string
- func (js CheckPoints) GormValue(ctx context.Context, db *gorm.DB) (expr clause.Expr)
- func (c *CheckPoints) Scan(value interface{}) (err error)
- func (c CheckPoints) Value() (value driver.Value, err error)
- type Command
- type Commands
- func (Commands) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Commands) GormDataType() string
- func (js Commands) GormValue(ctx context.Context, db *gorm.DB) (expr clause.Expr)
- func (c *Commands) Scan(value interface{}) (err error)
- func (c Commands) Value() (value driver.Value, err error)
- type Content
- type Contents
- func (Contents) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Contents) GormDataType() string
- func (js Contents) GormValue(ctx context.Context, db *gorm.DB) (expr clause.Expr)
- func (c *Contents) Scan(value interface{}) (err error)
- func (c Contents) Value() (value driver.Value, err error)
- type Deadline
- type Deadlines
- func (Deadlines) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Deadlines) GormDataType() string
- func (js Deadlines) GormValue(ctx context.Context, db *gorm.DB) (expr clause.Expr)
- func (c *Deadlines) Scan(value interface{}) (err error)
- func (c Deadlines) Value() (value driver.Value, err error)
- type Lab
Constants ¶
View Source
const (
LabDir = "./labs"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckPoint ¶
type CheckPoints ¶
type CheckPoints map[string][]CheckPoint
func (CheckPoints) GormDBDataType ¶
func (CheckPoints) GormDataType ¶
func (CheckPoints) GormDataType() string
func (*CheckPoints) Scan ¶
func (c *CheckPoints) Scan(value interface{}) (err error)
type Command ¶
type Command struct { Exec []string `yaml:"exec" json:"exec"` Worker worker `yaml:"worker" json:"worker"` }
type Commands ¶
type Commands []Command
func (Commands) GormDBDataType ¶
func (Commands) GormDataType ¶
type Content ¶
type Content struct { Type contenttype.ContentType `yaml:"type" json:"type"` Name string `yaml:"name" json:"name"` Data string `yaml:"-" json:"data,omitempty"` }
type Contents ¶
type Contents []Content
func (Contents) GormDBDataType ¶
func (Contents) GormDataType ¶
type Deadline ¶
type Deadline struct { Time time.Time `yaml:"time" json:"time"` Score float32 `yaml:"score" json:"score"` }
func (Deadline) MarshalYAML ¶
func (*Deadline) UnmarshalYAML ¶
type Deadlines ¶
type Deadlines []Deadline
func (Deadlines) GormDBDataType ¶
func (Deadlines) GormDataType ¶
type Lab ¶
type Lab struct { ID uint `gorm:"primaryKey" yaml:"-" json:"-"` LabId string `gorm:"unique" yaml:"-" json:"labId"` Promissions []user.Group `gorm:"many2many:lab_promissions" yaml:"promissions" json:"promissions"` Deadlines Deadlines `yaml:"deadlines" json:"deadlines"` Timeout duration `yaml:"timeout" json:"timeout"` Network ipv4net `yaml:"network" json:"network"` Description string `yaml:"description" json:"description"` Init Commands `yaml:"init" json:"init"` Clear Commands `yaml:"clear" json:"clear"` CheckPoints CheckPoints `yaml:"checkpoints" json:"checkpoints"` Contents Contents `yaml:"contents" json:"contents"` }
func (Lab) ContainPromission ¶
Click to show internal directories.
Click to hide internal directories.