controller

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: GPL-2.0 Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

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