commentservice

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(comment repoiface.CommentRepository) *Service

func (*Service) CountComment4User

func (s *Service) CountComment4User(ctx context.Context, userId int64) (int64, error)

func (*Service) CountComment4Video

func (s *Service) CountComment4Video(ctx context.Context, videoId int64) (int64, error)

func (*Service) CreateComment

func (s *Service) CreateComment(ctx context.Context, c *comment.Comment) (cmt *comment.Comment, err error)

func (*Service) GetCommentById

func (s *Service) GetCommentById(ctx context.Context, commentId int64) (cmt *comment.Comment, err error)

func (*Service) ListChildComment

func (s *Service) ListChildComment(ctx context.Context, commentId int64, limit, offset int) ([]*comment.Comment, error)

func (*Service) ListComment4Video

func (s *Service) ListComment4Video(ctx context.Context, videoId int64, limit, offset int) ([]*comment.Comment, error)

func (*Service) RemoveComment

func (s *Service) RemoveComment(ctx context.Context, userId, commentId int64) error

Jump to

Keyboard shortcuts

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