Documentation ¶
Overview ¶
Package ensure defines a mechanism that ensures mongodb to setup index, capped collections etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Field ¶
Field is a help ensure function to set field if it dose not exist. It is not an error if the collection is not exist.
func RegisterEnsure ¶
RegisterEnsure register an ensure function to be part of database ensure process. Database ensure process is started by "mongo" life cycle package.
Do not assume ensure functions runs at any specific order. Normally, for mongodb order is not important.
pkg and name generate log message, do not need to be unique.
Types ¶
Click to show internal directories.
Click to hide internal directories.