Documentation ¶
Index ¶
- type Post
- func (p *Post) CheckHealthReadiness(ctx context.Context) error
- func (p *Post) CreateCommentOnPost(ctx context.Context, req *model.CreateCommentRequest) error
- func (p *Post) CreateNewPost(ctx context.Context, requestBody *model.CreateNewPostRequest) error
- func (p *Post) GetCommentsByPostID(ctx context.Context, req *model.GetCommentRequest) (*model.CommentWithMetadata, error)
- func (p *Post) GetDetailPost(ctx context.Context, id int64) (*model.UserPostResponse, error)
- func (p *Post) GetListPost(ctx context.Context, params *model.GetListRequest) (*model.UserPostWithMetadata, error)
- func (p *Post) GetListPostByMe(ctx context.Context, params *model.GetListRequest) (*model.UserPostWithMetadata, error)
- func (p *Post) LikeOrDislikePost(ctx context.Context, id int64) error
- func (p *Post) UpdateTitleOrStatus(ctx context.Context, requestBody *model.UpdatePostRequest) error
- type UsecaseI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct {
// contains filtered or unexported fields
}
func NewPost ¶
func NewPost(repoPost repository.PostI, repoComment repository.CommentI, logger kitlog.Logger) *Post
func (*Post) CreateCommentOnPost ¶
func (*Post) CreateNewPost ¶
func (*Post) GetCommentsByPostID ¶
func (p *Post) GetCommentsByPostID(ctx context.Context, req *model.GetCommentRequest) (*model.CommentWithMetadata, error)
func (*Post) GetDetailPost ¶
func (*Post) GetListPost ¶
func (p *Post) GetListPost(ctx context.Context, params *model.GetListRequest) (*model.UserPostWithMetadata, error)
func (*Post) GetListPostByMe ¶
func (p *Post) GetListPostByMe(ctx context.Context, params *model.GetListRequest) (*model.UserPostWithMetadata, error)
func (*Post) LikeOrDislikePost ¶
func (*Post) UpdateTitleOrStatus ¶
type UsecaseI ¶
type UsecaseI interface { GetListPost(ctx context.Context, params *model.GetListRequest) (*model.UserPostWithMetadata, error) GetListPostByMe(ctx context.Context, params *model.GetListRequest) (*model.UserPostWithMetadata, error) GetDetailPost(ctx context.Context, id int64) (*model.UserPostResponse, error) CreateNewPost(ctx context.Context, requestBody *model.CreateNewPostRequest) error UpdateTitleOrStatus(ctx context.Context, requestBody *model.UpdatePostRequest) error GetCommentsByPostID(ctx context.Context, req *model.GetCommentRequest) (*model.CommentWithMetadata, error) CreateCommentOnPost(ctx context.Context, req *model.CreateCommentRequest) error LikeOrDislikePost(ctx context.Context, id int64) error CheckHealthReadiness(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.