Changes
13 changed files (+450/-76)
-
-
@@ -28,90 +28,100 @@ func FollowersNew() *Followers {} // Append adds an element to an FollowersCollection func (i *FollowersCollection) Append(o as.Item) error { if i == nil { func (f *FollowersCollection) Append(o as.Item) error { if f == nil { return fmt.Errorf("nil ") } i.Items = append(i.Items, o) i.TotalItems++ f.Items = append(f.Items, o) f.TotalItems++ return nil } // Append adds an element to an Followers func (i *Followers) Append(ob as.Item) error { i.Items = append(i.Items, ob) i.TotalItems++ func (f *Followers) Append(ob as.Item) error { f.Items = append(f.Items, ob) f.TotalItems++ return nil } // GetID returns the ObjectID corresponding to FollowersCollection func (i FollowersCollection) GetID() *as.ObjectID { return i.Collection().GetID() func (f FollowersCollection) GetID() *as.ObjectID { return f.Collection().GetID() } // GetLink returns the IRI corresponding to the current FollowersCollection object func (f FollowersCollection) GetLink() as.IRI { return as.IRI(f.ID) } // GetType returns the FollowersCollection's type func (i FollowersCollection) GetType() as.ActivityVocabularyType { return i.Type func (f FollowersCollection) GetType() as.ActivityVocabularyType { return f.Type } // IsLink returns false for an FollowersCollection object func (i FollowersCollection) IsLink() bool { func (f FollowersCollection) IsLink() bool { return false } // IsObject returns true for a FollowersCollection object func (i FollowersCollection) IsObject() bool { func (f FollowersCollection) IsObject() bool { return true } // GetID returns the ObjectID corresponding to Followers func (i Followers) GetID() *as.ObjectID { return i.Collection().GetID() func (f Followers) GetID() *as.ObjectID { return f.Collection().GetID() } // GetLink returns the IRI corresponding to the current Followers object func (f Followers) GetLink() as.IRI { return as.IRI(f.ID) } // GetType returns the Followers's type func (i Followers) GetType() as.ActivityVocabularyType { return i.Type func (f Followers) GetType() as.ActivityVocabularyType { return f.Type } // IsLink returns false for an Followers object func (i Followers) IsLink() bool { func (f Followers) IsLink() bool { return false } // IsObject returns true for a Followers object func (i Followers) IsObject() bool { func (f Followers) IsObject() bool { return true } // UnmarshalJSON func (i *FollowersCollection) UnmarshalJSON(data []byte) error { c := as.Collection(*i) func (f *FollowersCollection) UnmarshalJSON(data []byte) error { c := as.Collection(*f) err := c.UnmarshalJSON(data) *i = FollowersCollection(c) *f = FollowersCollection(c) return err } // UnmarshalJSON func (i *Followers) UnmarshalJSON(data []byte) error { c := as.Collection(*i) func (f *Followers) UnmarshalJSON(data []byte) error { c := as.Collection(*f) err := c.UnmarshalJSON(data) *i = Followers(c) *f = Followers(c) return err } // Collection returns the underlying Collection type func (i Followers) Collection() as.CollectionInterface { c := as.Collection(i) func (f Followers) Collection() as.CollectionInterface { c := as.Collection(f) return &c } // Collection returns the underlying Collection type func (i FollowersCollection) Collection() as.CollectionInterface { c := as.Collection(i) func (f FollowersCollection) Collection() as.CollectionInterface { c := as.Collection(f) return &c }
-
-
-
@@ -30,90 +30,100 @@ func FollowingNew() *Following {} // Append adds an element to an FollowingCollection func (i *FollowingCollection) Append(o as.Item) error { if i == nil { func (f *FollowingCollection) Append(o as.Item) error { if f == nil { return fmt.Errorf("nil ") } i.Items = append(i.Items, o) i.TotalItems++ f.Items = append(f.Items, o) f.TotalItems++ return nil } // Append adds an element to an Following func (i *Following) Append(ob as.Item) error { i.Items = append(i.Items, ob) i.TotalItems++ func (f *Following) Append(ob as.Item) error { f.Items = append(f.Items, ob) f.TotalItems++ return nil } // GetID returns the ObjectID corresponding to FollowingCollection func (i FollowingCollection) GetID() *as.ObjectID { return i.Collection().GetID() func (f FollowingCollection) GetID() *as.ObjectID { return f.Collection().GetID() } // GetLink returns the IRI corresponding to the current FollowingCollection object func (f FollowingCollection) GetLink() as.IRI { return as.IRI(f.ID) } // GetType returns the FollowingCollection's type func (i FollowingCollection) GetType() as.ActivityVocabularyType { return i.Type func (f FollowingCollection) GetType() as.ActivityVocabularyType { return f.Type } // IsLink returns false for an FollowingCollection object func (i FollowingCollection) IsLink() bool { func (f FollowingCollection) IsLink() bool { return false } // IsObject returns true for a FollowingCollection object func (i FollowingCollection) IsObject() bool { func (f FollowingCollection) IsObject() bool { return true } // GetID returns the ObjectID corresponding to Following func (i Following) GetID() *as.ObjectID { return i.Collection().GetID() func (f Following) GetID() *as.ObjectID { return f.Collection().GetID() } // GetLink returns the IRI corresponding to the current Following object func (f Following) GetLink() as.IRI { return as.IRI(f.ID) } // GetType returns the Following's type func (i Following) GetType() as.ActivityVocabularyType { return i.Type func (f Following) GetType() as.ActivityVocabularyType { return f.Type } // IsLink returns false for an Following object func (i Following) IsLink() bool { func (f Following) IsLink() bool { return false } // IsObject returns true for a Following object func (i Following) IsObject() bool { func (f Following) IsObject() bool { return true } // UnmarshalJSON func (i *FollowingCollection) UnmarshalJSON(data []byte) error { c := as.Collection(*i) func (f *FollowingCollection) UnmarshalJSON(data []byte) error { c := as.Collection(*f) err := c.UnmarshalJSON(data) *i = FollowingCollection(c) *f = FollowingCollection(c) return err } // UnmarshalJSON func (i *Following) UnmarshalJSON(data []byte) error { c := as.Collection(*i) func (f *Following) UnmarshalJSON(data []byte) error { c := as.Collection(*f) err := c.UnmarshalJSON(data) *i = Following(c) *f = Following(c) return err } // Collection returns the underlying Collection type func (i Following) Collection() as.CollectionInterface { c := as.Collection(i) func (f Following) Collection() as.CollectionInterface { c := as.Collection(f) return &c } // Collection returns the underlying Collection type func (i FollowingCollection) Collection() as.CollectionInterface { c := as.Collection(i) func (f FollowingCollection) Collection() as.CollectionInterface { c := as.Collection(f) return &c }
-
-
-
@@ -53,6 +53,11 @@ func (i InboxStream) GetID() *as.ObjectID {return i.Collection().GetID() } // GetLink returns the IRI corresponding to the current InboxStream object func (i InboxStream) GetLink() as.IRI { return as.IRI(i.ID) } // GetType returns the InboxStream's type func (i InboxStream) GetType() as.ActivityVocabularyType { return i.Type
-
@@ -73,6 +78,11 @@ func (i Inbox) GetID() *as.ObjectID {return i.Collection().GetID() } // GetLink returns the IRI corresponding to the current Inbox object func (i Inbox) GetLink() as.IRI { return as.IRI(i.ID) } // GetType returns the Inbox's type func (i Inbox) GetType() as.ActivityVocabularyType { return i.Type
-
-
-
@@ -45,6 +45,11 @@ func (l LikedCollection) GetID() *as.ObjectID {return l.Collection().GetID() } // GetLink returns the IRI corresponding to the current LikedCollection object func (l LikedCollection) GetLink() as.IRI { return as.IRI(l.ID) } // GetType returns the LikedCollection's type func (l LikedCollection) GetType() as.ActivityVocabularyType { return l.Type
-
@@ -65,6 +70,11 @@ func (l Liked) GetID() *as.ObjectID {return l.Collection().GetID() } // GetLink returns the IRI corresponding to the current Liked object func (l Liked) GetLink() as.IRI { return as.IRI(l.ID) } // GetType returns the Liked's type func (l Liked) GetType() as.ActivityVocabularyType { return l.Type
-
-
-
@@ -45,6 +45,11 @@ func (l LikesCollection) GetID() *as.ObjectID {return l.Collection().GetID() } // GetLink returns the IRI corresponding to the current LikesCollection object func (l LikesCollection) GetLink() as.IRI { return as.IRI(l.ID) } // GetType returns the LikesCollection's type func (l LikesCollection) GetType() as.ActivityVocabularyType { return l.Type
-
@@ -65,6 +70,11 @@ func (l Likes) GetID() *as.ObjectID {return l.Collection().GetID() } // GetLink returns the IRI corresponding to the current Likes object func (l Likes) GetLink() as.IRI { return as.IRI(l.ID) } // GetType returns the Likes's type func (l Likes) GetType() as.ActivityVocabularyType { return l.Type
-
-
-
@@ -44,6 +44,11 @@ func (o OutboxStream) GetID() *as.ObjectID {return o.Collection().GetID() } // GetLink returns the IRI corresponding to the current OutboxStream object func (o OutboxStream) GetLink() as.IRI { return as.IRI(o.ID) } // GetType returns the OutboxStream's type func (o OutboxStream) GetType() as.ActivityVocabularyType { return o.Type
-
@@ -64,6 +69,11 @@ func (o Outbox) GetID() *as.ObjectID {return o.Collection().GetID() } // GetLink returns the IRI corresponding to the current Outbox object func (o Outbox) GetLink() as.IRI { return as.IRI(o.ID) } // GetType returns the Outbox's type func (o Outbox) GetType() as.ActivityVocabularyType { return o.Type
-
-
-
@@ -12,3 +12,112 @@ type (// Shares is a type alias for an Ordered Collection Shares as.OrderedCollection ) // SharesNew initializes a new Shares func SharesNew() *Shares { id := as.ObjectID("Shares") i := Shares{ID: id, Type: as.OrderedCollectionType} i.Name = as.NaturalLanguageValueNew() i.Content = as.NaturalLanguageValueNew() i.TotalItems = 0 return &i } // Append adds an element to an SharesCollection func (o *SharesCollection) Append(ob as.Item) error { o.OrderedItems = append(o.OrderedItems, ob) o.TotalItems++ return nil } // Append adds an element to an Shares func (o *Shares) Append(ob as.Item) error { o.OrderedItems = append(o.OrderedItems, ob) o.TotalItems++ return nil } // GetID returns the ObjectID corresponding to the SharesCollection func (o SharesCollection) GetID() *as.ObjectID { return o.Collection().GetID() } // GetLink returns the IRI corresponding to the current SharesCollection object func (o SharesCollection) GetLink() as.IRI { return as.IRI(o.ID) } // GetType returns the SharesCollection's type func (o SharesCollection) GetType() as.ActivityVocabularyType { return o.Type } // IsLink returns false for an SharesCollection object func (o SharesCollection) IsLink() bool { return false } // IsObject returns true for a SharesCollection object func (o SharesCollection) IsObject() bool { return true } // GetID returns the ObjectID corresponding to Shares func (o Shares) GetID() *as.ObjectID { return o.Collection().GetID() } // GetLink returns the IRI corresponding to the current Shares object func (o Shares) GetLink() as.IRI { return as.IRI(o.ID) } // GetType returns the Shares's type func (o Shares) GetType() as.ActivityVocabularyType { return o.Type } // IsLink returns false for an Shares object func (o Shares) IsLink() bool { return false } // IsObject returns true for a Shares object func (o Shares) IsObject() bool { return true } // UnmarshalJSON func (o *SharesCollection) UnmarshalJSON(data []byte) error { c := as.OrderedCollection(*o) err := c.UnmarshalJSON(data) *o = SharesCollection(c) return err } // UnmarshalJSON func (o *Shares) UnmarshalJSON(data []byte) error { c := as.OrderedCollection(*o) err := c.UnmarshalJSON(data) *o = Shares(c) return err } // Collection returns the underlying Collection type func (o Shares) Collection() as.CollectionInterface { c := as.OrderedCollection(o) return &c } // Collection returns the underlying Collection type func (o SharesCollection) Collection() as.CollectionInterface { c := as.OrderedCollection(o) return &c }
-
-
-
@@ -803,6 +803,11 @@ func (i IntransitiveActivity) GetID() *ObjectID {return &i.ID } // GetLink returns the IRI corresponding to the IntransitiveActivity object func (i IntransitiveActivity) GetLink() IRI { return IRI(i.ID) } // IsObject func (i IntransitiveActivity) IsObject() bool { return true
-
@@ -823,6 +828,11 @@ func (a Activity) GetID() *ObjectID {return &a.ID } // GetLink returns the IRI corresponding to the Activity object func (a Activity) GetLink() IRI { return IRI(a.ID) } // IsObject returns true for Activity objects func (a Activity) IsObject() bool { return true
-
@@ -833,6 +843,11 @@ func (l Like) GetID() *ObjectID {return Activity(l).GetID() } // GetLink returns the IRI corresponding to the Like object func (l Like) GetLink() IRI { return IRI(l.ID) } // GetType func (l Like) GetType() ActivityVocabularyType { return l.Type
-
@@ -853,6 +868,11 @@ func (d Dislike) GetID() *ObjectID {return Activity(d).GetID() } // GetLink returns the IRI corresponding to the Dislike object func (d Dislike) GetLink() IRI { return IRI(d.ID) } // GetType func (d Dislike) GetType() ActivityVocabularyType { return d.Type
-
@@ -873,6 +893,11 @@ func (a Accept) GetID() *ObjectID {return Activity(a).GetID() } // GetLink returns the IRI corresponding to the Accept object func (a Accept) GetLink() IRI { return IRI(a.ID) } // GetType func (a Accept) GetType() ActivityVocabularyType { return a.Type
-
@@ -893,6 +918,11 @@ func (a Add) GetID() *ObjectID {return Activity(a).GetID() } // GetLink returns the IRI corresponding to the Add object func (a Add) GetLink() IRI { return IRI(a.ID) } // GetType func (a Add) GetType() ActivityVocabularyType { return a.Type
-
@@ -913,6 +943,11 @@ func (a Announce) GetID() *ObjectID {return Activity(a).GetID() } // GetLink returns the IRI corresponding to the Announce object func (a Announce) GetLink() IRI { return IRI(a.ID) } // GetType func (a Announce) GetType() ActivityVocabularyType { return a.Type
-
@@ -933,6 +968,11 @@ func (a Arrive) GetID() *ObjectID {return IntransitiveActivity(a).GetID() } // GetLink returns the IRI corresponding to the Arrive object func (a Arrive) GetLink() IRI { return IRI(a.ID) } // GetType func (a Arrive) GetType() ActivityVocabularyType { return a.Type
-
@@ -953,6 +993,11 @@ func (b Block) GetID() *ObjectID {return Activity(b).GetID() } // GetLink returns the IRI corresponding to the Block object func (b Block) GetLink() IRI { return IRI(b.ID) } // GetType func (b Block) GetType() ActivityVocabularyType { return b.Type
-
@@ -973,6 +1018,11 @@ func (c Create) GetID() *ObjectID {return Activity(c).GetID() } // GetLink returns the IRI corresponding to the Create object func (c Create) GetLink() IRI { return IRI(c.ID) } // GetType func (c Create) GetType() ActivityVocabularyType { return c.Type
-
@@ -993,6 +1043,11 @@ func (d Delete) GetID() *ObjectID {return Activity(d).GetID() } // GetLink returns the IRI corresponding to the Delete object func (d Delete) GetLink() IRI { return IRI(d.ID) } // GetType func (d Delete) GetType() ActivityVocabularyType { return d.Type
-
@@ -1013,6 +1068,11 @@ func (f Flag) GetID() *ObjectID {return Activity(f).GetID() } // GetLink returns the IRI corresponding to the Flag object func (f Flag) GetLink() IRI { return IRI(f.ID) } // GetType func (f Flag) GetType() ActivityVocabularyType { return f.Type
-
@@ -1033,6 +1093,11 @@ func (f Follow) GetID() *ObjectID {return Activity(f).GetID() } // GetLink returns the IRI corresponding to the Follow object func (f Follow) GetLink() IRI { return IRI(f.ID) } // GetType func (f Follow) GetType() ActivityVocabularyType { return f.Type
-
@@ -1053,6 +1118,11 @@ func (i Ignore) GetID() *ObjectID {return Activity(i).GetID() } // GetLink returns the IRI corresponding to the Ignore object func (i Ignore) GetLink() IRI { return IRI(i.ID) } // GetType func (i Ignore) GetType() ActivityVocabularyType { return i.Type
-
@@ -1073,6 +1143,11 @@ func (i Invite) GetID() *ObjectID {return Activity(i).GetID() } // GetLink returns the IRI corresponding to the Invite object func (i Invite) GetLink() IRI { return IRI(i.ID) } // GetType func (i Invite) GetType() ActivityVocabularyType { return i.Type
-
@@ -1093,6 +1168,11 @@ func (j Join) GetID() *ObjectID {return Activity(j).GetID() } // GetLink returns the IRI corresponding to the Join object func (j Join) GetLink() IRI { return IRI(j.ID) } // GetType func (j Join) GetType() ActivityVocabularyType { return j.Type
-
@@ -1113,6 +1193,11 @@ func (l Leave) GetID() *ObjectID {return Activity(l).GetID() } // GetLink returns the IRI corresponding to the Leave object func (l Leave) GetLink() IRI { return IRI(l.ID) } // GetType func (l Leave) GetType() ActivityVocabularyType { return l.Type
-
@@ -1133,6 +1218,11 @@ func (l Listen) GetID() *ObjectID {return Activity(l).GetID() } // GetLink returns the IRI corresponding to the Listen object func (l Listen) GetLink() IRI { return IRI(l.ID) } // GetType func (l Listen) GetType() ActivityVocabularyType { return l.Type
-
@@ -1153,6 +1243,11 @@ func (m Move) GetID() *ObjectID {return Activity(m).GetID() } // GetLink returns the IRI corresponding to the Move object func (m Move) GetLink() IRI { return IRI(m.ID) } // GetType func (m Move) GetType() ActivityVocabularyType { return m.Type
-
@@ -1173,6 +1268,11 @@ func (o Offer) GetID() *ObjectID {return Activity(o).GetID() } // GetLink returns the IRI corresponding to the Offer object func (o Offer) GetLink() IRI { return IRI(o.ID) } // GetType func (o Offer) GetType() ActivityVocabularyType { return o.Type
-
@@ -1193,6 +1293,11 @@ func (q Question) GetID() *ObjectID {return &q.ID } // GetLink returns the IRI corresponding to the Question object func (q Question) GetLink() IRI { return IRI(q.ID) } // GetType func (q Question) GetType() ActivityVocabularyType { return q.Type
-
@@ -1213,6 +1318,11 @@ func (r Reject) GetID() *ObjectID {return Activity(r).GetID() } // GetLink returns the IRI corresponding to the Reject object func (r Reject) GetLink() IRI { return IRI(r.ID) } // GetType func (r Reject) GetType() ActivityVocabularyType { return r.Type
-
@@ -1233,6 +1343,11 @@ func (r Remove) GetID() *ObjectID {return Activity(r).GetID() } // GetLink returns the IRI corresponding to the Remove object func (r Remove) GetLink() IRI { return IRI(r.ID) } // GetType func (r Remove) GetType() ActivityVocabularyType { return r.Type
-
@@ -1253,6 +1368,11 @@ func (r Read) GetID() *ObjectID {return Activity(r).GetID() } // GetLink returns the IRI corresponding to the Read object func (r Read) GetLink() IRI { return IRI(r.ID) } // GetType func (r Read) GetType() ActivityVocabularyType { return r.Type
-
@@ -1273,6 +1393,11 @@ func (t TentativeAccept) GetID() *ObjectID {return Activity(t).GetID() } // GetLink returns the IRI corresponding to the TentativeAccept object func (t TentativeAccept) GetLink() IRI { return IRI(t.ID) } // GetType func (t TentativeAccept) GetType() ActivityVocabularyType { return t.Type
-
@@ -1293,6 +1418,11 @@ func (t TentativeReject) GetID() *ObjectID {return Activity(t).GetID() } // GetLink returns the IRI corresponding to the TentativeReject object func (t TentativeReject) GetLink() IRI { return IRI(t.ID) } // GetType func (t TentativeReject) GetType() ActivityVocabularyType { return t.Type
-
@@ -1313,6 +1443,11 @@ func (t Travel) GetID() *ObjectID {return IntransitiveActivity(t).GetID() } // GetLink returns the IRI corresponding to the Travel object func (t Travel) GetLink() IRI { return IRI(t.ID) } // GetType func (t Travel) GetType() ActivityVocabularyType { return t.Type
-
@@ -1333,6 +1468,11 @@ func (u Undo) GetID() *ObjectID {return Activity(u).GetID() } // GetLink returns the IRI corresponding to the Unto object func (u Undo) GetLink() IRI { return IRI(u.ID) } // GetType func (u Undo) GetType() ActivityVocabularyType { return u.Type
-
@@ -1353,6 +1493,11 @@ func (u Update) GetID() *ObjectID {return Activity(u).GetID() } // GetLink returns the IRI corresponding to the Update object func (u Update) GetLink() IRI { return IRI(u.ID) } // GetType func (u Update) GetType() ActivityVocabularyType { return u.Type
-
@@ -1373,6 +1518,11 @@ func (v View) GetID() *ObjectID {return Activity(v).GetID() } // GetLink returns the IRI corresponding to the View object func (v View) GetLink() IRI { return IRI(v.ID) } // GetType func (v View) GetType() ActivityVocabularyType { return v.Type
-
-
-
@@ -265,6 +265,11 @@ func (a Actor) GetID() *ObjectID {return &a.ID } // GetLink returns the IRI corresponding to the Actor object func (a Actor) GetLink() IRI { return IRI(a.ID) } // GetType returns the type corresponding to the Actor object func (a Actor) GetType() ActivityVocabularyType { return a.Type
-
@@ -285,6 +290,11 @@ func (a Application) GetID() *ObjectID {return a.Actor().GetID() } // GetLink returns the IRI corresponding to the Application object func (a Application) GetLink() IRI { return IRI(a.ID) } // GetType returns the type corresponding to the Application object func (a Application) GetType() ActivityVocabularyType { return a.Type
-
@@ -305,6 +315,11 @@ func (g Group) GetID() *ObjectID {return g.Actor().GetID() } // GetLink returns the IRI corresponding to the Group object func (g Group) GetLink() IRI { return IRI(g.ID) } // GetType returns the type corresponding to the Group object func (g Group) GetType() ActivityVocabularyType { return g.Type
-
@@ -325,6 +340,11 @@ func (o Organization) GetID() *ObjectID {return o.Actor().GetID() } // GetLink returns the IRI corresponding to the Organization object func (o Organization) GetLink() IRI { return IRI(o.ID) } // GetType returns the type corresponding to the Organization object func (o Organization) GetType() ActivityVocabularyType { return o.Type
-
@@ -340,11 +360,16 @@ func (s Service) IsObject() bool {return s.Type == ObjectType || ValidObjectType(s.Type) } // GetID returns the ObjectID corresponding to the Service object // GetID returns the ObjectID corresponding to the Service object func (s Service) GetID() *ObjectID { return s.Actor().GetID() } // GetLink returns the IRI corresponding to the Service object func (s Service) GetLink() IRI { return IRI(s.ID) } // GetType returns the type corresponding to the Service object func (s Service) GetType() ActivityVocabularyType { return s.Type
-
@@ -370,9 +395,9 @@ func (p Person) GetType() ActivityVocabularyType {return p.Type } // Link returns the URI for the current Person object // GetLink returns the IRI corresponding to the Person object func (p Person) GetLink() IRI { return p.URL.(IRI) return IRI(p.ID) } // UnmarshalJSON
-
-
-
@@ -304,6 +304,11 @@ func (c *Collection) GetID() *ObjectID {return &c.ID } // GetLink returns the IRI corresponding to the Collection object func (c Collection) GetLink() IRI { return IRI(c.ID) } // IsObject returns true for a Collection object func (c Collection) IsObject() bool { return true
-
@@ -324,6 +329,11 @@ func (o OrderedCollection) GetID() *ObjectID {return &o.ID } // GetLink returns the IRI corresponding to the OrderedCollection object func (o OrderedCollection) GetLink() IRI { return IRI(o.ID) } // IsObject returns true for am OrderedCollection object func (o OrderedCollection) IsObject() bool { return true
-
-
-
@@ -11,6 +11,11 @@ func (i ItemCollection) GetID() *ObjectID {return nil } // GetLink returns the empty IRI func (i ItemCollection) GetLink() IRI { return IRI("") } // GetType returns the ItemCollection's type func (i ItemCollection) GetType() ActivityVocabularyType { return ActivityVocabularyType("")
-
@@ -25,3 +30,21 @@ func (i ItemCollection) IsLink() bool {func (i ItemCollection) IsObject() bool { return false } // Append facilitates adding elements to Item arrays // and ensures ItemCollection implements the Collection interface func (i *ItemCollection) Append(o Item) error { oldLen := len(*i) d := make(ItemCollection, oldLen+1) for k, it := range *i { d[k] = it } d[oldLen] = o *i = d return nil } // Collection returns the current object as collection interface func (i *ItemCollection) Collection() CollectionInterface { return i }
-
-
-
@@ -74,11 +74,16 @@ func (l Link) IsObject() bool {return l.Type == ObjectType || ValidObjectType(l.Type) } // GetID returns the ObjectID corresponding to the Mention object // GetID returns the ObjectID corresponding to the Link object func (l Link) GetID() *ObjectID { return &l.ID } // GetLink returns the IRI corresponding to the current Link func (l Link) GetLink() IRI { return IRI(l.ID) } // GetType returns the Type corresponding to the Mention object func (l Link) GetType() ActivityVocabularyType { return l.Type
-
@@ -99,6 +104,11 @@ func (m Mention) GetID() *ObjectID {return Link(m).GetID() } // GetLink returns the IRI corresponding to the current Mention func (m Mention) GetLink() IRI { return IRI(m.ID) } // GetType returns the Type corresponding to the Mention object func (m Mention) GetType() ActivityVocabularyType { return m.Type
-
-
-
@@ -379,7 +379,7 @@ func (o Object) GetID() *ObjectID {return &o.ID } // GetID returns the ObjectID corresponding to the current object // GetLink returns the IRI corresponding to the current object func (o Object) GetLink() IRI { return IRI(o.ID) }
-
@@ -389,19 +389,6 @@ func (o Object) GetType() ActivityVocabularyType {return o.Type } // Append facilitates adding elements to Item arrays // and ensures ItemCollection implements the Collection interface func (i *ItemCollection) Append(o Item) error { oldLen := len(*i) d := make(ItemCollection, oldLen+1) for k, it := range *i { d[k] = it } d[oldLen] = o *i = d return nil } // recipientsDeduplication normalizes the received arguments lists func recipientsDeduplication(recArgs ...*ItemCollection) error { recIds := make([]ObjectID, 0)
-