book

package
v0.0.0-...-ba1ec4a Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOrUpdateBook

func AddOrUpdateBook(bookInfo *entities.Book) (*entities.Book, error)

func GetBook

func GetBook(id string) (*entities.Book, error)

func GetBookAuthor

func GetBookAuthor(author string) (*entities.Book, error)

func GetBookByIsbn

func GetBookByIsbn(isbn string) (*entities.Book, error)

func GetBookListBy

func GetBookListBy(criteriaMap *hashmap.Map, pageSize int, pageNo int) (*datasources.PagedDataSource, error)

func GetBookListByIsbn

func GetBookListByIsbn(isbnList *arraylist.List) ([]*entities.Book, error)

func GetBookTitle

func GetBookTitle(title string) ([]*entities.Book, error)

func Sort

func Sort(bookArray []*entities.Book) []*entities.Book

Types

type BookScoreSorter

type BookScoreSorter struct {
	Books []*entities.Book
	By    func(b1 *entities.Book, b2 *entities.Book) bool
}

func (*BookScoreSorter) Len

func (this *BookScoreSorter) Len() int

func (*BookScoreSorter) Less

func (this *BookScoreSorter) Less(b1, b2 int) bool

func (*BookScoreSorter) Swap

func (this *BookScoreSorter) Swap(b1, b2 int)

type SortBy

type SortBy func(b1 *entities.Book, b2 *entities.Book) bool

func (SortBy) Sort

func (by SortBy) Sort(books []*entities.Book)

Jump to

Keyboard shortcuts

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