gotosocial/internal/db/instance.go

17 lines
782 B
Go
Raw Normal View History

package db
import "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
type Instance interface {
// GetUserCountForInstance returns the number of known accounts registered with the given domain.
2021-08-17 15:23:28 +02:00
GetUserCountForInstance(domain string) (int, DBError)
// GetStatusCountForInstance returns the number of known statuses posted from the given domain.
2021-08-17 15:23:28 +02:00
GetStatusCountForInstance(domain string) (int, DBError)
// GetDomainCountForInstance returns the number of known instances known that the given domain federates with.
2021-08-17 15:23:28 +02:00
GetDomainCountForInstance(domain string) (int, DBError)
// GetAccountsForInstance returns a slice of accounts from the given instance, arranged by ID.
2021-08-17 15:23:28 +02:00
GetAccountsForInstance(domain string, maxID string, limit int) ([]*gtsmodel.Account, DBError)
}