Versions in this module Expand all Collapse all v1 v1.0.0 Aug 6, 2023 Changes in this version + type Auth interface + CreateUser func(user entities.User) (int, error) + GenerateToken func(use entities.User) (string, error) + ParseToken func(token string) (int, error) + type AuthService struct + func NewAuthService(repo repository.Auth) *AuthService + func (s *AuthService) CreateUser(user entities.User) (int, error) + func (s *AuthService) GenerateToken(user entities.User) (string, error) + func (s *AuthService) ParseToken(token string) (int, error) + type Book interface + CreateBook func(book entities.Book) (int, error) + DeleteBook func(id int) error + GetBook func(id int) (*entities.Book, error) + GetBooks func() ([]*entities.Book, error) + UpdateBook func(book entities.Book) error + type BookService struct + func NewBookService(repo repository.Book) *BookService + func (s *BookService) CreateBook(book entities.Book) (int, error) + func (s *BookService) DeleteBook(id int) error + func (s *BookService) GetBook(id int) (*entities.Book, error) + func (s *BookService) GetBooks() ([]*entities.Book, error) + func (s *BookService) UpdateBook(book entities.Book) error + type Service struct + func NewService(repo *repository.Repository) *Service