Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize : initializes the main mongodb session.
Types ¶
type Session ¶
Session : session of a mongo database.
var Main *Session
Main : main mongo session of the application.
func (*Session) Initialize ¶
func (session *Session) Initialize(address, database, username, password string, timeout time.Duration)
Initialize : initializes the global mongodb session.
func (*Session) Inject ¶
func (session *Session) Inject() gin.HandlerFunc
Inject : saves a mongodb session to the context.
Click to show internal directories.
Click to hide internal directories.