controller

package
v0.0.0-...-974506c Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(art *mux.Router, db *sql.DB, bi *search.BleveIndex)

Register handlers

Types

type CommentController

type CommentController struct {
	// contains filtered or unexported fields
}

CommentController holds DB

func NewCommentController

func NewCommentController(userRepo user.Repository, itmRepo item.Repository, repo item.CommentRepository) *CommentController

NewCommentController constructs a controller

func (*CommentController) CreateCommentHandler

func (c *CommentController) CreateCommentHandler(w http.ResponseWriter, r *http.Request)

CreateCommentHandler creates comment

func (*CommentController) ListCommentHandler

func (c *CommentController) ListCommentHandler(w http.ResponseWriter, r *http.Request)

ListCommentHandler list items

type ItemController

type ItemController struct {
	// contains filtered or unexported fields
}

ItemController holds DB

func NewItemController

func NewItemController(userRepo user.Repository, prjRepo project.Repository, repo item.Repository) *ItemController

NewItemController constructs a controller

func (*ItemController) CreateItemHandler

func (c *ItemController) CreateItemHandler(w http.ResponseWriter, r *http.Request)

CreateItemHandler creates item

func (*ItemController) ListItemHandler

func (c *ItemController) ListItemHandler(w http.ResponseWriter, r *http.Request)

ListItemHandler list items

func (*ItemController) ShowItemHandler

func (c *ItemController) ShowItemHandler(w http.ResponseWriter, r *http.Request)

ShowItemHandler shows item

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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