summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-05-09 12:16:10 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-09 11:16:10 +0100
commit0e29f1f5bb68a48d9b837d7f4e0a16370734955b (patch)
treef08d203ec8ca8aeea728e5251b1dc3956524b4f4 /vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items
parent[chore/performance] Make sender multiplier configurable (#1750) (diff)
downloadgotosocial-0e29f1f5bb68a48d9b837d7f4e0a16370734955b.tar.xz
[feature] Enable federation in/out of profile PropertyValue fields (#1722)
Co-authored-by: kim <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go4
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go176
2 files changed, 145 insertions, 35 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go
index 311a38162..3227d852d 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_pkg.go
@@ -185,6 +185,10 @@ type privateManager interface {
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, error)
+ // DeserializePropertyValueSchema returns the deserialization method for
+ // the "SchemaPropertyValue" non-functional property in the vocabulary
+ // "Schema"
+ DeserializePropertyValueSchema() func(map[string]interface{}, map[string]string) (vocab.SchemaPropertyValue, error)
// DeserializePushForgeFed returns the deserialization method for the
// "ForgeFedPush" non-functional property in the vocabulary "ForgeFed"
DeserializePushForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedPush, error)
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go
index 7944a4541..c0dccff4f 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_items/gen_property_activitystreams_items.go
@@ -58,6 +58,7 @@ type ActivityStreamsItemsPropertyIterator struct {
activitystreamsPersonMember vocab.ActivityStreamsPerson
activitystreamsPlaceMember vocab.ActivityStreamsPlace
activitystreamsProfileMember vocab.ActivityStreamsProfile
+ schemaPropertyValueMember vocab.SchemaPropertyValue
forgefedPushMember vocab.ForgeFedPush
activitystreamsQuestionMember vocab.ActivityStreamsQuestion
activitystreamsReadMember vocab.ActivityStreamsRead
@@ -373,6 +374,12 @@ func deserializeActivityStreamsItemsPropertyIterator(i interface{}, aliasMap map
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil {
+ this := &ActivityStreamsItemsPropertyIterator{
+ alias: alias,
+ schemaPropertyValueMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil {
this := &ActivityStreamsItemsPropertyIterator{
alias: alias,
@@ -912,6 +919,13 @@ func (this ActivityStreamsItemsPropertyIterator) GetIRI() *url.URL {
return this.iri
}
+// GetSchemaPropertyValue returns the value of this property. When
+// IsSchemaPropertyValue returns false, GetSchemaPropertyValue will return an
+// arbitrary value.
+func (this ActivityStreamsItemsPropertyIterator) GetSchemaPropertyValue() vocab.SchemaPropertyValue {
+ return this.schemaPropertyValueMember
+}
+
// GetTootEmoji returns the value of this property. When IsTootEmoji returns
// false, GetTootEmoji will return an arbitrary value.
func (this ActivityStreamsItemsPropertyIterator) GetTootEmoji() vocab.TootEmoji {
@@ -1060,6 +1074,9 @@ func (this ActivityStreamsItemsPropertyIterator) GetType() vocab.Type {
if this.IsActivityStreamsProfile() {
return this.GetActivityStreamsProfile()
}
+ if this.IsSchemaPropertyValue() {
+ return this.GetSchemaPropertyValue()
+ }
if this.IsForgeFedPush() {
return this.GetForgeFedPush()
}
@@ -1164,6 +1181,7 @@ func (this ActivityStreamsItemsPropertyIterator) HasAny() bool {
this.IsActivityStreamsPerson() ||
this.IsActivityStreamsPlace() ||
this.IsActivityStreamsProfile() ||
+ this.IsSchemaPropertyValue() ||
this.IsForgeFedPush() ||
this.IsActivityStreamsQuestion() ||
this.IsActivityStreamsRead() ||
@@ -1616,6 +1634,13 @@ func (this ActivityStreamsItemsPropertyIterator) IsIRI() bool {
return this.iri != nil
}
+// IsSchemaPropertyValue returns true if this property has a type of
+// "PropertyValue". When true, use the GetSchemaPropertyValue and
+// SetSchemaPropertyValue methods to access and set this property.
+func (this ActivityStreamsItemsPropertyIterator) IsSchemaPropertyValue() bool {
+ return this.schemaPropertyValueMember != nil
+}
+
// IsTootEmoji returns true if this property has a type of "Emoji". When true, use
// the GetTootEmoji and SetTootEmoji methods to access and set this property.
func (this ActivityStreamsItemsPropertyIterator) IsTootEmoji() bool {
@@ -1723,6 +1748,8 @@ func (this ActivityStreamsItemsPropertyIterator) JSONLDContext() map[string]stri
child = this.GetActivityStreamsPlace().JSONLDContext()
} else if this.IsActivityStreamsProfile() {
child = this.GetActivityStreamsProfile().JSONLDContext()
+ } else if this.IsSchemaPropertyValue() {
+ child = this.GetSchemaPropertyValue().JSONLDContext()
} else if this.IsForgeFedPush() {
child = this.GetForgeFedPush().JSONLDContext()
} else if this.IsActivityStreamsQuestion() {
@@ -1907,60 +1934,63 @@ func (this ActivityStreamsItemsPropertyIterator) KindIndex() int {
if this.IsActivityStreamsProfile() {
return 43
}
- if this.IsForgeFedPush() {
+ if this.IsSchemaPropertyValue() {
return 44
}
- if this.IsActivityStreamsQuestion() {
+ if this.IsForgeFedPush() {
return 45
}
- if this.IsActivityStreamsRead() {
+ if this.IsActivityStreamsQuestion() {
return 46
}
- if this.IsActivityStreamsReject() {
+ if this.IsActivityStreamsRead() {
return 47
}
- if this.IsActivityStreamsRelationship() {
+ if this.IsActivityStreamsReject() {
return 48
}
- if this.IsActivityStreamsRemove() {
+ if this.IsActivityStreamsRelationship() {
return 49
}
- if this.IsForgeFedRepository() {
+ if this.IsActivityStreamsRemove() {
return 50
}
- if this.IsActivityStreamsService() {
+ if this.IsForgeFedRepository() {
return 51
}
- if this.IsActivityStreamsTentativeAccept() {
+ if this.IsActivityStreamsService() {
return 52
}
- if this.IsActivityStreamsTentativeReject() {
+ if this.IsActivityStreamsTentativeAccept() {
return 53
}
- if this.IsForgeFedTicket() {
+ if this.IsActivityStreamsTentativeReject() {
return 54
}
- if this.IsForgeFedTicketDependency() {
+ if this.IsForgeFedTicket() {
return 55
}
- if this.IsActivityStreamsTombstone() {
+ if this.IsForgeFedTicketDependency() {
return 56
}
- if this.IsActivityStreamsTravel() {
+ if this.IsActivityStreamsTombstone() {
return 57
}
- if this.IsActivityStreamsUndo() {
+ if this.IsActivityStreamsTravel() {
return 58
}
- if this.IsActivityStreamsUpdate() {
+ if this.IsActivityStreamsUndo() {
return 59
}
- if this.IsActivityStreamsVideo() {
+ if this.IsActivityStreamsUpdate() {
return 60
}
- if this.IsActivityStreamsView() {
+ if this.IsActivityStreamsVideo() {
return 61
}
+ if this.IsActivityStreamsView() {
+ return 62
+ }
if this.IsIRI() {
return -2
}
@@ -2066,6 +2096,8 @@ func (this ActivityStreamsItemsPropertyIterator) LessThan(o vocab.ActivityStream
return this.GetActivityStreamsPlace().LessThan(o.GetActivityStreamsPlace())
} else if this.IsActivityStreamsProfile() {
return this.GetActivityStreamsProfile().LessThan(o.GetActivityStreamsProfile())
+ } else if this.IsSchemaPropertyValue() {
+ return this.GetSchemaPropertyValue().LessThan(o.GetSchemaPropertyValue())
} else if this.IsForgeFedPush() {
return this.GetForgeFedPush().LessThan(o.GetForgeFedPush())
} else if this.IsActivityStreamsQuestion() {
@@ -2561,6 +2593,13 @@ func (this *ActivityStreamsItemsPropertyIterator) SetIRI(v *url.URL) {
this.iri = v
}
+// SetSchemaPropertyValue sets the value of this property. Calling
+// IsSchemaPropertyValue afterwards returns true.
+func (this *ActivityStreamsItemsPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.clear()
+ this.schemaPropertyValueMember = v
+}
+
// SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards
// returns true.
func (this *ActivityStreamsItemsPropertyIterator) SetTootEmoji(v vocab.TootEmoji) {
@@ -2754,6 +2793,10 @@ func (this *ActivityStreamsItemsPropertyIterator) SetType(t vocab.Type) error {
this.SetActivityStreamsProfile(v)
return nil
}
+ if v, ok := t.(vocab.SchemaPropertyValue); ok {
+ this.SetSchemaPropertyValue(v)
+ return nil
+ }
if v, ok := t.(vocab.ForgeFedPush); ok {
this.SetForgeFedPush(v)
return nil
@@ -2877,6 +2920,7 @@ func (this *ActivityStreamsItemsPropertyIterator) clear() {
this.activitystreamsPersonMember = nil
this.activitystreamsPlaceMember = nil
this.activitystreamsProfileMember = nil
+ this.schemaPropertyValueMember = nil
this.forgefedPushMember = nil
this.activitystreamsQuestionMember = nil
this.activitystreamsReadMember = nil
@@ -2992,6 +3036,8 @@ func (this ActivityStreamsItemsPropertyIterator) serialize() (interface{}, error
return this.GetActivityStreamsPlace().Serialize()
} else if this.IsActivityStreamsProfile() {
return this.GetActivityStreamsProfile().Serialize()
+ } else if this.IsSchemaPropertyValue() {
+ return this.GetSchemaPropertyValue().Serialize()
} else if this.IsForgeFedPush() {
return this.GetForgeFedPush().Serialize()
} else if this.IsActivityStreamsQuestion() {
@@ -3771,6 +3817,18 @@ func (this *ActivityStreamsItemsProperty) AppendIRI(v *url.URL) {
})
}
+// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list
+// of the property "items". Invalidates iterators that are traversing using
+// Prev.
+func (this *ActivityStreamsItemsProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.properties = append(this.properties, &ActivityStreamsItemsPropertyIterator{
+ alias: this.alias,
+ myIdx: this.Len(),
+ parent: this,
+ schemaPropertyValueMember: v,
+ })
+}
+
// AppendTootEmoji appends a Emoji value to the back of a list of the property
// "items". Invalidates iterators that are traversing using Prev.
func (this *ActivityStreamsItemsProperty) AppendTootEmoji(v vocab.TootEmoji) {
@@ -4875,6 +4933,23 @@ func (this *ActivityStreamsItemsProperty) InsertIRI(idx int, v *url.URL) {
}
}
+// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index
+// for a property "items". Existing elements at that index and higher are
+// shifted back once. Invalidates all iterators.
+func (this *ActivityStreamsItemsProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) {
+ this.properties = append(this.properties, nil)
+ copy(this.properties[idx+1:], this.properties[idx:])
+ this.properties[idx] = &ActivityStreamsItemsPropertyIterator{
+ alias: this.alias,
+ myIdx: idx,
+ parent: this,
+ schemaPropertyValueMember: v,
+ }
+ for i := idx; i < this.Len(); i++ {
+ (this.properties)[i].myIdx = i
+ }
+}
+
// InsertTootEmoji inserts a Emoji value at the specified index for a property
// "items". Existing elements at that index and higher are shifted back once.
// Invalidates all iterators.
@@ -5147,74 +5222,78 @@ func (this ActivityStreamsItemsProperty) Less(i, j int) bool {
rhs := this.properties[j].GetActivityStreamsProfile()
return lhs.LessThan(rhs)
} else if idx1 == 44 {
+ lhs := this.properties[i].GetSchemaPropertyValue()
+ rhs := this.properties[j].GetSchemaPropertyValue()
+ return lhs.LessThan(rhs)
+ } else if idx1 == 45 {
lhs := this.properties[i].GetForgeFedPush()
rhs := this.properties[j].GetForgeFedPush()
return lhs.LessThan(rhs)
- } else if idx1 == 45 {
+ } else if idx1 == 46 {
lhs := this.properties[i].GetActivityStreamsQuestion()
rhs := this.properties[j].GetActivityStreamsQuestion()
return lhs.LessThan(rhs)
- } else if idx1 == 46 {
+ } else if idx1 == 47 {
lhs := this.properties[i].GetActivityStreamsRead()
rhs := this.properties[j].GetActivityStreamsRead()
return lhs.LessThan(rhs)
- } else if idx1 == 47 {
+ } else if idx1 == 48 {
lhs := this.properties[i].GetActivityStreamsReject()
rhs := this.properties[j].GetActivityStreamsReject()
return lhs.LessThan(rhs)
- } else if idx1 == 48 {
+ } else if idx1 == 49 {
lhs := this.properties[i].GetActivityStreamsRelationship()
rhs := this.properties[j].GetActivityStreamsRelationship()
return lhs.LessThan(rhs)
- } else if idx1 == 49 {
+ } else if idx1 == 50 {
lhs := this.properties[i].GetActivityStreamsRemove()
rhs := this.properties[j].GetActivityStreamsRemove()
return lhs.LessThan(rhs)
- } else if idx1 == 50 {
+ } else if idx1 == 51 {
lhs := this.properties[i].GetForgeFedRepository()
rhs := this.properties[j].GetForgeFedRepository()
return lhs.LessThan(rhs)
- } else if idx1 == 51 {
+ } else if idx1 == 52 {
lhs := this.properties[i].GetActivityStreamsService()
rhs := this.properties[j].GetActivityStreamsService()
return lhs.LessThan(rhs)
- } else if idx1 == 52 {
+ } else if idx1 == 53 {
lhs := this.properties[i].GetActivityStreamsTentativeAccept()
rhs := this.properties[j].GetActivityStreamsTentativeAccept()
return lhs.LessThan(rhs)
- } else if idx1 == 53 {
+ } else if idx1 == 54 {
lhs := this.properties[i].GetActivityStreamsTentativeReject()
rhs := this.properties[j].GetActivityStreamsTentativeReject()
return lhs.LessThan(rhs)
- } else if idx1 == 54 {
+ } else if idx1 == 55 {
lhs := this.properties[i].GetForgeFedTicket()
rhs := this.properties[j].GetForgeFedTicket()
return lhs.LessThan(rhs)
- } else if idx1 == 55 {
+ } else if idx1 == 56 {
lhs := this.properties[i].GetForgeFedTicketDependency()
rhs := this.properties[j].GetForgeFedTicketDependency()
return lhs.LessThan(rhs)
- } else if idx1 == 56 {
+ } else if idx1 == 57 {
lhs := this.properties[i].GetActivityStreamsTombstone()
rhs := this.properties[j].GetActivityStreamsTombstone()
return lhs.LessThan(rhs)
- } else if idx1 == 57 {
+ } else if idx1 == 58 {
lhs := this.properties[i].GetActivityStreamsTravel()
rhs := this.properties[j].GetActivityStreamsTravel()
return lhs.LessThan(rhs)
- } else if idx1 == 58 {
+ } else if idx1 == 59 {
lhs := this.properties[i].GetActivityStreamsUndo()
rhs := this.properties[j].GetActivityStreamsUndo()
return lhs.LessThan(rhs)
- } else if idx1 == 59 {
+ } else if idx1 == 60 {
lhs := this.properties[i].GetActivityStreamsUpdate()
rhs := this.properties[j].GetActivityStreamsUpdate()
return lhs.LessThan(rhs)
- } else if idx1 == 60 {
+ } else if idx1 == 61 {
lhs := this.properties[i].GetActivityStreamsVideo()
rhs := this.properties[j].GetActivityStreamsVideo()
return lhs.LessThan(rhs)
- } else if idx1 == 61 {
+ } else if idx1 == 62 {
lhs := this.properties[i].GetActivityStreamsView()
rhs := this.properties[j].GetActivityStreamsView()
return lhs.LessThan(rhs)
@@ -6112,6 +6191,20 @@ func (this *ActivityStreamsItemsProperty) PrependIRI(v *url.URL) {
}
}
+// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a
+// list of the property "items". Invalidates all iterators.
+func (this *ActivityStreamsItemsProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.properties = append([]*ActivityStreamsItemsPropertyIterator{{
+ alias: this.alias,
+ myIdx: 0,
+ parent: this,
+ schemaPropertyValueMember: v,
+ }}, this.properties...)
+ for i := 1; i < this.Len(); i++ {
+ (this.properties)[i].myIdx = i
+ }
+}
+
// PrependTootEmoji prepends a Emoji value to the front of a list of the property
// "items". Invalidates all iterators.
func (this *ActivityStreamsItemsProperty) PrependTootEmoji(v vocab.TootEmoji) {
@@ -6983,6 +7076,19 @@ func (this *ActivityStreamsItemsProperty) SetIRI(idx int, v *url.URL) {
}
}
+// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index
+// for the property "items". Panics if the index is out of bounds. Invalidates
+// all iterators.
+func (this *ActivityStreamsItemsProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) {
+ (this.properties)[idx].parent = nil
+ (this.properties)[idx] = &ActivityStreamsItemsPropertyIterator{
+ alias: this.alias,
+ myIdx: idx,
+ parent: this,
+ schemaPropertyValueMember: v,
+ }
+}
+
// SetTootEmoji sets a Emoji value to be at the specified index for the property
// "items". Panics if the index is out of bounds. Invalidates all iterators.
func (this *ActivityStreamsItemsProperty) SetTootEmoji(idx int, v vocab.TootEmoji) {