summaryrefslogtreecommitdiff
path: root/internal/db/db.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-05-09 14:06:06 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-09 14:06:06 +0200
commit3363e0ebdd2ad8bde458037b82432bc3dd93adde (patch)
tree3b105083f75aa47f3872b588403d9e5cf2f45d14 /internal/db/db.go
parentLetsencrypt (#17) (diff)
downloadgotosocial-3363e0ebdd2ad8bde458037b82432bc3dd93adde.tar.xz
add api/v1/instance info handler + instance model (#18)
Diffstat (limited to 'internal/db/db.go')
-rw-r--r--internal/db/db.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/db/db.go b/internal/db/db.go
index 3e085e180..b281dd8d7 100644
--- a/internal/db/db.go
+++ b/internal/db/db.go
@@ -117,6 +117,11 @@ type DB interface {
// This is needed for things like serving files that belong to the instance and not an individual user/account.
CreateInstanceAccount() error
+ // CreateInstanceInstance creates an instance in the database with the same domain as the instance host value.
+ // Ie., if the instance is hosted at 'example.org' the instance will have a domain of 'example.org'.
+ // This is needed for things like serving instance information through /api/v1/instance
+ CreateInstanceInstance() error
+
// GetAccountByUserID is a shortcut for the common action of fetching an account corresponding to a user ID.
// The given account pointer will be set to the result of the query, whatever it is.
// In case of no entries, a 'no entries' error will be returned