Documentation
¶
Index ¶
Constants ¶
View Source
const (
DB_NAME = "cmd.db"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandEvent ¶
CommandEvent is published when a command running in a pane completes execution.
type DB ¶
func (*DB) CreateCommand ¶
func (db *DB) CreateCommand( ctx context.Context, c CommandEvent, ) error
func (*DB) ListCommands ¶
func (db *DB) ListCommands(ctx context.Context) ([]CommandEvent, error)
type Store ¶
type Store struct { deadlock.RWMutex // contains filtered or unexported fields }
Store coordinates the access to and creation of SQLite databases containing executed commands.
func (*Store) OpenDatabases ¶
OpenDatabases looks for cmd.db in all of the provided data directories and opens them if they exist. This method does not create new databases.
func (*Store) QueryCommands ¶
func (s *Store) QueryCommands(ctx context.Context) ([]CommandEvent, error)
QueryCommands queries commands across all open command databases.
func (*Store) SaveCommand ¶
func (s *Store) SaveCommand(ctx context.Context, c CommandEvent) error
SaveCommand stores a command in the command database adjacent to its borg file.
Click to show internal directories.
Click to hide internal directories.