Documentation ¶
Index ¶
- Variables
- type Article
- type ArticleRepo
- type ArticleUsecase
- func (uc *ArticleUsecase) Create(ctx context.Context, article *Article) (p *Article, err error)
- func (uc *ArticleUsecase) Delete(ctx context.Context, id int64) error
- func (uc *ArticleUsecase) Get(ctx context.Context, id int64) (p *Article, err error)
- func (uc *ArticleUsecase) List(ctx context.Context) (ps []*Article, err error)
- func (uc *ArticleUsecase) Update(ctx context.Context, id int64, article *Article) (p *Article, err error)
- type Comment
- type CommentRepo
- type CommentUsecase
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewArticleUsecase, NewCommentUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type ArticleRepo ¶
type ArticleRepo interface { ListArticle(ctx context.Context) ([]*Article, error) GetArticle(ctx context.Context, id int64) (*Article, error) CreateArticle(ctx context.Context, article *Article) (p *Article, err error) UpdateArticle(ctx context.Context, id int64, article *Article) (p *Article, err error) DeleteArticle(ctx context.Context, id int64) error }
type ArticleUsecase ¶
type ArticleUsecase struct {
// contains filtered or unexported fields
}
func NewArticleUsecase ¶
func NewArticleUsecase(repo ArticleRepo, logger log.Logger) *ArticleUsecase
func (*ArticleUsecase) Delete ¶
func (uc *ArticleUsecase) Delete(ctx context.Context, id int64) error
type CommentRepo ¶
type CommentUsecase ¶
type CommentUsecase struct {
// contains filtered or unexported fields
}
func NewCommentUsecase ¶
func NewCommentUsecase(repo CommentRepo, logger log.Logger) *CommentUsecase
func (*CommentUsecase) AddComment ¶
func (*CommentUsecase) DeleteComment ¶
func (uc *CommentUsecase) DeleteComment(ctx context.Context, id int64) error
func (*CommentUsecase) GetComments ¶
Click to show internal directories.
Click to hide internal directories.