summaryrefslogtreecommitdiff
path: root/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed
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_closed
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_closed')
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go4
-rw-r--r--vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go176
2 files changed, 145 insertions, 35 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go
index 2d7436e21..808cbdf51 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_pkg.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/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_closed/gen_property_activitystreams_closed.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go
index c4ab13fc8..76c758a41 100644
--- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go
+++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_closed/gen_property_activitystreams_closed.go
@@ -65,6 +65,7 @@ type ActivityStreamsClosedPropertyIterator struct {
activitystreamsPersonMember vocab.ActivityStreamsPerson
activitystreamsPlaceMember vocab.ActivityStreamsPlace
activitystreamsProfileMember vocab.ActivityStreamsProfile
+ schemaPropertyValueMember vocab.SchemaPropertyValue
forgefedPushMember vocab.ForgeFedPush
activitystreamsQuestionMember vocab.ActivityStreamsQuestion
activitystreamsReadMember vocab.ActivityStreamsRead
@@ -380,6 +381,12 @@ func deserializeActivityStreamsClosedPropertyIterator(i interface{}, aliasMap ma
alias: alias,
}
return this, nil
+ } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil {
+ this := &ActivityStreamsClosedPropertyIterator{
+ alias: alias,
+ schemaPropertyValueMember: v,
+ }
+ return this, nil
} else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil {
this := &ActivityStreamsClosedPropertyIterator{
alias: alias,
@@ -934,6 +941,13 @@ func (this ActivityStreamsClosedPropertyIterator) 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 ActivityStreamsClosedPropertyIterator) 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 ActivityStreamsClosedPropertyIterator) GetTootEmoji() vocab.TootEmoji {
@@ -1082,6 +1096,9 @@ func (this ActivityStreamsClosedPropertyIterator) GetType() vocab.Type {
if this.IsActivityStreamsProfile() {
return this.GetActivityStreamsProfile()
}
+ if this.IsSchemaPropertyValue() {
+ return this.GetSchemaPropertyValue()
+ }
if this.IsForgeFedPush() {
return this.GetForgeFedPush()
}
@@ -1201,6 +1218,7 @@ func (this ActivityStreamsClosedPropertyIterator) HasAny() bool {
this.IsActivityStreamsPerson() ||
this.IsActivityStreamsPlace() ||
this.IsActivityStreamsProfile() ||
+ this.IsSchemaPropertyValue() ||
this.IsForgeFedPush() ||
this.IsActivityStreamsQuestion() ||
this.IsActivityStreamsRead() ||
@@ -1653,6 +1671,13 @@ func (this ActivityStreamsClosedPropertyIterator) 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 ActivityStreamsClosedPropertyIterator) 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 ActivityStreamsClosedPropertyIterator) IsTootEmoji() bool {
@@ -1774,6 +1799,8 @@ func (this ActivityStreamsClosedPropertyIterator) JSONLDContext() map[string]str
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() {
@@ -1964,60 +1991,63 @@ func (this ActivityStreamsClosedPropertyIterator) KindIndex() int {
if this.IsActivityStreamsProfile() {
return 45
}
- if this.IsForgeFedPush() {
+ if this.IsSchemaPropertyValue() {
return 46
}
- if this.IsActivityStreamsQuestion() {
+ if this.IsForgeFedPush() {
return 47
}
- if this.IsActivityStreamsRead() {
+ if this.IsActivityStreamsQuestion() {
return 48
}
- if this.IsActivityStreamsReject() {
+ if this.IsActivityStreamsRead() {
return 49
}
- if this.IsActivityStreamsRelationship() {
+ if this.IsActivityStreamsReject() {
return 50
}
- if this.IsActivityStreamsRemove() {
+ if this.IsActivityStreamsRelationship() {
return 51
}
- if this.IsForgeFedRepository() {
+ if this.IsActivityStreamsRemove() {
return 52
}
- if this.IsActivityStreamsService() {
+ if this.IsForgeFedRepository() {
return 53
}
- if this.IsActivityStreamsTentativeAccept() {
+ if this.IsActivityStreamsService() {
return 54
}
- if this.IsActivityStreamsTentativeReject() {
+ if this.IsActivityStreamsTentativeAccept() {
return 55
}
- if this.IsForgeFedTicket() {
+ if this.IsActivityStreamsTentativeReject() {
return 56
}
- if this.IsForgeFedTicketDependency() {
+ if this.IsForgeFedTicket() {
return 57
}
- if this.IsActivityStreamsTombstone() {
+ if this.IsForgeFedTicketDependency() {
return 58
}
- if this.IsActivityStreamsTravel() {
+ if this.IsActivityStreamsTombstone() {
return 59
}
- if this.IsActivityStreamsUndo() {
+ if this.IsActivityStreamsTravel() {
return 60
}
- if this.IsActivityStreamsUpdate() {
+ if this.IsActivityStreamsUndo() {
return 61
}
- if this.IsActivityStreamsVideo() {
+ if this.IsActivityStreamsUpdate() {
return 62
}
- if this.IsActivityStreamsView() {
+ if this.IsActivityStreamsVideo() {
return 63
}
+ if this.IsActivityStreamsView() {
+ return 64
+ }
if this.IsIRI() {
return -2
}
@@ -2127,6 +2157,8 @@ func (this ActivityStreamsClosedPropertyIterator) LessThan(o vocab.ActivityStrea
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() {
@@ -2622,6 +2654,13 @@ func (this *ActivityStreamsClosedPropertyIterator) SetIRI(v *url.URL) {
this.iri = v
}
+// SetSchemaPropertyValue sets the value of this property. Calling
+// IsSchemaPropertyValue afterwards returns true.
+func (this *ActivityStreamsClosedPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.clear()
+ this.schemaPropertyValueMember = v
+}
+
// SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards
// returns true.
func (this *ActivityStreamsClosedPropertyIterator) SetTootEmoji(v vocab.TootEmoji) {
@@ -2815,6 +2854,10 @@ func (this *ActivityStreamsClosedPropertyIterator) 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
@@ -2956,6 +2999,7 @@ func (this *ActivityStreamsClosedPropertyIterator) clear() {
this.activitystreamsPersonMember = nil
this.activitystreamsPlaceMember = nil
this.activitystreamsProfileMember = nil
+ this.schemaPropertyValueMember = nil
this.forgefedPushMember = nil
this.activitystreamsQuestionMember = nil
this.activitystreamsReadMember = nil
@@ -3075,6 +3119,8 @@ func (this ActivityStreamsClosedPropertyIterator) serialize() (interface{}, erro
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() {
@@ -3854,6 +3900,18 @@ func (this *ActivityStreamsClosedProperty) AppendIRI(v *url.URL) {
})
}
+// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list
+// of the property "closed". Invalidates iterators that are traversing using
+// Prev.
+func (this *ActivityStreamsClosedProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.properties = append(this.properties, &ActivityStreamsClosedPropertyIterator{
+ alias: this.alias,
+ myIdx: this.Len(),
+ parent: this,
+ schemaPropertyValueMember: v,
+ })
+}
+
// AppendTootEmoji appends a Emoji value to the back of a list of the property
// "closed". Invalidates iterators that are traversing using Prev.
func (this *ActivityStreamsClosedProperty) AppendTootEmoji(v vocab.TootEmoji) {
@@ -4982,6 +5040,23 @@ func (this *ActivityStreamsClosedProperty) InsertIRI(idx int, v *url.URL) {
}
}
+// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index
+// for a property "closed". Existing elements at that index and higher are
+// shifted back once. Invalidates all iterators.
+func (this *ActivityStreamsClosedProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) {
+ this.properties = append(this.properties, nil)
+ copy(this.properties[idx+1:], this.properties[idx:])
+ this.properties[idx] = &ActivityStreamsClosedPropertyIterator{
+ 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
// "closed". Existing elements at that index and higher are shifted back once.
// Invalidates all iterators.
@@ -5298,74 +5373,78 @@ func (this ActivityStreamsClosedProperty) Less(i, j int) bool {
rhs := this.properties[j].GetActivityStreamsProfile()
return lhs.LessThan(rhs)
} else if idx1 == 46 {
+ lhs := this.properties[i].GetSchemaPropertyValue()
+ rhs := this.properties[j].GetSchemaPropertyValue()
+ return lhs.LessThan(rhs)
+ } else if idx1 == 47 {
lhs := this.properties[i].GetForgeFedPush()
rhs := this.properties[j].GetForgeFedPush()
return lhs.LessThan(rhs)
- } else if idx1 == 47 {
+ } else if idx1 == 48 {
lhs := this.properties[i].GetActivityStreamsQuestion()
rhs := this.properties[j].GetActivityStreamsQuestion()
return lhs.LessThan(rhs)
- } else if idx1 == 48 {
+ } else if idx1 == 49 {
lhs := this.properties[i].GetActivityStreamsRead()
rhs := this.properties[j].GetActivityStreamsRead()
return lhs.LessThan(rhs)
- } else if idx1 == 49 {
+ } else if idx1 == 50 {
lhs := this.properties[i].GetActivityStreamsReject()
rhs := this.properties[j].GetActivityStreamsReject()
return lhs.LessThan(rhs)
- } else if idx1 == 50 {
+ } else if idx1 == 51 {
lhs := this.properties[i].GetActivityStreamsRelationship()
rhs := this.properties[j].GetActivityStreamsRelationship()
return lhs.LessThan(rhs)
- } else if idx1 == 51 {
+ } else if idx1 == 52 {
lhs := this.properties[i].GetActivityStreamsRemove()
rhs := this.properties[j].GetActivityStreamsRemove()
return lhs.LessThan(rhs)
- } else if idx1 == 52 {
+ } else if idx1 == 53 {
lhs := this.properties[i].GetForgeFedRepository()
rhs := this.properties[j].GetForgeFedRepository()
return lhs.LessThan(rhs)
- } else if idx1 == 53 {
+ } else if idx1 == 54 {
lhs := this.properties[i].GetActivityStreamsService()
rhs := this.properties[j].GetActivityStreamsService()
return lhs.LessThan(rhs)
- } else if idx1 == 54 {
+ } else if idx1 == 55 {
lhs := this.properties[i].GetActivityStreamsTentativeAccept()
rhs := this.properties[j].GetActivityStreamsTentativeAccept()
return lhs.LessThan(rhs)
- } else if idx1 == 55 {
+ } else if idx1 == 56 {
lhs := this.properties[i].GetActivityStreamsTentativeReject()
rhs := this.properties[j].GetActivityStreamsTentativeReject()
return lhs.LessThan(rhs)
- } else if idx1 == 56 {
+ } else if idx1 == 57 {
lhs := this.properties[i].GetForgeFedTicket()
rhs := this.properties[j].GetForgeFedTicket()
return lhs.LessThan(rhs)
- } else if idx1 == 57 {
+ } else if idx1 == 58 {
lhs := this.properties[i].GetForgeFedTicketDependency()
rhs := this.properties[j].GetForgeFedTicketDependency()
return lhs.LessThan(rhs)
- } else if idx1 == 58 {
+ } else if idx1 == 59 {
lhs := this.properties[i].GetActivityStreamsTombstone()
rhs := this.properties[j].GetActivityStreamsTombstone()
return lhs.LessThan(rhs)
- } else if idx1 == 59 {
+ } else if idx1 == 60 {
lhs := this.properties[i].GetActivityStreamsTravel()
rhs := this.properties[j].GetActivityStreamsTravel()
return lhs.LessThan(rhs)
- } else if idx1 == 60 {
+ } else if idx1 == 61 {
lhs := this.properties[i].GetActivityStreamsUndo()
rhs := this.properties[j].GetActivityStreamsUndo()
return lhs.LessThan(rhs)
- } else if idx1 == 61 {
+ } else if idx1 == 62 {
lhs := this.properties[i].GetActivityStreamsUpdate()
rhs := this.properties[j].GetActivityStreamsUpdate()
return lhs.LessThan(rhs)
- } else if idx1 == 62 {
+ } else if idx1 == 63 {
lhs := this.properties[i].GetActivityStreamsVideo()
rhs := this.properties[j].GetActivityStreamsVideo()
return lhs.LessThan(rhs)
- } else if idx1 == 63 {
+ } else if idx1 == 64 {
lhs := this.properties[i].GetActivityStreamsView()
rhs := this.properties[j].GetActivityStreamsView()
return lhs.LessThan(rhs)
@@ -6264,6 +6343,20 @@ func (this *ActivityStreamsClosedProperty) PrependIRI(v *url.URL) {
}
}
+// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a
+// list of the property "closed". Invalidates all iterators.
+func (this *ActivityStreamsClosedProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) {
+ this.properties = append([]*ActivityStreamsClosedPropertyIterator{{
+ 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
// "closed". Invalidates all iterators.
func (this *ActivityStreamsClosedProperty) PrependTootEmoji(v vocab.TootEmoji) {
@@ -7165,6 +7258,19 @@ func (this *ActivityStreamsClosedProperty) SetIRI(idx int, v *url.URL) {
}
}
+// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index
+// for the property "closed". Panics if the index is out of bounds.
+// Invalidates all iterators.
+func (this *ActivityStreamsClosedProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) {
+ (this.properties)[idx].parent = nil
+ (this.properties)[idx] = &ActivityStreamsClosedPropertyIterator{
+ alias: this.alias,
+ myIdx: idx,
+ parent: this,
+ schemaPropertyValueMember: v,
+ }
+}
+
// SetTootEmoji sets a Emoji value to be at the specified index for the property
// "closed". Panics if the index is out of bounds. Invalidates all iterators.
func (this *ActivityStreamsClosedProperty) SetTootEmoji(idx int, v vocab.TootEmoji) {