repositories

package
v0.0.0-...-a32083c Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BookRepo

type BookRepo struct {
	interfaces.IBookRepository
}

BookRepo book repository

func (*BookRepo) Create

func (repo *BookRepo) Create(book *model.Book) (*model.Book, error)

Create add a new book into database

func (*BookRepo) Delete

func (repo *BookRepo) Delete(ID objectid.ObjectID) (int64, error)

Delete remove a book from database

func (*BookRepo) Get

func (repo *BookRepo) Get(ID string) (*model.Book, error)

Get get a book by ID into database

func (*BookRepo) List

func (repo *BookRepo) List(filters *model.BookFilter, sorting *model.Sorting) ([]model.Book, error)

List query database to return list of books

func (*BookRepo) Update

func (repo *BookRepo) Update(book *model.Book) (*model.Book, error)

Update update a book by ID

Jump to

Keyboard shortcuts

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