diff options
| author | 2023-05-09 12:16:10 +0200 | |
|---|---|---|
| committer | 2023-05-09 11:16:10 +0100 | |
| commit | 0e29f1f5bb68a48d9b837d7f4e0a16370734955b (patch) | |
| tree | f08d203ec8ca8aeea728e5251b1dc3956524b4f4 /vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc | |
| parent | [chore/performance] Make sender multiplier configurable (#1750) (diff) | |
| download | gotosocial-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_cc')
2 files changed, 144 insertions, 35 deletions
diff --git a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go index 707dcaaa9..9df4925e2 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_pkg.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/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_cc/gen_property_activitystreams_cc.go b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go index e13b3b7d1..2560ec0a3 100644 --- a/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go +++ b/vendor/github.com/superseriousbusiness/activity/streams/impl/activitystreams/property_cc/gen_property_activitystreams_cc.go @@ -58,6 +58,7 @@ type ActivityStreamsCcPropertyIterator struct { activitystreamsPersonMember vocab.ActivityStreamsPerson activitystreamsPlaceMember vocab.ActivityStreamsPlace activitystreamsProfileMember vocab.ActivityStreamsProfile + schemaPropertyValueMember vocab.SchemaPropertyValue forgefedPushMember vocab.ForgeFedPush activitystreamsQuestionMember vocab.ActivityStreamsQuestion activitystreamsReadMember vocab.ActivityStreamsRead @@ -372,6 +373,12 @@ func deserializeActivityStreamsCcPropertyIterator(i interface{}, aliasMap map[st alias: alias, } return this, nil + } else if v, err := mgr.DeserializePropertyValueSchema()(m, aliasMap); err == nil { + this := &ActivityStreamsCcPropertyIterator{ + alias: alias, + schemaPropertyValueMember: v, + } + return this, nil } else if v, err := mgr.DeserializePushForgeFed()(m, aliasMap); err == nil { this := &ActivityStreamsCcPropertyIterator{ alias: alias, @@ -911,6 +918,13 @@ func (this ActivityStreamsCcPropertyIterator) 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 ActivityStreamsCcPropertyIterator) 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 ActivityStreamsCcPropertyIterator) GetTootEmoji() vocab.TootEmoji { @@ -1059,6 +1073,9 @@ func (this ActivityStreamsCcPropertyIterator) GetType() vocab.Type { if this.IsActivityStreamsProfile() { return this.GetActivityStreamsProfile() } + if this.IsSchemaPropertyValue() { + return this.GetSchemaPropertyValue() + } if this.IsForgeFedPush() { return this.GetForgeFedPush() } @@ -1163,6 +1180,7 @@ func (this ActivityStreamsCcPropertyIterator) HasAny() bool { this.IsActivityStreamsPerson() || this.IsActivityStreamsPlace() || this.IsActivityStreamsProfile() || + this.IsSchemaPropertyValue() || this.IsForgeFedPush() || this.IsActivityStreamsQuestion() || this.IsActivityStreamsRead() || @@ -1615,6 +1633,13 @@ func (this ActivityStreamsCcPropertyIterator) 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 ActivityStreamsCcPropertyIterator) 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 ActivityStreamsCcPropertyIterator) IsTootEmoji() bool { @@ -1722,6 +1747,8 @@ func (this ActivityStreamsCcPropertyIterator) JSONLDContext() map[string]string 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() { @@ -1906,60 +1933,63 @@ func (this ActivityStreamsCcPropertyIterator) 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 } @@ -2065,6 +2095,8 @@ func (this ActivityStreamsCcPropertyIterator) LessThan(o vocab.ActivityStreamsCc 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() { @@ -2560,6 +2592,13 @@ func (this *ActivityStreamsCcPropertyIterator) SetIRI(v *url.URL) { this.iri = v } +// SetSchemaPropertyValue sets the value of this property. Calling +// IsSchemaPropertyValue afterwards returns true. +func (this *ActivityStreamsCcPropertyIterator) SetSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.clear() + this.schemaPropertyValueMember = v +} + // SetTootEmoji sets the value of this property. Calling IsTootEmoji afterwards // returns true. func (this *ActivityStreamsCcPropertyIterator) SetTootEmoji(v vocab.TootEmoji) { @@ -2753,6 +2792,10 @@ func (this *ActivityStreamsCcPropertyIterator) 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 @@ -2876,6 +2919,7 @@ func (this *ActivityStreamsCcPropertyIterator) clear() { this.activitystreamsPersonMember = nil this.activitystreamsPlaceMember = nil this.activitystreamsProfileMember = nil + this.schemaPropertyValueMember = nil this.forgefedPushMember = nil this.activitystreamsQuestionMember = nil this.activitystreamsReadMember = nil @@ -2991,6 +3035,8 @@ func (this ActivityStreamsCcPropertyIterator) 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() { @@ -3769,6 +3815,17 @@ func (this *ActivityStreamsCcProperty) AppendIRI(v *url.URL) { }) } +// AppendSchemaPropertyValue appends a PropertyValue value to the back of a list +// of the property "cc". Invalidates iterators that are traversing using Prev. +func (this *ActivityStreamsCcProperty) AppendSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, &ActivityStreamsCcPropertyIterator{ + alias: this.alias, + myIdx: this.Len(), + parent: this, + schemaPropertyValueMember: v, + }) +} + // AppendTootEmoji appends a Emoji value to the back of a list of the property // "cc". Invalidates iterators that are traversing using Prev. func (this *ActivityStreamsCcProperty) AppendTootEmoji(v vocab.TootEmoji) { @@ -4873,6 +4930,23 @@ func (this *ActivityStreamsCcProperty) InsertIRI(idx int, v *url.URL) { } } +// InsertSchemaPropertyValue inserts a PropertyValue value at the specified index +// for a property "cc". Existing elements at that index and higher are shifted +// back once. Invalidates all iterators. +func (this *ActivityStreamsCcProperty) InsertSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + this.properties = append(this.properties, nil) + copy(this.properties[idx+1:], this.properties[idx:]) + this.properties[idx] = &ActivityStreamsCcPropertyIterator{ + 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 // "cc". Existing elements at that index and higher are shifted back once. // Invalidates all iterators. @@ -5145,74 +5219,78 @@ func (this ActivityStreamsCcProperty) 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) @@ -6110,6 +6188,20 @@ func (this *ActivityStreamsCcProperty) PrependIRI(v *url.URL) { } } +// PrependSchemaPropertyValue prepends a PropertyValue value to the front of a +// list of the property "cc". Invalidates all iterators. +func (this *ActivityStreamsCcProperty) PrependSchemaPropertyValue(v vocab.SchemaPropertyValue) { + this.properties = append([]*ActivityStreamsCcPropertyIterator{{ + 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 // "cc". Invalidates all iterators. func (this *ActivityStreamsCcProperty) PrependTootEmoji(v vocab.TootEmoji) { @@ -6981,6 +7073,19 @@ func (this *ActivityStreamsCcProperty) SetIRI(idx int, v *url.URL) { } } +// SetSchemaPropertyValue sets a PropertyValue value to be at the specified index +// for the property "cc". Panics if the index is out of bounds. Invalidates +// all iterators. +func (this *ActivityStreamsCcProperty) SetSchemaPropertyValue(idx int, v vocab.SchemaPropertyValue) { + (this.properties)[idx].parent = nil + (this.properties)[idx] = &ActivityStreamsCcPropertyIterator{ + alias: this.alias, + myIdx: idx, + parent: this, + schemaPropertyValueMember: v, + } +} + // SetTootEmoji sets a Emoji value to be at the specified index for the property // "cc". Panics if the index is out of bounds. Invalidates all iterators. func (this *ActivityStreamsCcProperty) SetTootEmoji(idx int, v vocab.TootEmoji) { |
