service

package
v0.0.0-...-221af98 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStoriesService

type MockStoriesService struct {
	mock.Mock
}

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

Jump to

Keyboard shortcuts

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