todo

package
v0.0.0-...-82ef3d0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

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

Todo is the representation of all the todo-related handlers.

func New

func New(c *mongo.Collection) *Todo

New creates a Todo struct.

func (*Todo) AddGET

func (t *Todo) AddGET(w http.ResponseWriter, r *http.Request)

AddGET renders the form to add a todo.

func (*Todo) AddPOST

func (t *Todo) AddPOST(w http.ResponseWriter, r *http.Request)

AddPOST adds a todo the to the db.

func (*Todo) DeleteGET

func (t *Todo) DeleteGET(w http.ResponseWriter, r *http.Request)

DeleteGET renders the todos to be deleted.

func (*Todo) DeletePOST

func (t *Todo) DeletePOST(w http.ResponseWriter, r *http.Request)

DeletePOST deletes todos from the db.

func (*Todo) ListGET

func (t *Todo) ListGET(w http.ResponseWriter, r *http.Request)

ListGET lists the todos.

func (*Todo) UpdateGET

func (t *Todo) UpdateGET(w http.ResponseWriter, r *http.Request)

UpdateGET renders the todos to be updated.

func (*Todo) UpdatePOST

func (t *Todo) UpdatePOST(w http.ResponseWriter, r *http.Request)

UpdatePOST updates todos.

Jump to

Keyboard shortcuts

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