Beispiel #1
0
/* Return a list of all tags found in the database.
 *
 * This function creates a list of all tags found in the database. The
 * resulting list contains all tags from all messages found in the database.
 *
 * On error this function returns NULL.
 */
func (self *Database) GetAllTags() *Tags {
	tags := C.notmuch_database_get_all_tags(self.db)
	if tags == nil {
		return nil
	}
	return &Tags{tags: tags}
}
Beispiel #2
0
Datei: db.go Projekt: gmuch/gmuch
// Tags returns the list of all tags in the database.
func (db *DB) Tags() (*Tags, error) {
	ctags := C.notmuch_database_get_all_tags(db.toC())
	if ctags == nil {
		return nil, ErrUnknownError
	}
	tags := &Tags{
		cptr:   unsafe.Pointer(ctags),
		parent: (*cStruct)(db),
	}
	setGcClose(tags)
	return tags, nil
}