Documentation ¶
Index ¶
- type MongoClient
- func (m *MongoClient) Connect(ctx context.Context) error
- func (m *MongoClient) DeleteMany(ctx context.Context, Col string, filter interface{}, ...) (*mongo.DeleteResult, error)
- func (m *MongoClient) DeleteOne(ctx context.Context, Col string, filter interface{}, ...) (*mongo.DeleteResult, error)
- func (m *MongoClient) Find(ctx context.Context, replys interface{}, Col string, filter interface{}, ...) error
- func (m *MongoClient) FindOne(ctx context.Context, reply interface{}, Col string, filter interface{}, ...) error
- func (m *MongoClient) GetDatabase(ctx context.Context) string
- func (m *MongoClient) InsertMany(ctx context.Context, Col string, docs []interface{}, ...) (*mongo.InsertManyResult, error)
- func (m *MongoClient) InsertOne(ctx context.Context, Col string, doc interface{}, ...) (*mongo.InsertOneResult, error)
- func (m *MongoClient) ReplaceOne(ctx context.Context, Col string, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (m *MongoClient) UpdateMany(ctx context.Context, Col string, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (m *MongoClient) UpdateOne(ctx context.Context, Col string, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (m *MongoClient) UpdateSetOne(ctx context.Context, Col string, filter interface{}, Set interface{}, ...) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoClient ¶
type MongoClient struct {
// contains filtered or unexported fields
}
func NewMongoClient ¶
func NewMongoClient(configure *gxyconfig.Configuration) (*MongoClient, error)
func (*MongoClient) DeleteMany ¶
func (m *MongoClient) DeleteMany(ctx context.Context, Col string, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*MongoClient) DeleteOne ¶
func (m *MongoClient) DeleteOne(ctx context.Context, Col string, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*MongoClient) Find ¶
func (m *MongoClient) Find(ctx context.Context, replys interface{}, Col string, filter interface{}, opts ...*options.FindOptions) error
func (*MongoClient) FindOne ¶
func (m *MongoClient) FindOne(ctx context.Context, reply interface{}, Col string, filter interface{}, opts ...*options.FindOneOptions) error
func (*MongoClient) GetDatabase ¶
func (m *MongoClient) GetDatabase(ctx context.Context) string
func (*MongoClient) InsertMany ¶
func (m *MongoClient) InsertMany(ctx context.Context, Col string, docs []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
func (*MongoClient) InsertOne ¶
func (m *MongoClient) InsertOne(ctx context.Context, Col string, doc interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*MongoClient) ReplaceOne ¶
func (m *MongoClient) ReplaceOne(ctx context.Context, Col string, filter interface{}, update interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
func (*MongoClient) UpdateMany ¶
func (m *MongoClient) UpdateMany(ctx context.Context, Col string, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*MongoClient) UpdateOne ¶
func (m *MongoClient) UpdateOne(ctx context.Context, Col string, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*MongoClient) UpdateSetOne ¶
func (m *MongoClient) UpdateSetOne(ctx context.Context, Col string, filter interface{}, Set interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Click to show internal directories.
Click to hide internal directories.