Documentation
¶
Index ¶
- Variables
- func Create(w http.ResponseWriter, r *http.Request)
- func Delete(w http.ResponseWriter, r *http.Request)
- func DeleteById(id string) (*mongo.DeleteResult, error)
- func Insert(item Todo) error
- func Read(w http.ResponseWriter, r *http.Request)
- func Routes(r chi.Router)
- func ToggleDone(w http.ResponseWriter, r *http.Request)
- func Update(w http.ResponseWriter, r *http.Request)
- func UpdateById(id string, todo *Todo) (*mongo.UpdateResult, error)
- type Todo
- type TodosHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var Todos *mongo.Collection
Functions ¶
func DeleteById ¶
func DeleteById(id string) (*mongo.DeleteResult, error)
func ToggleDone ¶
func ToggleDone(w http.ResponseWriter, r *http.Request)
Update calls the UpdateById func
func UpdateById ¶
func UpdateById(id string, todo *Todo) (*mongo.UpdateResult, error)
Types ¶
type TodosHandler ¶
type TodosHandler struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.