thread

package
v0.0.0-...-692bca9 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewThreadRepositoryImpl

func NewThreadRepositoryImpl(db *sql.DB) *threadRepositoryImpl

Types

type ThreadRepository

type ThreadRepository interface {
	Insert(ctx context.Context, thread entity.Thread) (err error)

	FindAllWithQueryAndPagination(
		ctx context.Context,
		accessorUserID string,
		query string,
		pageInfo entity.PageInfo,
	) (pagination entity.Pagination[entity.Thread], err error)

	FindAllByCategoryIDWithPagination(
		ctx context.Context,
		accessorUserID string,
		categoryID string,
		pageInfo entity.PageInfo,
	) (pagination entity.Pagination[entity.Thread], err error)

	FindAllByUserIDWithPagination(
		ctx context.Context,
		accessorUserID string,
		UserID string,
		pageInfo entity.PageInfo,
	) (pagination entity.Pagination[entity.Thread], err error)

	FindByID(
		ctx context.Context,
		accessorUserID string,
		ID string,
	) (thread entity.Thread, err error)

	Update(
		ctx context.Context,
		ID string,
		thread entity.Thread,
	) (err error)

	Delete(
		ctx context.Context,
		ID string,
	) (err error)

	FindAllModeratorByThreadID(
		ctx context.Context,
		threadID string,
	) (moderators []entity.Moderator, err error)

	FindAllCommentByThreadID(
		ctx context.Context,
		threadID string,
		pageInfo entity.PageInfo,
	) (pagination entity.Pagination[entity.Comment], err error)

	InsertComment(
		ctx context.Context,
		comment entity.Comment,
	) (err error)

	InsertFollowThread(
		ctx context.Context,
		threadFollow entity.ThreadFollow,
	) (err error)

	DeleteFollowThread(
		ctx context.Context,
		threadFollow entity.ThreadFollow,
	) (err error)

	InsertLike(
		ctx context.Context,
		like entity.Like,
	) (err error)

	DeleteLike(
		ctx context.Context,
		like entity.Like,
	) (err error)

	InsertModerator(
		ctx context.Context,
		moderator entity.Moderator,
	) (err error)

	DeleteModerator(
		ctx context.Context,
		moderator entity.Moderator,
	) (err error)

	IncrementTotalViewer(
		ID string,
	) (err error)

	FindCommentByID(
		ctx context.Context,
		ID string,
	) (comment entity.Comment, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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