summaryrefslogtreecommitdiff
path: root/internal/db/instance.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-07-07 11:34:12 +0200
committerLibravatar GitHub <noreply@github.com>2023-07-07 11:34:12 +0200
commite70bf8a6c82e3d5c943550b364fc6f8120f6f07e (patch)
treef408ccff2e6f2451bf95ee9a5d96e5b678d686d5 /internal/db/instance.go
parent[chore/performance] Remove remaining 'whereEmptyOrNull' funcs (#1946) (diff)
downloadgotosocial-e70bf8a6c82e3d5c943550b364fc6f8120f6f07e.tar.xz
[chore/bugfix] Domain block tidying up, Implement first pass of `207 Multi-Status` (#1886)
* [chore/refactor] update domain block processing * expose domain block import errors a lil better * move/remove unused query keys
Diffstat (limited to 'internal/db/instance.go')
-rw-r--r--internal/db/instance.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/db/instance.go b/internal/db/instance.go
index 3166a0a18..ab40c7a82 100644
--- a/internal/db/instance.go
+++ b/internal/db/instance.go
@@ -37,6 +37,15 @@ type Instance interface {
// GetInstance returns the instance entry for the given domain, if it exists.
GetInstance(ctx context.Context, domain string) (*gtsmodel.Instance, Error)
+ // GetInstanceByID returns the instance entry corresponding to the given id, if it exists.
+ GetInstanceByID(ctx context.Context, id string) (*gtsmodel.Instance, error)
+
+ // PutInstance inserts the given instance into the database.
+ PutInstance(ctx context.Context, instance *gtsmodel.Instance) error
+
+ // UpdateInstance updates the given instance entry.
+ UpdateInstance(ctx context.Context, instance *gtsmodel.Instance, columns ...string) 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)