tum

package
v1.11.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLdapBadAuth = errors.New("login failed")

Functions

func FetchCourses

func FetchCourses(daoWrapper dao.DaoWrapper) func()

FetchCourses updates the enrollments of all relevant courses

func FindStudentsForCourses

func FindStudentsForCourses(courses []model.Course, usersDao dao.UsersDao)

func FindUserWithEmail

func FindUserWithEmail(email string) (*model.User, error)

func GetCurrentSemester

func GetCurrentSemester() (year int, term string)

func GetEventsForCourses

func GetEventsForCourses(courses []model.Course, daoWrapper dao.DaoWrapper)

func PrefetchCourses

func PrefetchCourses(dao dao.DaoWrapper) func()

PrefetchCourses loads all courses from tumonline, so we can use them in the course creation from search

Types

type Catalog added in v1.9.0

type Catalog struct {
	Dao dao.DaoWrapper
}

Catalog is TUMOnline as the course creation page uses it: the course list PrefetchCourses copies into the search backend, and the lectures and enrolments fetched for a course once it exists.

func (Catalog) SearchCourses added in v1.9.0

func (c Catalog) SearchCourses(q string, limit int64) ([]search.PrefetchedCourse, error)

SearchCourses searches the courses PrefetchCourses stored, as v1's searchCourse did.

func (Catalog) SyncCourse added in v1.9.0

func (c Catalog) SyncCourse(course model.Course)

SyncCourse fetches a new course's lectures and enrolments from TUMOnline in the background, and refreshes the courses it knows of, as v1's createCourse did.

type Event

type Event struct {
	Start               time.Time
	End                 time.Time
	SingleEventID       uint
	SingleEventTypeName string
	Status              string
	RoomCode            string
	RoomName            string
}

type LdapResp

type LdapResp struct {
	UserId    string
	LrzIdent  string
	FirstName string
	LastName  *string
}

func LoginWithTumCredentials

func LoginWithTumCredentials(username string, password string) (*LdapResp, error)

LoginWithTumCredentials returns student id if login and password match, err otherwise

Jump to

Keyboard shortcuts

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