Documentation ¶
Index ¶
- type MockStoriesService
- func (mock *MockStoriesService) AddStory(story *model.Story) error
- func (mock *MockStoriesService) DeleteStory(storyID string) (int64, error)
- func (mock *MockStoriesService) GetMostViewsStories(offset, limit int) ([]model.Story, error)
- func (mock *MockStoriesService) GetStory(storyID string) (*model.Story, error)
- func (mock *MockStoriesService) GetTopRatedStories(offset, limit int) ([]model.Story, error)
- func (mock *MockStoriesService) SearchStories(query string) ([]model.Story, error)
- func (mock *MockStoriesService) UpdateStory(story *model.Story) (int64, error)
- type StoryService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStoriesService ¶
func (*MockStoriesService) AddStory ¶
func (mock *MockStoriesService) AddStory(story *model.Story) error
func (*MockStoriesService) DeleteStory ¶
func (mock *MockStoriesService) DeleteStory(storyID string) (int64, error)
func (*MockStoriesService) GetMostViewsStories ¶
func (mock *MockStoriesService) GetMostViewsStories(offset, limit int) ([]model.Story, error)
func (*MockStoriesService) GetStory ¶
func (mock *MockStoriesService) GetStory(storyID string) (*model.Story, error)
func (*MockStoriesService) GetTopRatedStories ¶
func (mock *MockStoriesService) GetTopRatedStories(offset, limit int) ([]model.Story, error)
func (*MockStoriesService) SearchStories ¶
func (mock *MockStoriesService) SearchStories(query string) ([]model.Story, error)
func (*MockStoriesService) UpdateStory ¶
func (mock *MockStoriesService) UpdateStory(story *model.Story) (int64, error)
type StoryService ¶
type StoryService interface { AddStory(story *model.Story) error GetStory(storyID string) (*model.Story, error) UpdateStory(story *model.Story) (int64, error) DeleteStory(storyID string) (int64, error) SearchStories(query string) ([]model.Story, error) GetMostViewsStories(offset, limit int) ([]model.Story, error) GetTopRatedStories(offset, limit int) ([]model.Story, error) }
func NewStoriesService ¶
func NewStoriesService(store store.StoriesStore) StoryService
Click to show internal directories.
Click to hide internal directories.