Documentation ¶
Index ¶
- type IPostService
- type PostService
- func (s *PostService) AddPost(ctx context.Context, post *domain.Post) error
- func (s *PostService) AdminGetPostById(ctx context.Context, id string) (*domain.Post, error)
- func (s *PostService) AdminGetPosts(ctx context.Context, pageDTO dto.PageDTO) ([]*domain.Post, int64, error)
- func (s *PostService) DecreaseCommentCount(ctx context.Context, postId string, cnt int) error
- func (s *PostService) DeletePost(ctx context.Context, id string) error
- func (s *PostService) GetLatestPosts(ctx context.Context, count int64) ([]*domain.Post, error)
- func (s *PostService) GetPosts(ctx context.Context, pageRequest *domain.PostRequest) ([]*domain.Post, int64, error)
- func (s *PostService) GetPunishedPostById(ctx context.Context, id string) (*domain.Post, error)
- func (s *PostService) IncreasePostLikeCount(ctx context.Context, postId string) error
- func (s *PostService) IncreaseVisitCount(ctx context.Context, id string) error
- func (s *PostService) SavePost(ctx context.Context, originalPost *domain.Post, savedPost *domain.Post, ...) error
- func (s *PostService) UpdatePostIsCommentAllowed(ctx context.Context, id string, isCommentAllowed bool) error
- func (s *PostService) UpdatePostIsDisplayed(ctx context.Context, id string, isDisplayed bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPostService ¶
type IPostService interface { GetLatestPosts(ctx context.Context, count int64) ([]*domain.Post, error) GetPosts(ctx context.Context, pageRequest *domain.PostRequest) ([]*domain.Post, int64, error) GetPunishedPostById(ctx context.Context, id string) (*domain.Post, error) IncreaseVisitCount(ctx context.Context, id string) error AdminGetPosts(ctx context.Context, pageDTO dto.PageDTO) ([]*domain.Post, int64, error) AddPost(ctx context.Context, post *domain.Post) error DeletePost(ctx context.Context, id string) error DecreaseCommentCount(ctx context.Context, postId string, cnt int) error AdminGetPostById(ctx context.Context, id string) (*domain.Post, error) UpdatePostIsDisplayed(ctx context.Context, id string, isDisplayed bool) error UpdatePostIsCommentAllowed(ctx context.Context, id string, isCommentAllowed bool) error SavePost(ctx context.Context, originalPost *domain.Post, savedPost *domain.Post, isNewPost bool) error IncreasePostLikeCount(ctx context.Context, postId string) error }
type PostService ¶
type PostService struct {
// contains filtered or unexported fields
}
func NewPostService ¶
func NewPostService(repo repository.IPostRepository, cfgService website_config.Service, countStats service2.ICountStatsService, fileService service3.IFileService) *PostService
func (*PostService) AdminGetPostById ¶
func (*PostService) AdminGetPosts ¶
func (*PostService) DecreaseCommentCount ¶
func (*PostService) DeletePost ¶
func (s *PostService) DeletePost(ctx context.Context, id string) error
func (*PostService) GetLatestPosts ¶
func (*PostService) GetPosts ¶
func (s *PostService) GetPosts(ctx context.Context, pageRequest *domain.PostRequest) ([]*domain.Post, int64, error)
func (*PostService) GetPunishedPostById ¶
func (*PostService) IncreasePostLikeCount ¶
func (s *PostService) IncreasePostLikeCount(ctx context.Context, postId string) error
func (*PostService) IncreaseVisitCount ¶
func (s *PostService) IncreaseVisitCount(ctx context.Context, id string) error
func (*PostService) UpdatePostIsCommentAllowed ¶
func (*PostService) UpdatePostIsDisplayed ¶
Click to show internal directories.
Click to hide internal directories.