mongo

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

README

mongo

import "github.com/coralproject/shelf/internal/platform/db/mongo"

Overview

Package mongo provides support for using MongoDB.

Index

Package files

mongo.go

func New

func New(url string, timeout time.Duration) (*mgo.Session, error)

New creates a new master session. If no url is provided, it will defaul to localhost:27017. If a zero value timeout is specified, a timeout of 60sec will be used instead.

func Query

func Query(value interface{}) string

Query provides a string version of the value


Generated by godoc2md

Documentation

Overview

Package mongo provides support for using MongoDB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(url string, timeout time.Duration) (*mgo.Session, error)

New creates a new master session. If no url is provided, it will defaul to localhost:27017. If a zero value timeout is specified, a timeout of 60sec will be used instead.

func Query

func Query(value interface{}) string

Query provides a string version of the value

Types

This section is empty.

Jump to

Keyboard shortcuts

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