Converted the URL property to support an array of links as a value
This commit is contained in:
parent
947bcada60
commit
4837641dc8
|
@ -275,7 +275,7 @@ type Activity struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -1000,7 +1000,7 @@ func TestActivity_MarshalJSON(t *testing.T) {
|
|||
Summary NaturalLanguageValues
|
||||
Tag ItemCollection
|
||||
Updated time.Time
|
||||
URL LinkOrIRI
|
||||
URL Item
|
||||
To ItemCollection
|
||||
Bto ItemCollection
|
||||
CC ItemCollection
|
||||
|
@ -1243,7 +1243,7 @@ func TestIntransitiveActivity_MarshalJSON(t *testing.T) {
|
|||
Summary NaturalLanguageValues
|
||||
Tag ItemCollection
|
||||
Updated time.Time
|
||||
URL LinkOrIRI
|
||||
URL Item
|
||||
To ItemCollection
|
||||
Bto ItemCollection
|
||||
CC ItemCollection
|
||||
|
|
2
actor.go
2
actor.go
|
@ -111,7 +111,7 @@ type Actor struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -101,7 +101,7 @@ type Collection struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -80,7 +80,7 @@ type CollectionPage struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -220,7 +220,7 @@ func writeObjectJSONValue(b *[]byte, o Object) (notEmpty bool) {
|
|||
notEmpty = writeItemJSONProp(b, "tag", o.Tag) || notEmpty
|
||||
}
|
||||
if o.URL != nil {
|
||||
notEmpty = writeIRIJSONProp(b, "url", o.URL) || notEmpty
|
||||
notEmpty = writeItemJSONProp(b, "url", o.URL) || notEmpty
|
||||
}
|
||||
if o.To != nil {
|
||||
notEmpty = writeItemJSONProp(b, "to", o.To) || notEmpty
|
||||
|
|
|
@ -84,7 +84,7 @@ type IntransitiveActivity struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -211,7 +211,7 @@ type Object struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -80,7 +80,7 @@ type OrderedCollection struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -81,7 +81,7 @@ type OrderedCollectionPage struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
2
place.go
2
place.go
|
@ -79,7 +79,7 @@ type Place struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -81,7 +81,7 @@ type Profile struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -82,7 +82,7 @@ type Question struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -85,7 +85,7 @@ type Relationship struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
|
@ -81,7 +81,7 @@ type Tombstone struct {
|
|||
// Updated the date and time at which the object was updated
|
||||
Updated time.Time `jsonld:"updated,omitempty"`
|
||||
// URL identifies one or more links to representations of the object
|
||||
URL LinkOrIRI `jsonld:"url,omitempty"`
|
||||
URL Item `jsonld:"url,omitempty"`
|
||||
// To identifies an entity considered to be part of the public primary audience of an Activity Pub Object
|
||||
To ItemCollection `jsonld:"to,omitempty"`
|
||||
// Bto identifies anActivity Pub Object that is part of the private primary audience of this Activity Pub Object.
|
||||
|
|
Reference in a new issue