service

package
v0.0.0-...-721231a Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryService

type CategoryService interface {
	Create(ctx context.Context, request web.CategoryCreateRequest) web.CategoryResponse
	Update(ctx context.Context, request web.CategoryUpdateRequest) web.CategoryResponse
	Delete(ctx context.Context, categoryId int)
	FindById(ctx context.Context, categoryId int) web.CategoryResponse
	FindAll(ctx context.Context) []web.CategoryResponse
}

func NewCategoryService

func NewCategoryService(categoryRepository repository.CategoryRepository, DB *sql.DB, validate *validator.Validate) CategoryService

type CategoryServiceImpl

type CategoryServiceImpl struct {
	CategoryRepository repository.CategoryRepository
	DB                 *sql.DB
	Validate           *validator.Validate
}

func (*CategoryServiceImpl) Create

func (*CategoryServiceImpl) Delete

func (services *CategoryServiceImpl) Delete(ctx context.Context, categoryId int)

func (*CategoryServiceImpl) FindAll

func (services *CategoryServiceImpl) FindAll(ctx context.Context) []web.CategoryResponse

func (*CategoryServiceImpl) FindById

func (services *CategoryServiceImpl) FindById(ctx context.Context, categoryId int) web.CategoryResponse

func (*CategoryServiceImpl) Update

Jump to

Keyboard shortcuts

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