Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { CreateBook(book *entities.Book) (*entities.Book, error) DeleteBook(bookID string) error GetBook(bookID string) (*entities.Book, error) GetBooks() ([]*entities.Book, error) GetBooksByID(bookIDList []string) ([]*entities.Book, error) }
func NewRepo ¶
func NewRepo(db *pgx.Conn) Repository
type Service ¶
type Service interface { InsertBook(book *entities.Book) (*entities.Book, error) DeleteBook(bookID string) error GetBook(bookID string) (*entities.Book, error) GetBooks() ([]*entities.Book, error) GetBooksByID(bookIDList []string) ([]*entities.Book, error) }
func NewService ¶
func NewService(r Repository) Service
Click to show internal directories.
Click to hide internal directories.