Documentation
¶
Index ¶
- type MongoCommandDriver
- func (m *MongoCommandDriver) Close() error
- func (m *MongoCommandDriver) Connect(connectionString string) error
- func (m *MongoCommandDriver) Create(collection string, data interface{}) error
- func (m *MongoCommandDriver) Delete(collection string, filter interface{}) error
- func (m *MongoCommandDriver) SetCommandDatabase(databaseName string)
- func (m *MongoCommandDriver) Update(collection string, filter interface{}, update interface{}) error
- type MongoQueryDriver
- func (m *MongoQueryDriver) Close() error
- func (m *MongoQueryDriver) Connect(connectionString string) error
- func (m *MongoQueryDriver) Read(collection string, filter interface{}) (interface{}, error)
- func (m *MongoQueryDriver) SetClient(client *mongo.Client)
- func (m *MongoQueryDriver) SetDatabaseName(name string)
- func (m *MongoQueryDriver) SetQueryDatabase(databaseName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoCommandDriver ¶
type MongoCommandDriver struct { ConnectionTimeout time.Duration // contains filtered or unexported fields }
func (*MongoCommandDriver) Close ¶
func (m *MongoCommandDriver) Close() error
func (*MongoCommandDriver) Connect ¶
func (m *MongoCommandDriver) Connect(connectionString string) error
func (*MongoCommandDriver) Create ¶
func (m *MongoCommandDriver) Create(collection string, data interface{}) error
func (*MongoCommandDriver) Delete ¶
func (m *MongoCommandDriver) Delete(collection string, filter interface{}) error
func (*MongoCommandDriver) SetCommandDatabase ¶ added in v1.2.1
func (m *MongoCommandDriver) SetCommandDatabase(databaseName string)
func (*MongoCommandDriver) Update ¶
func (m *MongoCommandDriver) Update(collection string, filter interface{}, update interface{}) error
type MongoQueryDriver ¶
type MongoQueryDriver struct { ConnectionTimeout time.Duration // contains filtered or unexported fields }
func (*MongoQueryDriver) Close ¶
func (m *MongoQueryDriver) Close() error
func (*MongoQueryDriver) Connect ¶
func (m *MongoQueryDriver) Connect(connectionString string) error
func (*MongoQueryDriver) Read ¶
func (m *MongoQueryDriver) Read(collection string, filter interface{}) (interface{}, error)
func (*MongoQueryDriver) SetClient ¶ added in v1.3.0
func (m *MongoQueryDriver) SetClient(client *mongo.Client)
New method to set the client directly for tests
func (*MongoQueryDriver) SetDatabaseName ¶ added in v1.3.0
func (m *MongoQueryDriver) SetDatabaseName(name string)
New method to set the database name for tests
func (*MongoQueryDriver) SetQueryDatabase ¶ added in v1.2.1
func (m *MongoQueryDriver) SetQueryDatabase(databaseName string)
Click to show internal directories.
Click to hide internal directories.