Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitServer ¶
func InitServer(dir string)
InitServer initializes structures and starts listening
Types ¶
type Command ¶
type Command struct { Login string `yaml:"login"` //user login Password string `yaml:"password"` //user password - deleted after check Command string `yaml:"command"` //given command - described in protocol.md Contest string `yaml:"contest"` //contest name for commands that need it Round string `yaml:"round"` //round name for commands that need it Task string `yaml:"task"` //task name for commands that need it Data string `yaml:"data"` //additional data like submission code (specified in docs) }
Command holds user command data (unmarshallized from yaml)
type ReturnMessage ¶
type ReturnMessage struct { Status string `yaml:"status"` //status may be "ok" or contains error ContestRanking map[string]uint `yaml:"contest_ranking,omitempty"` //used in contest_ranking Tasks []string `yaml:"tasks,omitempty"` //used in round_ranking Users []string `yaml:"users,omitempty"` //used in round_ranking RoundRanking [][]uint `yaml:"round_ranking,omitempty,flow"` //used in round_ranking Filename string `yaml:"filename,omitempty"` //used in get_task Data string `yaml:"data,omitempty"` //used in get_task, encoded in base64 Submissions [][3]string `yaml:"submissions,omitempty,flow"` //used in list_submissions Submission tasks.Submission `yaml:"submission,omitempty"` //used in get_submission Contests [][2]string `yaml:"contests,omitempty,flow"` //used in list_contests }
ReturnMessage send to client after execute command
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server stores main SOK data
func (*Server) CheckSubmissions ¶
CheckSubmissions read and check submissions from sok/queue
Click to show internal directories.
Click to hide internal directories.