service

package
v0.0.0-...-d16b773 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleService

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

func NewArticleService

func NewArticleService(articleRepo *data.ArticleRepo) *ArticleService

func (*ArticleService) Create

func (s *ArticleService) Create(article *models.Article) error

type CategoryService

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

func NewCategoryService

func NewCategoryService(categoryRepo *data.CategoryRepo) *CategoryService

func (*CategoryService) Create

func (s *CategoryService) Create(category *models.Category) error

func (*CategoryService) DeletedById

func (s *CategoryService) DeletedById(id uint) error

func (*CategoryService) ExistByIdAndUserId

func (s *CategoryService) ExistByIdAndUserId(id, userId uint) (bool, error)

func (*CategoryService) FindByUserIdAndIsDeleted

func (s *CategoryService) FindByUserIdAndIsDeleted(userId uint, isDeleted int32) ([]*models.Category, error)

func (*CategoryService) GetById

func (s *CategoryService) GetById(id uint) (*models.Category, error)

func (*CategoryService) GetByUserAndTitle

func (s *CategoryService) GetByUserAndTitle(userId uint, title string) (*models.Category, error)

func (*CategoryService) UnDeletedById

func (s *CategoryService) UnDeletedById(id uint) error

func (*CategoryService) Update

func (s *CategoryService) Update(category *models.Category) error

type UserService

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

func NewUserService

func NewUserService(userRepo *data.UserRepo) *UserService

func (*UserService) Create

func (s *UserService) Create(user *models.User) error

func (*UserService) ExistByEmail

func (s *UserService) ExistByEmail(email string) (has bool, err error)

func (*UserService) GetByEmail

func (s *UserService) GetByEmail(email string) (*models.User, error)

Jump to

Keyboard shortcuts

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