database

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResult

func CreateResult()

func DeleteContest

func DeleteContest()

func DeleteProblem

func DeleteProblem()

func DeleteResult

func DeleteResult()

func DeleteUser

func DeleteUser()

func EndDatabase

func EndDatabase(db *sql.DB)

func InitDatabase

func InitDatabase() *sql.DB

func RegisterProblem

func RegisterProblem(problem settings.Problems)

func RegisterResult

func RegisterResult(res Result_table)

func RegisterUser

func RegisterUser(Student_id string, Student_password string)

Types

type Contest_table

type Contest_table struct {
	Title      string
	Start_time string
	End_time   string
}

func ReadContest

func ReadContest() Contest_table

type LimitDescription

type LimitDescription struct {
	Description string
}

type Problem_table

type Problem_table struct {
	ProblemNum              string
	ProblemTitle            string
	ProblemScore            int
	ProblemLimitTime        int
	ProblemLimitMemory      int
	ProblemDescription      string
	ProblemLimitationInput  string
	ProblemLimitationOutput string
	ProblemInitialCode      string

	ProblemLimitationDescription []LimitDescription
	TestCase                     []TCase
	SecretCase                   []SCase
}

func ReadProblem

func ReadProblem() []Problem_table

type Result_table

type Result_table struct {
	Student_id  string
	Problem_num int
	Result      int
}

func ReadResult

func ReadResult() []Result_table

type SCase

type SCase struct {
	Input  string
	Output string
}

type TCase

type TCase struct {
	Input       string
	Output      string
	Description string
}

type User_table

type User_table struct {
	Student_id       []string
	Student_password []string
}

func ReadUser

func ReadUser() []User_table

Jump to

Keyboard shortcuts

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