Example #1
0
//keys return datfile names of Sugtaglist.
func keys() []string {
	var r []string
	err := db.DB.View(func(tx *bolt.Tx) error {
		var err error
		r, err = db.KeyStrings(tx, "sugtag")
		return err
	})
	if err != nil {
		log.Print(err)
		return nil
	}
	return r
}
Example #2
0
//Get tags from the disk and returns Slice.
func Get() tag.Slice {
	var r []string
	err := db.DB.View(func(tx *bolt.Tx) error {
		var err error
		r, err = db.KeyStrings(tx, "usertagTag")
		return err
	})
	if err != nil {
		log.Print(err)
		return nil
	}
	return tag.NewSlice(r)
}
Example #3
0
//getAllNodes returns all nodes in table.
func getAllNodes() node.Slice {
	var r []string
	err := db.DB.View(func(tx *bolt.Tx) error {
		var err error
		r, err = db.KeyStrings(tx, "lookupA")
		return err
	})
	if err != nil {
		log.Print(err)
		return nil
	}
	return node.NewSlice(r)
}
Example #4
0
//AllCaches returns all  thread names
func AllCaches() Caches {
	var r []string
	err := db.DB.View(func(tx *bolt.Tx) error {
		var err error
		r, err = db.KeyStrings(tx, "thread")
		return err
	})
	if err != nil {
		log.Print(err)
		return nil
	}
	ca := make(Caches, len(r))
	for i, t := range r {
		ca[i] = NewCache(t)
	}
	return ca
}