Documentation ¶
Index ¶
- type ArticlePublisher
- func (s *ArticlePublisher) GetArticleBySlug(ctx context.Context, slug string) (*models.Article, error)
- func (s *ArticlePublisher) ListArticles(ctx context.Context, author, tag string, limit, offset int64) ([]*models.Article, error)
- func (s *ArticlePublisher) UnpublishArticle(ctx context.Context, slug string) error
- func (s *ArticlePublisher) UpdateArticle(ctx context.Context, slug string, article *models.Article) error
- func (s *ArticlePublisher) WriteArticle(ctx context.Context, article *models.Article) error
- type CommentPublisher
- func (s *CommentPublisher) DeleteComment(ctx context.Context, ID string) error
- func (s *CommentPublisher) GetCommentByID(ctx context.Context, ID string) (*models.Comment, error)
- func (s *CommentPublisher) ListComments(ctx context.Context, article string) ([]*models.Comment, error)
- func (s *CommentPublisher) WriteComment(ctx context.Context, comment *models.Comment) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticlePublisher ¶
type ArticlePublisher struct {
// contains filtered or unexported fields
}
func NewArticlePublisher ¶
func NewArticlePublisher(articleRepository *repositories.ArticleRepository) *ArticlePublisher
func (*ArticlePublisher) GetArticleBySlug ¶
func (*ArticlePublisher) ListArticles ¶
func (*ArticlePublisher) UnpublishArticle ¶
func (*ArticlePublisher) UpdateArticle ¶
type CommentPublisher ¶
type CommentPublisher struct {
// contains filtered or unexported fields
}
func NewCommentPublisher ¶
func NewCommentPublisher(commentRepository *repositories.CommentRepository) *CommentPublisher
func (*CommentPublisher) DeleteComment ¶
func (*CommentPublisher) GetCommentByID ¶
func (*CommentPublisher) ListComments ¶
Click to show internal directories.
Click to hide internal directories.