2024-02-02 12:02:44 +00:00
|
|
|
package mongo
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
"go.mongodb.org/mongo-driver/mongo"
|
|
|
|
"go.mongodb.org/mongo-driver/mongo/options"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Configuration struct {
|
2024-11-28 14:49:32 +00:00
|
|
|
URL string `env:"MONGO_URL,required"`
|
2024-02-02 12:02:44 +00:00
|
|
|
DatabaseName string `env:"MONGO_DB_NAME,required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type RequestSettings struct {
|
|
|
|
Driver *mongo.Collection
|
|
|
|
Options *options.FindOptions
|
|
|
|
Filter primitive.M
|
|
|
|
}
|