helpers

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFriendsFromDatabase

func GetFriendsFromDatabase(ctx *core.Context, user *models.User) ([]*proto.User, error)

func GetTheaterMembers

func GetTheaterMembers(ctx *core.Context, theater *models.Theater) ([]*proto.User, error)

func GetValidationErrorsFromGoValidator

func GetValidationErrorsFromGoValidator(errs url.Values) map[string]interface{}

func NewMediaSourceProto

func NewMediaSourceProto(ms *models.MediaSource) *proto.MediaSource

func NewMemberProto

func NewMemberProto(ctx *core.Context, member *models.TheaterMember) (*proto.User, error)

func NewNotificationProto

func NewNotificationProto(db *mongo.Database, notif *models.Notification) (*proto.Notification, error)

func NewProtoConnection

func NewProtoConnection(conn *models.Connection) *proto.Connection

func NewProtoFriend

func NewProtoFriend(friend *models.Friend) (*proto.Friend, error)

func NewProtoMessage

func NewProtoMessage(db *mongo.Database, ctx context.Context, message *models.Message) (*proto.Message, error)

func NewProtoUser

func NewProtoUser(user *models.User) *proto.User

func NewProtoUserWithState

func NewProtoUserWithState(user *models.User) *proto.User

func NewSubtitleProto

func NewSubtitleProto(subtitle *models.Subtitle) (*proto.Subtitle, error)

func NewTheaterProto

func NewTheaterProto(db *mongo.Database, ctx context.Context, theater *models.Theater) (*proto.Theater, error)

func SendEventToFriends

func SendEventToFriends(ctx *core.Context, event []byte, user *models.User) error

update friends with new event of user

func SendEventToTheaterMembers

func SendEventToTheaterMembers(ctx *core.Context, event []byte, theater *models.Theater) (err error)

func SendEventToUser

func SendEventToUser(ctx *core.Context, event []byte, user *proto.User) (err error)

func SendEventToUsers

func SendEventToUsers(ctx *core.Context, event []byte, users []*proto.User)

Types

This section is empty.

Jump to

Keyboard shortcuts

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