book

package
v0.0.0-...-40cab1b Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	// contains filtered or unexported fields
}

func NewBookService

func NewBookService(db *gorm.DB) *Book

func (*Book) AddBook

func (b *Book) AddBook(req *request.AddBook, by string) *response.Book

func (*Book) DeleteBook

func (b *Book) DeleteBook(id uint) (*response.Book, error)

func (*Book) GetBookByID

func (b *Book) GetBookByID(id uint) (*response.Book, error)

func (*Book) GetBooks

func (b *Book) GetBooks() *response.Books

func (*Book) UpdateBook

func (b *Book) UpdateBook(id uint, req *request.UpdateBook, by string) (*response.Book, error)

type IBook

type IBook interface {
	GetBooks() *response.Books
	GetBookByID(uint) (*response.Book, error)
	AddBook(*request.AddBook, string) *response.Book
	UpdateBook(uint, *request.UpdateBook, string) (*response.Book, error)
	DeleteBook(uint) (*response.Book, error)
}

Jump to

Keyboard shortcuts

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