summaryrefslogtreecommitdiff
path: root/internal/ap/interfaces.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-10-04 13:09:42 +0100
committerLibravatar GitHub <noreply@github.com>2023-10-04 13:09:42 +0100
commitc6e00afc7c23df994b70eee89d2d392718e6a321 (patch)
treecee98c1a78e36ba6a0e8183afa0b2796765fe7f6 /internal/ap/interfaces.go
parent[chore] internal/ap: add pollable AS types, code reformatting, general niceti... (diff)
downloadgotosocial-c6e00afc7c23df994b70eee89d2d392718e6a321.tar.xz
[feature] tentatively start adding polls support (#2249)
Diffstat (limited to 'internal/ap/interfaces.go')
-rw-r--r--internal/ap/interfaces.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/ap/interfaces.go b/internal/ap/interfaces.go
index 4538c476f..9e606db62 100644
--- a/internal/ap/interfaces.go
+++ b/internal/ap/interfaces.go
@@ -247,14 +247,8 @@ type CollectionPageIterator interface {
NextPage() WithIRI
PrevPage() WithIRI
- NextItem() IteratorItemable
- PrevItem() IteratorItemable
-}
-
-// IteratorItemable represents the minimum interface for an item in an iterator.
-type IteratorItemable interface {
- WithIRI
- WithType
+ NextItem() TypeOrIRI
+ PrevItem() TypeOrIRI
}
// Flaggable represents the minimum interface for an activitystreams 'Flag' activity.
@@ -267,6 +261,12 @@ type Flaggable interface {
WithObject
}
+// TypeOrIRI represents the minimum interface for something that may be a vocab.Type OR IRI.
+type TypeOrIRI interface {
+ WithIRI
+ WithType
+}
+
// WithJSONLDId represents an activity with JSONLDIdProperty.
type WithJSONLDId interface {
GetJSONLDId() vocab.JSONLDIdProperty