Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
Host string `json:",default=localhost"`
Username string `json:",optional"`
Password string `json:",optional"`
Port int `json:",default=27017"`
DBName string `json:",optional"`
Option string `json:",optional"`
AuthMechanism string `json:",default=None,options=[SCRAM-SHA-256,SCRAM-SHA-1,MONGODB-X509,MONGODB-AWS,None]"`
AuthSource string `json:",optional"`
TlsCAFile string `json:",optional"`
TlsCertificateKeyFile string `json:",optional"`
}
Conf is the MongoDB configuration structure.
func (Conf) MustNewClient ¶
MustNewClient returns the client if the config is correct.
func (Conf) MustNewDatabase ¶
MustNewDatabase returns the database if the config is correct.
Click to show internal directories.
Click to hide internal directories.