Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDbAdapter ¶
type MongoDbAdapter struct { *adapter.BaseAdapter // contains filtered or unexported fields }
func NewMongoDbAdapter ¶
func NewMongoDbAdapter(name string, config *MongoDbConfig) *MongoDbAdapter
func (*MongoDbAdapter) Close ¶
func (a *MongoDbAdapter) Close() error
func (*MongoDbAdapter) Get ¶
func (a *MongoDbAdapter) Get() interface{}
func (*MongoDbAdapter) GetCollection ¶
func (a *MongoDbAdapter) GetCollection(dbName string, collName string) *mongo.Collection
func (*MongoDbAdapter) GetDatabase ¶
func (a *MongoDbAdapter) GetDatabase(name string) *mongo.Database
func (*MongoDbAdapter) Setup ¶
func (a *MongoDbAdapter) Setup() (err error)
type MongoDbConfig ¶
type MongoDbConfig struct { Hosts []string `json:"hosts,omitempty" config:"hosts,required"` Username string `json:"username,omitempty" config:"username"` Password string `json:"password,omitempty" config:"password"` ReplicaSet string `json:"replica_set,omitempty" config:"replica_set"` DirectConnection bool `json:"direct_connection,omitempty" config:"direct_connection"` }
Click to show internal directories.
Click to hide internal directories.