Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpCommands ¶
DumpCommands returns the whole database as a map. For use in testing and debugging.
func ReplaceCommandsFinder ¶
Types ¶
type CommandDB ¶
type CommandDB interface { // AddSnap adds the entries for commands pointing to the given // snap name to the commands database. AddSnap(snapName, version, summary string, commands []string) error // Commit persist the changes, and closes the database. If the // database has already been committed/rollbacked, does nothing. Commit() error // Rollback aborts the changes, and closes the database. If the // database has already been committed/rollbacked, does nothing. Rollback() error }
func Create ¶
Create opens the commands database for writing, and starts a transaction that drops and recreates the buckets. You should then call AddSnap with each snap you wish to add, and them Commit the results to make the changes live, or Rollback to abort; either of these closes the database again.
Click to show internal directories.
Click to hide internal directories.