courses

package
v0.0.0-...-6cc2e2a Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCourse

func CreateCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)

CreateCourse - creates a new course in the course DB

func DeleteCourse

func DeleteCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)

DeleteCourse - deletes the course witht the given shorthand

func GetCourse

func GetCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)

GetCourse - gets course with the given course shorthand

func GetCourses

func GetCourses(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)

GetCourses - retieves all the courses from the DB

func UpdateCourse

func UpdateCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)

UpdateCourse - update the course witht the given shorthand

Types

type Course

type Course struct {
	ShortHand     string     `json:"shorthand" bson:"shorthand"`
	Course        string     `json:"course" bson:"-"`
	Name          string     `json:"name" bson:"name"`
	Prerequisites [][]string `json:"prerequisites" bson:"prerequisites"`
	CoRequisites  [][]string `json:"corequisites" bson:"corequisites"`
	TermsOffered  []string   `json:"terms_offered" bson:"terms_offered"`
}

func (*Course) SetCourse

func (c *Course) SetCourse()

SetCourse - set the course field of Course struct to shorthand

Jump to

Keyboard shortcuts

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