Documentation
¶
Index ¶
- Constants
- func FilterQuery[F any](c *gin.Context) (bson.M, error)
- type APIResponse
- type AcademicCalendar
- type AcademicCalendarDropDeadlines
- type AcademicCalendarSession
- type AcademicSession
- type AcademicSessionSections
- type Assistant
- type AstraEvent
- type Autocomplete
- type BasicCourse
- type BasicProfessor
- type BucketInfo
- type BuildingRooms
- type ChoiceRequirement
- type CollectionRequirement
- type CollectionRequirementIntermediate
- type ConsentRequirement
- type CoreRequirement
- type Course
- type CourseNumberAcademicSessions
- type CourseRequirement
- type DiscountProgram
- type Event
- type GPARequirement
- type GradeData
- type HoursRequirement
- type Letters
- type LimitRequirement
- type Location
- type MajorRequirement
- type MapBuilding
- type MazevoEvent
- type Meeting
- type MinorRequirement
- type MultiBuildingEvents
- type ObjectInfo
- type ObjectSignedURLBody
- type Organization
- type OtherRequirement
- type Professor
- type Requirement
- type Room
- type RoomEvents
- type Section
- type SectionNumberProfessors
- type SectionRequirement
- type SectionWithTime
- type SimpleAcademicSession
- type SimpleProfessor
- type SingleBuildingEvents
- type TypedGradeData
Constants ¶
View Source
const BUCKET_PREFIX = "utdnebula_"
Prefix used for cloud storage bucket names
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIResponse ¶
type APIResponse[T any] struct { Status int `json:"status"` Message string `json:"message"` Data T `json:"data"` }
Type for all API responses
type AcademicCalendar ¶
type AcademicCalendar struct {
Id string `bson:"_id" json:"_id"`
Timeline string `bson:"timeline" json:"timeline"`
Sessions []AcademicCalendarSession `bson:"sessions" json:"sessions"`
EnrollmentOpens string `bson:"enrollment_opens" json:"enrollment_opens"`
SchedulePlannerAvailable string `bson:"schedule_planner_available" json:"schedule_planner_available"`
OnlineAddSwapEnds string `bson:"online_add_swap_ends" json:"online_add_swap_ends"`
LastReadmission string `bson:"last_readmission" json:"last_readmission"`
LastFromWaitlist string `bson:"last_from_waitlist" json:"last_from_waitlist"`
MidtermsDue string `bson:"midterms_due" json:"midterms_due"`
UniversityClosings [][]string `bson:"university_closings" json:"university_closings"`
NoClasses [][]string `bson:"no_classes" json:"no_classes"`
}
Academic Calendar type
type AcademicCalendarSession ¶
type AcademicCalendarSession struct {
Name string `bson:"name" json:"name"`
LastRegistration string `bson:"last_registration" json:"last_registration"`
Begin string `bson:"begin" json:"begin"`
LateRegistration []string `bson:"late_registration" json:"late_registration"`
CensusDay string `bson:"census_day" json:"census_day"`
DropDeadlines AcademicCalendarDropDeadlines `bson:"drop_deadlines" json:"drop_deadlines"`
End string `bson:"end" json:"end"`
ReadingDays []string `bson:"reading_days" json:"reading_days"`
Exams []string `bson:"exams" json:"exams"`
FinalGradingPeriod []string `bson:"final_grading_period" json:"final_grading_period"`
}
type AcademicSession ¶
type AcademicSessionSections ¶
type AcademicSessionSections struct {
Academic_session SimpleAcademicSession `bson:"academic_session" json:"academic_session" schema:"academic_session"`
Sections []SectionNumberProfessors `bson:"sections" json:"sections" schema:"sections"`
}
type AstraEvent ¶
type AstraEvent struct {
ActivityName *string `bson:"activity_name" json:"activity_name"`
MeetingType *string `bson:"meeting_type" json:"meeting_type"`
StartDate *string `bson:"start_date" json:"start_date"`
EndDate *string `bson:"end_date" json:"end_date"`
CurrentState *string `bson:"current_state" json:"current_state"`
NotAllowedUsageMask *float64 `bson:"not_allowed_usage_mask" json:"not_allowed_usage_mask"`
UsageColor *string `bson:"usage_color" json:"usage_color"`
Capacity *float64 `bson:"capacity" json:"capacity"`
}
type Autocomplete ¶
type Autocomplete struct {
Course_numbers []CourseNumberAcademicSessions `bson:"course_numbers" json:"course_numbers" schema:"course_numbers"`
Subject_prefix string `bson:"subject_prefix" json:"subject_prefix" schema:"subject_prefix"`
}
type BasicCourse ¶
type BasicCourse struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Subject_prefix string `bson:"subject_prefix" json:"subject_prefix" queryable:""`
Course_number string `bson:"course_number" json:"course_number" queryable:""`
Title string `bson:"title" json:"title" queryable:""`
Credit_hours string `bson:"credit_hours" json:"credit_hours" queryable:""`
Class_level string `bson:"class_level" json:"class_level" queryable:""`
Activity_type string `bson:"activity_type" json:"activity_type" queryable:""`
Catalog_year string `bson:"catalog_year" json:"catalog_year" queryable:""`
}
type BasicProfessor ¶
type BasicProfessor struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
First_name string `bson:"first_name" json:"first_name" queryable:""`
Last_name string `bson:"last_name" json:"last_name" queryable:""`
Email string `bson:"email" json:"email" queryable:""`
Phone_number string `bson:"phone_number" json:"phone_number" queryable:""`
Office Location `bson:"office" json:"office"`
Office_hours []Meeting `bson:"office_hours" json:"office_hours"`
}
type BucketInfo ¶
type BucketInfo struct {
Name string `bson:"name" json:"name"`
Created time.Time `bson:"created" json:"created"`
Updated time.Time `bson:"updated" json:"updated"`
Contents []string `bson:"contents" json:"contents"`
}
Minimized form of storage.BucketAttrs for cloud storage
func BucketInfoFromAttrs ¶
func BucketInfoFromAttrs(attrs *storage.BucketAttrs) BucketInfo
type BuildingRooms ¶
type BuildingRooms struct {
Building string `bson:"building" json:"building"`
Rooms []Room `bson:"rooms" json:"rooms"`
Lat float64 `bson:"lat" json:"lat"`
Lng float64 `bson:"lng" json:"lng"`
}
Rooms type
type ChoiceRequirement ¶
type ChoiceRequirement struct {
Requirement `bson:",inline" json:",inline"`
Choices *CollectionRequirement `bson:"choices" json:"choices"`
}
func NewChoiceRequirement ¶
func NewChoiceRequirement(choices *CollectionRequirement) *ChoiceRequirement
type CollectionRequirement ¶
type CollectionRequirement struct {
Requirement `bson:",inline" json:",inline"`
Name string `bson:"name" json:"name"`
Required int `bson:"required" json:"required"`
Options []interface{} `bson:"options" json:"options"`
}
func NewCollectionRequirement ¶
func NewCollectionRequirement(name string, required int, options []interface{}) *CollectionRequirement
func (*CollectionRequirement) UnmarshalBSON ¶
func (cr *CollectionRequirement) UnmarshalBSON(data []byte) error
type ConsentRequirement ¶
type ConsentRequirement struct {
Requirement `bson:",inline" json:",inline"`
Granter string `bson:"granter" json:"granter"`
}
func NewConsentRequirement ¶
func NewConsentRequirement(granter string) *ConsentRequirement
type CoreRequirement ¶
type CoreRequirement struct {
Requirement `bson:",inline" json:",inline"`
CoreFlag string `bson:"core_flag" json:"core_flag"`
Hours int `bson:"hours" json:"hours"`
}
func NewCoreRequirement ¶
func NewCoreRequirement(coreFlag string, hours int) *CoreRequirement
type Course ¶
type Course struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Subject_prefix string `bson:"subject_prefix" json:"subject_prefix" queryable:""`
Course_number string `bson:"course_number" json:"course_number" queryable:""`
Title string `bson:"title" json:"title" queryable:""`
Description string `bson:"description" json:"description"`
Enrollment_reqs string `bson:"enrollment_reqs" json:"enrollment_reqs"`
School string `bson:"school" json:"school" queryable:""`
Credit_hours string `bson:"credit_hours" json:"credit_hours" queryable:""`
Class_level string `bson:"class_level" json:"class_level" queryable:""`
Activity_type string `bson:"activity_type" json:"activity_type" queryable:""`
Grading string `bson:"grading" json:"grading" queryable:""`
Internal_course_number string `bson:"internal_course_number" json:"internal_course_number" queryable:""`
Prerequisites *CollectionRequirement `bson:"prerequisites" json:"prerequisites"`
Corequisites *CollectionRequirement `bson:"corequisites" json:"corequisites"`
Co_or_pre_requisites *CollectionRequirement `bson:"co_or_pre_requisites" json:"co_or_pre_requisites"`
Sections []primitive.ObjectID `bson:"sections" json:"sections"`
Lecture_contact_hours string `bson:"lecture_contact_hours" json:"lecture_contact_hours" queryable:""`
Laboratory_contact_hours string `bson:"laboratory_contact_hours" json:"laboratory_contact_hours" queryable:""`
Offering_frequency string `bson:"offering_frequency" json:"offering_frequency" queryable:""`
Catalog_year string `bson:"catalog_year" json:"catalog_year" queryable:""`
Attributes interface{} `bson:"attributes" json:"attributes"`
}
type CourseNumberAcademicSessions ¶
type CourseNumberAcademicSessions struct {
Academic_sessions []AcademicSessionSections `bson:"academic_sessions" json:"academic_sessions" schema:"academic_sessions"`
Course_number string `bson:"course_number" json:"course_number" schema:"course_number"`
Title string `bson:"title" json:"title" schema:"title"`
}
type CourseRequirement ¶
type CourseRequirement struct {
Requirement `bson:",inline" json:",inline"`
ClassReference string `bson:"class_reference" json:"class_reference"`
MinimumGrade string `bson:"minimum_grade" json:"minimum_grade"`
}
func NewCourseRequirement ¶
func NewCourseRequirement(classRef string, minGrade string) *CourseRequirement
type DiscountProgram ¶
type DiscountProgram struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Category string `bson:"category" json:"category"`
Business string `bson:"business" json:"business"`
Address string `bson:"address" json:"address"`
Phone string `bson:"phone" json:"phone"`
Email string `bson:"email" json:"email"`
Website string `bson:"website" json:"website"`
Discount string `bson:"discount" json:"discount"`
}
type Event ¶
type Event struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Summary string `bson:"summary" json:"summary"`
Location string `bson:"location" json:"location"`
StartTime time.Time `bson:"start_time" json:"start_time"`
EndTime time.Time `bson:"end_time" json:"end_time"`
Description string `bson:"description" json:"description"`
EventType []string `bson:"event_type" json:"event_type"`
TargetAudience []string `bson:"target_audience" json:"target_audience"`
Topic []string `bson:"topic" json:"topic"`
EventTags []string `bson:"event_tags" json:"event_tags"`
EventWebsite string `bson:"event_website" json:"event_website"`
Department []string `bson:"department" json:"department"`
ContactName string `bson:"contact_name" json:"contact_name"`
ContactEmail string `bson:"contact_email" json:"contact_email"`
ContactPhoneNumber string `bson:"contact_phone_number" json:"contact_phone_number"`
}
type GPARequirement ¶
type GPARequirement struct {
Requirement `bson:",inline" json:",inline"`
Minimum float64 `bson:"minimum" json:"minimum"`
Subset string `bson:"subset" json:"subset"`
}
func NewGPARequirement ¶
func NewGPARequirement(min float64, subset string) *GPARequirement
type HoursRequirement ¶
type HoursRequirement struct {
Requirement `bson:",inline" json:",inline"`
Required int `bson:"required" json:"required"`
Options []*CourseRequirement `bson:"options" json:"options"`
}
func NewHoursRequirement ¶
func NewHoursRequirement(required int, options []*CourseRequirement) *HoursRequirement
type Letters ¶
type Letters struct {
Date string `bson:"date" json:"date"`
Letters string `bson:"letters" json:"letters"`
}
Letters type
type LimitRequirement ¶
type LimitRequirement struct {
Requirement `bson:",inline" json:",inline"`
MaxHours int `bson:"max_hours" json:"max_hours"`
}
func NewLimitRequirement ¶
func NewLimitRequirement(maxHours int) *LimitRequirement
type MajorRequirement ¶
type MajorRequirement struct {
Requirement `bson:",inline" json:",inline"`
Major string `bson:"major" json:"major"`
}
func NewMajorRequirement ¶
func NewMajorRequirement(major string) *MajorRequirement
type MapBuilding ¶
type MapBuilding struct {
Name *string `bson:"name" json:"name"`
Acronym *string `bson:"acronym" json:"acronym"`
Lat *float64 `bson:"lat" json:"lat"`
Lng *float64 `bson:"lng" json:"lng"`
}
Map location type
type MazevoEvent ¶
type MazevoEvent struct {
EventName *string `bson:"eventName" json:"eventName"`
OrganizationName *string `bson:"organizationName" json:"organizationName"`
ContactName *string `bson:"contactName" json:"contactName"`
SetupMinutes *float64 `bson:"setupMinutes" json:"setupMinutes"`
DateTimeStart *string `bson:"dateTimeStart" json:"dateTimeStart"`
DateTimeEnd *string `bson:"dateTimeEnd" json:"dateTimeEnd"`
TeardownMinutes *float64 `bson:"teardownMinutes" json:"teardownMinutes"`
StatusDescription *string `bson:"statusDescription" json:"statusDescription"`
StatusColor *string `bson:"statusColor" json:"statusColor"`
}
type Meeting ¶
type Meeting struct {
Start_date time.Time `bson:"start_date" json:"start_date"`
End_date time.Time `bson:"end_date" json:"end_date"`
Meeting_days []string `bson:"meeting_days" json:"meeting_days"`
Start_time string `bson:"start_time" json:"start_time"`
End_time string `bson:"end_time" json:"end_time"`
Modality string `bson:"modality" json:"modality"`
Location Location `bson:"location" json:"location"`
}
type MinorRequirement ¶
type MinorRequirement struct {
Requirement `bson:",inline" json:",inline"`
Minor string `bson:"minor" json:"minor"`
}
func NewMinorRequirement ¶
func NewMinorRequirement(minor string) *MinorRequirement
type MultiBuildingEvents ¶
type MultiBuildingEvents[T any] struct { Date string `bson:"date" json:"date"` Buildings []SingleBuildingEvents[T] `bson:"buildings" json:"buildings"` }
Event hierarchy
type ObjectInfo ¶
type ObjectInfo struct {
Bucket string `bson:"bucket" json:"bucket"`
Name string `bson:"name" json:"name"`
ContentType string `bson:"content_type" json:"content_type"`
Size int64 `bson:"size" json:"size"`
ContentEncoding string `bson:"content_encoding" json:"content_encoding"`
MD5 []byte `bson:"md5" json:"md5"`
MediaLink string `bson:"media_link" json:"media_link"`
Created time.Time `bson:"created" json:"created"`
Updated time.Time `bson:"updated" json:"updated"`
}
Minimized form of storage.ObjectAttrs for cloud storage
func ObjectInfoFromAttrs ¶
func ObjectInfoFromAttrs(attrs *storage.ObjectAttrs) ObjectInfo
type ObjectSignedURLBody ¶
type ObjectSignedURLBody struct {
Method string `json:"method"` // method to be used with signed URL. For example, PUT
Headers []string `json:"headers"` // headers for signed URL
Expiration string `json:"expiration"` // timestamp for when the signed URL will expire
}
Signed URL request body
type Organization ¶
type Organization struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Title string `bson:"title" json:"title"`
Description string `bson:"description" json:"description"`
Categories []string `bson:"categories" json:"categories"`
President_name string `bson:"president_name" json:"president_name"`
Emails []string `bson:"emails" json:"emails"`
Picture_data string `bson:"picture_data" json:"picture_data"`
}
type OtherRequirement ¶
type OtherRequirement struct {
Requirement `bson:",inline" json:",inline"`
Description string `bson:"description" json:"description"`
Condition string `bson:"condition" json:"condition"`
}
func NewOtherRequirement ¶
func NewOtherRequirement(description, condition string) *OtherRequirement
type Professor ¶
type Professor struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
First_name string `bson:"first_name" json:"first_name" queryable:""`
Last_name string `bson:"last_name" json:"last_name" queryable:""`
Titles []string `bson:"titles" json:"titles" queryable:""`
Email string `bson:"email" json:"email" queryable:""`
Phone_number string `bson:"phone_number" json:"phone_number" queryable:""`
Office Location `bson:"office" json:"office"`
Profile_uri string `bson:"profile_uri" json:"profile_uri"`
Image_uri string `bson:"image_uri" json:"image_uri"`
Office_hours []Meeting `bson:"office_hours" json:"office_hours"`
Sections []primitive.ObjectID `bson:"sections" json:"sections"`
}
type Requirement ¶
type Requirement struct {
Type string `bson:"type" json:"type"`
}
type RoomEvents ¶
type Section ¶
type Section struct {
Id primitive.ObjectID `bson:"_id" json:"_id"`
Section_number string `bson:"section_number" json:"section_number" queryable:""`
Course_reference primitive.ObjectID `bson:"course_reference" json:"course_reference" queryable:""`
Section_corequisites *CollectionRequirement `bson:"section_corequisites" json:"section_corequisites"`
Academic_session AcademicSession `bson:"academic_session" json:"academic_session"`
Professors []primitive.ObjectID `bson:"professors" json:"professors"`
Teaching_assistants []Assistant `bson:"teaching_assistants" json:"teaching_assistants"`
Internal_class_number string `bson:"internal_class_number" json:"internal_class_number" queryable:""`
Instruction_mode string `bson:"instruction_mode" json:"instruction_mode" queryable:""`
Meetings []Meeting `bson:"meetings" json:"meetings"`
Core_flags []string `bson:"core_flags" json:"core_flags"`
Syllabus_uri string `bson:"syllabus_uri" json:"syllabus_uri"`
Grade_distribution []int `bson:"grade_distribution" json:"grade_distribution"`
Attributes interface{} `bson:"attributes" json:"attributes"`
Professor_details *[]BasicProfessor `bson:"professor_details,omitempty" json:"professor_details,omitempty"` // only shows if professor_details was set by the endpoint
Course_details *[]BasicCourse `bson:"course_details,omitempty" json:"course_details,omitempty"` // only shows if course_details was set by the endpoint
}
type SectionNumberProfessors ¶
type SectionNumberProfessors struct {
Professors []SimpleProfessor `bson:"professors" json:"professors" schema:"professors"`
Section_number string `bson:"section_number" json:"section_number" schema:"section_number"`
}
type SectionRequirement ¶
type SectionRequirement struct {
Requirement `bson:",inline" json:",inline"`
SectionReference primitive.ObjectID `bson:"section_reference" json:"section_reference"`
}
func NewSectionRequirement ¶
func NewSectionRequirement(sectionRef primitive.ObjectID) *SectionRequirement
type SectionWithTime ¶
type SectionWithTime struct {
Section primitive.ObjectID `bson:"section" json:"section"`
StartTime string `bson:"start_time" json:"start_time"`
EndTime string `bson:"end_time" json:"end_time"`
}
Event types
type SimpleAcademicSession ¶
type SimpleAcademicSession struct {
Name string `bson:"name" json:"name"`
}
type SimpleProfessor ¶
type SingleBuildingEvents ¶
type SingleBuildingEvents[T any] struct { Building string `bson:"building" json:"building"` Rooms []RoomEvents[T] `bson:"rooms" json:"rooms"` }
type TypedGradeData ¶
Click to show internal directories.
Click to hide internal directories.