2026-05-19 13:33:04 +00:00
|
|
|
package mongo
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
// Conf is MongoDB client configuration for DocumentDB helpers.
|
2026-05-20 07:01:08 +00:00
|
|
|
// Use json tags for go-zero conf (see etc/gateway.yaml).
|
2026-05-19 13:33:04 +00:00
|
|
|
type Conf struct {
|
2026-05-20 07:01:08 +00:00
|
|
|
Schema string `json:",default=mongodb"`
|
|
|
|
|
User string `json:",optional"`
|
|
|
|
|
Password string `json:",optional"`
|
|
|
|
|
Host string `json:",optional"`
|
|
|
|
|
Port int `json:",optional"` // if Host has no ":port", appended in buildConnectionURI
|
|
|
|
|
Database string `json:",optional"`
|
|
|
|
|
AuthSource string `json:",optional"`
|
|
|
|
|
ReplicaName string `json:",optional"`
|
|
|
|
|
TLS bool `json:",optional"`
|
|
|
|
|
MaxPoolSize uint64 `json:",optional"`
|
|
|
|
|
MinPoolSize uint64 `json:",optional"`
|
|
|
|
|
MaxConnIdleTime time.Duration `json:",optional"`
|
|
|
|
|
Compressors []string `json:",optional"`
|
|
|
|
|
ConnectTimeoutMs int64 `json:",optional"`
|
2026-05-19 13:33:04 +00:00
|
|
|
}
|