db

package
v0.0.0-...-254d333 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2015 License: MIT Imports: 5 Imported by: 0

README

数据库持久化模块

采用mongodb做后端,存储JSON文档。

Documentation

Index

Constants

View Source
const (
	COUNTERS = "COUNTERS"
)

Variables

This section is empty.

Functions

func C

func C(collection string) (*mgo.Session, *mgo.Collection)

------------------------------------------------ copy connection !IMPORTANT! NEVER FORGET -----> defer ms.Close() <-----

func NextVal

func NextVal(countername string) int32

---------------------------------------------------------- ID GENERATOR

Types

type Counter

type Counter struct {
	Name    string
	NextVal int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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