services

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IBookService

type IBookService interface {
	// Book
	AddOrUpdateBook(bookInfo *entities.Book) (*entities.Book, error)
	GetBook(id string) (*entities.Book, error)
	GetBookByIsbn(isbn string) (*entities.Book, error)
	GetBookByAuthor(author string) (*entities.Book, error)
	GetBookByTitle(title string) ([]*entities.Book, error)

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

	// Buy record
	AddBuyRecord(*entities.BuyRecord) (*entities.BuyRecord, error)
	GetBuyRecordBy(criteriaMap *hashmap.Map) (*datasources.DataSource, error)
	PagedGetBuyRecordBy(criteriaMap *hashmap.Map, pageSize int, pageNo int) (*datasources.PagedDataSource, error)

	// Rank
	GetRankInIsbn(isbnList *arraylist.List) ([]*entities.Book, error)

	RemoveDuplicate() error
}

type ICalisApiService

type ICalisApiService interface {
	GetCipByIsbn(isbn string) ([]string, error)
	UpdateLocalBookCip() (map[string][]string, error)
}

type IDefaultService

type IDefaultService interface {
	Version(c *gin.Context) string
	VerifyMongoDB() error
}

type IDoubanApiService

type IDoubanApiService interface {
	GetBookByIsbn(isbn string) (*entities.Book, error)
}

type ISearchService

type ISearchService interface {
	SearchBook(keyword string, criteriaMap *hashmap.Map, pageSize int, pageNo int) (*datasources.PagedDataSource, error)
	SearchBookByQuery(query elastic.Query, pageSize int, pageNo int) (*datasources.PagedDataSource, error)
	DeleteAllBook() (int64, error)
	SyncBook() (int64, int64, error)
}

Directories

Path Synopsis
bll
dal

Jump to

Keyboard shortcuts

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