mgo_session

package
v0.0.0-...-b5b63d9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *Config) (*mgo.Session, error)

Types

type Config

type Config struct {
	DialInfo     mgo.DialInfo `yaml:",inline"`
	PasswordFile string       `yaml:"password_file,omitempty"`
}

Config stores how to connect to the MongoDB server and an optional password file

func (*Config) Validate

func (c *Config) Validate(configKey string) error

Validate ensures the most common fields inside the mgo.DialInfo portion of a Config are set correctly as well as other fields inside the Config itself.

Jump to

Keyboard shortcuts

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