cmd

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultDatabase        = DatabaseSpec{Type: "sqlite", Path: "scrape_data/scrape.db"}
	ErrDatabaseFormat      = errors.New("database spec must be in the format <type>:<path spec>")
	ErrUnsupportedDatabase = errors.New("unsupported database type")
)

Functions

func Database

func Database(spec DatabaseSpec) (store.Factory, error)

func NewDatabaseValue

func NewDatabaseValue(env string, def DatabaseSpec) *envflags.Value[DatabaseSpec]

Types

type DatabaseSpec

type DatabaseSpec struct {
	Type string
	Path string
}

func NewDatabaseSpec

func NewDatabaseSpec(s string) (DatabaseSpec, error)

Format: <type>:<path spec> Example: sqlite:scrape_data/scrape.db Example: sqlite::memory:

func (DatabaseSpec) String

func (d DatabaseSpec) String() string

Jump to

Keyboard shortcuts

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