public

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx *gin.Context, model *models.Subject)

Get takes the subject model and returns its response view object

func GetAllSubjects

func GetAllSubjects(ctx *gin.Context, model *models.Course)

GetAllSubjects takes the course model and returns its response view object.

func GetCourses

func GetCourses(ctx *gin.Context, courses []*models.Course)

GetCourses takes the course models and returns its response view objects

func GetInstitutes

func GetInstitutes(ctx *gin.Context, institutes []models.Institute)

GetInstitutes takes the institute models and returns its response view objects

func GetOfferings

func GetOfferings(ctx *gin.Context, IDs []string, offerings []*models.Offering)

GetOfferings takes the offering models and returns its response view objects

It also takes the IDs of the professors for each offering, since that information is not stored in the DTO. Besides that, it sorts the offerings to rank most interesting ones on top Since this is a public endpoint, results size is limited to 3

func GetRelations

func GetRelations(ctx *gin.Context, model *models.Subject, weak, strong []models.Subject)

GetRelations takes the subject model and its weak and strong successors It returns the view object for its graph

func GetStats

func GetStats(
	ctx *gin.Context,
	statsChan <-chan *views.StatsEntry,
)

GetStats takes the calculated statistics and sets the output object as the response

Types

This section is empty.

Jump to

Keyboard shortcuts

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