aboutsummaryrefslogtreecommitdiff
path: root/db/local.go
diff options
context:
space:
mode:
authorFChannel <>2022-04-30 11:00:55 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commit1892327cee2c3fa1d3bea729bd08eb63c2189a96 (patch)
tree7b846f7d9caf46fba6c9d15ff81b9d89dcca9476 /db/local.go
parent5b52d269faa2ce2014d0feba603a2122361cf4eb (diff)
restructured code base to prevent circular dependicies
Diffstat (limited to 'db/local.go')
-rw-r--r--db/local.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/db/local.go b/db/local.go
deleted file mode 100644
index 7cb46d1..0000000
--- a/db/local.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package db
-
-func IsIDLocal(id string) (bool, error) {
- activity, err := GetActivityFromDB(id)
- return len(activity.OrderedItems) > 0, err
-}
-
-func IsActorLocal(id string) (bool, error) {
- actor, err := GetActorFromDB(id)
- return actor.Id != "", err
-}
-
-func IsObjectLocal(id string) (bool, error) {
- query := `select id from activitystream where id=$1`
-
- rows, err := db.Query(query, id)
- if err != nil {
- return false, err
- }
-
- var nID string
- defer rows.Close()
-
- rows.Next()
- err = rows.Scan(&nID)
- return nID != "", err
-}
-
-func IsObjectCached(id string) (bool, error) {
- query := `select id from cacheactivitystream where id=$1`
- rows, err := db.Query(query, id)
- if err != nil {
- return false, err
- }
-
- var nID string
- defer rows.Close()
-
- rows.Next()
- err = rows.Scan(&nID)
- return nID != "", err
-}