task

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: 4 Imported by: 0

README

IN PRODCTION

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTasks

func CreateTasks(db *mongo.Client, tasks []TaskCreate, database_name, collection_name string) error

func DeleteTasks

func DeleteTasks(db *mongo.Client, tasks []Task, database_name, collection_name string) error

func UpdateTasks

func UpdateTasks(db *mongo.Client, tasks []Task, database_name, collection_name string) error

Types

type Task

type Task struct {
	ID        primitive.ObjectID `bson:"_id,omitempty"`
	ExamID    primitive.ObjectID `bson:"examid,omitempty"`
	Title     string             `json:"title"`
	Statement string             `json:"statement"`
	Score     float32            `json:"score"`
	Tags      []string           `json:"tags"`
}

func GetTasks

func GetTasks(db *mongo.Client, database_name, collection_name string) ([]Task, error)

func GetTasksClass

func GetTasksClass(db *mongo.Client, examID primitive.ObjectID, database_name, collection_name string) ([]Task, error)

type TaskCreate

type TaskCreate struct {
	ExamID    primitive.ObjectID `bson:"examid,omitempty"`
	Title     string             `json:"title"`
	Statement string             `json:"statement"`
	Score     float32            `json:"score"`
	Tags      []string           `json:"tags"`
}

Jump to

Keyboard shortcuts

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