lab

package
v0.0.0-...-2b700e0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabDir = "./labs"
)

Variables

This section is empty.

Functions

func Commit

func Commit(labId string) error

Types

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   deadline.Deadlines     `yaml:"deadlines" json:"deadlines"`
	Network     ipv4net                `yaml:"network" json:"network"`
	Description string                 `yaml:"description" json:"description"`
	Init        command.Commands       `yaml:"init" json:"init"`
	Clear       command.Commands       `yaml:"clear" json:"clear"`
	CheckPoints checkpoint.CheckPoints `yaml:"checkpoints" json:"checkpoints"`
	Contents    content.Contents       `yaml:"contents" json:"contents"`
}

func GetLab

func GetLab(labId string) (lab Lab, err error)

func GetLabs

func GetLabs() (labs []Lab, err error)

func (Lab) ContainPromission

func (lab Lab) ContainPromission(group string) bool

func (Lab) Judge

func (lab Lab) Judge(userdata user.User, env map[string]string, contents content.Contents) (result checkpoint.CheckPoints, stdout, stderr bytes.Buffer, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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