createCategory

package
v0.0.0-...-9de6353 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepositoryCreate

func NewRepositoryCreate(db *gorm.DB) *repository

func NewServiceCreate

func NewServiceCreate(repository Repository) *service

Types

type CategoryAlreadyExistsError

type CategoryAlreadyExistsError struct {
	// contains filtered or unexported fields
}

func (*CategoryAlreadyExistsError) Error

type CreateCategoryError

type CreateCategoryError struct {
	// contains filtered or unexported fields
}

func (*CreateCategoryError) Error

func (e *CreateCategoryError) Error() string

type InputCreateCategory

type InputCreateCategory struct {
	ParentID string `json:"parent_id" validate:""`
	Name     string `json:"name" validate:"required"`
	Slug     string `json:"slug" validate:""`
}

type Repository

type Repository interface {
	CreateCategoryRepository(input *model.Category) (*model.Category, error)
}

type Service

type Service interface {
	CreateCategoryService(input *InputCreateCategory) (*model.Category, error)
}

Jump to

Keyboard shortcuts

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