Skip to content

Commit

Permalink
Add IsPublic to streams types
Browse files Browse the repository at this point in the history
  • Loading branch information
cjslep committed Aug 4, 2018
1 parent e372d27 commit 377455a
Show file tree
Hide file tree
Showing 54 changed files with 327 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ master (Release Candidate for v0.2.0)
* Begin FederateAPI unofficial implementation report.
* All 'vocab.Object' types and types extending from 'vocab.Object' now have an
'IsPublic' method that will return true if the 'to', 'bto', 'cc', or 'bcc'
properties have the ActivityPub special Public collection IRI.
properties have the ActivityPub special Public collection IRI. The
'streams' types also have a corresponding 'IsPublic' method.
* Use 'OrderedCollection' as the default type for 'likes', 'liked',
'following', and 'followers' properties if the actor or object does not
have an IRI, 'Collection', or 'OrderedCollection' set for these
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Accept) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Accept) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Accept) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Activity) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Activity) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Activity) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Add) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Add) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Add) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_announce.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Announce) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Announce) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Announce) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Application) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Application) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Application) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_arrive.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Arrive) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Arrive) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Arrive) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_article.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Article) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Article) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Article) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_audio.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Audio) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Audio) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Audio) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Block) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Block) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Block) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Collection) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Collection) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetTotalItems attempts to get this 'totalItems' property as a int64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Collection) GetTotalItems() (r Resolution, k int64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_collectionpage.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *CollectionPage) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *CollectionPage) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// ResolvePartOf passes the actual concrete type to the resolver for handing property partOf. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired.
func (t *CollectionPage) ResolvePartOf(r *Resolver) (s Resolution, err error) {
s = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Create) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Create) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Create) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Delete) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Delete) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Delete) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_dislike.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Dislike) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Dislike) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Dislike) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Document) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Document) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Document) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Event) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Event) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Event) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Flag) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Flag) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Flag) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_follow.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Follow) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Follow) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Follow) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Group) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Group) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Group) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_ignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Ignore) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Ignore) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Ignore) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Image) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Image) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetHeight attempts to get this 'height' property as a int64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Image) GetHeight() (r Resolution, k int64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_intransitiveactivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *IntransitiveActivity) Serialize() (m map[string]interface{}, err error)

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *IntransitiveActivity) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *IntransitiveActivity) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_invite.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Invite) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Invite) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Invite) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Join) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Join) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Join) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_leave.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Leave) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Leave) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Leave) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_like.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Like) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Like) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Like) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Listen) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Listen) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Listen) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_move.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Move) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Move) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// LenActor returns the number of values this property contains. Each index be used with HasActor to determine if GetActor is safe to call or if raw handling would be needed.
func (t *Move) LenActor() (idx int) {
return t.raw.ActorLen()
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Note) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Note) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Note) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
6 changes: 6 additions & 0 deletions streams/gen_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func (t *Object) Serialize() (m map[string]interface{}, err error) {

}

// IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection
func (t *Object) IsPublic() (b bool) {
return t.raw.IsPublic()

}

// GetAltitude attempts to get this 'altitude' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Object) GetAltitude() (r Resolution, k float64) {
r = Unresolved
Expand Down
Loading

0 comments on commit 377455a

Please sign in to comment.