Documentation ¶
Index ¶
- func ApproveSchedule(w http.ResponseWriter, r *http.Request, draftsCollection *mongo.Collection, ...)
- func GenerateSchedule(w http.ResponseWriter, r *http.Request, draft_schedules *mongo.Collection, ...)
- func GetSchedule(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- func GetSchedules(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- func UpdateSchedule(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
- type Algs1_Request
- type Algs1_Schedule
- type Algs2_Request
- type Capacity
- type Class
- type CourseOffering
- type CoursesWithCapacities
- type Estimate
- type Frontend_Request
- type Schedule
- type Term
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproveSchedule ¶
func ApproveSchedule(w http.ResponseWriter, r *http.Request, draftsCollection *mongo.Collection, previousSchedulesCollection *mongo.Collection)
ApproveSchedule - removes schedule in draft collection and adds it to previous_schedules collection, approving it.
func GenerateSchedule ¶
func GenerateSchedule(w http.ResponseWriter, r *http.Request, draft_schedules *mongo.Collection, users_coll *mongo.Collection, courses_coll *mongo.Collection, classrooms_coll *mongo.Collection, algs1_api string, algs2_api string)
GenerateSchedule - Generates a new schedule TODO: Still waiting for Algs 2 to have proper API response
func GetSchedule ¶
func GetSchedule(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
GetSchedule retrieves a schedule by year
func GetSchedules ¶
func GetSchedules(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
GetSchedules retrieves all schedules from the MongoDB collection
func UpdateSchedule ¶
func UpdateSchedule(w http.ResponseWriter, r *http.Request, collection *mongo.Collection)
UpdateSchedule handles updating an existing schedule
Types ¶
type Algs1_Request ¶
type Algs1_Request struct { Year string `json:"year"` Term string `json:"term"` Professors []users.User `json:"professors"` Courses []CoursesWithCapacities `json:"courses"` Classrooms []classrooms.Classroom `json:"classrooms"` }
type Algs1_Schedule ¶
type Algs1_Schedule struct {
Schedule []CourseOffering `json:"schedule"`
}
type Algs2_Request ¶
type Class ¶
type Class struct { Num string `json:"num"` Building string `json:"building"` Room string `json:"room"` Professor string `json:"professor"` Days []string `json:"days"` NumSeats int `json:"num_seats"` NumEnroll int `json:"num_enroll"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` }
type CourseOffering ¶
type CoursesWithCapacities ¶
type CoursesWithCapacities struct { Course string `json:"course" bson:"course"` Peng bool `json:"peng" bson:"peng"` Prerequisites [][]string `json:"prerequisites" bson:"prerequisites"` CoRequisites [][]string `json:"corequisites" bson:"corequisites"` Pre_enroll int `json:"pre_enroll" bson:"pre_enroll"` Min_enroll int `json:"min_enroll" bson:"min_enroll"` Hours [3]int `json:"hours" bson:"hours"` }
type Frontend_Request ¶
type Term ¶
type Term struct { Term string `json:"term"` Courses []CourseOffering `json:"courses"` }
Click to show internal directories.
Click to hide internal directories.