Versions in this module Expand all Collapse all v0 v0.0.1 May 6, 2020 Changes in this version + const ASC + const DESC + func BindData(data interface{}, ret interface{}) (err error) + func GetOneOption() *options.FindOneOptions + func GetOption() *options.FindOptions + func NewMongoClient(mongoConf string) *mongo.Client + func ObjToString(id primitive.ObjectID) string + func ToBsonD(data interface{}) bson.D + func ToMap() + func ToObjectID(id string) primitive.ObjectID + func WhereOrResult(condition *Condition, secondCondition ...*Condition) bson.M + type Condition struct + func NewCondition() *Condition + func Where(field string, opt string, val interface{}) *Condition + func (con *Condition) Result() bson.M + func (con *Condition) Where(field string, opt string, val interface{}) *Condition + func (con *Condition) WhereOrResult(condition *Condition, secondCondition ...*Condition) bson.M + type Conf struct + APPName string + HeartBeatInterval int + Hosts string + MaxConnIdleTime int + MaxPoolSize uint64 + MinPoolSize uint64 + type Insert struct + func NewInsertOne() *Insert + func (in *Insert) Result(autoFields ...string) bson.D + func (in *Insert) Value(field string, val interface{}) *Insert + type Search struct + Hint string + Limit int64 + Projection string + Skip int64 + Sort bson.D + func NewSearch() *Search + func SetHint(hint string) *Search + func SetLimit(limit int64) *Search + func SetOffset(offset int64) *Search + func SetSelect(fields string) *Search + func SetSort(field string, sort SortType) *Search + func (s *Search) GetOneOption() *options.FindOneOptions + func (s *Search) GetOption() *options.FindOptions + func (s *Search) SetHint(hint string) *Search + func (s *Search) SetLimit(limit int64) *Search + func (s *Search) SetOffset(offset int64) *Search + func (s *Search) SetSelect(fields string) *Search + func (s *Search) SetSort(field string, sort SortType) *Search + type SearchSort struct + Field string + type SortType int + type Update struct + func Incr(field string, val int) *Update + func NewUpdate() *Update + func Set(field string, val interface{}) *Update + func (up *Update) Incr(field string, val int) *Update + func (up *Update) Result(autoFields ...string) bson.D + func (up *Update) Set(field string, val interface{}) *Update