mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
16 lines
255 B
Go
16 lines
255 B
Go
package mongo
|
|
|
|
import "go.mongodb.org/mongo-driver/mongo"
|
|
|
|
type DbOption func(options *DbOptions)
|
|
|
|
type DbOptions struct {
|
|
client *mongo.Client
|
|
}
|
|
|
|
func WithDbClient(c *mongo.Client) DbOption {
|
|
return func(options *DbOptions) {
|
|
options.client = c
|
|
}
|
|
}
|