Documentation ¶
Index ¶
Constants ¶
View Source
const ArticlesPerPage int = 10
ArticlesPerPage is the number of articles to be on a page with pagination
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Logger log.Logger Repository repository.Repository }
Controller has a logger and talks to the Repository to retrieve data from the database
func (*Controller) GetArticle ¶
func (ctrl *Controller) GetArticle(c *gin.Context)
GetArticle returns a single marshalled article
func (*Controller) GetArticles ¶
func (ctrl *Controller) GetArticles(c *gin.Context)
GetArticles returns a paginated list of marshalled FromArticles
func (*Controller) GetAuthor ¶
func (ctrl *Controller) GetAuthor(c *gin.Context)
GetAuthor returns a single marshalled author
func (*Controller) GetAuthors ¶
func (ctrl *Controller) GetAuthors(c *gin.Context)
GetAuthors returns a list of marshalled authors
Click to show internal directories.
Click to hide internal directories.