Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCommentNotFound = errors.New("comment not found")
)
Functions ¶
func NewPGCommentDAO ¶
func NewRedisCommentDAO ¶
func NewRedisCommentDAO(client *rediskit.RedisClient, baseDAO CommentDAO) *redisCommentDAO
Types ¶
type Comment ¶
type Comment struct {
ID uuid.UUID
VideoID string
Content string
CreatedAt time.Time
UpdatedAt time.Time
}
func NewFakeComment ¶
func (*Comment) ToProto ¶
func (c *Comment) ToProto() *pb.CommentInfo
type CommentDAO ¶
type CommentDAO interface {
ListByVideoID(ctx context.Context, videoID string, limit, offset int) ([]*Comment, error)
Create(ctx context.Context, comment *Comment) (uuid.UUID, error)
Update(ctx context.Context, comment *Comment) error
Delete(ctx context.Context, id uuid.UUID) error
DeleteByVideoID(ctx context.Context, videoID string) error
}
Click to show internal directories.
Click to hide internal directories.