Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Post ¶
type Post struct { ID uint `json:"id"` AuthorID uint `json:"author_id"` Content string `json:"content"` }
Post defines the properties of a Post to be listed
type Repository ¶
type Repository interface { // GetAllPosts returns all Posts saved in storage. GetAllPosts() ([]Post, error) }
Repository provides access to Post repository.
type Service ¶
Service provides Post listing operations.
func NewService ¶
func NewService(r Repository) Service
NewService creates an list service with the necessary dependencies
Click to show internal directories.
Click to hide internal directories.