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 + var Cache ristretto.Cache + var DB *gorm.DB + var Migrator = newMigrator() + var Progress = NewProgressDao() + func NewCoursesDao() coursesDao + type AllTokensDto struct + UserLrzID string + UserMail string + UserName string + type AuditDao interface + Create func(*model.Audit) error + Find func(limit int, offset int, types ...model.AuditType) (audits []model.Audit, err error) + func NewAuditDao() AuditDao + type BookmarkDao interface + Add func(*model.Bookmark) error + Delete func(uint) error + GetByID func(uint) (model.Bookmark, error) + GetByStreamID func(uint, uint) ([]model.Bookmark, error) + Update func(*model.Bookmark) error + func NewBookmarkDao() BookmarkDao + type CalendarResult struct + CourseName string + Created time.Time + End time.Time + LectureHallName string + Start time.Time + StreamID uint + func (r CalendarResult) IsoCreated() string + func (r CalendarResult) IsoEnd() string + func (r CalendarResult) IsoStart() string + type CameraPresetDao interface + GetDefaultCameraPreset func(lectureHallID uint) (res model.CameraPreset, err error) + func NewCameraPresetDao() CameraPresetDao + type ChatDao interface + AddChatPoll func(poll *model.Poll) error + AddChatPollOptionVote func(pollOptionId uint, userId uint) error + AddMessage func(chat *model.Chat) error + ApproveChat func(id uint) error + CloseActivePoll func(streamID uint) error + DeleteChat func(id uint) error + GetActivePoll func(streamID uint) (model.Poll, error) + GetAllChats func(userID uint, streamID uint) ([]model.Chat, error) + GetChat func(id uint, userID uint) (*model.Chat, error) + GetChatUsers func(streamid uint) ([]model.User, error) + GetChatsByUser func(userID uint) ([]model.Chat, error) + GetPollOptionVoteCount func(pollOptionId uint) (int64, error) + GetPollUserVote func(pollId uint, userId uint) (uint, error) + GetPolls func(streamID uint) ([]model.Poll, error) + GetReactions func(chatID uint) ([]model.ChatReaction, error) + GetVisibleChats func(userID uint, streamID uint) ([]model.Chat, error) + RemoveReactions func(chatID uint) error + ResolveChat func(id uint) error + RetractChat func(id uint) error + ToggleReaction func(userID uint, chatID uint, username string, emoji string) error + func NewChatDao() ChatDao + type CoursesDao interface + AddAdminToCourse func(userID uint, courseID uint) error + CreateCourse func(ctx context.Context, course *model.Course, keep bool) error + DeleteCourse func(course model.Course) + GetAdministeredCoursesByUserId func(ctx context.Context, userid uint, teachingTerm string, year int) (courses []model.Course, err error) + GetAllCourses func() ([]model.Course, error) + GetAllCoursesForSemester func(year int, term string, ctx context.Context) (courses []model.Course) + GetAllCoursesWithTUMIDFromSemester func(ctx context.Context, year int, term string) (courses []model.Course, err error) + GetAvailableSemesters func(c context.Context) []Semester + GetCourseAdmins func(courseID uint) ([]model.User, error) + GetCourseById func(ctx context.Context, id uint) (course model.Course, err error) + GetCourseByShortLink func(link string) (model.Course, error) + GetCourseBySlugYearAndTerm func(ctx context.Context, slug string, term string, year int) (model.Course, error) + GetCourseByToken func(token string) (course model.Course, err error) + GetCourseForLecturerIdByYearAndTerm func(c context.Context, year int, term string, userId uint) ([]model.Course, error) + GetCurrentOrNextLectureForCourse func(ctx context.Context, courseID uint) (model.Stream, error) + GetInvitedUsersForCourse func(course *model.Course) error + GetPublicAndLoggedInCourses func(year int, term string) (courses []model.Course, err error) + GetPublicCourses func(year int, term string) (courses []model.Course, err error) + RemoveAdminFromCourse func(userID uint, courseID uint) error + UnDeleteCourse func(ctx context.Context, course model.Course) error + UpdateCourse func(ctx context.Context, course model.Course) error + UpdateCourseMetadata func(ctx context.Context, course model.Course) + type DaoWrapper struct + AuditDao AuditDao + BookmarkDao BookmarkDao + func NewDaoWrapper() DaoWrapper + type EmailDao interface + Create func(context.Context, *model.Email) error + Delete func(context.Context, uint) error + Get func(context.Context, uint) (model.Email, error) + GetDue func(context.Context, int) ([]model.Email, error) + GetFailed func(context.Context) ([]model.Email, error) + Save func(context.Context, *model.Email) error + func NewEmailDao() EmailDao + type FileDao interface + CountVoDFiles func() (int64, error) + DeleteFile func(id uint) error + GetFileById func(id string) (f model.File, err error) + NewFile func(f *model.File) error + SetThumbnail func(streamId uint, thumb model.File) error + UpdateFile func(id string, f *model.File) error + func NewFileDao() FileDao + type InfoPageDao interface + GetAll func() ([]model.InfoPage, error) + GetById func(uint) (model.InfoPage, error) + New func(*model.InfoPage) error + Update func(uint, *model.InfoPage) error + func NewInfoPageDao() InfoPageDao + type IngestServerDao interface + GetBestIngestServer func() (server model.IngestServer, err error) + GetStreamSlot func(ingestServerID uint) (sn model.StreamName, err error) + GetTranscodedStreamSlot func(ingestServerID uint) (sn model.StreamName, err error) + RemoveStreamFromSlot func(streamID uint) error + SaveIngestServer func(server model.IngestServer) + SaveSlot func(slot model.StreamName) + func NewIngestServerDao() IngestServerDao + type LectureHallsDao interface + CreateLectureHall func(lectureHall model.LectureHall) + DeleteLectureHall func(id uint) error + FindPreset func(lectureHallID string, presetID string) (model.CameraPreset, error) + GetAllLectureHalls func() []model.LectureHall + GetLectureHallByID func(id uint) (model.LectureHall, error) + GetLectureHallByPartialName func(name string) (model.LectureHall, error) + GetStreamsForLectureHallIcal func(userId uint, lectureHalls []uint, all bool) ([]CalendarResult, error) + SaveLectureHall func(lectureHall model.LectureHall) error + SaveLectureHallFullAssoc func(lectureHall model.LectureHall) + SavePreset func(preset model.CameraPreset) error + UnsetDefaults func(lectureHallID string) error + func NewLectureHallsDao() LectureHallsDao + type NotificationsDao interface + AddNotification func(notification *model.Notification) error + DeleteNotification func(id uint) error + GetAllNotifications func() ([]model.Notification, error) + GetNotifications func(target ...model.NotificationTarget) ([]model.Notification, error) + func NewNotificiationsDao() NotificationsDao + type ProgressDao interface + GetProgressesForUser func(userID uint) ([]model.StreamProgress, error) + LoadProgress func(userID uint, streamIDs []uint) (streamProgress []model.StreamProgress, err error) + SaveProgresses func(progresses []model.StreamProgress) error + SaveWatchedState func(progress *model.StreamProgress) error + func NewProgressDao() ProgressDao + type Semester struct + TeachingTerm string + Year int + type ServerNotificationDao interface + CreateServerNotification func(notification model.ServerNotification) error + DeleteServerNotification func(notificationId string) error + GetAllServerNotifications func() ([]model.ServerNotification, error) + GetCurrentServerNotifications func() ([]model.ServerNotification, error) + UpdateServerNotification func(notification model.ServerNotification, id string) error + func NewServerNotificationDao() ServerNotificationDao + type Stat struct + X string + Y int + type StatisticsDao interface + AddStat func(stat model.Stat) error + GetCourseNumLiveViews func(courseID uint) (int, error) + GetCourseNumStudents func(courseID uint) (int64, error) + GetCourseNumVodViews func(courseID uint) (int, error) + GetCourseNumVodViewsPerDay func(courseID uint) ([]Stat, error) + GetCourseStatsHourly func(courseID uint) ([]Stat, error) + GetCourseStatsWeekdays func(courseID uint) ([]Stat, error) + GetStreamNumLiveViews func(streamID uint) (int, error) + GetStudentActivityCourseStats func(courseID uint, live bool) ([]Stat, error) + func NewStatisticsDao() StatisticsDao + type StreamWithCourseAndSubtitles struct + CourseID uint + CourseName string + Description string + ID uint + Name string + Subtitles string + TeachingTerm string + Year int + type StreamsDao interface + AddVodView func(id string) error + ClearWorkersForStream func(stream model.Stream) error + CreateStream func(stream *model.Stream) error + DeleteLectureSeries func(string) error + DeleteSilences func(streamID string) error + DeleteStream func(streamID string) + DeleteStreamsWithTumID func(ids []uint) + DeleteUnit func(id uint) + ExecAllStreamsWithCoursesAndSubtitles func(f func([]StreamWithCourseAndSubtitles)) + GetAllStreams func() ([]model.Stream, error) + GetCurrentLive func(ctx context.Context) (currentLive []model.Stream, err error) + GetCurrentLiveNonHidden func(ctx context.Context) (currentLive []model.Stream, err error) + GetDuePremieresForWorkers func() []model.Stream + GetDueStreamsForWorkers func() []model.Stream + GetLiveStreamsInLectureHall func(lectureHallId uint) ([]model.Stream, error) + GetStreamByID func(ctx context.Context, id string) (stream model.Stream, err error) + GetStreamByKey func(ctx context.Context, key string) (stream model.Stream, err error) + GetStreamByTumOnlineID func(ctx context.Context, id uint) (stream model.Stream, err error) + GetStreamsByIds func(ids []uint) ([]model.Stream, error) + GetStreamsWithWatchState func(courseID uint, userID uint) (streams []model.Stream, err error) + GetTranscodingProgressByVersion func(streamVersion model.StreamVersion, streamId uint) (model.TranscodingProgress, error) + GetUnitByID func(id string) (model.StreamUnit, error) + GetWorkersForStream func(stream model.Stream) ([]model.Worker, error) + RemoveTranscodingProgress func(streamVersion model.StreamVersion, streamId uint) error + SaveCAMURL func(stream *model.Stream, url string) + SaveCOMBURL func(stream *model.Stream, url string) + SaveEndedState func(streamID uint, hasEnded bool) error + SavePRESURL func(stream *model.Stream, url string) + SaveStream func(vod *model.Stream) error + SaveTranscodingProgress func(progress model.TranscodingProgress) error + SaveWorkerForStream func(stream model.Stream, worker model.Worker) error + SetLectureHall func(streamIDs []uint, lectureHallID uint) error + SetStreamLiveNowTimestampById func(streamID uint, liveNowTimestamp time.Time) error + SetStreamNotLiveById func(streamID uint) error + ToggleVisibility func(streamId uint, private bool) error + UnsetLectureHall func(streamIDs []uint) error + UpdateLectureSeries func(model.Stream) error + UpdateSilences func(silences []model.Silence, streamID string) error + UpdateStream func(stream model.Stream) error + UpdateStreamFullAssoc func(vod *model.Stream) error + func NewStreamsDao() StreamsDao + type SubtitlesDao interface + Create func(c context.Context, it *model.Subtitles) error + CreateOrUpsert func(context.Context, *model.Subtitles) error + Delete func(context.Context, uint) error + Get func(context.Context, uint) (model.Subtitles, error) + GetByStreamIDandLang func(context.Context, uint, string) (model.Subtitles, error) + func NewSubtitlesDao() SubtitlesDao + type TokenDao interface + AddToken func(token model.Token) error + DeleteToken func(id string) error + GetAllTokens func() ([]AllTokensDto, error) + GetToken func(token string) (model.Token, error) + TokenUsed func(token model.Token) error + func NewTokenDao() TokenDao + type TranscodingFailureDao interface + All func() ([]model.TranscodingFailure, error) + Delete func(id uint) error + New func(*model.TranscodingFailure) error + func NewTranscodingFailureDao() TranscodingFailureDao + type UploadKeyDao interface + CreateUploadKey func(key string, stream uint, videoType model.VideoType) error + DeleteUploadKey func(key model.UploadKey) error + GetUploadKey func(key string) (model.UploadKey, error) + func NewUploadKeyDao() UploadKeyDao + type UsersDao interface + AddUserSetting func(userSetting *model.UserSetting) error + AddUsersToCourseByTUMIDs func(matrNr []string, courseID uint) error + AreUsersEmpty func(ctx context.Context) (isEmpty bool, err error) + CreateRegisterLink func(ctx context.Context, user model.User) (registerLink model.RegisterLink, err error) + CreateUser func(ctx context.Context, user *model.User) (err error) + DeleteResetKey func(key string) + DeleteUser func(ctx context.Context, uid uint) (err error) + GetAllAdminsAndLecturers func(users *[]model.User) (err error) + GetUserByEmail func(ctx context.Context, email string) (user model.User, err error) + GetUserByID func(ctx context.Context, id uint) (user model.User, err error) + GetUserByResetKey func(key string) (model.User, error) + HasPinnedCourse func(model.User, uint) (bool, error) + IsUserAdmin func(ctx context.Context, uid uint) (res bool, err error) + PinCourse func(user model.User, course model.Course, pin bool) error + SearchUser func(query string) (users []model.User, err error) + UpdateUser func(user model.User) error + UpsertUser func(user *model.User) error + func NewUsersDao() UsersDao + type VideoSectionDao interface + Create func([]model.VideoSection) error + Delete func(uint) error + Get func(uint) (model.VideoSection, error) + GetByStreamId func(uint) ([]model.VideoSection, error) + Update func(*model.VideoSection) error + func NewVideoSectionDao() VideoSectionDao + type VideoSeekDao interface + Add func(streamID string, pos float64) error + Get func(streamID string) ([]model.VideoSeekChunk, error) + func NewVideoSeekDao() VideoSeekDao + type WorkerDao interface + CreateWorker func(worker *model.Worker) error + DeleteWorker func(workerID string) error + GetAliveWorkers func() []model.Worker + GetAllWorkers func() ([]model.Worker, error) + GetWorkerByHostname func(ctx context.Context, hostname string) (model.Worker, error) + GetWorkerByID func(ctx context.Context, workerID string) (model.Worker, error) + SaveWorker func(worker model.Worker) error + func NewWorkerDao() WorkerDao