Documentation ¶
Index ¶
- type Storage
- func (_m *Storage) AddBook(ctx context.Context, title string, author string, source string) (storage.Book, error)
- func (_m *Storage) AddHighlight(ctx context.Context, b storage.Book, text string, note string, chapter string, ...) (storage.Highlight, error)
- func (_m *Storage) EXPECT() *Storage_Expecter
- func (_m *Storage) ListBooks(ctx context.Context, lt time.Time, gt time.Time) ([]storage.Book, error)
- func (_m *Storage) ListHighlights(ctx context.Context, lt time.Time, gt time.Time) ([]storage.Highlight, error)
- type Storage_AddBook_Call
- func (_c *Storage_AddBook_Call) Return(_a0 storage.Book, _a1 error) *Storage_AddBook_Call
- func (_c *Storage_AddBook_Call) Run(run func(ctx context.Context, title string, author string, source string)) *Storage_AddBook_Call
- func (_c *Storage_AddBook_Call) RunAndReturn(run func(context.Context, string, string, string) (storage.Book, error)) *Storage_AddBook_Call
- type Storage_AddHighlight_Call
- type Storage_Expecter
- func (_e *Storage_Expecter) AddBook(ctx interface{}, title interface{}, author interface{}, source interface{}) *Storage_AddBook_Call
- func (_e *Storage_Expecter) AddHighlight(ctx interface{}, b interface{}, text interface{}, note interface{}, ...) *Storage_AddHighlight_Call
- func (_e *Storage_Expecter) ListBooks(ctx interface{}, lt interface{}, gt interface{}) *Storage_ListBooks_Call
- func (_e *Storage_Expecter) ListHighlights(ctx interface{}, lt interface{}, gt interface{}) *Storage_ListHighlights_Call
- type Storage_ListBooks_Call
- func (_c *Storage_ListBooks_Call) Return(_a0 []storage.Book, _a1 error) *Storage_ListBooks_Call
- func (_c *Storage_ListBooks_Call) Run(run func(ctx context.Context, lt time.Time, gt time.Time)) *Storage_ListBooks_Call
- func (_c *Storage_ListBooks_Call) RunAndReturn(run func(context.Context, time.Time, time.Time) ([]storage.Book, error)) *Storage_ListBooks_Call
- type Storage_ListHighlights_Call
- func (_c *Storage_ListHighlights_Call) Return(_a0 []storage.Highlight, _a1 error) *Storage_ListHighlights_Call
- func (_c *Storage_ListHighlights_Call) Run(run func(ctx context.Context, lt time.Time, gt time.Time)) *Storage_ListHighlights_Call
- func (_c *Storage_ListHighlights_Call) RunAndReturn(run func(context.Context, time.Time, time.Time) ([]storage.Highlight, error)) *Storage_ListHighlights_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
Storage is an autogenerated mock type for the Storage type
func NewStorage ¶
NewStorage creates a new instance of Storage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Storage) AddBook ¶
func (_m *Storage) AddBook(ctx context.Context, title string, author string, source string) (storage.Book, error)
AddBook provides a mock function with given fields: ctx, title, author, source
func (*Storage) AddHighlight ¶
func (_m *Storage) AddHighlight(ctx context.Context, b storage.Book, text string, note string, chapter string, location int, url string) (storage.Highlight, error)
AddHighlight provides a mock function with given fields: ctx, b, text, note, chapter, location, url
func (*Storage) EXPECT ¶
func (_m *Storage) EXPECT() *Storage_Expecter
type Storage_AddBook_Call ¶
Storage_AddBook_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBook'
func (*Storage_AddBook_Call) Return ¶
func (_c *Storage_AddBook_Call) Return(_a0 storage.Book, _a1 error) *Storage_AddBook_Call
func (*Storage_AddBook_Call) Run ¶
func (_c *Storage_AddBook_Call) Run(run func(ctx context.Context, title string, author string, source string)) *Storage_AddBook_Call
func (*Storage_AddBook_Call) RunAndReturn ¶
func (_c *Storage_AddBook_Call) RunAndReturn(run func(context.Context, string, string, string) (storage.Book, error)) *Storage_AddBook_Call
type Storage_AddHighlight_Call ¶
Storage_AddHighlight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddHighlight'
func (*Storage_AddHighlight_Call) Return ¶
func (_c *Storage_AddHighlight_Call) Return(_a0 storage.Highlight, _a1 error) *Storage_AddHighlight_Call
type Storage_Expecter ¶
type Storage_Expecter struct {
// contains filtered or unexported fields
}
func (*Storage_Expecter) AddBook ¶
func (_e *Storage_Expecter) AddBook(ctx interface{}, title interface{}, author interface{}, source interface{}) *Storage_AddBook_Call
AddBook is a helper method to define mock.On call
- ctx context.Context
- title string
- author string
- source string
func (*Storage_Expecter) AddHighlight ¶
func (_e *Storage_Expecter) AddHighlight(ctx interface{}, b interface{}, text interface{}, note interface{}, chapter interface{}, location interface{}, url interface{}) *Storage_AddHighlight_Call
AddHighlight is a helper method to define mock.On call
- ctx context.Context
- b storage.Book
- text string
- note string
- chapter string
- location int
- url string
func (*Storage_Expecter) ListBooks ¶
func (_e *Storage_Expecter) ListBooks(ctx interface{}, lt interface{}, gt interface{}) *Storage_ListBooks_Call
ListBooks is a helper method to define mock.On call
- ctx context.Context
- lt time.Time
- gt time.Time
func (*Storage_Expecter) ListHighlights ¶
func (_e *Storage_Expecter) ListHighlights(ctx interface{}, lt interface{}, gt interface{}) *Storage_ListHighlights_Call
ListHighlights is a helper method to define mock.On call
- ctx context.Context
- lt time.Time
- gt time.Time
type Storage_ListBooks_Call ¶
Storage_ListBooks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBooks'
func (*Storage_ListBooks_Call) Return ¶
func (_c *Storage_ListBooks_Call) Return(_a0 []storage.Book, _a1 error) *Storage_ListBooks_Call
func (*Storage_ListBooks_Call) Run ¶
func (_c *Storage_ListBooks_Call) Run(run func(ctx context.Context, lt time.Time, gt time.Time)) *Storage_ListBooks_Call
func (*Storage_ListBooks_Call) RunAndReturn ¶
type Storage_ListHighlights_Call ¶
Storage_ListHighlights_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListHighlights'
func (*Storage_ListHighlights_Call) Return ¶
func (_c *Storage_ListHighlights_Call) Return(_a0 []storage.Highlight, _a1 error) *Storage_ListHighlights_Call
func (*Storage_ListHighlights_Call) Run ¶
func (_c *Storage_ListHighlights_Call) Run(run func(ctx context.Context, lt time.Time, gt time.Time)) *Storage_ListHighlights_Call