db

package
v0.0.0-...-98414d4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2016 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = mgo.ErrNotFound

ErrNotFound is an mgo.ErrNotFound

Functions

func NewID

func NewID() string

NewID returns a new hex-encoded ObjectID

func NewObjectID

func NewObjectID() bson.ObjectId

NewObjectID returns an ObjectID

Types

type Database

type Database struct {
	*mgo.Database
}

Database object

func Connect

func Connect() *Database

Connect connects to the database

func (*Database) Close

func (d *Database) Close()

Close closes the database connection

type ObjectID

type ObjectID bson.ObjectId

ObjectID is a bson.ObjectId

Jump to

Keyboard shortcuts

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