Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PagesNavigator ¶
type PagesNavigator struct {
}
PagesNavigator contains all pages links, as well as links to the previous and next pages from the current one
type Reader ¶ added in v1.2.0
type Reader interface {
Search(keywords string, page, resultsPerPage int) (*Result, error)
Count() (uint64, error)
Close() error
}
Reader defines a set of reading operations over an index
type ReaderMock ¶ added in v1.2.0
type ReaderMock struct {
SearchFake func(keywords string, page, resultsPerPage int) (*Result, error)
CountFake func() (uint64, error)
CloseFake func() error
}
ReaderMock implements the Reader interface with a mockable struct. Just assign to each *Fake property the function you want to execute
func NewReaderMock ¶ added in v1.2.0
func NewReaderMock() *ReaderMock
NewReaderMock returns a new instance of ReaderMock
func (*ReaderMock) Close ¶ added in v1.2.0
func (r *ReaderMock) Close() error
Close runs the faked close method contained in the instance
func (*ReaderMock) Count ¶ added in v1.2.0
func (r *ReaderMock) Count() (uint64, error)
Count runs the faked count method contained in the instance
Click to show internal directories.
Click to hide internal directories.