storage

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() store.Store

Get retrieves the storage provider

func Initialize

func Initialize(cfg *Config) error

Initialize instantiates the storage provider based on the Config provider

Types

type Config

type Config struct {
	// File is the path of the file to use for persistence
	// If blank, persistence is disabled
	//
	// XXX: Rename to path for v4.0.0
	File string `yaml:"file"`

	// Type of store
	// If blank, uses the default in-memory store
	Type Type `yaml:"type"`
}

Config is the configuration for storage

type Type

type Type string

Type of the store.

const (
	TypeMemory   Type = "memory"   // In-memory store
	TypeSQLite   Type = "sqlite"   // SQLite store
	TypePostgres Type = "postgres" // Postgres store
)

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

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