database

package
v0.0.0-...-794322a Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Host         = "mongodb://ds021346.mlab.com:21346/"
	Database     = "paper"
	AuthDatabase = "authdb"
	AuthUserName = "root"
	AuthPassword = "pass"
)

Functions

This section is empty.

Types

type MgoDb

type MgoDb struct {
	Session *mgo.Session
	Db      *mgo.Database
	Col     *mgo.Collection
}

func (*MgoDb) C

func (this *MgoDb) C(collection string) *mgo.Collection

func (*MgoDb) Close

func (this *MgoDb) Close() bool

func (*MgoDb) DropoDb

func (this *MgoDb) DropoDb()

func (*MgoDb) Index

func (this *MgoDb) Index(collection string, keys []string) bool

func (*MgoDb) Init

func (this *MgoDb) Init() *mgo.Session

func (*MgoDb) IsDup

func (this *MgoDb) IsDup(err error) bool

func (*MgoDb) RemoveAll

func (this *MgoDb) RemoveAll(collection string) bool

Jump to

Keyboard shortcuts

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