blogpostcontroller

package
v0.0.0-...-71fa18b Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 (*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)

func (BlogPostController) Update

func (c BlogPostController) Update(ctx context.Context, id int64, token string, title string, content 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)
}

Jump to

Keyboard shortcuts

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