mongoclient

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CollectionBlobs         = "blobs"
	CollectionResellers     = "resellers"
	CollectionUsers         = "users"
	CollectionSubscriptions = "bb_subscriptions"
	CollectionSites         = "projects"
)

Variables

This section is empty.

Functions

func Connect

func Connect(config *Config, log *logrus.Entry) (*mongo.Client, error)

Connect connects to MongoDB

Types

type Auth

type Auth struct {
	Username string
	Password string
	Source   string
}

type Config

type Config struct {
	AppName            string
	TLS                *nconf.TLSConfig
	Servers            []string
	ReplSetName        string
	ConnTimeout        time.Duration
	Auth               *Auth
	SecondaryPreferred bool
}

Jump to

Keyboard shortcuts

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