Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
Dial dials a MongoDB server with the provided MongoDB connection string, as supplied to the mongo utility, an auth mechanism (see AuthMechanism), and a TLS configuration
func DialInsecure ¶
func DialInsecure(connString string, authMechanism AuthMechanism) (*mgo.Session, error)
DialInsecure dials a MongoDB server with the provided MongoDB connection string, as supplied to the mongo utility, an auth mechanism (see AuthMechanism). Note: this method does not encrypt any information placed on the wire, including authentication details
Types ¶
type AuthMechanism ¶
type AuthMechanism string
AuthMechanism represents a MongoDB authentication mechanism
const ( //ScramSha1 = SCRAM-SHA-1 ScramSha1 AuthMechanism = "SCRAM-SHA-1" //MongoCR = MONGODB-CR MongoCR AuthMechanism = "MONGODB-CR" //PlainAuth = PLAIN PlainAuth AuthMechanism = "PLAIN" //X500 = MONGODB-X500 X500 AuthMechanism = "MONGODB-X500" //GssAPI = GSSAPI GssAPI AuthMechanism = "GSSAPI" //None is used to show that authentication is disabled None AuthMechanism = "" )
func ParseAuthMechanism ¶
func ParseAuthMechanism(mechanism string) (AuthMechanism, error)
ParseAuthMechanism parses a string representation of a MongoDB authentication mechanism and returns the AuthMechanism which matches
Click to show internal directories.
Click to hide internal directories.