mg5

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigFromMap

type ConfigFromMap func(map[string]interface{}) (DatastoreConfig, error)

ConfigFromMap creates a new datastore config from a map

type DatastoreConfig

type DatastoreConfig interface {
	// DiskSpec returns a minimal configuration of the datastore
	// represting what is stored on disk.  Run time values are
	// excluded.
	DiskSpec() DiskSpec
}

DatastoreConfig is an abstraction of a datastore config. A "spec" is first converted to a DatastoreConfig and then Create() is called to instantiate a new datastore

func AnyDatastoreConfig

func AnyDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

AnyDatastoreConfig returns a DatastoreConfig from a spec based on the "type" parameter

func FlatfsDatastoreConfig

func FlatfsDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

FlatfsDatastoreConfig returns a flatfs DatastoreConfig from a spec

func LeveldsDatastoreConfig

func LeveldsDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

LeveldsDatastoreConfig returns a levelds DatastoreConfig from a spec

func LogDatastoreConfig

func LogDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

LogDatastoreConfig returns a log DatastoreConfig from a spec

func MeasureDatastoreConfig

func MeasureDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

MeasureDatastoreConfig returns a measure DatastoreConfig from a spec

func MemDatastoreConfig

func MemDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

MemDatastoreConfig returns a memory DatastoreConfig from a spec

func MountDatastoreConfig

func MountDatastoreConfig(params map[string]interface{}) (DatastoreConfig, error)

MountDatastoreConfig returns a mount DatastoreConfig from a spec

type DiskSpec

type DiskSpec map[string]interface{}

DiskSpec is the type returned by the DatastoreConfig's DiskSpec method

func (DiskSpec) Bytes

func (spec DiskSpec) Bytes() []byte

Bytes returns a minimal JSON encoding of the DiskSpec

func (DiskSpec) String

func (spec DiskSpec) String() string

String returns a minimal JSON encoding of the DiskSpec

type Migration

type Migration struct{}

func (Migration) Apply

func (m Migration) Apply(opts migrate.Options) error

func (Migration) Reversible

func (m Migration) Reversible() bool

func (Migration) Revert

func (m Migration) Revert(opts migrate.Options) error

func (Migration) Versions

func (m Migration) Versions() string

Jump to

Keyboard shortcuts

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