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.UserCreateDTO) model.User FindEmail(email string) model.User IsDuplicateEmail(email string) bool }
AuthService interface that cover all function needed
func NewAuthService ¶
func NewAuthService(userRep repository.UserRepository) AuthService
NewAuthService is used to create new Instance
type BookService ¶
type BookService interface { InsertBook(book dto.BookCreateDTO) model.Book UpdateBook(book dto.BookUpdateDTO) model.Book DeleteBook(book model.Book) GetAll() []model.Book FindBookByID(id uint64) model.Book AuthorizeForEdit(userID string, bookID uint64) bool }
BookService interface for book service
func NewBookService ¶
func NewBookService(bookRepo repository.BookRepository) BookService
NewBookService is new Instance
type JWTService ¶
type JWTService interface { GenerateToken(userID string) string ValidateToken(token string) (*jwt.Token, error) }
JWTService is used for tokenize header
type UserService ¶
type UserService interface { UpdateUser(user dto.UserUpdateDTO) model.User GetUser(userID string) model.User }
UserService interface for user service
func NewUserService ¶
func NewUserService(userRepo repository.UserRepository) UserService
NewUserService is new Instance
Click to show internal directories.
Click to hide internal directories.