tum

package
v1.4.22 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 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 CourseInfo

type CourseInfo struct {
	CourseName       string `json:"courseName"`
	TumOnlineId      string `json:"tumOnlineID"`
	NumberAttendees  int    `json:"numberAttendees"`
	TeachingTerm     string `json:"teachingTerm"`
	TeachingTermFull string `json:"teachingTermFull"`
}

func GetCourseInformation

func GetCourseInformation(courseID string, token string) (CourseInfo, error)

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