Versions in this module Expand all Collapse all v1 v1.4.19 May 8, 2024 v1.4.18 May 2, 2024 v1.4.17 Jan 11, 2024 v1.4.16 Dec 28, 2023 v1.4.15 Dec 28, 2023 v1.4.14 Dec 18, 2023 v1.4.13 Dec 7, 2023 v1.4.12 Nov 19, 2023 v1.4.11 Nov 8, 2023 v1.4.10 Sep 30, 2023 v1.4.9 Sep 21, 2023 v1.4.8 Sep 13, 2023 v1.4.7 Aug 30, 2023 Changes in this version + const CSVLb + const CSVSep + const CourseNotFoundErrMsg + const ForbiddenCourseAccess + const ForbiddenGenericErrMsg + const ForbiddenStreamAccess + const PageNotFoundErrMsg + const StreamNotFoundErrMsg + var CookieSecure = false + var EntityExpr = regexp.MustCompile("&#?[A-Za-z0-9]+;") + var ErrMeiliNotConfigured = errors.New("meilisearch is not configured") + var ErrUnbalancedTags = errors.New("unbalanced tags") + var Loc *time.Location + var TagExpr = regexp.MustCompile("<(/?)([A-Za-z0-9]+).*?>") + func Admin(c *gin.Context) + func AdminOfCourse(c *gin.Context) + func AdminToken(daoWrapper dao.DaoWrapper) gin.HandlerFunc + func AtLeastLecturer(c *gin.Context) + func CourseListContains(courses []model.Course, courseId uint) bool + func ErrorHandler(c *gin.Context) + func GetCacheItem(key string) (interface{}, bool) + func InitBranding() + func InitContext(daoWrapper dao.DaoWrapper) gin.HandlerFunc + func InitCourse(wrapper dao.DaoWrapper) gin.HandlerFunc + func InitCronService() + func InitStream(wrapper dao.DaoWrapper) gin.HandlerFunc + func InitStreamRealtime() realtime.SubscriptionMiddleware + func LoadConfig() + func LoggedIn(c *gin.Context) + func MaskEmail(email string) (masked string, err error) + func MaskLogin(login string) (masked string) + func OwnerOfCourse(c *gin.Context) + func RenderErrorPage(c *gin.Context, status int, message string) + func SearchSubtitles(q string, streamID uint) *meilisearch.SearchResponse + func SetCacheItem(key string, value interface{}, ttl time.Duration) + func SetSignedPlaylists(s *model.Stream, user *model.User, allowDownloading bool) error + func SetTemplateExecutor(e TemplateExecutor) + func StartSession(c *gin.Context, data *SessionData) + func Truncate(input string, length int) string + func TruncateHtml(buf []byte, maxlen int, ellipsis string) ([]byte, error) + func UploadLRZ(file string) error + type Branding struct + Description string + Title string + var BrandingCfg Branding + type CanonicalURL struct + func NewCanonicalURL(url string) CanonicalURL + func (c CanonicalURL) Course(year int, term string, slug string) string + func (c CanonicalURL) Info(version string) string + func (c CanonicalURL) Login() string + func (c CanonicalURL) Root() string + func (c CanonicalURL) Stream(slug string, id uint, version string) string + type Config struct + Alerts ... + Auths struct{ ... } + Campus struct{ ... } + CanonicalURL string + Db struct{ ... } + IngestBase string + JWTKey *string + Ldap struct{ ... } + Lrz struct{ ... } + Mail MailConfig + Meili ... + Paths struct{ ... } + Saml ... + VodURLTemplate string + VoiceService ... + WebUrl string + WorkerToken string + var Cfg Config + func (Config) GetJWTKey() *rsa.PrivateKey + func (c Config) GetMeiliClient() (*meilisearch.Client, error) + type CronService struct + var Cron *CronService + func (c *CronService) AddFunc(name string, fn func(), spec string) error + func (c *CronService) ListCronJobs() []string + func (c *CronService) Run() + func (c *CronService) RunJob(name string) + type DebugTemplateExecutor struct + Patterns []string + func (e DebugTemplateExecutor) ExecuteTemplate(w io.Writer, name string, data interface{}) error + type ErrorPageData struct + Branding Branding + Message string + Status int + type ExportDataEntry struct + Data []dao.Stat + Name string + XName string + YName string + type ExportStatsContainer struct + func (e ExportStatsContainer) AddDataEntry(entry *ExportDataEntry) ExportStatsContainer + func (e ExportStatsContainer) ExportCsv() string + func (e ExportStatsContainer) ExportJson() []gin.H + type JWTClaims struct + SamlSubjectID *string + UserID uint + type JWTPlaylistClaims struct + CourseID string + Download bool + Playlist string + StreamID string + UserID uint + type MailConfig struct + MaxMailsPerMinute int + SMIMECert string + SMIMEKey string + Sender string + Server string + type Mailer struct + Dao dao.DaoWrapper + MaxMailsPerMinute int + func NewMailer(dao dao.DaoWrapper, maxMailsPerMinute int) *Mailer + func (m *Mailer) Run() + type MeiliExporter struct + func NewMeiliExporter(d dao.DaoWrapper) *MeiliExporter + func (m *MeiliExporter) Export() + func (m *MeiliExporter) SetIndexSettings() + type MeiliStream struct + CourseID uint + CourseName string + Description string + ID uint + Name string + TeachingTerm string + Year int + type MeiliSubtitles struct + ID string + StreamID uint + Text string + TextNext string + TextPrev string + Timestamp int64 + type PresetUtility interface + FetchCameraPresets func(context.Context) + FetchLHPresets func(model.LectureHall) + ProvideCamera func(model.CameraType, string) (camera.Cam, error) + TakeSnapshot func(model.CameraPreset) + UsePreset func(model.CameraPreset) + func NewPresetUtility(lectureHallDao dao.LectureHallsDao) PresetUtility + type ReleaseTemplateExecutor struct + Template *template.Template + func (e ReleaseTemplateExecutor) ExecuteTemplate(w io.Writer, name string, data interface{}) error + type RequestError struct + CustomMessage string + Err error + Status int + func (r RequestError) Error() string + func (r RequestError) ToResponse() gin.H + type SessionData struct + SamlSubjectID *string + Userid uint + type TUMLiveContext struct + Course *model.Course + SamlSubjectID *string + Stream *model.Stream + User *model.User + func (c *TUMLiveContext) UserIsAdmin() bool + type TemplateExecutor interface + ExecuteTemplate func(w io.Writer, name string, data interface{}) error