helpers

package
v1.4.28 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 8 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBookmarkToProto

func ParseBookmarkToProto(b model.Bookmark) *protobuf.Bookmark

ParseBookmarkToProto converts a Bookmark model to its protobuf representation.

func ParseCourseToProto

func ParseCourseToProto(c model.Course, u *model.User) *protobuf.Course

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

func ParseSemesterToProto(semester model.Semester) *protobuf.Semester

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

func ParseStreamToProto(stream model.Stream, downloads []model.DownloadableVod) *protobuf.Stream

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

func ParseUserToProto(u *model.User) *protobuf.User

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.

Jump to

Keyboard shortcuts

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