WIP: prep for 1.0 #1

Draft
sneak wants to merge 9 commits from next into master
Showing only changes of commit 8dbd92abbd - Show all commits

View File

@ -14,6 +14,16 @@ func (m *Manager) TootCountForHostname(hostname string) (uint, error) {
} }
} }
func (m *Manager) TotalTootCount() (uint, error) {
var c uint
e := m.db.Model(&StoredToot{}).Count(&c)
if e.Error != nil {
return 0, e.Error
} else {
return c, nil
}
}
func (m *Manager) GetAPInstanceFromUUID(uuid *uuid.UUID) (*APInstance, error) { func (m *Manager) GetAPInstanceFromUUID(uuid *uuid.UUID) (*APInstance, error) {
var i APInstance var i APInstance
e := m.db.Model(&APInstance{}).Where("uuid = ?", uuid).First(&i) e := m.db.Model(&APInstance{}).Where("uuid = ?", uuid).First(&i)