bookrepository

package
v0.0.0-...-b5756a5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookRepository

type BookRepository interface {
	Save(book model.Book) (model.Book, error)
	Update(book model.Book) (model.Book, error)
	Delete(bookId string) error
	Search(s string) ([]model.Book, error)
	FindById(bookId string) (model.Book, error)
	FindAll() ([]model.Book, error)
}

func NewBookRepositoryImpl

func NewBookRepositoryImpl(Db *gorm.DB) BookRepository

type BookServiceImpl

type BookServiceImpl struct {
	Db *gorm.DB
}

func (*BookServiceImpl) Delete

func (b *BookServiceImpl) Delete(bookId string) error

Delete implements BookRepository.

func (*BookServiceImpl) FindAll

func (b *BookServiceImpl) FindAll() ([]model.Book, error)

FindAll implements BookRepository.

func (*BookServiceImpl) FindById

func (b *BookServiceImpl) FindById(bookId string) (model.Book, error)

FindById implements BookRepository.

func (*BookServiceImpl) Save

func (b *BookServiceImpl) Save(book model.Book) (model.Book, error)

Save implements BookRepository.

func (*BookServiceImpl) Search

func (b *BookServiceImpl) Search(s string) ([]model.Book, error)

Search implements BookRepository.

func (*BookServiceImpl) Update

func (b *BookServiceImpl) Update(book model.Book) (model.Book, error)

Update implements BookRepository.

Jump to

Keyboard shortcuts

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