Documentation ¶
Overview ¶
Package blog holds the domain entities for the blog
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("Blog not found")
ErrNotFound is used when a blog could not be found.
Functions ¶
This section is empty.
Types ¶
type Blog ¶
type Blog struct { ID int Name string SiteURL string FeedURL string PolledAt time.Time Active bool Posts []post.Post }
Blog type holds information about blogs
type Repository ¶
type Repository interface { Store(blog *Blog) error Find(id int) (*Blog, error) Count() int FindAll(limit int, page int) []*Blog FindPopular(limit int) []*Blog }
Repository provides access a blog store
type Service ¶
type Service interface { StoreNewBlog(name string, siteURL string, feedURL string) (*Blog, error) FindBlog(id int) (*Blog, error) StoreNewPost(blogID int, post *post.Post) (*post.Post, error) BlogCount() int FindAllBlogs(page int) []*Blog FindPopularBlogs() []*Blog }
Service provides access a blog service
Click to show internal directories.
Click to hide internal directories.