mgosec

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(connString string, authMechanism AuthMechanism, conf *tls.Config) (*mgo.Session, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL