fixtures

package module
v0.0.0-...-bee1cce Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

README

go-mongodb-fixtures

Build Status Go Report Card codecov

BSON fixtures of common MongoDB server commands

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsVersionMatch

func IsVersionMatch(versionStr, filter string) bool

func Load

func Load(flavour MongoDBFlavour, versionStr, command string, out interface{}) error

func Versions

func Versions(flavour MongoDBFlavour) []string

func VersionsFilter

func VersionsFilter(flavour MongoDBFlavour, filter string) []string

func Write

func Write(serverInfo *ServerInfo, command string, data []byte) error

Types

type MongoDBFlavour

type MongoDBFlavour interface {
	String() string
	Dir() string
}

type MongoDBFlavourType

type MongoDBFlavourType string
const (
	MongoDB                 MongoDBFlavourType = "mongodb"
	PerconaServerForMongoDB MongoDBFlavourType = "psmdb"
)

func (MongoDBFlavourType) Dir

func (ft MongoDBFlavourType) Dir() string

func (MongoDBFlavourType) String

func (ft MongoDBFlavourType) String() string

type ServerInfo

type ServerInfo struct {
	Version string
	Flavour MongoDBFlavour
}

func GetServerInfo

func GetServerInfo(session *mgo.Session) (*ServerInfo, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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