Documentation ¶
Overview ¶
Package storedefs contains definitions used by the store package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyHOME = errors.New("environment variable HOME is empty")
ErrEmptyHOME is the error returned by EnsureDataDir when the environmental variable HOME is empty.
View Source
var ErrNoMatchingCmd = errors.New("no matching command line")
ErrNoMatchingCmd is the error returned when a LastCmd or FirstCmd query completes with no result.
View Source
var NoBlacklist = map[string]struct{}{}
NoBlacklist is an empty blacklist, to be used in GetDirs.
Functions ¶
func EnsureDataDir ¶
EnsureDataDir ensures Elvish's data directory exists, creating it if necessary. It returns the path to the data directory (never with a trailing slash) and possible error.
Types ¶
type Store ¶ added in v0.11.0
type Store interface { NextCmdSeq() (int, error) AddCmd(text string) (int, error) DelCmd(seq int) error Cmd(seq int) (string, error) Cmds(from, upto int) ([]string, error) NextCmd(from int, prefix string) (int, string, error) PrevCmd(upto int, prefix string) (int, string, error) AddDir(dir string, incFactor float64) error DelDir(dir string) error Dirs(blacklist map[string]struct{}) ([]Dir, error) }
Store is an interface satisfied by the storage service.
Click to show internal directories.
Click to hide internal directories.