mgostore

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(db *mgo.Database) (_ store.Backend, err error)

NewBackend creates a new Backend instance using the given *mgo.Database. The given Database's underlying session will be copied. The Backend must be closed when finished with.

Types

type Params

type Params struct {
	// Address holds the address of the MongoDB
	// server to connect to, in host:port form.
	Address string `yaml:"address"`

	// Database holds the database name to use.
	// If this is empty, "candid" will be used.
	Database string `yaml:"database"`
}

Params holds the specification for the parameters used in the config file.

func (Params) NewBackend

func (p Params) NewBackend() (store.Backend, error)

NewBackend implements store.BackendFactory.

Jump to

Keyboard shortcuts

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