Documentation ¶
Index ¶
- type MongoNewDriver
- func (s *MongoNewDriver) Connect() (err error)
- func (s *MongoNewDriver) Count(key string) (count int64, err error)
- func (s *MongoNewDriver) DeleteOne(key string) error
- func (s *MongoNewDriver) FindAll(prefix string, out interface{}) (err error)
- func (s *MongoNewDriver) FindOne(key string, out interface{}) (err error)
- func (s *MongoNewDriver) Insert(key string, doc interface{}) (err error)
- func (s *MongoNewDriver) UpdateOne(key string, doc interface{}) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoNewDriver ¶
type MongoNewDriver struct { Host string Timeout time.Duration PoolLimit int DbName string // 数据库名称 CollectName string URI string Connected bool // 连接状态 // contains filtered or unexported fields }
func (*MongoNewDriver) Connect ¶
func (s *MongoNewDriver) Connect() (err error)
func (*MongoNewDriver) DeleteOne ¶
func (s *MongoNewDriver) DeleteOne(key string) error
func (*MongoNewDriver) FindAll ¶
func (s *MongoNewDriver) FindAll(prefix string, out interface{}) (err error)
func (*MongoNewDriver) FindOne ¶
func (s *MongoNewDriver) FindOne(key string, out interface{}) (err error)
func (*MongoNewDriver) Insert ¶
func (s *MongoNewDriver) Insert(key string, doc interface{}) (err error)
func (*MongoNewDriver) UpdateOne ¶
func (s *MongoNewDriver) UpdateOne(key string, doc interface{}) (err error)
Click to show internal directories.
Click to hide internal directories.