submission

package
v0.0.0-...-181bd5f Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 6 Imported by: 0

README

IN PRODUCTION

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSubmissions

func CreateSubmissions(db *mongo.Client, submissions []SubmissionCreate, database_name, collection_name string) error

func DeleteSubmissions

func DeleteSubmissions(db *mongo.Client, submissions []Submission, database_name, collection_name string) error

func UpdateSubmissions

func UpdateSubmissions(db *mongo.Client, submissions []Submission, database_name, collection_name string) error

Types

type Submission

type Submission struct {
	ID       primitive.ObjectID `bson:"_id,omitempty"`
	Student  student.Student    `json:"student"`
	Veredict string             `json:"veredict"`
	Time     string             `json:"time"`
}

TODO : Check how submissions time are made in Pimenta Judge TODO : Decide if veredict gonna be num code or string

func GetSubmissions

func GetSubmissions(db *mongo.Client, database_name, collection_name string) ([]Submission, error)

type SubmissionCreate

type SubmissionCreate struct {
	Student  student.Student `json:"student"`
	Veredict string          `json:"veredict"`
	Time     string          `json:"time"`
}

Jump to

Keyboard shortcuts

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