Documentation ¶
Index ¶
- func AllGroups() []string
- func AllItems() []*models.Item
- func CreateItem(group, name, value string)
- func FlushStore(data *map[string][]*models.Item)
- func GroupNamed(name string) []*models.Item
- func GroupOrItemNamed(name string) ([]*models.Item, string)
- func ItemNamed(name string) *models.Item
- func ItemNamedLev(name string) *models.Item
- func ReadStore() map[string][]*models.Item
- func RemoveItem(group, name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllGroups ¶
func AllGroups() []string
AllGroups returns all group names contained in the local store
func CreateItem ¶
func CreateItem(group, name, value string)
CreateItem creates an item in the store using the given group name, item name and value
func FlushStore ¶
FlushStore overwrites the local store with the provided contents
func GroupNamed ¶
GroupNamed searches for a group with a given name
func GroupOrItemNamed ¶
GroupOrItemNamed searches for either a group or an item with a given name. First, looks for an item whose name matches the given value. If it can't be found, searches for a group whose name matches the given value. Again, if none found, searches for an item using Levenshtein comparsion.
func ItemNamedLev ¶
ItemNamedLev searches for an item with a given name that either fully matches the provided string or is close, when calculated using the Levenshtein string distance algorithm
func RemoveItem ¶
func RemoveItem(group, name string)
RemoveItem removes an item with a given name and group
Types ¶
This section is empty.