Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentService ¶
type CommentService interface { PostComment(ctx context.Context, comment *models.Comment) error GetComments(ctx context.Context, videoID string) ([]models.Comment, error) }
func NewCommentService ¶
func NewCommentService(commentRepo repositories.CommentRepository, pubSubService *pubsubclient.PubSubService) CommentService
type LikeService ¶
type LikeService interface { AddLike(ctx context.Context, like *models.Like) error GetLikes(ctx context.Context, videoID string) ([]models.Like, error) }
func NewLikeService ¶
func NewLikeService(likeRepo repositories.LikeRepository, pubSubService *pubsubclient.PubSubService) LikeService
type Services ¶
type Services struct { UserService *UserService VideoService *VideoService CommentService *CommentService LikeService *LikeService }
Services struct encapsulates all the service layer dependencies TODO: Implement abstraction layer for services
type UserService ¶
type UserService interface { RegisterUser(ctx context.Context, user *models.User) error GetUser(ctx context.Context, id string) (*models.User, error) }
func NewUserService ¶
func NewUserService(userRepo repositories.UserRepository, pubSubService *pubsubclient.PubSubService) UserService
type VideoService ¶
type VideoService interface { UploadVideo(ctx context.Context, video *models.Video) error GetAllVideos(ctx context.Context) ([]models.Video, error) }
func NewVideoService ¶
func NewVideoService(videoRepo repositories.VideoRepository, pubSubService *pubsubclient.PubSubService) VideoService
NewVideoService initializes a new VideoService with the given VideoRepository and PubSubService
Click to show internal directories.
Click to hide internal directories.