sgmongo

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSessionByMgo added in v1.9.6

func NewSessionByMgo(cfg *MongoCfg) (*mgo.Session, error)

func NewSessionByOffice added in v1.9.6

func NewSessionByOffice(cfg *MongoCfg) (*mongo.Client, error)

Types

type MongoCfg

type MongoCfg struct {
	Host   string `json:"host"`
	Port   string `json:"port"`
	User   string `json:"user"`
	Pwd    string `json:"pwd"`
	DbName string `json:"dbName"`
}

func ReadCfg

func ReadCfg(filename string) (*MongoCfg, error)

Jump to

Keyboard shortcuts

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