services

package
v0.0.0-...-65dd222 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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 (s *ArticlePublisher) GetArticleBySlug(ctx context.Context, slug string) (*models.Article, error)

func (*ArticlePublisher) ListArticles

func (s *ArticlePublisher) ListArticles(ctx context.Context, author, tag string, limit, offset int64) ([]*models.Article, error)

func (*ArticlePublisher) UnpublishArticle

func (s *ArticlePublisher) UnpublishArticle(ctx context.Context, slug string) error

func (*ArticlePublisher) UpdateArticle

func (s *ArticlePublisher) UpdateArticle(ctx context.Context, slug string, article *models.Article) error

func (*ArticlePublisher) WriteArticle

func (s *ArticlePublisher) WriteArticle(ctx context.Context, article *models.Article) error

type CommentPublisher

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

func NewCommentPublisher

func NewCommentPublisher(commentRepository *repositories.CommentRepository) *CommentPublisher

func (*CommentPublisher) DeleteComment

func (s *CommentPublisher) DeleteComment(ctx context.Context, ID string) error

func (*CommentPublisher) GetCommentByID

func (s *CommentPublisher) GetCommentByID(ctx context.Context, ID string) (*models.Comment, error)

func (*CommentPublisher) ListComments

func (s *CommentPublisher) ListComments(ctx context.Context, article string) ([]*models.Comment, error)

func (*CommentPublisher) WriteComment

func (s *CommentPublisher) WriteComment(ctx context.Context, comment *models.Comment) error

Jump to

Keyboard shortcuts

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