Add IsPublic to streams types

このコミットが含まれているのは:
Cory Slep 2018-08-04 15:30:31 +02:00
コミット 377455aa70
54個のファイルの変更327行の追加1行の削除

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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()

ファイルの表示

@ -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

ファイルの表示

@ -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

ファイルの表示

@ -25,6 +25,12 @@ func (t *Offer) 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 *Offer) 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 *Offer) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *OrderedCollection) 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 *OrderedCollection) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// LenOrderedItems returns the number of values this property contains. Each index be used with HasOrderedItems to determine if ResolveOrderedItems is safe to call or if raw handling would be needed.
func (t *OrderedCollection) LenOrderedItems() (idx int) {
return t.raw.OrderedItemsLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *OrderedCollectionPage) 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 *OrderedCollectionPage) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// GetStartIndex attempts to get this 'startIndex' property as a int64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *OrderedCollectionPage) GetStartIndex() (r Resolution, k int64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Organization) 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 *Organization) 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 *Organization) GetAltitude() (r Resolution, k float64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Page) 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 *Page) 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 *Page) GetAltitude() (r Resolution, k float64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Person) 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 *Person) 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 *Person) GetAltitude() (r Resolution, k float64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Place) 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 *Place) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// GetAccuracy attempts to get this 'accuracy' property as a float64. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling.
func (t *Place) GetAccuracy() (r Resolution, k float64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Profile) 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 *Profile) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// ResolveDescribes passes the actual concrete type to the resolver for handing property describes. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired.
func (t *Profile) ResolveDescribes(r *Resolver) (s Resolution, err error) {
s = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Question) 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 *Question) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// LenOneOf returns the number of values this property contains. Each index be used with HasOneOf to determine if ResolveOneOf is safe to call or if raw handling would be needed.
func (t *Question) LenOneOf() (idx int) {
return t.raw.OneOfLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Read) 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 *Read) 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 *Read) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Reject) 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 *Reject) 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 *Reject) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Relationship) 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 *Relationship) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// ResolveSubject passes the actual concrete type to the resolver for handing property subject. It returns a Resolution appropriate for clients to determine whether it would be necessary to do raw handling, if desired.
func (t *Relationship) ResolveSubject(r *Resolver) (s Resolution, err error) {
s = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *Remove) 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 *Remove) 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 *Remove) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Service) 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 *Service) 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 *Service) GetAltitude() (r Resolution, k float64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *TentativeAccept) 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 *TentativeAccept) 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 *TentativeAccept) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *TentativeReject) 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 *TentativeReject) 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 *TentativeReject) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Tombstone) 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 *Tombstone) IsPublic() (b bool) {
return t.raw.IsPublic()
}
// LenFormerType returns the number of values this property contains. Each index be used with HasFormerType to determine if GetFormerType is safe to call or if raw handling would be needed.
func (t *Tombstone) LenFormerType() (idx int) {
return t.raw.FormerTypeLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Travel) 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 *Travel) 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 *Travel) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Undo) 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 *Undo) 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 *Undo) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Update) 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 *Update) 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 *Update) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -25,6 +25,12 @@ func (t *Video) 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 *Video) 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 *Video) GetAltitude() (r Resolution, k float64) {
r = Unresolved

ファイルの表示

@ -25,6 +25,12 @@ func (t *View) 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 *View) 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 *View) LenActor() (idx int) {
return t.raw.ActorLen()

ファイルの表示

@ -270,6 +270,19 @@ func generateDefinitions(t *defs.Type) (fd []*defs.FunctionDef, sd []*defs.Struc
},
},
}...)
if t.GetTypeMetadata().HasIsPublicMethod {
this.F = append(this.F, &defs.MemberFunctionDef{
Name: "IsPublic",
Comment: "IsPublic returns true if the 'to', 'bto', 'cc', or 'bcc' properties address the special Public ActivityPub collection",
P: this,
Return: []*defs.FunctionVarDef{{"b", "bool"}},
Body: func() string {
var b bytes.Buffer
b.WriteString(fmt.Sprintf("return t.%s.IsPublic()\n", rawMemberName))
return b.String()
},
})
}
for _, p := range t.GetProperties() {
generatePropertyHelpers(p, this)
for _, r := range p.Range {