2021-08-17 11:18:43 +02:00
|
|
|
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)
|
2021-08-17 11:18:43 +02:00
|
|
|
|
|
|
|
|
// 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)
|
2021-08-17 11:18:43 +02:00
|
|
|
|
|
|
|
|
// 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)
|
2021-08-17 11:18:43 +02:00
|
|
|
|
|
|
|
|
// 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)
|
2021-08-17 11:18:43 +02:00
|
|
|
}
|