Documentation ¶
Index ¶
- func New(o ...Option) (*mongo.Database, error)
- type Option
- func WithAuthName(p string) Option
- func WithCluster(p bool) Option
- func WithDirect(p bool) Option
- func WithHost(p string) Option
- func WithName(p string) Option
- func WithPassword(p string) Option
- func WithPort(p int) Option
- func WithRetryWrites(p bool) Option
- func WithUsername(p string) Option
- func WithViper(args ...string) Option
- func WithWriteConcern(p string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*opts)
Option provides a function definition to set opts
func WithCluster ¶
WithCluster sets this up as a clustered (srv) connection
func WithDirect ¶
WithDirect tells mongo this is a direct connection.
func WithRetryWrites ¶
WithRetryWrites turns retryWrites on or off
func WithWriteConcern ¶
WithWriteConcern sets the write concern (0, 1, or majority)
Click to show internal directories.
Click to hide internal directories.