Documentation ¶
Index ¶
Constants ¶
View Source
const PUBLIC string = "PUBLIC"
View Source
const STATE string = "__STATE__"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionOpts ¶ added in v1.12.0
type ConnectionOpts struct {
MaxIdleTimeMs int
}
type MongoClient ¶
type MongoClient struct {
// contains filtered or unexported fields
}
func NewMongoClient ¶
func NewMongoClient(logger logging.Logger, mongodbURL string, connectionOptions ConnectionOpts) (*MongoClient, error)
NewMongoClient tries to setup a new MongoClient instance. The function returns a `nil` client if the environment variable `MongoDBUrl` is not specified.
func (*MongoClient) Collection ¶ added in v1.10.0
func (m *MongoClient) Collection(collectionName string) *mongo.Collection
func (*MongoClient) Disconnect ¶
func (mongoClient *MongoClient) Disconnect() error
Click to show internal directories.
Click to hide internal directories.