public

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 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 GetProfessors added in v1.5.5

func GetProfessors(ctx *gin.Context, professors []*models.Professor)

GetProfessors takes the professor models and returns its response view objects

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,
	stats *models.Stats,
)

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