github.com/elves/Elvish@v0.12.0/store/storedefs/interface.go (about) 1 package storedefs 2 3 // Store is an interface satisfied by the storage service. 4 type Store interface { 5 NextCmdSeq() (int, error) 6 AddCmd(text string) (int, error) 7 DelCmd(seq int) error 8 Cmd(seq int) (string, error) 9 Cmds(from, upto int) ([]string, error) 10 NextCmd(from int, prefix string) (int, string, error) 11 PrevCmd(upto int, prefix string) (int, string, error) 12 13 AddDir(dir string, incFactor float64) error 14 DelDir(dir string) error 15 Dirs(blacklist map[string]struct{}) ([]Dir, error) 16 17 SharedVar(name string) (string, error) 18 SetSharedVar(name, value string) error 19 DelSharedVar(name string) error 20 }