Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNoStoryFound sub-domain specific error ErrNoStoryFound = errors.New("Cannot find Story") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { CreateStory(story chronicle.Story) (createdStory chronicle.Story, err error) UpdateStory(story chronicle.Story) (updatedStory chronicle.Story, err error) GetStories(filter chronicle.StoryFilterOptions, option chronicle.PagingOptions) (chronicle.Stories, int, error) GetStoryByID(id int) (chronicle.Story, error) GetStoryBySlug(slug string) (chronicle.Story, error) DeleteStoryByID(id int) error }
Service provide an interface to story domain service
func NewService ¶
func NewService(storyRepository chronicle.StoryRepository) Service
Click to show internal directories.
Click to hide internal directories.