Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BUCKET_PREFIX = "utdnebula_"

Prefix used for cloud storage bucket names

Variables

This section is empty.

Functions

func FilterQuery

func FilterQuery[F any](urlValues url.Values) (bson.M, error)

FilterQuery converts URL query parameters into a MongoDB BSON query filter.

It validates that each query parameter corresponds to a field in type F that is marked as queryable.

Returns an error if:

  • A query parameter key is not defined in the struct
  • A field exists but is not marked as queryable

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"`
	URL                      string                    `bson:"url" json:"url"`
}

Academic Calendar type Must also be updated in api-tools/parser/academicCalendars.go

type AcademicCalendarDropDeadlines

type AcademicCalendarDropDeadlines struct {
	WithoutW                  string `bson:"without_w" json:"without_w"`
	UndergradApprovalRequired string `bson:"undergrad_approval_required" json:"undergrad_approval_required"`
	GraduateWithdrawlEnds     string `bson:"graduate_withdrawl_ends" json:"graduate_withdrawl_ends"`
}

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 AcademicProgram

type AcademicProgram struct {
	Title           string   `bson:"name" json:"name"`
	School          string   `bson:"school" json:"school"`
	DegreeOptions   []Degree `bson:"degree_options" json:"degree_options"`
	AreasOfInterest []string `bson:"areas_of_interest" json:"areas_of_interest"`
}

type AcademicSession

type AcademicSession struct {
	Name       string    `bson:"name" json:"name" queryable:""`
	Start_date time.Time `bson:"start_date" json:"start_date" queryable:""`
	End_date   time.Time `bson:"end_date" json:"end_date" queryable:""`
}

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 AnnualFinancialReport

type AnnualFinancialReport struct {
	OperatingRevenues    Table[float64] `bson:"operating_revenues" json:"operating_revenues"`
	OperatingExpenses    Table[float64] `bson:"operating_expenses" json:"operating_expenses"`
	NonoperatingRevenues Table[float64] `bson:"nonoperating_revenues" json:"nonoperating_revenues"`
	BeginningNetPosition float64        `bson:"beginning_net_position" json:"beginning_net_position"`
	EndingNetPosition    float64        `bson:"ending_net_position" json:"ending_net_position"`
}

Annual Financial Report (AFR) Structs

type Assistant

type Assistant struct {
	First_name string `bson:"first_name" json:"first_name" queryable:""`
	Last_name  string `bson:"last_name" json:"last_name" queryable:""`
	Role       string `bson:"role" json:"role" queryable:""`
	Email      string `bson:"email" json:"email" queryable:""`
}

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 AuxiliaryExpensesValues

type AuxiliaryExpensesValues struct {
	EstimatedIncome  float64 `bson:"estimated_income" json:"estimated_income"`
	BudgetedExpenses float64 `bson:"budgeted_expenses" json:"budgeted_expenses"`
	DebtService      float64 `bson:"debt_service" json:"debt_service"`
	Other            float64 `bson:"other" json:"other"`
}

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 Budget

type Budget struct {
	Id                    string                 `bson:"_id" json:"_id"`
	OperatingBudget       *OperatingBudget       `bson:"operating_budget" json:"operating_budget"`
	AnnualFinancialReport *AnnualFinancialReport `bson:"annual_financial_report" json:"annual_financial_report"`
}

Top level container for both the planned budget and the actual annual financial report

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 Club

type Club struct {
	Slug         string              `json:"slug"`
	ID           string              `json:"id"`
	Name         string              `json:"name"`
	Description  string              `json:"description"`
	Tags         []string            `json:"tags"`
	ProfileImage string              `json:"profile_image"`
	UpdatedAt    time.Time           `json:"updated_at"`
	Officers     []map[string]string `json:"officers"`
	Contacts     []Contact           `json:"contacts"`
}

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 CollectionRequirementIntermediate

type CollectionRequirementIntermediate struct {
	Name     string     `bson:"name"`
	Required int        `bson:"required"`
	Options  []bson.Raw `bson:"options"`
}

type ConsentRequirement

type ConsentRequirement struct {
	Requirement `bson:",inline" json:",inline"`
	Granter     string `bson:"granter" json:"granter"`
}

func NewConsentRequirement

func NewConsentRequirement(granter string) *ConsentRequirement

type Contact

type Contact struct {
	Platform string `json:"platform"`
	URL      string `json:"url"`
}

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" queryable:""`
	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 Degree

type Degree struct {
	Level          string `bson:"level" json:"level"`
	PublicUrl      string `bson:"public_url" json:"public_url"`
	CipCode        string `bson:"cip_code" json:"cip_code"`
	StemDesignated bool   `bson:"stem_designated" json:"stem_designated"`
	JointProgram   bool   `bson:"joint_program" json:"joint_program"`
}

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 DiscountQueryParams

type DiscountQueryParams struct {
	Category string `form:"category"`
	Business string `form:"business"`
	Address  string `form:"address"`
	Discount string `form:"discount"`
	Q        string `form:"q"`
}

func (*DiscountQueryParams) HasFields

func (params *DiscountQueryParams) HasFields() bool

func (*DiscountQueryParams) TrimSpace

func (params *DiscountQueryParams) TrimSpace()

TrimSpace sanitizes all of fields of the discount query params

type EmailAttachment

type EmailAttachment struct {
	Name string `json:"name" binding:"required"`
	Data []byte `json:"data" binding:"required"`
}

type EmailRequest

type EmailRequest struct {
	From        string            `json:"from,omitempty"`
	To          []string          `json:"to" binding:"required,dive,email"`
	Subject     string            `json:"subject" binding:"required"`
	Body        string            `json:"body" binding:"required"`
	Attachments []EmailAttachment `json:"attachments,omitempty"`
	Embeds      []EmailAttachment `json:"embeds,omitempty"`
}

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 FundsValues

type FundsValues struct {
	EstimatedIncome  float64 `bson:"estimated_income" json:"estimated_income"`
	BudgetedExpenses float64 `bson:"budgeted_expenses" json:"budgeted_expenses"`
}

type FuzzySearchConfig

type FuzzySearchConfig struct {
	Field      string
	MaxEdits   int
	BoostScore int
}

The configuration for fuzzy searches

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 GradeData

type GradeData struct {
	Id                string  `bson:"_id" json:"_id"`
	GradeDistribution [14]int `bson:"grade_distribution" json:"grade_distribution"`
}

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 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 Location

type Location struct {
	Building string `bson:"building" json:"building" queryable:""`
	Room     string `bson:"room" json:"room" queryable:""`
	Map_uri  string `bson:"map_uri" json:"map_uri" queryable:""`
}

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" queryable:""`
	End_date     time.Time `bson:"end_date" json:"end_date" queryable:""`
	Meeting_days []string  `bson:"meeting_days" json:"meeting_days" queryable:""`
	Start_time   string    `bson:"start_time" json:"start_time" queryable:""`
	End_time     string    `bson:"end_time" json:"end_time" queryable:""`
	Modality     string    `bson:"modality" json:"modality" queryable:""`
	Location     Location  `bson:"location" json:"location" queryable:""`
}

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"`
	PublicUrl       string    `bson:"public_url" json:"public_url"`
}

Minimized form of storage.ObjectAttrs for cloud storage

func ObjectInfoFromAttrs

func ObjectInfoFromAttrs(attrs *storage.ObjectAttrs, url string) 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 OperatingBudget

type OperatingBudget struct {
	OperatingRevenues                Table[float64]                                `bson:"operating_revenues" json:"operating_revenues"`
	OperatingExpenses                Table[float64]                                `bson:"operating_expenses" json:"operating_expenses"`
	BudgetedNonoperatingRevenues     Table[float64]                                `bson:"budgeted_nonoperating_revenues" json:"budgeted_nonoperating_revenues"`
	SalariesDoeAndInstructionalAdmin Table[SalariesDoeAndInstructionalAdminValues] `bson:"salaries_doe_and_instructional_admin" json:"salaries_doe_and_instructional_admin"`
	ServiceDepartmentsFunds          *Table2[FundsValues]                          `bson:"service_departments_funds" json:"service_departments_funds"`
	DesignatedFunds                  *Table2[FundsValues]                          `bson:"designated_funds" json:"designated_funds"`
	BudgetedTuitionAndStudentFees    Table2[float64]                               `bson:"budgeted_tuition_and_student_fees" json:"budgeted_tuition_and_student_fees"`
	AuxiliaryExpenses                *Table2[AuxiliaryExpensesValues]              `bson:"auxiliary_expenses" json:"auxiliary_expenses"`
	RestrictedFunds                  *Table2[FundsValues]                          `bson:"restricted_funds" json:"restricted_funds"`
}

Operating Budget Structs

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" queryable:""`
	Profile_uri  string               `bson:"profile_uri" json:"profile_uri" queryable:""`
	Image_uri    string               `bson:"image_uri" json:"image_uri" queryable:""`
	Office_hours []Meeting            `bson:"office_hours" json:"office_hours" queryable:""`
	Sections     []primitive.ObjectID `bson:"sections" json:"sections"`
}

type Requirement

type Requirement struct {
	Type string `bson:"type" json:"type"`
}

type Room

type Room struct {
	Room     string `bson:"room" json:"room"`
	Capacity int    `bson:"capacity" json:"capacity"`
}

type RoomEvents

type RoomEvents[T any] struct {
	Room   string `bson:"room" json:"room"`
	Events []T    `bson:"events" json:"events"`
}

type Row

type Row[T any] struct {
	Label string `bson:"label" json:"label"`
	Value T      `bson:"value" json:"value"`
}

type SalariesDoeAndInstructionalAdminValues

type SalariesDoeAndInstructionalAdminValues struct {
	Total                         float64 `bson:"total" json:"total"`
	FacultySalaries               float64 `bson:"faculty_salaries" json:"faculty_salaries"`
	DepartmentalOperatingExpenses float64 `bson:"departmental_operating_expenses" json:"departmental_operating_expenses"`
	InstructionalAdministration   float64 `bson:"instructional_administration" json:"instructional_administration"`
}

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" queryable:""`
	Professors            []primitive.ObjectID   `bson:"professors" json:"professors"`
	Teaching_assistants   []Assistant            `bson:"teaching_assistants" json:"teaching_assistants" queryable:""`
	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" queryable:""`
	Core_flags            []string               `bson:"core_flags" json:"core_flags" queryable:""`
	Syllabus_uri          string                 `bson:"syllabus_uri" json:"syllabus_uri" queryable:""`
	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"`
	Total_students int               `bson:"total_students" json:"total_students" schema:"total_students"`
}

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 SimpleProfessor struct {
	First_name string `bson:"first_name" json:"first_name" schema:"first_name"`
	Last_name  string `bson:"last_name" json:"last_name" schema:"last_name"`
}

type SingleBuildingEvents

type SingleBuildingEvents[T any] struct {
	Building string          `bson:"building" json:"building"`
	Rooms    []RoomEvents[T] `bson:"rooms" json:"rooms"`
}

type Table

type Table[T any] struct {
	Name  string   `bson:"name" json:"name"`
	Rows  []Row[T] `bson:"rows" json:"rows"`
	Total T        `bson:"total" json:"total"`
}

Table utils

type Table2

type Table2[T any] struct {
	Name  string     `bson:"name" json:"name"`
	Rows  []Table[T] `bson:"rows" json:"rows"`
	Total T          `bson:"total" json:"total"`
}

type TypedGradeData

type TypedGradeData struct {
	Id   string `bson:"_id" json:"_id"`
	Data []struct {
		Type              string  `bson:"type" json:"type"`
		GradeDistribution [14]int `bson:"grade_distribution" json:"grade_distribution"`
	} `bson:"data" json:"data"`
}

Jump to

Keyboard shortcuts

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