summaryrefslogtreecommitdiff
path: root/internal/db/db.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-07-31 15:47:35 +0200
committerLibravatar GitHub <noreply@github.com>2023-07-31 15:47:35 +0200
commit2796a2e82f16ade9872008878cf88299bd66b4e7 (patch)
tree76f7b69cc1da57ca10b71c57abf1892575bea100 /internal/db/db.go
parent[performance] cache follow, follow request and block ID lists (#2027) (diff)
downloadgotosocial-2796a2e82f16ade9872008878cf88299bd66b4e7.tar.xz
[feature] Hashtag federation (in/out), hashtag client API endpoints (#2032)
* update go-fed * do the things * remove unused columns from tags * update to latest lingo from main * further tag shenanigans * serve stub page at tag endpoint * we did it lads * tests, oh tests, ohhh tests, oh tests (doo doo doo doo) * swagger docs * document hashtag usage + federation * instanceGet * don't bother parsing tag href * rename whereStartsWith -> whereStartsLike * remove GetOrCreateTag * dont cache status tag timelineability
Diffstat (limited to 'internal/db/db.go')
-rw-r--r--internal/db/db.go20
1 files changed, 1 insertions, 19 deletions
diff --git a/internal/db/db.go b/internal/db/db.go
index 370dab38b..7c00050ff 100644
--- a/internal/db/db.go
+++ b/internal/db/db.go
@@ -17,12 +17,6 @@
package db
-import (
- "context"
-
- "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
-)
-
const (
// DBTypePostgres represents an underlying POSTGRES database type.
DBTypePostgres string = "POSTGRES"
@@ -48,20 +42,8 @@ type DB interface {
Status
StatusBookmark
StatusFave
+ Tag
Timeline
User
Tombstone
-
- /*
- USEFUL CONVERSION FUNCTIONS
- */
-
- // TagStringToTag takes a lowercase tag in the form "somehashtag", which has been
- // used in a status. It takes the id of the account that wrote the status, and the id of the status itself, and then
- // returns an *apimodel.Tag corresponding to the given tags. If the tag already exists in database, that tag
- // will be returned. Otherwise a pointer to a new tag struct will be created and returned.
- //
- // Note: this func doesn't/shouldn't do any manipulation of tags in the DB, it's just for checking
- // if they exist in the db already, and conveniently returning them, or creating new tag structs.
- TagStringToTag(ctx context.Context, tag string, originAccountID string) (*gtsmodel.Tag, error)
}