Documentation
¶
Index ¶
- Variables
- func NewMemcache() *memcache.Client
- func NewPostgres() *gorm.DB
- type MongoDB
- func (d MongoDB) Count(resource interface{}, query bson.M) (int, error)
- func (d MongoDB) Create(data interface{}) error
- func (d MongoDB) Find(query interface{}, limit, page int, sort string, result interface{}) error
- func (d MongoDB) FindAll(results interface{}) error
- func (d MongoDB) FindAndGroupBy(by string, query interface{}, result interface{}, collection interface{}) error
- func (d MongoDB) FindOne(query, result interface{}) error
- func (m MongoDB) Ping() error
- func (d MongoDB) Update(query, data interface{}, _type interface{}) error
- func (d MongoDB) Upsert(query, data interface{}, _type interface{}) (*mgo.ChangeInfo, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Postgres *gorm.DB
Functions ¶
func NewMemcache ¶
func NewPostgres ¶
Types ¶
type MongoDB ¶
type MongoDB struct {
Current *mgo.Database
}
func NewMongoDB ¶
func (MongoDB) FindAndGroupBy ¶
Click to show internal directories.
Click to hide internal directories.