src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/cli/histutil/db.go (about)

     1  package histutil
     2  
     3  import (
     4  	"src.elv.sh/pkg/store/storedefs"
     5  )
     6  
     7  // DB is the interface of the storage database.
     8  type DB interface {
     9  	NextCmdSeq() (int, error)
    10  	AddCmd(cmd string) (int, error)
    11  	CmdsWithSeq(from, upto int) ([]storedefs.Cmd, error)
    12  	PrevCmd(upto int, prefix string) (storedefs.Cmd, error)
    13  	NextCmd(from int, prefix string) (storedefs.Cmd, error)
    14  }