Documentation ¶
Index ¶
- func Get(ctx *gin.Context, model *models.Subject)
- func GetAllSubjects(ctx *gin.Context, model *models.Course)
- func GetCourses(ctx *gin.Context, courses []*models.Course)
- func GetInstitutes(ctx *gin.Context, institutes []models.Institute)
- func GetOfferingComments(ctx *gin.Context, comments []*models.Comment)
- func GetOfferingsWithStats(ctx *gin.Context, IDs []string, offerings []*models.Offering, ...)
- func GetProfessors(ctx *gin.Context, professors []*models.Professor)
- func GetRelations(ctx *gin.Context, model *models.Subject, weak, strong []models.Subject)
- func GetSiblingSubjects(ctx *gin.Context, siblings []*views.SubjectSibling)
- func GetStats(ctx *gin.Context, stats *models.Stats)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllSubjects ¶
GetAllSubjects takes the course model and returns its response view object.
func GetCourses ¶
GetCourses takes the course models and returns its response view objects
func GetInstitutes ¶
GetInstitutes takes the institute models and returns its response view objects
func GetOfferingComments ¶ added in v1.6.0
GetOfferingComments takes the comments models and returns their view response objects
It also sorts comments to display most upvoted (and least downvoted) on top
func GetOfferingsWithStats ¶ added in v1.6.0
func GetOfferingsWithStats( ctx *gin.Context, IDs []string, offerings []*models.Offering, stats []*models.OfferingStats, limit int, )
GetOfferingsWithStats takes the offering models and returns their view response objects
It also takes IDs of the professors for each offering (given that this information is not stored in the model directly) Finally, it sorts the offerings to display most interesting ones on top
func GetProfessors ¶ added in v1.5.5
GetProfessors takes the professor models and returns its response view objects
func GetRelations ¶
GetRelations takes the subject model and its weak and strong successors It returns the view object for its graph
func GetSiblingSubjects ¶ added in v1.5.9
func GetSiblingSubjects(ctx *gin.Context, siblings []*views.SubjectSibling)
GetSiblingSubjects is a dummy function that returns the sibling subjects
Types ¶
This section is empty.