summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship
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_relationship
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_relationship')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go4
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go176
2 files changed, 145 insertions, 35 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go
index 7e3c3021e..d7c16c04c 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_pkg.go
@@ -177,6 +177,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_relationship/gen_property_activitystreams_relationship.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go
index f36234e6d..e1ddc6a29 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_relationship/gen_property_activitystreams_relationship.go
@@ -56,6 +56,7 @@ type ActivityStreamsRelationshipPropertyIterator struct {
activitystreamsPersonMember vocab.ActivityStreamsPerson
activitystreamsPlaceMember vocab.ActivityStreamsPlace
activitystreamsProfileMember vocab.ActivityStreamsProfile
+ schemaPropertyValueMember vocab.SchemaPropertyValue
forgefedPushMember vocab.ForgeFedPush
activitystreamsQuestionMember vocab.ActivityStreamsQuestion
activitystreamsReadMember vocab.ActivityStreamsRead
@@ -359,6 +360,12 @@ func deserializeActivityStreamsRelationshipPropertyIterator(i interface{}, alias
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil {
+ this := &ActivityStreamsRelationshipPropertyIterator{
+ alias: alias,
+ schemaPropertyValueMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil {
this := &ActivityStreamsRelationshipPropertyIterator{
alias: alias,
@@ -884,6 +891,13 @@ func (this ActivityStreamsRelationshipPropertyIterator) 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 ActivityStreamsRelationshipPropertyIterator) 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 ActivityStreamsRelationshipPropertyIterator) GetTootEmoji() vocab.TootEmoji {
@@ -1026,6 +1040,9 @@ func (this ActivityStreamsRelationshipPropertyIterator) GetType() vocab.Type {
if this.IsActivityStreamsProfile() {
return this.GetActivityStreamsProfile()
}
+ if this.IsSchemaPropertyValue() {
+ return this.GetSchemaPropertyValue()
+ }
if this.IsForgeFedPush() {
return this.GetForgeFedPush()
}
@@ -1128,6 +1145,7 @@ func (this ActivityStreamsRelationshipPropertyIterator) HasAny() bool {
this.IsActivityStreamsPerson() ||
this.IsActivityStreamsPlace() ||
this.IsActivityStreamsProfile() ||
+ this.IsSchemaPropertyValue() ||
this.IsForgeFedPush() ||
this.IsActivityStreamsQuestion() ||
this.IsActivityStreamsRead() ||
@@ -1566,6 +1584,13 @@ func (this ActivityStreamsRelationshipPropertyIterator) 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 ActivityStreamsRelationshipPropertyIterator) 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 ActivityStreamsRelationshipPropertyIterator) IsTootEmoji() bool {
@@ -1669,6 +1694,8 @@ func (this ActivityStreamsRelationshipPropertyIterator) JSONLDContext() map[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() {
@@ -1847,60 +1874,63 @@ func (this ActivityStreamsRelationshipPropertyIterator) KindIndex() int {
if this.IsActivityStreamsProfile() {
return 41
}
- if this.IsForgeFedPush() {
+ if this.IsSchemaPropertyValue() {
return 42
}
- if this.IsActivityStreamsQuestion() {
+ if this.IsForgeFedPush() {
return 43
}
- if this.IsActivityStreamsRead() {
+ if this.IsActivityStreamsQuestion() {
return 44
}
- if this.IsActivityStreamsReject() {
+ if this.IsActivityStreamsRead() {
return 45
}
- if this.IsActivityStreamsRelationship() {
+ if this.IsActivityStreamsReject() {
return 46
}
- if this.IsActivityStreamsRemove() {
+ if this.IsActivityStreamsRelationship() {
return 47
}
- if this.IsForgeFedRepository() {
+ if this.IsActivityStreamsRemove() {
return 48
}
- if this.IsActivityStreamsService() {
+ if this.IsForgeFedRepository() {
return 49
}
- if this.IsActivityStreamsTentativeAccept() {
+ if this.IsActivityStreamsService() {
return 50
}
- if this.IsActivityStreamsTentativeReject() {
+ if this.IsActivityStreamsTentativeAccept() {
return 51
}
- if this.IsForgeFedTicket() {
+ if this.IsActivityStreamsTentativeReject() {
return 52
}
- if this.IsForgeFedTicketDependency() {
+ if this.IsForgeFedTicket() {
return 53
}
- if this.IsActivityStreamsTombstone() {
+ if this.IsForgeFedTicketDependency() {
return 54
}
- if this.IsActivityStreamsTravel() {
+ if this.IsActivityStreamsTombstone() {
return 55
}
- if this.IsActivityStreamsUndo() {
+ if this.IsActivityStreamsTravel() {
return 56
}
- if this.IsActivityStreamsUpdate() {
+ if this.IsActivityStreamsUndo() {
return 57
}
- if this.IsActivityStreamsVideo() {
+ if this.IsActivityStreamsUpdate() {
return 58
}
- if this.IsActivityStreamsView() {
+ if this.IsActivityStreamsVideo() {
return 59
}
+ if this.IsActivityStreamsView() {
+ return 60
+ }
if this.IsIRI() {
return -2
}
@@ -2002,6 +2032,8 @@ func (this ActivityStreamsRelationshipPropertyIterator) LessThan(o vocab.Activit
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() {
@@ -2483,6 +2515,13 @@ func (this *ActivityStreamsRelationshipPropertyIterator) SetIRI(v *url.URL) {
this.iri = v
}
+// SetSchemaPropertyValue sets the value of this property. Calling
+// IsSchemaPropertyValue afterwards returns true.
+func (this *ActivityStreamsRelationshipPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.clear()
+ this.schemaPropertyValueMember = v
+}
+
// SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards
// returns true.
func (this *ActivityStreamsRelationshipPropertyIterator) SetTootEmoji(v vocab.TootEmoji) {
@@ -2668,6 +2707,10 @@ func (this *ActivityStreamsRelationshipPropertyIterator) SetType(t vocab.Type) e
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
@@ -2789,6 +2832,7 @@ func (this *ActivityStreamsRelationshipPropertyIterator) clear() {
this.activitystreamsPersonMember = nil
this.activitystreamsPlaceMember = nil
this.activitystreamsProfileMember = nil
+ this.schemaPropertyValueMember = nil
this.forgefedPushMember = nil
this.activitystreamsQuestionMember = nil
this.activitystreamsReadMember = nil
@@ -2900,6 +2944,8 @@ func (this ActivityStreamsRelationshipPropertyIterator) serialize() (interface{}
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() {
@@ -3705,6 +3751,18 @@ func (this *ActivityStreamsRelationshipProperty) AppendIRI(v *url.URL) {
})
}
+// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list
+// of the property "relationship". Invalidates iterators that are traversing
+// using Prev.
+func (this *ActivityStreamsRelationshipProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.properties = append(this.properties, &ActivityStreamsRelationshipPropertyIterator{
+ alias: this.alias,
+ myIdx: this.Len(),
+ parent: this,
+ schemaPropertyValueMember: v,
+ })
+}
+
// AppendTootEmoji appends a Emoji value to the back of a list of the property
// "relationship". Invalidates iterators that are traversing using Prev.
func (this *ActivityStreamsRelationshipProperty) AppendTootEmoji(v vocab.TootEmoji) {
@@ -4778,6 +4836,23 @@ func (this *ActivityStreamsRelationshipProperty) InsertIRI(idx int, v *url.URL)
}
}
+// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index
+// for a property "relationship". Existing elements at that index and higher
+// are shifted back once. Invalidates all iterators.
+func (this *ActivityStreamsRelationshipProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) {
+ this.properties = append(this.properties, nil)
+ copy(this.properties[idx+1:], this.properties[idx:])
+ this.properties[idx] = &ActivityStreamsRelationshipPropertyIterator{
+ 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
// "relationship". Existing elements at that index and higher are shifted back
// once. Invalidates all iterators.
@@ -5042,74 +5117,78 @@ func (this ActivityStreamsRelationshipProperty) Less(i, j int) bool {
rhs := this.properties[j].GetActivityStreamsProfile()
return lhs.LessThan(rhs)
} else if idx1 == 42 {
+ lhs := this.properties[i].GetSchemaPropertyValue()
+ rhs := this.properties[j].GetSchemaPropertyValue()
+ return lhs.LessThan(rhs)
+ } else if idx1 == 43 {
lhs := this.properties[i].GetForgeFedPush()
rhs := this.properties[j].GetForgeFedPush()
return lhs.LessThan(rhs)
- } else if idx1 == 43 {
+ } else if idx1 == 44 {
lhs := this.properties[i].GetActivityStreamsQuestion()
rhs := this.properties[j].GetActivityStreamsQuestion()
return lhs.LessThan(rhs)
- } else if idx1 == 44 {
+ } else if idx1 == 45 {
lhs := this.properties[i].GetActivityStreamsRead()
rhs := this.properties[j].GetActivityStreamsRead()
return lhs.LessThan(rhs)
- } else if idx1 == 45 {
+ } else if idx1 == 46 {
lhs := this.properties[i].GetActivityStreamsReject()
rhs := this.properties[j].GetActivityStreamsReject()
return lhs.LessThan(rhs)
- } else if idx1 == 46 {
+ } else if idx1 == 47 {
lhs := this.properties[i].GetActivityStreamsRelationship()
rhs := this.properties[j].GetActivityStreamsRelationship()
return lhs.LessThan(rhs)
- } else if idx1 == 47 {
+ } else if idx1 == 48 {
lhs := this.properties[i].GetActivityStreamsRemove()
rhs := this.properties[j].GetActivityStreamsRemove()
return lhs.LessThan(rhs)
- } else if idx1 == 48 {
+ } else if idx1 == 49 {
lhs := this.properties[i].GetForgeFedRepository()
rhs := this.properties[j].GetForgeFedRepository()
return lhs.LessThan(rhs)
- } else if idx1 == 49 {
+ } else if idx1 == 50 {
lhs := this.properties[i].GetActivityStreamsService()
rhs := this.properties[j].GetActivityStreamsService()
return lhs.LessThan(rhs)
- } else if idx1 == 50 {
+ } else if idx1 == 51 {
lhs := this.properties[i].GetActivityStreamsTentativeAccept()
rhs := this.properties[j].GetActivityStreamsTentativeAccept()
return lhs.LessThan(rhs)
- } else if idx1 == 51 {
+ } else if idx1 == 52 {
lhs := this.properties[i].GetActivityStreamsTentativeReject()
rhs := this.properties[j].GetActivityStreamsTentativeReject()
return lhs.LessThan(rhs)
- } else if idx1 == 52 {
+ } else if idx1 == 53 {
lhs := this.properties[i].GetForgeFedTicket()
rhs := this.properties[j].GetForgeFedTicket()
return lhs.LessThan(rhs)
- } else if idx1 == 53 {
+ } else if idx1 == 54 {
lhs := this.properties[i].GetForgeFedTicketDependency()
rhs := this.properties[j].GetForgeFedTicketDependency()
return lhs.LessThan(rhs)
- } else if idx1 == 54 {
+ } else if idx1 == 55 {
lhs := this.properties[i].GetActivityStreamsTombstone()
rhs := this.properties[j].GetActivityStreamsTombstone()
return lhs.LessThan(rhs)
- } else if idx1 == 55 {
+ } else if idx1 == 56 {
lhs := this.properties[i].GetActivityStreamsTravel()
rhs := this.properties[j].GetActivityStreamsTravel()
return lhs.LessThan(rhs)
- } else if idx1 == 56 {
+ } else if idx1 == 57 {
lhs := this.properties[i].GetActivityStreamsUndo()
rhs := this.properties[j].GetActivityStreamsUndo()
return lhs.LessThan(rhs)
- } else if idx1 == 57 {
+ } else if idx1 == 58 {
lhs := this.properties[i].GetActivityStreamsUpdate()
rhs := this.properties[j].GetActivityStreamsUpdate()
return lhs.LessThan(rhs)
- } else if idx1 == 58 {
+ } else if idx1 == 59 {
lhs := this.properties[i].GetActivityStreamsVideo()
rhs := this.properties[j].GetActivityStreamsVideo()
return lhs.LessThan(rhs)
- } else if idx1 == 59 {
+ } else if idx1 == 60 {
lhs := this.properties[i].GetActivityStreamsView()
rhs := this.properties[j].GetActivityStreamsView()
return lhs.LessThan(rhs)
@@ -5981,6 +6060,20 @@ func (this *ActivityStreamsRelationshipProperty) PrependIRI(v *url.URL) {
}
}
+// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a
+// list of the property "relationship". Invalidates all iterators.
+func (this *ActivityStreamsRelationshipProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.properties = append([]*ActivityStreamsRelationshipPropertyIterator{{
+ 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
// "relationship". Invalidates all iterators.
func (this *ActivityStreamsRelationshipProperty) PrependTootEmoji(v vocab.TootEmoji) {
@@ -6827,6 +6920,19 @@ func (this *ActivityStreamsRelationshipProperty) SetIRI(idx int, v *url.URL) {
}
}
+// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index
+// for the property "relationship". Panics if the index is out of bounds.
+// Invalidates all iterators.
+func (this *ActivityStreamsRelationshipProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) {
+ (this.properties)[idx].parent = nil
+ (this.properties)[idx] = &ActivityStreamsRelationshipPropertyIterator{
+ alias: this.alias,
+ myIdx: idx,
+ parent: this,
+ schemaPropertyValueMember: v,
+ }
+}
+
// SetTootEmoji sets a Emoji value to be at the specified index for the property
// "relationship". Panics if the index is out of bounds. Invalidates all
// iterators.