util

package
v0.0.0-...-d3289b9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(e error)

Check: error handling

func EnableCors

func EnableCors(w *http.ResponseWriter, r *http.Request)

EnableCors: headers needed to enable cors

func GetStringInBetween

func GetStringInBetween(str, start, end string) (string, error)

GetStringInBetween: get substrinf from 2 (potentially) diffeent delimiters

Types

type DBQuestion

type DBQuestion struct {
	ID           int
	Title        string
	Desc         string
	Difficulty   string
	Category     string
	Constraint   string
	FunctionName string
	Parameters   []string
	Tests        []DBQuestion_Test
}

func DBGetJSON

func DBGetJSON(endpoint string) DBQuestion

DBGetJSON: Get's Info from DB and converts it into a DBQuestion Struct

type DBQuestion_Test

type DBQuestion_Test struct {
	Arguments []string
	Output    string
}

Questions (Database)

type StudentExamAnswer

type StudentExamAnswer struct {
	QID                 int
	StudentExamAnswerID int
	Code                string
	Tests               []StudentExamAnswer_Test
	Comment             string
	Id                  int
}

type StudentExamAnswer_Test

type StudentExamAnswer_Test struct {
	Pass          bool
	Points        int
	StudentOutput string
}

StudentExamAnswers

Jump to

Keyboard shortcuts

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