Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandStore ¶
type CommandStore interface { // Store stores the passed commands map. Store(cmds map[string]string) error // Load retrieves a stored commands map or // an empty map, if no store was applied // before. Load() (cmds map[string]string, err error) }
CommandStore allows to store and load registered commands so that they can be updated instead of deleted and re-created on restarts.
type LocalCommandStore ¶
type LocalCommandStore struct {
// contains filtered or unexported fields
}
LocalCommandStore implements CommandStore for a local file as storage device.
func NewDefault ¶
func NewDefault() *LocalCommandStore
NewDefault returns a new LocalCommandStore with default file location (".commandCache.json").
func NewLocalCommandStore ¶
func NewLocalCommandStore(loc string) *LocalCommandStore
NewLocalCommandStore creates a new instance of LocalCommandStore with the passed file location as stoage destination.
Click to show internal directories.
Click to hide internal directories.