service

package
v0.0.0-...-d6a3c1e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAuthService

type IAuthService interface {
	VerifyCredential(email string, password string) interface{}
	CreateUser(user dto.RegisterDTO) entity.User
	FindByEmail(email string) entity.User
	IsDuplicateEmail(email string) bool
}

func AuthService

func AuthService(userRep repository.IUserRepository) IAuthService

type IBlogService

type IBlogService interface {
	Insert(b dto.BlogCreateDTO) (entity.Blog, error)
	Update(b dto.BlogUpdateDTO) entity.Blog
	Delete(b entity.Blog)
	All() []dto.BlogListDTO
	FindByID(blogID uint64) entity.Blog
	IsAllowedToEdit(userID string, blogID uint64) bool
}

func BlogService

func BlogService(blogRepo repository.IBlogRepository) IBlogService

type IJWTService

type IJWTService interface {
	GenerateToken(userID string) string
	ValidateToken(token string) (*jwt.Token, error)
}

func JWTService

func JWTService() IJWTService

type IUserService

type IUserService interface {
	Update(user dto.UserUpdateDTO) entity.User
	Profile(userID string) entity.User
}

func UserService

func UserService(userRepo repository.IUserRepository) IUserService

Jump to

Keyboard shortcuts

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