Documentation ¶
Index ¶
- Constants
- Variables
- func CloseTagSets() (err error)
- func GetTagDatPath(basedir string) string
- func ReleaseTagMan(id uint64, guid uuid.UUID) (err error)
- type TagMan
- func (tm *TagMan) Active() bool
- func (tm *TagMan) AddTag(name string) error
- func (tm *TagMan) Close() (err error)
- func (tm *TagMan) Count() (cnt int, err error)
- func (tm *TagMan) EnsureTag(id entry.EntryTag, name string) error
- func (tm *TagMan) GetAndPopulate(name string) (entry.EntryTag, error)
- func (tm *TagMan) GetTag(name string) (entry.EntryTag, error)
- func (tm *TagMan) GetTagSubmap(tags []entry.EntryTag) (mp map[string]entry.EntryTag, err error)
- func (tm *TagMan) ImportTags(tgs []string) error
- func (tm *TagMan) Merge(s []TagPair) (updated bool, err error)
- func (tm *TagMan) ResetOverride(s []TagPair) (err error)
- func (tm *TagMan) ReverseLookup(tg entry.EntryTag) (string, error)
- func (tm *TagMan) TagSet() (pairs []TagPair, err error)
- type TagManager
- type TagPair
Constants ¶
View Source
const (
TAG_MANAGER_FILENAME string = "tags.dat"
)
Variables ¶
Functions ¶
func CloseTagSets ¶
func CloseTagSets() (err error)
func GetTagDatPath ¶
Types ¶
type TagMan ¶
type TagMan struct {
// contains filtered or unexported fields
}
func (*TagMan) GetAndPopulate ¶
func (*TagMan) GetTagSubmap ¶
func (*TagMan) ImportTags ¶
func (*TagMan) Merge ¶
Merge attempts to merge the given tag set pair list into the given tag manager if two tag names are the same, we check that the tag ids are the same if they are not the same, we throw an error
func (*TagMan) ResetOverride ¶
ResetOverride forces the tag manager to completely reset state and treat the provided tag set and use the provided tags. If the provided set does not contain "default" and "gravwell" they are automatically added
type TagManager ¶
type TagManager interface { AddTag(name string) error ImportTags(tags []string) error EnsureTag(id entry.EntryTag, name string) error GetAndPopulate(name string) (entry.EntryTag, error) GetTag(name string) (entry.EntryTag, error) ReverseLookup(tg entry.EntryTag) (string, error) TagSet() ([]TagPair, error) ResetOverride([]TagPair) error GetTagSubmap([]entry.EntryTag) (map[string]entry.EntryTag, error) Merge([]TagPair) (bool, error) Active() bool Count() (int, error) }
Click to show internal directories.
Click to hide internal directories.