summaryrefslogtreecommitdiff
path: root/internal/db/instance.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-03-14 17:11:04 +0100
committerLibravatar GitHub <noreply@github.com>2023-03-14 16:11:04 +0000
commit196cd88b1c7c44a337ca12f6a804f1bb7fa83c4a (patch)
tree9607d95b3f4f55a1ebfeded2f7aa9a3c8866bd0a /internal/db/instance.go
parent[chore] fix + update swagger docs (#1622) (diff)
downloadgotosocial-196cd88b1c7c44a337ca12f6a804f1bb7fa83c4a.tar.xz
[feature] Allow admins to send test emails (#1620)
* [feature] Allow admins to send test emails * implement unwrap on new error type * add + use gtserror types * GoToSocial Email Test -> GoToSocial Test Email * add + use getInstance db call * removed unused "unknown" error type
Diffstat (limited to 'internal/db/instance.go')
-rw-r--r--internal/db/instance.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/db/instance.go b/internal/db/instance.go
index 85d094d96..dff471193 100644
--- a/internal/db/instance.go
+++ b/internal/db/instance.go
@@ -34,6 +34,9 @@ type Instance interface {
// CountInstanceDomains returns the number of known instances known that the given domain federates with.
CountInstanceDomains(ctx context.Context, domain string) (int, Error)
+ // GetInstance returns the instance entry for the given domain, if it exists.
+ GetInstance(ctx context.Context, domain string) (*gtsmodel.Instance, Error)
+
// GetInstanceAccounts returns a slice of accounts from the given instance, arranged by ID.
GetInstanceAccounts(ctx context.Context, domain string, maxID string, limit int) ([]*gtsmodel.Account, Error)