Documentation ¶
Index ¶
- type MongoDbAdapter
- func (a *MongoDbAdapter) Close() error
- func (a *MongoDbAdapter) CreateSession() (mongo.Session, error)
- func (a *MongoDbAdapter) Get() interface{}
- func (a *MongoDbAdapter) GetCollection(dbName string, collName string) *mongo.Collection
- func (a *MongoDbAdapter) GetDatabase(name string) *mongo.Database
- func (a *MongoDbAdapter) Setup() (err error)
- type MongoDbConfig
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) CreateSession ¶ added in v0.3.0
func (a *MongoDbAdapter) CreateSession() (mongo.Session, 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:"ReplicaSet,omitempty" config:"ReplicaSet"` DirectConnection bool `json:"DirectConnection,omitempty" config:"DirectConnection"` RootCA string `json:"RootCA,omitempty" config:"RootCA"` AuthSource string `json:"AuthSource,omitempty" config:"AuthSource"` }
Click to show internal directories.
Click to hide internal directories.