mongo

package
v0.0.0-...-15608e1 Latest Latest
Warning

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

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

README

mongo

import "github.com/ardanlabs/kit/db/mongo"

Package mongo provides support for using MongoDB.

func New

func New(cfg Config) (*mgo.Session, error)

New creates a new master session.

func Query

func Query(value interface{}) string

Query provides a string version of the value

type Config

type Config struct {
    Host     string
    AuthDB   string
    DB       string
    User     string
    Password string
    Timeout  time.Duration
}

Config provides configuration values.


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(cfg Config) (*mgo.Session, error)

New creates a new master session.

func Query

func Query(value interface{}) string

Query provides a string version of the value

Types

type Config

type Config struct {
	Host     string
	AuthDB   string
	DB       string
	User     string
	Password string
	Timeout  time.Duration
}

Config provides configuration values.

Jump to

Keyboard shortcuts

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