Documentation ¶
Index ¶
- func CreateCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- func DeleteCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- func GetCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- func GetCourses(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- func UpdateCourse(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- type Course
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"` }
Click to show internal directories.
Click to hide internal directories.