mgoconfig

package
v0.0.0-...-30ca3a0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2014 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultProvider = &MgoConfiguratorProvider{}
View Source
var (
	ErrNotInit = errors.New("mgoconfig: package need to be init")
)

Functions

func Register

func Register(dbsess *mgo.Session, dbname string)

Types

type MgoConfig

type MgoConfig struct {
	ConfigColl *mgo.Collection
}

func NewMgoConfig

func NewMgoConfig(db *mgo.Database) *MgoConfig

func (*MgoConfig) Close

func (c *MgoConfig) Close() error

func (*MgoConfig) Get

func (c *MgoConfig) Get(key string) (string, error)

func (*MgoConfig) Set

func (c *MgoConfig) Set(key, val string) error

type MgoConfiguratorProvider

type MgoConfiguratorProvider struct {
	DBSess *mgo.Session
	DBName string
}

func (*MgoConfiguratorProvider) OpenConfigurator

func (p *MgoConfiguratorProvider) OpenConfigurator(*http.Request) (config.Configurator, error)

Jump to

Keyboard shortcuts

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