Documentation ¶
Index ¶
Constants ¶
View Source
const (
COLLECTION = "wonderland"
)
Constant that represents the collection at the database.
Variables ¶
This section is empty.
Functions ¶
func MongoConnect ¶
func MongoConnect()
The MongoConnect function will establish the connection with the database.
Types ¶
type MongoDB ¶
The MongoDB will store the database information address.
func (*MongoDB) Create ¶
func (m *MongoDB) Create(wonderland model.Wonderland) error
Function to create an object in the collection.
func (*MongoDB) GetAll ¶
func (m *MongoDB) GetAll() ([]model.Wonderland, error)
Function to get all objects stored at the collection.
Click to show internal directories.
Click to hide internal directories.