Documentation ¶
Index ¶
- type BlogPostController
- func (c *BlogPostController) Add(ctx context.Context, token string, title string, content string, ...) ([]byte, *errors.CustomError)
- func (c *BlogPostController) Delete(ctx context.Context, id int64, token string) *errors.CustomError
- func (c *BlogPostController) GetAll(ctx context.Context) ([]byte, *errors.CustomError)
- func (c *BlogPostController) GetByID(ctx context.Context, id int64) ([]byte, *errors.CustomError)
- func (c *BlogPostController) Search(ctx context.Context, search string) ([]byte, *errors.CustomError)
- func (c BlogPostController) Update(ctx context.Context, id int64, token string, title string, content string) ([]byte, *errors.CustomError)
- type IBlogPostController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlogPostController ¶
type BlogPostController struct {
UseCase blogpostusecase.IBlogPostUseCase
}
func New ¶
func New() *BlogPostController
func (*BlogPostController) Add ¶
func (c *BlogPostController) Add(ctx context.Context, token string, title string, content string, categoryIds []int64) ([]byte, *errors.CustomError)
func (*BlogPostController) Delete ¶
func (c *BlogPostController) Delete(ctx context.Context, id int64, token string) *errors.CustomError
func (*BlogPostController) GetAll ¶
func (c *BlogPostController) GetAll(ctx context.Context) ([]byte, *errors.CustomError)
func (*BlogPostController) GetByID ¶
func (c *BlogPostController) GetByID(ctx context.Context, id int64) ([]byte, *errors.CustomError)
func (*BlogPostController) Search ¶
func (c *BlogPostController) Search(ctx context.Context, search string) ([]byte, *errors.CustomError)
type IBlogPostController ¶
type IBlogPostController interface { Add(ctx context.Context, token string, blogPost *entities.BlogPost) ([]byte, *errors.CustomError) GetAll(ctx context.Context) ([]byte, *errors.CustomError) GetByID(ctx context.Context, id int64) ([]byte, *errors.CustomError) Update(ctx context.Context, id int64, token string, title string, content string) ([]byte, *errors.CustomError) Delete(ctx context.Context, id int64, token string) *errors.CustomError Search(ctx context.Context, search string) ([]byte, *errors.CustomError) }
Click to show internal directories.
Click to hide internal directories.