stores

package
v2.0.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadReadableStore

func LoadReadableStore(name string, options *Options) (models.ReadableStore, error)

LoadReadableStore finds an available readable store by name

func LoadWritableStore

func LoadWritableStore(name string, options *Options) (models.WritableStore, error)

GetWritableStore finds a writable store by its name

func RegisterStore

func RegisterStore(name string, store StoreLoader)

RegisterStore registers an available store

Types

type Options

type Options struct {
	Params       map[string]string
	MergeOptions *models.MergeOptions
}

Options passes params and merge options when initializing stores

func CreateOptions

func CreateOptions(param map[string]string) *Options

CreateOptions initialize an empty Options object

type StoreLoader

type StoreLoader func(options *Options) (interface{}, error)

StoreLoader must return an initialized store

Directories

Path Synopsis
cells

Jump to

Keyboard shortcuts

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