middleware

package
v0.0.0-...-170c9a4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToMongo

func ConnectToMongo()

ConnectToMongo initiate connection with database

func DeleteTodo

func DeleteTodo(todo string)

DeleteTodo deletes a todo by ID

func GetAllTodos

func GetAllTodos() []primitive.M

GetAllTodos get all todos, literally

func InsertTodo

func InsertTodo(content models.ToDoList)

InsertTodo insert a todo in the db

Types

type Config

type Config struct {
	MongoIP string `config:"mongo_ip"`
	Port    uint32 `config:"port"`
}

Config mongo connection params

Jump to

Keyboard shortcuts

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