Documentation ¶
Index ¶
- type Handler
- func (h *Handler) C(cName string) *mgo.Collection
- func (h *Handler) CHandle(cName string, handle func(c *mgo.Collection))
- func (h *Handler) CloneSession() *mgo.Session
- func (h *Handler) DB(dbName, cName string) *mgo.Collection
- func (h *Handler) DBHandle(dbName, cName string, handle func(c *mgo.Collection))
- func (h *Handler) IncrID(cName string) (id int64, err error)
- func (h *Handler) Session() *mgo.Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler 提供MongoDB的数据库操作
func InitHandler ¶
InitHandler 初始化Handler url MongoDB连接路径
Click to show internal directories.
Click to hide internal directories.