Documentation ¶
Overview ¶
Package db is a wrapper around the mgo package the app uses to communicate with the MongoDB database.
Index ¶
- func CloseDB()
- func CreateDot(dot *models.Dot, dotbookID int)
- func CreateDotbook(dotbook *models.Dotbook)
- func DeleteDotbook(id int) error
- func DotbookExists(name string) bool
- func GetAllDotbooks() []*models.Dotbook
- func GetDotbook(id int) *models.Dotbook
- func InitDB()
- func UpdateDotbook(id int, dotbook *models.Dotbook) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDotbook ¶
CreateDotbook inserts a Dotbook object in the database
func DeleteDotbook ¶
DeleteDotbook deletes a Dotbook from the database
func DotbookExists ¶
DotbookExists returns a bool indicating whether or not a Dotbook with the given name is in the database
func GetAllDotbooks ¶
GetAllDotbooks queries the database and returns a Dotbook slice
func GetDotbook ¶
GetDotbook retrieves a Dotbook object from the database via its id
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.