Documentation ¶
Index ¶
- func Auth() gin.HandlerFunc
- func NewDatabaseMiddleware(host, dbname string) gin.HandlerFunc
- func NewGoogleMiddleware() gin.HandlerFunc
- func NewGoogleMiddlewareWithRoundTripper(roundTripper http.RoundTripper) gin.HandlerFunc
- type DB
- type DBCollection
- func (dbc *DBCollection) AggregationIterator(query interface{}) interfaces.DBResultIterator
- func (dbc *DBCollection) AggregationOne(query, result interface{}) error
- func (dbc *DBCollection) Find(query interface{}) interfaces.DBQuery
- func (dbc *DBCollection) FindOne(query interface{}, result interface{}) (bool, error)
- func (dbc *DBCollection) Insert(object interface{}) error
- type DBConnection
- type DBQuery
- type DBResultIterator
- type Google
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDatabaseMiddleware ¶
func NewDatabaseMiddleware(host, dbname string) gin.HandlerFunc
func NewGoogleMiddleware ¶
func NewGoogleMiddleware() gin.HandlerFunc
func NewGoogleMiddlewareWithRoundTripper ¶
func NewGoogleMiddlewareWithRoundTripper(roundTripper http.RoundTripper) gin.HandlerFunc
Types ¶
type DB ¶
type DB struct {
*mgo.Database
}
func (*DB) C ¶
func (db *DB) C(name string) interfaces.DBCollection
type DBCollection ¶
type DBCollection struct {
*mgo.Collection
}
func (*DBCollection) AggregationIterator ¶
func (dbc *DBCollection) AggregationIterator(query interface{}) interfaces.DBResultIterator
func (*DBCollection) AggregationOne ¶
func (dbc *DBCollection) AggregationOne(query, result interface{}) error
func (*DBCollection) Find ¶
func (dbc *DBCollection) Find(query interface{}) interfaces.DBQuery
func (*DBCollection) FindOne ¶
func (dbc *DBCollection) FindOne(query interface{}, result interface{}) (bool, error)
FindOne finds the first object matched by the query and stores it into result. Returns whether the object has been found or not and an error.
func (*DBCollection) Insert ¶
func (dbc *DBCollection) Insert(object interface{}) error
type DBConnection ¶
type DBConnection struct {
*mgo.Session
}
func (*DBConnection) Clone ¶
func (dbc *DBConnection) Clone() interfaces.DBConnection
func (*DBConnection) DB ¶
func (dbc *DBConnection) DB(name string) interfaces.Database
type DBQuery ¶
type DBQuery struct {
*mgo.Query
}
func (*DBQuery) Iterator ¶
func (dbq *DBQuery) Iterator() interfaces.DBResultIterator
type DBResultIterator ¶
type DBResultIterator struct {
*mgo.Iter
}
Click to show internal directories.
Click to hide internal directories.