config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package config contains shared configuration settings for kf subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBPath

func DBPath(env *command.Env) string

DBPath returns the database path associated with env, or "".

func LoadDB

func LoadDB(env *command.Env) (*kfdb.Store, error)

LoadDB opens the database specified by the DBPath setting. If the database does not exist, LoadDB reports an error.

func SaveDB

func SaveDB(env *command.Env, s *kfdb.Store) error

SaveDB saves the specified database to the DBPath.

func WatchDB added in v0.1.3

func WatchDB(env *command.Env) (*kflib.DBWatcher, error)

WatchDB opens a watcher for the database specified by the DBPath setting. If the database does not exist, WatchDB reports an error.

Types

type Settings

type Settings struct {
	DBPath string // path of database file (overrides KEYFISH_DB)
	PFile  string // path of passphrase file
}

Settings are shared settings used by kf subcommands.

Jump to

Keyboard shortcuts

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