Documentation
¶
Overview ¶
Package helpers provides helper functions for parsing models to protobuf representations.
Package helpers provides helper functions for parsing models to protobuf representations.
Index ¶
- func ParseBookmarkToProto(b model.Bookmark) *protobuf.Bookmark
- func ParseCourseToProto(c model.Course, u *model.User) *protobuf.Course
- func ParseDownloadToProto(download model.DownloadableVod) *protobuf.Download
- func ParseLectureHallToProto(lh *model.LectureHall) *protobuf.LectureHall
- func ParseNotificationToProto(notification model.Notification) *protobuf.UserGroupNotification
- func ParseSemesterToProto(semester model.Semester) *protobuf.Semester
- func ParseServerNotificationToProto(notification model.ServerNotification) *protobuf.ServerNotification
- func ParseStreamProgressToProto(progress model.StreamProgress) *protobuf.StreamProgress
- func ParseStreamToProto(stream model.Stream, downloads []model.DownloadableVod) *protobuf.Stream
- func ParseUserSettingToProto(setting model.UserSetting) *protobuf.UserSetting
- func ParseUserToProto(u *model.User) *protobuf.User
- func ParseVideoSectionToProto(section model.VideoSection) *protobuf.VideoSection
- func UpdateUserSettings(db *gorm.DB, user *model.User, req *protobuf.UpdateUserSettingsRequest) (settings []model.UserSetting, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBookmarkToProto ¶
ParseBookmarkToProto converts a Bookmark model to its protobuf representation.
func ParseCourseToProto ¶
ParseCourseToProto converts a Course model to its protobuf representation.
func ParseDownloadToProto ¶
func ParseDownloadToProto(download model.DownloadableVod) *protobuf.Download
func ParseLectureHallToProto ¶
func ParseLectureHallToProto(lh *model.LectureHall) *protobuf.LectureHall
func ParseNotificationToProto ¶
func ParseNotificationToProto(notification model.Notification) *protobuf.UserGroupNotification
func ParseSemesterToProto ¶
ParseSemesterToProto converts a Semester model to its protobuf representation.
func ParseServerNotificationToProto ¶
func ParseServerNotificationToProto(notification model.ServerNotification) *protobuf.ServerNotification
func ParseStreamProgressToProto ¶
func ParseStreamProgressToProto(progress model.StreamProgress) *protobuf.StreamProgress
ParseStreamProgressToProto converts a StreamProgress model to its protobuf representation.
func ParseStreamToProto ¶
ParseStreamToProto converts a Stream model to its protobuf representation. It returns an error if the conversion of timestamps fails.
func ParseUserSettingToProto ¶
func ParseUserSettingToProto(setting model.UserSetting) *protobuf.UserSetting
ParseUserSettingToProto converts a UserSetting model to its protobuf representation.
func ParseUserToProto ¶
ParseUserToProto converts a User model to its protobuf representation.
func ParseVideoSectionToProto ¶
func ParseVideoSectionToProto(section model.VideoSection) *protobuf.VideoSection
ParseVideoSectionToProto converts a VideoSection model to its protobuf representation.
func UpdateUserSettings ¶
func UpdateUserSettings(db *gorm.DB, user *model.User, req *protobuf.UpdateUserSettingsRequest) (settings []model.UserSetting, err error)
Types ¶
This section is empty.