Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { VerifyCredential(email string, password string) interface{} CreateUser(user dto.RegisterDTO) entity.User FindByEmail(email string) entity.User IsDuplicateEmail(email string) bool }
interface use case need to do for authen
func NewAuthService ¶
func NewAuthService(userRep repository.UserRepository) AuthService
type BookService ¶
type BookService interface { Insert(b dto.BookCreateDTO) entity.Book Update(b dto.BookUpdateDTO) entity.Book Delete(b entity.Book) All() []entity.Book FinById(bookID uint64) entity.Book IsAllowedToEdit(userID string, bookID uint64) bool }
func NewBookService ¶
func NewBookService(bookRepo repository.BookRepository) BookService
type JWTService ¶
type JWTService interface { GenerateToken(UserID string) string ValidateToken(token string) (*jwt.Token, error) }
A contract of what jwtService can do
func NewJWTService ¶
func NewJWTService() JWTService
type UserService ¶
type UserService interface { Update(user dto.UserUpdateDTO) entity.User Profile(userID string) entity.User }
func NewUserService ¶
func NewUserService(userRepo repository.UserRepository) UserService
Click to show internal directories.
Click to hide internal directories.