github.com/hugelgupf/u-root@v0.0.0-20191023214958-4807c632154c/cmds/core/elvish/store/storedefs/interface.go (about)

     1  package storedefs
     2  
     3  // Store is an interface for things like command history
     4  // It assumes we have a 'cursor', which we can adjust.
     5  type Store interface {
     6  	Seek(int) (int, error)
     7  	Cur() (int, error)
     8  	Prev() (int, error)
     9  	Next() (int, error)
    10  	Remove(int) error
    11  	Add(text string) (int, error)
    12  	One(int) (string, error)
    13  	List(int, int) ([]string, error)
    14  	Walk(from int, to int, f func(string) bool) error
    15  	Search(from int, prefix string) (int, string, error)
    16  	RSearch(upto int, prefix string) (int, string, error)
    17  }