schedules

package module
v0.0.0-...-f6610b7 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2017 License: MIT Imports: 17 Imported by: 0

README

schedules

Reimplementation of @srct/schedules in Golang

Documentation

Overview

Ingest of MicroStrategy Exports

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GmuImport

func GmuImport(files []string)

func HandleCalendarGET

func HandleCalendarGET(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCampusCreate

func HandleCampusCreate(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCampusDelete

func HandleCampusDelete(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCampusEdit

func HandleCampusEdit(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

TODO: MAKE WORK

func HandleCampusIndex

func HandleCampusIndex(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCampusShow

func HandleCampusShow(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCourseCreate

func HandleCourseCreate(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCourseDelete

func HandleCourseDelete(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCourseEdit

func HandleCourseEdit(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCourseIndex

func HandleCourseIndex(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleCourseShow

func HandleCourseShow(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleHomeGET

func HandleHomeGET(rw http.ResponseWriter, r *http.Request, ps httprouter.Params)

func HandleSectionCreate

func HandleSectionCreate(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSectionDelete

func HandleSectionDelete(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSectionEdit

func HandleSectionEdit(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSectionIndex

func HandleSectionIndex(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSectionShow

func HandleSectionShow(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSemesterCreate

func HandleSemesterCreate(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSemesterDelete

func HandleSemesterDelete(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSemesterEdit

func HandleSemesterEdit(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSemesterIndex

func HandleSemesterIndex(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSemesterShow

func HandleSemesterShow(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSessionCreate

func HandleSessionCreate(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSessionDelete

func HandleSessionDelete(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSessionEdit

func HandleSessionEdit(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSessionIndex

func HandleSessionIndex(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func HandleSessionShow

func HandleSessionShow(rw http.ResponseWriter, r *http.Request, p httprouter.Params)

func StartServer

func StartServer()

Types

type Campus

type Campus struct {
	gorm.Model
	Slug     string `gorm:"unique_index"`
	Name     string
	Timezone string
}

Campus

type Course

type Course struct {
	gorm.Model
	Slug string `gorm:"unique_index"`
	Name string
}

Course

type Section

type Section struct {
	gorm.Model
	Semester     string    `gorm:"not null"` // Semester the section was taught in
	Course       string    `gorm:"not null"` // Course the section belongs to
	Section      string    `gorm:"not null"` // Section ID within the course (ex: "MGMT 313 001" --> "001")
	CRN          int       `gorm:"not null"` // Course Registration Number
	LinkCode     string    // ?
	ScheduleType string    `gorm:"not null"` // What kind of class this represents (ex: Lecture, Internship, Recitation)
	SectionTitle string    `gorm:"not null"` // Longform Title of the Course (ex: Organizational Behavior)
	Instructor   string    `gorm:"not null"` // Name of the Instructor teaching the course
	StartDate    string    `gorm:"not null"` // Start date of the course
	EndDate      string    `gorm:"not null"` // End date of the course
	Days         string    // Days the section meets
	Times        string    // Times on those days the section meets
	Sessions     []Session `gorm:"ForeignKey:SectionRefer"` // Sessions the section meets at (time/places/etc)
	SecDays      string    // Secondary Days
	SecTimes     string    // Secondary Times
	TertDays     string    // Tertiary Days
	TertTimes    string    // Tertiary Times
	Location     string    `gorm:"not null"` // Where the section meets
	RoomCapacity int       // Seating capacity of the location
	Status       string    `gorm:"not null"`                                         // Open, Waitlisted, Cancelled, Restricted
	CampusName   string    `gorm:"not null"`                                         // Campus Name
	Campus       Campus    `gorm:"ForeignKey:CampusName;AssociationForeignKey:Name"` // What campus the location is on
	XList        bool      // ?
	XListNumber  string    // ?
	SectionNotes string    // Notes from the registrar's office
	MinCRHours   int       // Minimum number of credits that can be applied to the course
	Limit        int       // Seating limit for the course
	Enrolled     int       // Number of enrolled students
	SeatsAvail   int       // Number of available seats
	Waitlist     int       // Number of students on the waitlist
}

Section

func GetSectionByCRN

func GetSectionByCRN(crn int, semester string) (Section, error)

Queries the database for a particular section in a given semester.

func GetSectionsByCRN

func GetSectionsByCRN(crns []int, semester string) ([]Section, error)

Queries the database for a list of sections in a given semester.

type Semester

type Semester struct {
	//gorm.Model
	//Slug string `gorm:"unique_index"`
	Name string
}

Semester

func GetSemesters

func GetSemesters() ([]Semester, error)

type Session

type Session struct {
	gorm.Model
	Campus       Campus
	Location     string
	SectionRefer uint
	Sun          bool `gorm:"default:0"`
	Mon          bool `gorm:"default:0"`
	Tues         bool `gorm:"default:0"`
	Wed          bool `gorm:"default:0"`
	Thurs        bool `gorm:"default:0"`
	Fri          bool `gorm:"default:0"`
	Sat          bool `gorm:"default:0"`
	Start        time.Time
	End          time.Time
}

Session

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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