Grand test fixup (#138)

* start fixing up tests

* fix up tests + automate with drone

* fiddle with linting

* messing about with drone.yml

* some more fiddling

* hmmm

* add cache

* add vendor directory

* verbose

* ci updates

* update some little things

* update sig
This commit is contained in:
Tobi Smethurst 2021-08-12 21:03:24 +02:00 committed by GitHub
commit 98263a7de6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2677 changed files with 1090869 additions and 219 deletions

152
vendor/github.com/go-fed/activity/streams/README.md generated vendored Normal file
View file

@ -0,0 +1,152 @@
# streams
ActivityStreams vocabularies automatically code-generated with `astool`.
## Reference & Tutorial
The [go-fed website](https://go-fed.org/) contains tutorials and reference
materials, in addition to the rest of this README.
## How To Use
```
go get github.com/go-fed/activity
```
All generated types and properties are interfaces in
`github.com/go-fed/streams/vocab`, but note that the constructors and supporting
functions live in `github.com/go-fed/streams`.
To create a type and set properties:
```golang
var actorURL *url.URL = // ...
// A new "Create" Activity.
create := streams.NewActivityStreamsCreate()
// A new "actor" property.
actor := streams.NewActivityStreamsActorProperty()
actor.AppendIRI(actorURL)
// Set the "actor" property on the "Create" Activity.
create.SetActivityStreamsActor(actor)
```
To process properties on a type:
```golang
// Returns true if the "Update" has at least one "object" with an IRI value.
func hasObjectWithIRIValue(update vocab.ActivityStreamsUpdate) bool {
objectProperty := update.GetActivityStreamsObject()
// Any property may be nil if it was either empty in the original JSON or
// never set on the golang type.
if objectProperty == nil {
return false
}
// The "object" property is non-functional: it could have multiple values. The
// generated code has slightly different methods for a functional property
// versus a non-functional one.
//
// While it may be easy to ignore multiple values in other languages
// (accidentally or purposefully), go-fed is designed to make it hard to do
// so.
for iter := objectProperty.Begin(); iter != objectProperty.End(); iter = iter.Next() {
// If this particular value is an IRI, return true.
if iter.IsIRI() {
return true
}
}
// All values are literal embedded values and not IRIs.
return false
}
```
The ActivityStreams type hierarchy of "extends" and "disjoint" is not the same
as the Object Oriented definition of inheritance. It is also not the same as
golang's interface duck-typing. Helper functions are provided to guarantee that
an application's logic can correctly apply the type hierarchy.
```golang
thing := // Pick a type from streams.NewActivityStreams<Type>()
if streams.ActivityStreamsObjectIsDisjointWith(thing) {
fmt.Printf("The \"Object\" type is Disjoint with the %T type.\n", thing)
}
if streams.ActivityStreamsLinkIsExtendedBy(thing) {
fmt.Printf("The %T type Extends from the \"Link\" type.\n", thing)
}
if streams.ActivityStreamsActivityExtends(thing) {
fmt.Printf("The \"Activity\" type extends from the %T type.\n", thing)
}
```
When given a generic JSON payload, it can be resolved to a concrete type by
creating a `streams.JSONResolver` and giving it a callback function that accepts
the interesting concrete type:
```golang
// Callbacks must be in the form:
// func(context.Context, <TypeInterface>) error
createCallback := func(c context.Context, create vocab.ActivityStreamsCreate) error {
// Do something with 'create'
fmt.Printf("createCallback called: %T\n", create)
return nil
}
updateCallback := func(c context.Context, update vocab.ActivityStreamsUpdate) error {
// Do something with 'update'
fmt.Printf("updateCallback called: %T\n", update)
return nil
}
jsonResolver, err := streams.NewJSONResolver(createCallback, updateCallback)
if err != nil {
// Something in the setup was wrong. For example, a callback has an
// unsupported signature and would never be called
panic(err)
}
// Create a context, which allows you to pass data opaquely through the
// JSONResolver.
c := context.Background()
// Example 15 of the ActivityStreams specification.
b := []byte(`{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally created a note",
"type": "Create",
"actor": {
"type": "Person",
"name": "Sally"
},
"object": {
"type": "Note",
"name": "A Simple Note",
"content": "This is a simple note"
}
}`)
var jsonMap map[string]interface{}
if err = json.Unmarshal(b, &jsonMap); err != nil {
panic(err)
}
// The createCallback function will be called.
err = jsonResolver.Resolve(c, jsonMap)
if err != nil && !streams.IsUnmatchedErr(err) {
// Something went wrong
panic(err)
} else if streams.IsUnmatchedErr(err) {
// Everything went right but the callback didn't match or the ActivityStreams
// type is one that wasn't code generated.
fmt.Println("No match: ", err)
}
```
A `streams.TypeResolver` is similar but uses the golang types instead. It
accepts the generic `vocab.Type`. This is the abstraction when needing to handle
any ActivityStreams type. The function `ToType` can convert a JSON-decoded-map
into this kind of value if needed.
A `streams.PredicatedTypeResolver` lets you apply a boolean predicate function
that acts as a check whether a callback is allowed to be invoked.
## FAQ
### Why Are Empty Properties Nil And Not Zero-Valued?
Due to implementation design decisions, it would require a lot of plumbing to
ensure this would work properly. It would also require allocation of a
non-trivial amount of memory.

501
vendor/github.com/go-fed/activity/streams/gen_consts.go generated vendored Normal file
View file

@ -0,0 +1,501 @@
// Code generated by astool. DO NOT EDIT.
package streams
// ActivityStreamsAcceptName is the string literal of the name for the Accept type in the ActivityStreams vocabulary.
var ActivityStreamsAcceptName string = "Accept"
// ActivityStreamsActivityName is the string literal of the name for the Activity type in the ActivityStreams vocabulary.
var ActivityStreamsActivityName string = "Activity"
// ActivityStreamsAddName is the string literal of the name for the Add type in the ActivityStreams vocabulary.
var ActivityStreamsAddName string = "Add"
// ActivityStreamsAnnounceName is the string literal of the name for the Announce type in the ActivityStreams vocabulary.
var ActivityStreamsAnnounceName string = "Announce"
// ActivityStreamsApplicationName is the string literal of the name for the Application type in the ActivityStreams vocabulary.
var ActivityStreamsApplicationName string = "Application"
// ActivityStreamsArriveName is the string literal of the name for the Arrive type in the ActivityStreams vocabulary.
var ActivityStreamsArriveName string = "Arrive"
// ActivityStreamsArticleName is the string literal of the name for the Article type in the ActivityStreams vocabulary.
var ActivityStreamsArticleName string = "Article"
// ActivityStreamsAudioName is the string literal of the name for the Audio type in the ActivityStreams vocabulary.
var ActivityStreamsAudioName string = "Audio"
// ActivityStreamsBlockName is the string literal of the name for the Block type in the ActivityStreams vocabulary.
var ActivityStreamsBlockName string = "Block"
// ForgeFedBranchName is the string literal of the name for the Branch type in the ForgeFed vocabulary.
var ForgeFedBranchName string = "Branch"
// ActivityStreamsCollectionName is the string literal of the name for the Collection type in the ActivityStreams vocabulary.
var ActivityStreamsCollectionName string = "Collection"
// ActivityStreamsCollectionPageName is the string literal of the name for the CollectionPage type in the ActivityStreams vocabulary.
var ActivityStreamsCollectionPageName string = "CollectionPage"
// ForgeFedCommitName is the string literal of the name for the Commit type in the ForgeFed vocabulary.
var ForgeFedCommitName string = "Commit"
// ActivityStreamsCreateName is the string literal of the name for the Create type in the ActivityStreams vocabulary.
var ActivityStreamsCreateName string = "Create"
// ActivityStreamsDeleteName is the string literal of the name for the Delete type in the ActivityStreams vocabulary.
var ActivityStreamsDeleteName string = "Delete"
// ActivityStreamsDislikeName is the string literal of the name for the Dislike type in the ActivityStreams vocabulary.
var ActivityStreamsDislikeName string = "Dislike"
// ActivityStreamsDocumentName is the string literal of the name for the Document type in the ActivityStreams vocabulary.
var ActivityStreamsDocumentName string = "Document"
// TootEmojiName is the string literal of the name for the Emoji type in the Toot vocabulary.
var TootEmojiName string = "Emoji"
// ActivityStreamsEventName is the string literal of the name for the Event type in the ActivityStreams vocabulary.
var ActivityStreamsEventName string = "Event"
// ActivityStreamsFlagName is the string literal of the name for the Flag type in the ActivityStreams vocabulary.
var ActivityStreamsFlagName string = "Flag"
// ActivityStreamsFollowName is the string literal of the name for the Follow type in the ActivityStreams vocabulary.
var ActivityStreamsFollowName string = "Follow"
// ActivityStreamsGroupName is the string literal of the name for the Group type in the ActivityStreams vocabulary.
var ActivityStreamsGroupName string = "Group"
// TootIdentityProofName is the string literal of the name for the IdentityProof type in the Toot vocabulary.
var TootIdentityProofName string = "IdentityProof"
// ActivityStreamsIgnoreName is the string literal of the name for the Ignore type in the ActivityStreams vocabulary.
var ActivityStreamsIgnoreName string = "Ignore"
// ActivityStreamsImageName is the string literal of the name for the Image type in the ActivityStreams vocabulary.
var ActivityStreamsImageName string = "Image"
// ActivityStreamsIntransitiveActivityName is the string literal of the name for the IntransitiveActivity type in the ActivityStreams vocabulary.
var ActivityStreamsIntransitiveActivityName string = "IntransitiveActivity"
// ActivityStreamsInviteName is the string literal of the name for the Invite type in the ActivityStreams vocabulary.
var ActivityStreamsInviteName string = "Invite"
// ActivityStreamsJoinName is the string literal of the name for the Join type in the ActivityStreams vocabulary.
var ActivityStreamsJoinName string = "Join"
// ActivityStreamsLeaveName is the string literal of the name for the Leave type in the ActivityStreams vocabulary.
var ActivityStreamsLeaveName string = "Leave"
// ActivityStreamsLikeName is the string literal of the name for the Like type in the ActivityStreams vocabulary.
var ActivityStreamsLikeName string = "Like"
// ActivityStreamsLinkName is the string literal of the name for the Link type in the ActivityStreams vocabulary.
var ActivityStreamsLinkName string = "Link"
// ActivityStreamsListenName is the string literal of the name for the Listen type in the ActivityStreams vocabulary.
var ActivityStreamsListenName string = "Listen"
// ActivityStreamsMentionName is the string literal of the name for the Mention type in the ActivityStreams vocabulary.
var ActivityStreamsMentionName string = "Mention"
// ActivityStreamsMoveName is the string literal of the name for the Move type in the ActivityStreams vocabulary.
var ActivityStreamsMoveName string = "Move"
// ActivityStreamsNoteName is the string literal of the name for the Note type in the ActivityStreams vocabulary.
var ActivityStreamsNoteName string = "Note"
// ActivityStreamsObjectName is the string literal of the name for the Object type in the ActivityStreams vocabulary.
var ActivityStreamsObjectName string = "Object"
// ActivityStreamsOfferName is the string literal of the name for the Offer type in the ActivityStreams vocabulary.
var ActivityStreamsOfferName string = "Offer"
// ActivityStreamsOrderedCollectionName is the string literal of the name for the OrderedCollection type in the ActivityStreams vocabulary.
var ActivityStreamsOrderedCollectionName string = "OrderedCollection"
// ActivityStreamsOrderedCollectionPageName is the string literal of the name for the OrderedCollectionPage type in the ActivityStreams vocabulary.
var ActivityStreamsOrderedCollectionPageName string = "OrderedCollectionPage"
// ActivityStreamsOrganizationName is the string literal of the name for the Organization type in the ActivityStreams vocabulary.
var ActivityStreamsOrganizationName string = "Organization"
// ActivityStreamsPageName is the string literal of the name for the Page type in the ActivityStreams vocabulary.
var ActivityStreamsPageName string = "Page"
// ActivityStreamsPersonName is the string literal of the name for the Person type in the ActivityStreams vocabulary.
var ActivityStreamsPersonName string = "Person"
// ActivityStreamsPlaceName is the string literal of the name for the Place type in the ActivityStreams vocabulary.
var ActivityStreamsPlaceName string = "Place"
// ActivityStreamsProfileName is the string literal of the name for the Profile type in the ActivityStreams vocabulary.
var ActivityStreamsProfileName string = "Profile"
// W3IDSecurityV1PublicKeyName is the string literal of the name for the PublicKey type in the W3IDSecurityV1 vocabulary.
var W3IDSecurityV1PublicKeyName string = "PublicKey"
// ForgeFedPushName is the string literal of the name for the Push type in the ForgeFed vocabulary.
var ForgeFedPushName string = "Push"
// ActivityStreamsQuestionName is the string literal of the name for the Question type in the ActivityStreams vocabulary.
var ActivityStreamsQuestionName string = "Question"
// ActivityStreamsReadName is the string literal of the name for the Read type in the ActivityStreams vocabulary.
var ActivityStreamsReadName string = "Read"
// ActivityStreamsRejectName is the string literal of the name for the Reject type in the ActivityStreams vocabulary.
var ActivityStreamsRejectName string = "Reject"
// ActivityStreamsRelationshipName is the string literal of the name for the Relationship type in the ActivityStreams vocabulary.
var ActivityStreamsRelationshipName string = "Relationship"
// ActivityStreamsRemoveName is the string literal of the name for the Remove type in the ActivityStreams vocabulary.
var ActivityStreamsRemoveName string = "Remove"
// ForgeFedRepositoryName is the string literal of the name for the Repository type in the ForgeFed vocabulary.
var ForgeFedRepositoryName string = "Repository"
// ActivityStreamsServiceName is the string literal of the name for the Service type in the ActivityStreams vocabulary.
var ActivityStreamsServiceName string = "Service"
// ActivityStreamsTentativeAcceptName is the string literal of the name for the TentativeAccept type in the ActivityStreams vocabulary.
var ActivityStreamsTentativeAcceptName string = "TentativeAccept"
// ActivityStreamsTentativeRejectName is the string literal of the name for the TentativeReject type in the ActivityStreams vocabulary.
var ActivityStreamsTentativeRejectName string = "TentativeReject"
// ForgeFedTicketName is the string literal of the name for the Ticket type in the ForgeFed vocabulary.
var ForgeFedTicketName string = "Ticket"
// ForgeFedTicketDependencyName is the string literal of the name for the TicketDependency type in the ForgeFed vocabulary.
var ForgeFedTicketDependencyName string = "TicketDependency"
// ActivityStreamsTombstoneName is the string literal of the name for the Tombstone type in the ActivityStreams vocabulary.
var ActivityStreamsTombstoneName string = "Tombstone"
// ActivityStreamsTravelName is the string literal of the name for the Travel type in the ActivityStreams vocabulary.
var ActivityStreamsTravelName string = "Travel"
// ActivityStreamsUndoName is the string literal of the name for the Undo type in the ActivityStreams vocabulary.
var ActivityStreamsUndoName string = "Undo"
// ActivityStreamsUpdateName is the string literal of the name for the Update type in the ActivityStreams vocabulary.
var ActivityStreamsUpdateName string = "Update"
// ActivityStreamsVideoName is the string literal of the name for the Video type in the ActivityStreams vocabulary.
var ActivityStreamsVideoName string = "Video"
// ActivityStreamsViewName is the string literal of the name for the View type in the ActivityStreams vocabulary.
var ActivityStreamsViewName string = "View"
// ActivityStreamsAccuracyPropertyName is the string literal of the name for the accuracy property in the ActivityStreams vocabulary.
var ActivityStreamsAccuracyPropertyName string = "accuracy"
// ActivityStreamsActorPropertyName is the string literal of the name for the actor property in the ActivityStreams vocabulary.
var ActivityStreamsActorPropertyName string = "actor"
// ActivityStreamsAltitudePropertyName is the string literal of the name for the altitude property in the ActivityStreams vocabulary.
var ActivityStreamsAltitudePropertyName string = "altitude"
// ActivityStreamsAnyOfPropertyName is the string literal of the name for the anyOf property in the ActivityStreams vocabulary.
var ActivityStreamsAnyOfPropertyName string = "anyOf"
// ForgeFedAssignedToPropertyName is the string literal of the name for the assignedTo property in the ForgeFed vocabulary.
var ForgeFedAssignedToPropertyName string = "assignedTo"
// ActivityStreamsAttachmentPropertyName is the string literal of the name for the attachment property in the ActivityStreams vocabulary.
var ActivityStreamsAttachmentPropertyName string = "attachment"
// ActivityStreamsAttributedToPropertyName is the string literal of the name for the attributedTo property in the ActivityStreams vocabulary.
var ActivityStreamsAttributedToPropertyName string = "attributedTo"
// ActivityStreamsAudiencePropertyName is the string literal of the name for the audience property in the ActivityStreams vocabulary.
var ActivityStreamsAudiencePropertyName string = "audience"
// ActivityStreamsBccPropertyName is the string literal of the name for the bcc property in the ActivityStreams vocabulary.
var ActivityStreamsBccPropertyName string = "bcc"
// TootBlurhashPropertyName is the string literal of the name for the blurhash property in the Toot vocabulary.
var TootBlurhashPropertyName string = "blurhash"
// ActivityStreamsBtoPropertyName is the string literal of the name for the bto property in the ActivityStreams vocabulary.
var ActivityStreamsBtoPropertyName string = "bto"
// ActivityStreamsCcPropertyName is the string literal of the name for the cc property in the ActivityStreams vocabulary.
var ActivityStreamsCcPropertyName string = "cc"
// ActivityStreamsClosedPropertyName is the string literal of the name for the closed property in the ActivityStreams vocabulary.
var ActivityStreamsClosedPropertyName string = "closed"
// ForgeFedCommittedPropertyName is the string literal of the name for the committed property in the ForgeFed vocabulary.
var ForgeFedCommittedPropertyName string = "committed"
// ForgeFedCommittedByPropertyName is the string literal of the name for the committedBy property in the ForgeFed vocabulary.
var ForgeFedCommittedByPropertyName string = "committedBy"
// ActivityStreamsContentPropertyName is the string literal of the name for the content property in the ActivityStreams vocabulary.
var ActivityStreamsContentPropertyName string = "content"
// ActivityStreamsContentPropertyMapName is the string literal of the name for the content property in the ActivityStreams vocabulary when it is a natural language map.
var ActivityStreamsContentPropertyMapName string = "contentMap"
// ActivityStreamsContextPropertyName is the string literal of the name for the context property in the ActivityStreams vocabulary.
var ActivityStreamsContextPropertyName string = "context"
// ActivityStreamsCurrentPropertyName is the string literal of the name for the current property in the ActivityStreams vocabulary.
var ActivityStreamsCurrentPropertyName string = "current"
// ActivityStreamsDeletedPropertyName is the string literal of the name for the deleted property in the ActivityStreams vocabulary.
var ActivityStreamsDeletedPropertyName string = "deleted"
// ForgeFedDependantsPropertyName is the string literal of the name for the dependants property in the ForgeFed vocabulary.
var ForgeFedDependantsPropertyName string = "dependants"
// ForgeFedDependedByPropertyName is the string literal of the name for the dependedBy property in the ForgeFed vocabulary.
var ForgeFedDependedByPropertyName string = "dependedBy"
// ForgeFedDependenciesPropertyName is the string literal of the name for the dependencies property in the ForgeFed vocabulary.
var ForgeFedDependenciesPropertyName string = "dependencies"
// ForgeFedDependsOnPropertyName is the string literal of the name for the dependsOn property in the ForgeFed vocabulary.
var ForgeFedDependsOnPropertyName string = "dependsOn"
// ActivityStreamsDescribesPropertyName is the string literal of the name for the describes property in the ActivityStreams vocabulary.
var ActivityStreamsDescribesPropertyName string = "describes"
// ForgeFedDescriptionPropertyName is the string literal of the name for the description property in the ForgeFed vocabulary.
var ForgeFedDescriptionPropertyName string = "description"
// TootDiscoverablePropertyName is the string literal of the name for the discoverable property in the Toot vocabulary.
var TootDiscoverablePropertyName string = "discoverable"
// ActivityStreamsDurationPropertyName is the string literal of the name for the duration property in the ActivityStreams vocabulary.
var ActivityStreamsDurationPropertyName string = "duration"
// ForgeFedEarlyItemsPropertyName is the string literal of the name for the earlyItems property in the ForgeFed vocabulary.
var ForgeFedEarlyItemsPropertyName string = "earlyItems"
// ActivityStreamsEndTimePropertyName is the string literal of the name for the endTime property in the ActivityStreams vocabulary.
var ActivityStreamsEndTimePropertyName string = "endTime"
// TootFeaturedPropertyName is the string literal of the name for the featured property in the Toot vocabulary.
var TootFeaturedPropertyName string = "featured"
// ForgeFedFilesAddedPropertyName is the string literal of the name for the filesAdded property in the ForgeFed vocabulary.
var ForgeFedFilesAddedPropertyName string = "filesAdded"
// ForgeFedFilesModifiedPropertyName is the string literal of the name for the filesModified property in the ForgeFed vocabulary.
var ForgeFedFilesModifiedPropertyName string = "filesModified"
// ForgeFedFilesRemovedPropertyName is the string literal of the name for the filesRemoved property in the ForgeFed vocabulary.
var ForgeFedFilesRemovedPropertyName string = "filesRemoved"
// ActivityStreamsFirstPropertyName is the string literal of the name for the first property in the ActivityStreams vocabulary.
var ActivityStreamsFirstPropertyName string = "first"
// ActivityStreamsFollowersPropertyName is the string literal of the name for the followers property in the ActivityStreams vocabulary.
var ActivityStreamsFollowersPropertyName string = "followers"
// ActivityStreamsFollowingPropertyName is the string literal of the name for the following property in the ActivityStreams vocabulary.
var ActivityStreamsFollowingPropertyName string = "following"
// ForgeFedForksPropertyName is the string literal of the name for the forks property in the ForgeFed vocabulary.
var ForgeFedForksPropertyName string = "forks"
// ActivityStreamsFormerTypePropertyName is the string literal of the name for the formerType property in the ActivityStreams vocabulary.
var ActivityStreamsFormerTypePropertyName string = "formerType"
// ActivityStreamsGeneratorPropertyName is the string literal of the name for the generator property in the ActivityStreams vocabulary.
var ActivityStreamsGeneratorPropertyName string = "generator"
// ForgeFedHashPropertyName is the string literal of the name for the hash property in the ForgeFed vocabulary.
var ForgeFedHashPropertyName string = "hash"
// ActivityStreamsHeightPropertyName is the string literal of the name for the height property in the ActivityStreams vocabulary.
var ActivityStreamsHeightPropertyName string = "height"
// ActivityStreamsHrefPropertyName is the string literal of the name for the href property in the ActivityStreams vocabulary.
var ActivityStreamsHrefPropertyName string = "href"
// ActivityStreamsHreflangPropertyName is the string literal of the name for the hreflang property in the ActivityStreams vocabulary.
var ActivityStreamsHreflangPropertyName string = "hreflang"
// ActivityStreamsIconPropertyName is the string literal of the name for the icon property in the ActivityStreams vocabulary.
var ActivityStreamsIconPropertyName string = "icon"
// ActivityStreamsImagePropertyName is the string literal of the name for the image property in the ActivityStreams vocabulary.
var ActivityStreamsImagePropertyName string = "image"
// ActivityStreamsInReplyToPropertyName is the string literal of the name for the inReplyTo property in the ActivityStreams vocabulary.
var ActivityStreamsInReplyToPropertyName string = "inReplyTo"
// ActivityStreamsInboxPropertyName is the string literal of the name for the inbox property in the ActivityStreams vocabulary.
var ActivityStreamsInboxPropertyName string = "inbox"
// ActivityStreamsInstrumentPropertyName is the string literal of the name for the instrument property in the ActivityStreams vocabulary.
var ActivityStreamsInstrumentPropertyName string = "instrument"
// ForgeFedIsResolvedPropertyName is the string literal of the name for the isResolved property in the ForgeFed vocabulary.
var ForgeFedIsResolvedPropertyName string = "isResolved"
// ActivityStreamsItemsPropertyName is the string literal of the name for the items property in the ActivityStreams vocabulary.
var ActivityStreamsItemsPropertyName string = "items"
// ActivityStreamsLastPropertyName is the string literal of the name for the last property in the ActivityStreams vocabulary.
var ActivityStreamsLastPropertyName string = "last"
// ActivityStreamsLatitudePropertyName is the string literal of the name for the latitude property in the ActivityStreams vocabulary.
var ActivityStreamsLatitudePropertyName string = "latitude"
// ActivityStreamsLikedPropertyName is the string literal of the name for the liked property in the ActivityStreams vocabulary.
var ActivityStreamsLikedPropertyName string = "liked"
// ActivityStreamsLikesPropertyName is the string literal of the name for the likes property in the ActivityStreams vocabulary.
var ActivityStreamsLikesPropertyName string = "likes"
// ActivityStreamsLocationPropertyName is the string literal of the name for the location property in the ActivityStreams vocabulary.
var ActivityStreamsLocationPropertyName string = "location"
// ActivityStreamsLongitudePropertyName is the string literal of the name for the longitude property in the ActivityStreams vocabulary.
var ActivityStreamsLongitudePropertyName string = "longitude"
// ActivityStreamsMediaTypePropertyName is the string literal of the name for the mediaType property in the ActivityStreams vocabulary.
var ActivityStreamsMediaTypePropertyName string = "mediaType"
// ActivityStreamsNamePropertyName is the string literal of the name for the name property in the ActivityStreams vocabulary.
var ActivityStreamsNamePropertyName string = "name"
// ActivityStreamsNamePropertyMapName is the string literal of the name for the name property in the ActivityStreams vocabulary when it is a natural language map.
var ActivityStreamsNamePropertyMapName string = "nameMap"
// ActivityStreamsNextPropertyName is the string literal of the name for the next property in the ActivityStreams vocabulary.
var ActivityStreamsNextPropertyName string = "next"
// ActivityStreamsObjectPropertyName is the string literal of the name for the object property in the ActivityStreams vocabulary.
var ActivityStreamsObjectPropertyName string = "object"
// ActivityStreamsOneOfPropertyName is the string literal of the name for the oneOf property in the ActivityStreams vocabulary.
var ActivityStreamsOneOfPropertyName string = "oneOf"
// ActivityStreamsOrderedItemsPropertyName is the string literal of the name for the orderedItems property in the ActivityStreams vocabulary.
var ActivityStreamsOrderedItemsPropertyName string = "orderedItems"
// ActivityStreamsOriginPropertyName is the string literal of the name for the origin property in the ActivityStreams vocabulary.
var ActivityStreamsOriginPropertyName string = "origin"
// ActivityStreamsOutboxPropertyName is the string literal of the name for the outbox property in the ActivityStreams vocabulary.
var ActivityStreamsOutboxPropertyName string = "outbox"
// W3IDSecurityV1OwnerPropertyName is the string literal of the name for the owner property in the W3IDSecurityV1 vocabulary.
var W3IDSecurityV1OwnerPropertyName string = "owner"
// ActivityStreamsPartOfPropertyName is the string literal of the name for the partOf property in the ActivityStreams vocabulary.
var ActivityStreamsPartOfPropertyName string = "partOf"
// ActivityStreamsPreferredUsernamePropertyName is the string literal of the name for the preferredUsername property in the ActivityStreams vocabulary.
var ActivityStreamsPreferredUsernamePropertyName string = "preferredUsername"
// ActivityStreamsPreferredUsernamePropertyMapName is the string literal of the name for the preferredUsername property in the ActivityStreams vocabulary when it is a natural language map.
var ActivityStreamsPreferredUsernamePropertyMapName string = "preferredUsernameMap"
// ActivityStreamsPrevPropertyName is the string literal of the name for the prev property in the ActivityStreams vocabulary.
var ActivityStreamsPrevPropertyName string = "prev"
// ActivityStreamsPreviewPropertyName is the string literal of the name for the preview property in the ActivityStreams vocabulary.
var ActivityStreamsPreviewPropertyName string = "preview"
// W3IDSecurityV1PublicKeyPropertyName is the string literal of the name for the publicKey property in the W3IDSecurityV1 vocabulary.
var W3IDSecurityV1PublicKeyPropertyName string = "publicKey"
// W3IDSecurityV1PublicKeyPemPropertyName is the string literal of the name for the publicKeyPem property in the W3IDSecurityV1 vocabulary.
var W3IDSecurityV1PublicKeyPemPropertyName string = "publicKeyPem"
// ActivityStreamsPublishedPropertyName is the string literal of the name for the published property in the ActivityStreams vocabulary.
var ActivityStreamsPublishedPropertyName string = "published"
// ActivityStreamsRadiusPropertyName is the string literal of the name for the radius property in the ActivityStreams vocabulary.
var ActivityStreamsRadiusPropertyName string = "radius"
// ForgeFedRefPropertyName is the string literal of the name for the ref property in the ForgeFed vocabulary.
var ForgeFedRefPropertyName string = "ref"
// ActivityStreamsRelPropertyName is the string literal of the name for the rel property in the ActivityStreams vocabulary.
var ActivityStreamsRelPropertyName string = "rel"
// ActivityStreamsRelationshipPropertyName is the string literal of the name for the relationship property in the ActivityStreams vocabulary.
var ActivityStreamsRelationshipPropertyName string = "relationship"
// ActivityStreamsRepliesPropertyName is the string literal of the name for the replies property in the ActivityStreams vocabulary.
var ActivityStreamsRepliesPropertyName string = "replies"
// ActivityStreamsResultPropertyName is the string literal of the name for the result property in the ActivityStreams vocabulary.
var ActivityStreamsResultPropertyName string = "result"
// ActivityStreamsSharesPropertyName is the string literal of the name for the shares property in the ActivityStreams vocabulary.
var ActivityStreamsSharesPropertyName string = "shares"
// TootSignatureAlgorithmPropertyName is the string literal of the name for the signatureAlgorithm property in the Toot vocabulary.
var TootSignatureAlgorithmPropertyName string = "signatureAlgorithm"
// TootSignatureValuePropertyName is the string literal of the name for the signatureValue property in the Toot vocabulary.
var TootSignatureValuePropertyName string = "signatureValue"
// ActivityStreamsSourcePropertyName is the string literal of the name for the source property in the ActivityStreams vocabulary.
var ActivityStreamsSourcePropertyName string = "source"
// ActivityStreamsStartIndexPropertyName is the string literal of the name for the startIndex property in the ActivityStreams vocabulary.
var ActivityStreamsStartIndexPropertyName string = "startIndex"
// ActivityStreamsStartTimePropertyName is the string literal of the name for the startTime property in the ActivityStreams vocabulary.
var ActivityStreamsStartTimePropertyName string = "startTime"
// ActivityStreamsStreamsPropertyName is the string literal of the name for the streams property in the ActivityStreams vocabulary.
var ActivityStreamsStreamsPropertyName string = "streams"
// ActivityStreamsSubjectPropertyName is the string literal of the name for the subject property in the ActivityStreams vocabulary.
var ActivityStreamsSubjectPropertyName string = "subject"
// ActivityStreamsSummaryPropertyName is the string literal of the name for the summary property in the ActivityStreams vocabulary.
var ActivityStreamsSummaryPropertyName string = "summary"
// ActivityStreamsSummaryPropertyMapName is the string literal of the name for the summary property in the ActivityStreams vocabulary when it is a natural language map.
var ActivityStreamsSummaryPropertyMapName string = "summaryMap"
// ActivityStreamsTagPropertyName is the string literal of the name for the tag property in the ActivityStreams vocabulary.
var ActivityStreamsTagPropertyName string = "tag"
// ActivityStreamsTargetPropertyName is the string literal of the name for the target property in the ActivityStreams vocabulary.
var ActivityStreamsTargetPropertyName string = "target"
// ForgeFedTeamPropertyName is the string literal of the name for the team property in the ForgeFed vocabulary.
var ForgeFedTeamPropertyName string = "team"
// ForgeFedTicketsTrackedByPropertyName is the string literal of the name for the ticketsTrackedBy property in the ForgeFed vocabulary.
var ForgeFedTicketsTrackedByPropertyName string = "ticketsTrackedBy"
// ActivityStreamsToPropertyName is the string literal of the name for the to property in the ActivityStreams vocabulary.
var ActivityStreamsToPropertyName string = "to"
// ActivityStreamsTotalItemsPropertyName is the string literal of the name for the totalItems property in the ActivityStreams vocabulary.
var ActivityStreamsTotalItemsPropertyName string = "totalItems"
// ForgeFedTracksTicketsForPropertyName is the string literal of the name for the tracksTicketsFor property in the ForgeFed vocabulary.
var ForgeFedTracksTicketsForPropertyName string = "tracksTicketsFor"
// ActivityStreamsUnitsPropertyName is the string literal of the name for the units property in the ActivityStreams vocabulary.
var ActivityStreamsUnitsPropertyName string = "units"
// ActivityStreamsUpdatedPropertyName is the string literal of the name for the updated property in the ActivityStreams vocabulary.
var ActivityStreamsUpdatedPropertyName string = "updated"
// ActivityStreamsUrlPropertyName is the string literal of the name for the url property in the ActivityStreams vocabulary.
var ActivityStreamsUrlPropertyName string = "url"
// TootVotersCountPropertyName is the string literal of the name for the votersCount property in the Toot vocabulary.
var TootVotersCountPropertyName string = "votersCount"
// ActivityStreamsWidthPropertyName is the string literal of the name for the width property in the ActivityStreams vocabulary.
var ActivityStreamsWidthPropertyName string = "width"

51
vendor/github.com/go-fed/activity/streams/gen_doc.go generated vendored Normal file
View file

@ -0,0 +1,51 @@
// Code generated by astool. DO NOT EDIT.
// Package streams contains constructors and functions necessary for applications
// to serialize, deserialize, and use ActivityStreams types in Go. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is useful to three classes of developers: end-user-application
// developers, specification writers creating an ActivityStream Extension, and
// ActivityPub implementors wanting to create an alternate ActivityStreams
// implementation that still satisfies the interfaces generated by the go-fed
// tool.
//
// Application developers should limit their use to the Resolver type, the
// constructors beginning with "New", the "Extends" functions, the
// "DisjointWith" functions, the "ExtendedBy" functions, and any interfaces
// returned in those functions in this package. This lets applications use
// Resolvers to Deserialize or Dispatch specific types. The types themselves
// can Serialize as needed. The "Extends", "DisjointWith", and "ExtendedBy"
// functions help navigate the ActivityStreams hierarchy since it is not
// equivalent to object-oriented inheritance.
//
// When creating an ActivityStreams extension, developers will want to ensure
// that the generated code builds correctly and check that the properties,
// types, extensions, and disjointedness is set up correctly. Writing unit
// tests with concrete types is then the next step. If the tool has an error
// generating this code, a fix is needed in the tool as it is likely there is
// a new RDF type being used in the extension that the tool does not know how
// to resolve. Thus, most development will focus on the go-fed tool itself.
//
// Finally, ActivityStreams implementors that want drop-in replacement while
// still using the generated interfaces are highly encouraged to examine the
// Manager type in this package (in addition to the constructors) as these are
// the locations where concrete types are instantiated. When supplying a
// different type in these two locations, the other generated code will
// propagate it throughout the rest of an application. The Manager is
// instantiated as a singleton at init time in this library. It is then
// injected into each implementation library so they can deserialize their
// needed types without relying on the underlying concrete type.
//
// Subdirectories of this package include implementation files and functions
// that are not intended to be directly linked to applications, but are used
// by this particular package. It is strongly recommended to only use the
// property interfaces and type interfaces in subdirectories and limiting
// concrete types to those in this package. The go-fed tool is likely to
// contain a pruning feature in the future which will analyze an application
// and eliminate code that would be dead if it were to be generated which
// reduces the compilation time, compilation resources, and binary size of an
// application. Such a feature will not be compatible with applications that
// use the concrete implementation types.
package streams

408
vendor/github.com/go-fed/activity/streams/gen_init.go generated vendored Normal file
View file

@ -0,0 +1,408 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
propertyaccuracy "github.com/go-fed/activity/streams/impl/activitystreams/property_accuracy"
propertyactor "github.com/go-fed/activity/streams/impl/activitystreams/property_actor"
propertyaltitude "github.com/go-fed/activity/streams/impl/activitystreams/property_altitude"
propertyanyof "github.com/go-fed/activity/streams/impl/activitystreams/property_anyof"
propertyattachment "github.com/go-fed/activity/streams/impl/activitystreams/property_attachment"
propertyattributedto "github.com/go-fed/activity/streams/impl/activitystreams/property_attributedto"
propertyaudience "github.com/go-fed/activity/streams/impl/activitystreams/property_audience"
propertybcc "github.com/go-fed/activity/streams/impl/activitystreams/property_bcc"
propertybto "github.com/go-fed/activity/streams/impl/activitystreams/property_bto"
propertycc "github.com/go-fed/activity/streams/impl/activitystreams/property_cc"
propertyclosed "github.com/go-fed/activity/streams/impl/activitystreams/property_closed"
propertycontent "github.com/go-fed/activity/streams/impl/activitystreams/property_content"
propertycontext "github.com/go-fed/activity/streams/impl/activitystreams/property_context"
propertycurrent "github.com/go-fed/activity/streams/impl/activitystreams/property_current"
propertydeleted "github.com/go-fed/activity/streams/impl/activitystreams/property_deleted"
propertydescribes "github.com/go-fed/activity/streams/impl/activitystreams/property_describes"
propertyduration "github.com/go-fed/activity/streams/impl/activitystreams/property_duration"
propertyendtime "github.com/go-fed/activity/streams/impl/activitystreams/property_endtime"
propertyfirst "github.com/go-fed/activity/streams/impl/activitystreams/property_first"
propertyfollowers "github.com/go-fed/activity/streams/impl/activitystreams/property_followers"
propertyfollowing "github.com/go-fed/activity/streams/impl/activitystreams/property_following"
propertyformertype "github.com/go-fed/activity/streams/impl/activitystreams/property_formertype"
propertygenerator "github.com/go-fed/activity/streams/impl/activitystreams/property_generator"
propertyheight "github.com/go-fed/activity/streams/impl/activitystreams/property_height"
propertyhref "github.com/go-fed/activity/streams/impl/activitystreams/property_href"
propertyhreflang "github.com/go-fed/activity/streams/impl/activitystreams/property_hreflang"
propertyicon "github.com/go-fed/activity/streams/impl/activitystreams/property_icon"
propertyimage "github.com/go-fed/activity/streams/impl/activitystreams/property_image"
propertyinbox "github.com/go-fed/activity/streams/impl/activitystreams/property_inbox"
propertyinreplyto "github.com/go-fed/activity/streams/impl/activitystreams/property_inreplyto"
propertyinstrument "github.com/go-fed/activity/streams/impl/activitystreams/property_instrument"
propertyitems "github.com/go-fed/activity/streams/impl/activitystreams/property_items"
propertylast "github.com/go-fed/activity/streams/impl/activitystreams/property_last"
propertylatitude "github.com/go-fed/activity/streams/impl/activitystreams/property_latitude"
propertyliked "github.com/go-fed/activity/streams/impl/activitystreams/property_liked"
propertylikes "github.com/go-fed/activity/streams/impl/activitystreams/property_likes"
propertylocation "github.com/go-fed/activity/streams/impl/activitystreams/property_location"
propertylongitude "github.com/go-fed/activity/streams/impl/activitystreams/property_longitude"
propertymediatype "github.com/go-fed/activity/streams/impl/activitystreams/property_mediatype"
propertyname "github.com/go-fed/activity/streams/impl/activitystreams/property_name"
propertynext "github.com/go-fed/activity/streams/impl/activitystreams/property_next"
propertyobject "github.com/go-fed/activity/streams/impl/activitystreams/property_object"
propertyoneof "github.com/go-fed/activity/streams/impl/activitystreams/property_oneof"
propertyordereditems "github.com/go-fed/activity/streams/impl/activitystreams/property_ordereditems"
propertyorigin "github.com/go-fed/activity/streams/impl/activitystreams/property_origin"
propertyoutbox "github.com/go-fed/activity/streams/impl/activitystreams/property_outbox"
propertypartof "github.com/go-fed/activity/streams/impl/activitystreams/property_partof"
propertypreferredusername "github.com/go-fed/activity/streams/impl/activitystreams/property_preferredusername"
propertyprev "github.com/go-fed/activity/streams/impl/activitystreams/property_prev"
propertypreview "github.com/go-fed/activity/streams/impl/activitystreams/property_preview"
propertypublished "github.com/go-fed/activity/streams/impl/activitystreams/property_published"
propertyradius "github.com/go-fed/activity/streams/impl/activitystreams/property_radius"
propertyrel "github.com/go-fed/activity/streams/impl/activitystreams/property_rel"
propertyrelationship "github.com/go-fed/activity/streams/impl/activitystreams/property_relationship"
propertyreplies "github.com/go-fed/activity/streams/impl/activitystreams/property_replies"
propertyresult "github.com/go-fed/activity/streams/impl/activitystreams/property_result"
propertyshares "github.com/go-fed/activity/streams/impl/activitystreams/property_shares"
propertysource "github.com/go-fed/activity/streams/impl/activitystreams/property_source"
propertystartindex "github.com/go-fed/activity/streams/impl/activitystreams/property_startindex"
propertystarttime "github.com/go-fed/activity/streams/impl/activitystreams/property_starttime"
propertystreams "github.com/go-fed/activity/streams/impl/activitystreams/property_streams"
propertysubject "github.com/go-fed/activity/streams/impl/activitystreams/property_subject"
propertysummary "github.com/go-fed/activity/streams/impl/activitystreams/property_summary"
propertytag "github.com/go-fed/activity/streams/impl/activitystreams/property_tag"
propertytarget "github.com/go-fed/activity/streams/impl/activitystreams/property_target"
propertyto "github.com/go-fed/activity/streams/impl/activitystreams/property_to"
propertytotalitems "github.com/go-fed/activity/streams/impl/activitystreams/property_totalitems"
propertyunits "github.com/go-fed/activity/streams/impl/activitystreams/property_units"
propertyupdated "github.com/go-fed/activity/streams/impl/activitystreams/property_updated"
propertyurl "github.com/go-fed/activity/streams/impl/activitystreams/property_url"
propertywidth "github.com/go-fed/activity/streams/impl/activitystreams/property_width"
typeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_accept"
typeactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_activity"
typeadd "github.com/go-fed/activity/streams/impl/activitystreams/type_add"
typeannounce "github.com/go-fed/activity/streams/impl/activitystreams/type_announce"
typeapplication "github.com/go-fed/activity/streams/impl/activitystreams/type_application"
typearrive "github.com/go-fed/activity/streams/impl/activitystreams/type_arrive"
typearticle "github.com/go-fed/activity/streams/impl/activitystreams/type_article"
typeaudio "github.com/go-fed/activity/streams/impl/activitystreams/type_audio"
typeblock "github.com/go-fed/activity/streams/impl/activitystreams/type_block"
typecollection "github.com/go-fed/activity/streams/impl/activitystreams/type_collection"
typecollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_collectionpage"
typecreate "github.com/go-fed/activity/streams/impl/activitystreams/type_create"
typedelete "github.com/go-fed/activity/streams/impl/activitystreams/type_delete"
typedislike "github.com/go-fed/activity/streams/impl/activitystreams/type_dislike"
typedocument "github.com/go-fed/activity/streams/impl/activitystreams/type_document"
typeevent "github.com/go-fed/activity/streams/impl/activitystreams/type_event"
typeflag "github.com/go-fed/activity/streams/impl/activitystreams/type_flag"
typefollow "github.com/go-fed/activity/streams/impl/activitystreams/type_follow"
typegroup "github.com/go-fed/activity/streams/impl/activitystreams/type_group"
typeignore "github.com/go-fed/activity/streams/impl/activitystreams/type_ignore"
typeimage "github.com/go-fed/activity/streams/impl/activitystreams/type_image"
typeintransitiveactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_intransitiveactivity"
typeinvite "github.com/go-fed/activity/streams/impl/activitystreams/type_invite"
typejoin "github.com/go-fed/activity/streams/impl/activitystreams/type_join"
typeleave "github.com/go-fed/activity/streams/impl/activitystreams/type_leave"
typelike "github.com/go-fed/activity/streams/impl/activitystreams/type_like"
typelink "github.com/go-fed/activity/streams/impl/activitystreams/type_link"
typelisten "github.com/go-fed/activity/streams/impl/activitystreams/type_listen"
typemention "github.com/go-fed/activity/streams/impl/activitystreams/type_mention"
typemove "github.com/go-fed/activity/streams/impl/activitystreams/type_move"
typenote "github.com/go-fed/activity/streams/impl/activitystreams/type_note"
typeobject "github.com/go-fed/activity/streams/impl/activitystreams/type_object"
typeoffer "github.com/go-fed/activity/streams/impl/activitystreams/type_offer"
typeorderedcollection "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollection"
typeorderedcollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollectionpage"
typeorganization "github.com/go-fed/activity/streams/impl/activitystreams/type_organization"
typepage "github.com/go-fed/activity/streams/impl/activitystreams/type_page"
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
typerelationship "github.com/go-fed/activity/streams/impl/activitystreams/type_relationship"
typeremove "github.com/go-fed/activity/streams/impl/activitystreams/type_remove"
typeservice "github.com/go-fed/activity/streams/impl/activitystreams/type_service"
typetentativeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativeaccept"
typetentativereject "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativereject"
typetombstone "github.com/go-fed/activity/streams/impl/activitystreams/type_tombstone"
typetravel "github.com/go-fed/activity/streams/impl/activitystreams/type_travel"
typeundo "github.com/go-fed/activity/streams/impl/activitystreams/type_undo"
typeupdate "github.com/go-fed/activity/streams/impl/activitystreams/type_update"
typevideo "github.com/go-fed/activity/streams/impl/activitystreams/type_video"
typeview "github.com/go-fed/activity/streams/impl/activitystreams/type_view"
propertyassignedto "github.com/go-fed/activity/streams/impl/forgefed/property_assignedto"
propertycommitted "github.com/go-fed/activity/streams/impl/forgefed/property_committed"
propertycommittedby "github.com/go-fed/activity/streams/impl/forgefed/property_committedby"
propertydependants "github.com/go-fed/activity/streams/impl/forgefed/property_dependants"
propertydependedby "github.com/go-fed/activity/streams/impl/forgefed/property_dependedby"
propertydependencies "github.com/go-fed/activity/streams/impl/forgefed/property_dependencies"
propertydependson "github.com/go-fed/activity/streams/impl/forgefed/property_dependson"
propertydescription "github.com/go-fed/activity/streams/impl/forgefed/property_description"
propertyearlyitems "github.com/go-fed/activity/streams/impl/forgefed/property_earlyitems"
propertyfilesadded "github.com/go-fed/activity/streams/impl/forgefed/property_filesadded"
propertyfilesmodified "github.com/go-fed/activity/streams/impl/forgefed/property_filesmodified"
propertyfilesremoved "github.com/go-fed/activity/streams/impl/forgefed/property_filesremoved"
propertyforks "github.com/go-fed/activity/streams/impl/forgefed/property_forks"
propertyhash "github.com/go-fed/activity/streams/impl/forgefed/property_hash"
propertyisresolved "github.com/go-fed/activity/streams/impl/forgefed/property_isresolved"
propertyref "github.com/go-fed/activity/streams/impl/forgefed/property_ref"
propertyteam "github.com/go-fed/activity/streams/impl/forgefed/property_team"
propertyticketstrackedby "github.com/go-fed/activity/streams/impl/forgefed/property_ticketstrackedby"
propertytracksticketsfor "github.com/go-fed/activity/streams/impl/forgefed/property_tracksticketsfor"
typebranch "github.com/go-fed/activity/streams/impl/forgefed/type_branch"
typecommit "github.com/go-fed/activity/streams/impl/forgefed/type_commit"
typepush "github.com/go-fed/activity/streams/impl/forgefed/type_push"
typerepository "github.com/go-fed/activity/streams/impl/forgefed/type_repository"
typeticket "github.com/go-fed/activity/streams/impl/forgefed/type_ticket"
typeticketdependency "github.com/go-fed/activity/streams/impl/forgefed/type_ticketdependency"
propertyblurhash "github.com/go-fed/activity/streams/impl/toot/property_blurhash"
propertydiscoverable "github.com/go-fed/activity/streams/impl/toot/property_discoverable"
propertyfeatured "github.com/go-fed/activity/streams/impl/toot/property_featured"
propertysignaturealgorithm "github.com/go-fed/activity/streams/impl/toot/property_signaturealgorithm"
propertysignaturevalue "github.com/go-fed/activity/streams/impl/toot/property_signaturevalue"
propertyvoterscount "github.com/go-fed/activity/streams/impl/toot/property_voterscount"
typeemoji "github.com/go-fed/activity/streams/impl/toot/type_emoji"
typeidentityproof "github.com/go-fed/activity/streams/impl/toot/type_identityproof"
propertyowner "github.com/go-fed/activity/streams/impl/w3idsecurityv1/property_owner"
propertypublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/property_publickey"
propertypublickeypem "github.com/go-fed/activity/streams/impl/w3idsecurityv1/property_publickeypem"
typepublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/type_publickey"
)
var mgr *Manager
// init handles the 'magic' of creating a Manager and dependency-injecting it into
// every other code-generated package. This gives the implementations access
// to create any type needed to deserialize, without relying on the other
// specific concrete implementations. In order to replace a go-fed created
// type with your own, be sure to have the manager call your own
// implementation's deserialize functions instead of the built-in type.
// Finally, each implementation views the Manager as an interface with only a
// subset of funcitons available. This means this Manager implements the union
// of those interfaces.
func init() {
mgr = &Manager{}
propertyaccuracy.SetManager(mgr)
propertyactor.SetManager(mgr)
propertyaltitude.SetManager(mgr)
propertyanyof.SetManager(mgr)
propertyattachment.SetManager(mgr)
propertyattributedto.SetManager(mgr)
propertyaudience.SetManager(mgr)
propertybcc.SetManager(mgr)
propertybto.SetManager(mgr)
propertycc.SetManager(mgr)
propertyclosed.SetManager(mgr)
propertycontent.SetManager(mgr)
propertycontext.SetManager(mgr)
propertycurrent.SetManager(mgr)
propertydeleted.SetManager(mgr)
propertydescribes.SetManager(mgr)
propertyduration.SetManager(mgr)
propertyendtime.SetManager(mgr)
propertyfirst.SetManager(mgr)
propertyfollowers.SetManager(mgr)
propertyfollowing.SetManager(mgr)
propertyformertype.SetManager(mgr)
propertygenerator.SetManager(mgr)
propertyheight.SetManager(mgr)
propertyhref.SetManager(mgr)
propertyhreflang.SetManager(mgr)
propertyicon.SetManager(mgr)
propertyimage.SetManager(mgr)
propertyinbox.SetManager(mgr)
propertyinreplyto.SetManager(mgr)
propertyinstrument.SetManager(mgr)
propertyitems.SetManager(mgr)
propertylast.SetManager(mgr)
propertylatitude.SetManager(mgr)
propertyliked.SetManager(mgr)
propertylikes.SetManager(mgr)
propertylocation.SetManager(mgr)
propertylongitude.SetManager(mgr)
propertymediatype.SetManager(mgr)
propertyname.SetManager(mgr)
propertynext.SetManager(mgr)
propertyobject.SetManager(mgr)
propertyoneof.SetManager(mgr)
propertyordereditems.SetManager(mgr)
propertyorigin.SetManager(mgr)
propertyoutbox.SetManager(mgr)
propertypartof.SetManager(mgr)
propertypreferredusername.SetManager(mgr)
propertyprev.SetManager(mgr)
propertypreview.SetManager(mgr)
propertypublished.SetManager(mgr)
propertyradius.SetManager(mgr)
propertyrel.SetManager(mgr)
propertyrelationship.SetManager(mgr)
propertyreplies.SetManager(mgr)
propertyresult.SetManager(mgr)
propertyshares.SetManager(mgr)
propertysource.SetManager(mgr)
propertystartindex.SetManager(mgr)
propertystarttime.SetManager(mgr)
propertystreams.SetManager(mgr)
propertysubject.SetManager(mgr)
propertysummary.SetManager(mgr)
propertytag.SetManager(mgr)
propertytarget.SetManager(mgr)
propertyto.SetManager(mgr)
propertytotalitems.SetManager(mgr)
propertyunits.SetManager(mgr)
propertyupdated.SetManager(mgr)
propertyurl.SetManager(mgr)
propertywidth.SetManager(mgr)
typeaccept.SetManager(mgr)
typeactivity.SetManager(mgr)
typeadd.SetManager(mgr)
typeannounce.SetManager(mgr)
typeapplication.SetManager(mgr)
typearrive.SetManager(mgr)
typearticle.SetManager(mgr)
typeaudio.SetManager(mgr)
typeblock.SetManager(mgr)
typecollection.SetManager(mgr)
typecollectionpage.SetManager(mgr)
typecreate.SetManager(mgr)
typedelete.SetManager(mgr)
typedislike.SetManager(mgr)
typedocument.SetManager(mgr)
typeevent.SetManager(mgr)
typeflag.SetManager(mgr)
typefollow.SetManager(mgr)
typegroup.SetManager(mgr)
typeignore.SetManager(mgr)
typeimage.SetManager(mgr)
typeintransitiveactivity.SetManager(mgr)
typeinvite.SetManager(mgr)
typejoin.SetManager(mgr)
typeleave.SetManager(mgr)
typelike.SetManager(mgr)
typelink.SetManager(mgr)
typelisten.SetManager(mgr)
typemention.SetManager(mgr)
typemove.SetManager(mgr)
typenote.SetManager(mgr)
typeobject.SetManager(mgr)
typeoffer.SetManager(mgr)
typeorderedcollection.SetManager(mgr)
typeorderedcollectionpage.SetManager(mgr)
typeorganization.SetManager(mgr)
typepage.SetManager(mgr)
typeperson.SetManager(mgr)
typeplace.SetManager(mgr)
typeprofile.SetManager(mgr)
typequestion.SetManager(mgr)
typeread.SetManager(mgr)
typereject.SetManager(mgr)
typerelationship.SetManager(mgr)
typeremove.SetManager(mgr)
typeservice.SetManager(mgr)
typetentativeaccept.SetManager(mgr)
typetentativereject.SetManager(mgr)
typetombstone.SetManager(mgr)
typetravel.SetManager(mgr)
typeundo.SetManager(mgr)
typeupdate.SetManager(mgr)
typevideo.SetManager(mgr)
typeview.SetManager(mgr)
propertyassignedto.SetManager(mgr)
propertycommitted.SetManager(mgr)
propertycommittedby.SetManager(mgr)
propertydependants.SetManager(mgr)
propertydependedby.SetManager(mgr)
propertydependencies.SetManager(mgr)
propertydependson.SetManager(mgr)
propertydescription.SetManager(mgr)
propertyearlyitems.SetManager(mgr)
propertyfilesadded.SetManager(mgr)
propertyfilesmodified.SetManager(mgr)
propertyfilesremoved.SetManager(mgr)
propertyforks.SetManager(mgr)
propertyhash.SetManager(mgr)
propertyisresolved.SetManager(mgr)
propertyref.SetManager(mgr)
propertyteam.SetManager(mgr)
propertyticketstrackedby.SetManager(mgr)
propertytracksticketsfor.SetManager(mgr)
typebranch.SetManager(mgr)
typecommit.SetManager(mgr)
typepush.SetManager(mgr)
typerepository.SetManager(mgr)
typeticket.SetManager(mgr)
typeticketdependency.SetManager(mgr)
propertyblurhash.SetManager(mgr)
propertydiscoverable.SetManager(mgr)
propertyfeatured.SetManager(mgr)
propertysignaturealgorithm.SetManager(mgr)
propertysignaturevalue.SetManager(mgr)
propertyvoterscount.SetManager(mgr)
typeemoji.SetManager(mgr)
typeidentityproof.SetManager(mgr)
propertyowner.SetManager(mgr)
propertypublickey.SetManager(mgr)
propertypublickeypem.SetManager(mgr)
typepublickey.SetManager(mgr)
typeaccept.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeactivity.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeadd.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeannounce.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeapplication.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typearrive.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typearticle.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeaudio.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeblock.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typecollection.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typecollectionpage.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typecreate.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typedelete.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typedislike.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typedocument.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeevent.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeflag.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typefollow.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typegroup.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeignore.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeimage.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeintransitiveactivity.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeinvite.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typejoin.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeleave.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typelike.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typelink.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typelisten.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typemention.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typemove.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typenote.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeobject.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeoffer.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeorderedcollection.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeorderedcollectionpage.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeorganization.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typepage.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeperson.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeplace.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeprofile.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typequestion.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeread.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typereject.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typerelationship.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeremove.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeservice.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typetentativeaccept.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typetentativereject.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typetombstone.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typetravel.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeundo.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeupdate.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typevideo.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeview.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typebranch.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typecommit.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typepush.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typerepository.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeticket.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeticketdependency.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeemoji.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typeidentityproof.SetTypePropertyConstructor(NewJSONLDTypeProperty)
typepublickey.SetTypePropertyConstructor(NewJSONLDTypeProperty)
}

View file

@ -0,0 +1,978 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
"context"
"errors"
"fmt"
vocab "github.com/go-fed/activity/streams/vocab"
"strings"
)
// JSONResolver resolves a JSON-deserialized map into its concrete ActivityStreams
// type
type JSONResolver struct {
callbacks []interface{}
}
// NewJSONResolver creates a new Resolver that takes a JSON-deserialized generic
// map and determines the correct concrete Go type. The callback function is
// guaranteed to receive a value whose underlying ActivityStreams type matches
// the concrete interface name in its signature. The callback functions must
// be of the form:
//
// func(context.Context, <TypeInterface>) error
//
// where TypeInterface is the code-generated interface for an ActivityStream
// type. An error is returned if a callback function does not match this
// signature.
func NewJSONResolver(callbacks ...interface{}) (*JSONResolver, error) {
for _, cb := range callbacks {
// Each callback function must satisfy one known function signature, or else we will generate a runtime error instead of silently fail.
switch cb.(type) {
case func(context.Context, vocab.ActivityStreamsAccept) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsActivity) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsAdd) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsAnnounce) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsApplication) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsArrive) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsArticle) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsAudio) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsBlock) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedBranch) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsCollection) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsCollectionPage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedCommit) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsCreate) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsDelete) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsDislike) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsDocument) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.TootEmoji) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsEvent) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsFlag) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsFollow) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsGroup) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.TootIdentityProof) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsIgnore) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsImage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsIntransitiveActivity) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsInvite) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsJoin) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsLeave) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsLike) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsLink) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsListen) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsMention) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsMove) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsNote) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsObject) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOffer) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrderedCollection) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrderedCollectionPage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrganization) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPerson) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPlace) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsProfile) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.W3IDSecurityV1PublicKey) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedPush) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsQuestion) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRead) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsReject) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRelationship) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRemove) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedRepository) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsService) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTentativeAccept) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTentativeReject) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedTicket) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedTicketDependency) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTombstone) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTravel) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsUndo) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsUpdate) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsVideo) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsView) error:
// Do nothing, this callback has a correct signature.
default:
return nil, errors.New("a callback function is of the wrong signature and would never be called")
}
}
return &JSONResolver{callbacks: callbacks}, nil
}
// toAliasMap converts a JSONLD context into a map of vocabulary name to alias.
func toAliasMap(i interface{}) (m map[string]string) {
m = make(map[string]string)
toHttpHttpsFn := func(s string) (ok bool, http, https string) {
if strings.HasPrefix(s, "http://") {
ok = true
http = s
https = "https" + strings.TrimPrefix(s, "http")
} else if strings.HasPrefix(s, "https://") {
ok = true
https = s
http = "http" + strings.TrimPrefix(s, "https")
}
return
}
switch v := i.(type) {
case string:
// Single entry, no alias.
if ok, http, https := toHttpHttpsFn(v); ok {
m[http] = ""
m[https] = ""
} else {
m[v] = ""
}
case []interface{}:
// Recursively apply.
for _, elem := range v {
r := toAliasMap(elem)
for k, val := range r {
m[k] = val
}
}
case map[string]interface{}:
// Map any aliases.
for k, val := range v {
// Only handle string aliases.
switch conc := val.(type) {
case string:
m[k] = conc
}
}
}
return
}
// Resolve determines the ActivityStreams type of the payload, then applies the
// first callback function whose signature accepts the ActivityStreams value's
// type. This strictly assures that the callback function will only be passed
// ActivityStream objects whose type matches its interface. Returns an error
// if the ActivityStreams type does not match callbackers or is not a type
// handled by the generated code. If multiple types are present, it will check
// each one in order and apply only the first one. It returns an unhandled
// error for a multi-typed object if none of the types were able to be handled.
func (this JSONResolver) Resolve(ctx context.Context, m map[string]interface{}) error {
typeValue, ok := m["type"]
if !ok {
return fmt.Errorf("cannot determine ActivityStreams type: 'type' property is missing")
}
rawContext, ok := m["@context"]
if !ok {
return fmt.Errorf("cannot determine ActivityStreams type: '@context' is missing")
}
aliasMap := toAliasMap(rawContext)
// Begin: Private lambda to handle a single string "type" value. Makes code generation easier.
handleFn := func(typeString string) error {
ActivityStreamsAlias, ok := aliasMap["https://www.w3.org/ns/activitystreams"]
if !ok {
ActivityStreamsAlias = aliasMap["http://www.w3.org/ns/activitystreams"]
}
if len(ActivityStreamsAlias) > 0 {
ActivityStreamsAlias += ":"
}
ForgeFedAlias, ok := aliasMap["https://forgefed.peers.community/ns"]
if !ok {
ForgeFedAlias = aliasMap["http://forgefed.peers.community/ns"]
}
if len(ForgeFedAlias) > 0 {
ForgeFedAlias += ":"
}
TootAlias, ok := aliasMap["https://joinmastodon.org/ns"]
if !ok {
TootAlias = aliasMap["http://joinmastodon.org/ns"]
}
if len(TootAlias) > 0 {
TootAlias += ":"
}
W3IDSecurityV1Alias, ok := aliasMap["https://w3id.org/security/v1"]
if !ok {
W3IDSecurityV1Alias = aliasMap["http://w3id.org/security/v1"]
}
if len(W3IDSecurityV1Alias) > 0 {
W3IDSecurityV1Alias += ":"
}
if typeString == ActivityStreamsAlias+"Accept" {
v, err := mgr.DeserializeAcceptActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAccept) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Activity" {
v, err := mgr.DeserializeActivityActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsActivity) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Add" {
v, err := mgr.DeserializeAddActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAdd) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Announce" {
v, err := mgr.DeserializeAnnounceActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAnnounce) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Application" {
v, err := mgr.DeserializeApplicationActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsApplication) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Arrive" {
v, err := mgr.DeserializeArriveActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsArrive) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Article" {
v, err := mgr.DeserializeArticleActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsArticle) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Audio" {
v, err := mgr.DeserializeAudioActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAudio) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Block" {
v, err := mgr.DeserializeBlockActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsBlock) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ForgeFedAlias+"Branch" {
v, err := mgr.DeserializeBranchForgeFed()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ForgeFedBranch) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Collection" {
v, err := mgr.DeserializeCollectionActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsCollection) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"CollectionPage" {
v, err := mgr.DeserializeCollectionPageActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsCollectionPage) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ForgeFedAlias+"Commit" {
v, err := mgr.DeserializeCommitForgeFed()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ForgeFedCommit) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Create" {
v, err := mgr.DeserializeCreateActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsCreate) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Delete" {
v, err := mgr.DeserializeDeleteActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsDelete) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Dislike" {
v, err := mgr.DeserializeDislikeActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsDislike) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Document" {
v, err := mgr.DeserializeDocumentActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsDocument) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == TootAlias+"Emoji" {
v, err := mgr.DeserializeEmojiToot()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.TootEmoji) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Event" {
v, err := mgr.DeserializeEventActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsEvent) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Flag" {
v, err := mgr.DeserializeFlagActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsFlag) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Follow" {
v, err := mgr.DeserializeFollowActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsFollow) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Group" {
v, err := mgr.DeserializeGroupActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsGroup) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == TootAlias+"IdentityProof" {
v, err := mgr.DeserializeIdentityProofToot()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.TootIdentityProof) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Ignore" {
v, err := mgr.DeserializeIgnoreActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsIgnore) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Image" {
v, err := mgr.DeserializeImageActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsImage) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"IntransitiveActivity" {
v, err := mgr.DeserializeIntransitiveActivityActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsIntransitiveActivity) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Invite" {
v, err := mgr.DeserializeInviteActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsInvite) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Join" {
v, err := mgr.DeserializeJoinActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsJoin) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Leave" {
v, err := mgr.DeserializeLeaveActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsLeave) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Like" {
v, err := mgr.DeserializeLikeActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsLike) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Link" {
v, err := mgr.DeserializeLinkActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsLink) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Listen" {
v, err := mgr.DeserializeListenActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsListen) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Mention" {
v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsMention) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Move" {
v, err := mgr.DeserializeMoveActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsMove) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Note" {
v, err := mgr.DeserializeNoteActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsNote) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Object" {
v, err := mgr.DeserializeObjectActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsObject) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Offer" {
v, err := mgr.DeserializeOfferActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOffer) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"OrderedCollection" {
v, err := mgr.DeserializeOrderedCollectionActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOrderedCollection) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"OrderedCollectionPage" {
v, err := mgr.DeserializeOrderedCollectionPageActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOrderedCollectionPage) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Organization" {
v, err := mgr.DeserializeOrganizationActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOrganization) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Page" {
v, err := mgr.DeserializePageActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPage) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Person" {
v, err := mgr.DeserializePersonActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPerson) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Place" {
v, err := mgr.DeserializePlaceActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPlace) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Profile" {
v, err := mgr.DeserializeProfileActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsProfile) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == W3IDSecurityV1Alias+"PublicKey" {
v, err := mgr.DeserializePublicKeyW3IDSecurityV1()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.W3IDSecurityV1PublicKey) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ForgeFedAlias+"Push" {
v, err := mgr.DeserializePushForgeFed()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ForgeFedPush) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Question" {
v, err := mgr.DeserializeQuestionActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsQuestion) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Read" {
v, err := mgr.DeserializeReadActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsRead) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Reject" {
v, err := mgr.DeserializeRejectActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsReject) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Relationship" {
v, err := mgr.DeserializeRelationshipActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsRelationship) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Remove" {
v, err := mgr.DeserializeRemoveActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsRemove) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ForgeFedAlias+"Repository" {
v, err := mgr.DeserializeRepositoryForgeFed()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ForgeFedRepository) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Service" {
v, err := mgr.DeserializeServiceActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsService) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"TentativeAccept" {
v, err := mgr.DeserializeTentativeAcceptActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTentativeAccept) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"TentativeReject" {
v, err := mgr.DeserializeTentativeRejectActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTentativeReject) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ForgeFedAlias+"Ticket" {
v, err := mgr.DeserializeTicketForgeFed()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ForgeFedTicket) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ForgeFedAlias+"TicketDependency" {
v, err := mgr.DeserializeTicketDependencyForgeFed()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ForgeFedTicketDependency) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Tombstone" {
v, err := mgr.DeserializeTombstoneActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTombstone) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Travel" {
v, err := mgr.DeserializeTravelActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTravel) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Undo" {
v, err := mgr.DeserializeUndoActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsUndo) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Update" {
v, err := mgr.DeserializeUpdateActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsUpdate) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"Video" {
v, err := mgr.DeserializeVideoActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsVideo) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else if typeString == ActivityStreamsAlias+"View" {
v, err := mgr.DeserializeViewActivityStreams()(m, aliasMap)
if err != nil {
return err
}
for _, i := range this.callbacks {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsView) error); ok {
return fn(ctx, v)
}
}
return ErrNoCallbackMatch
} else {
return ErrUnhandledType
}
}
// End: Private lambda
if typeStr, ok := typeValue.(string); ok {
return handleFn(typeStr)
} else if typeIArr, ok := typeValue.([]interface{}); ok {
for _, typeI := range typeIArr {
if typeStr, ok := typeI.(string); ok {
if err := handleFn(typeStr); err == nil {
return nil
} else if err == ErrUnhandledType {
// Keep trying other types: only if all fail do we return this error.
continue
} else {
return err
}
}
}
return ErrUnhandledType
} else {
return ErrUnhandledType
}
}

2292
vendor/github.com/go-fed/activity/streams/gen_manager.go generated vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,385 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_accept"
typeactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_activity"
typeadd "github.com/go-fed/activity/streams/impl/activitystreams/type_add"
typeannounce "github.com/go-fed/activity/streams/impl/activitystreams/type_announce"
typeapplication "github.com/go-fed/activity/streams/impl/activitystreams/type_application"
typearrive "github.com/go-fed/activity/streams/impl/activitystreams/type_arrive"
typearticle "github.com/go-fed/activity/streams/impl/activitystreams/type_article"
typeaudio "github.com/go-fed/activity/streams/impl/activitystreams/type_audio"
typeblock "github.com/go-fed/activity/streams/impl/activitystreams/type_block"
typecollection "github.com/go-fed/activity/streams/impl/activitystreams/type_collection"
typecollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_collectionpage"
typecreate "github.com/go-fed/activity/streams/impl/activitystreams/type_create"
typedelete "github.com/go-fed/activity/streams/impl/activitystreams/type_delete"
typedislike "github.com/go-fed/activity/streams/impl/activitystreams/type_dislike"
typedocument "github.com/go-fed/activity/streams/impl/activitystreams/type_document"
typeevent "github.com/go-fed/activity/streams/impl/activitystreams/type_event"
typeflag "github.com/go-fed/activity/streams/impl/activitystreams/type_flag"
typefollow "github.com/go-fed/activity/streams/impl/activitystreams/type_follow"
typegroup "github.com/go-fed/activity/streams/impl/activitystreams/type_group"
typeignore "github.com/go-fed/activity/streams/impl/activitystreams/type_ignore"
typeimage "github.com/go-fed/activity/streams/impl/activitystreams/type_image"
typeintransitiveactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_intransitiveactivity"
typeinvite "github.com/go-fed/activity/streams/impl/activitystreams/type_invite"
typejoin "github.com/go-fed/activity/streams/impl/activitystreams/type_join"
typeleave "github.com/go-fed/activity/streams/impl/activitystreams/type_leave"
typelike "github.com/go-fed/activity/streams/impl/activitystreams/type_like"
typelink "github.com/go-fed/activity/streams/impl/activitystreams/type_link"
typelisten "github.com/go-fed/activity/streams/impl/activitystreams/type_listen"
typemention "github.com/go-fed/activity/streams/impl/activitystreams/type_mention"
typemove "github.com/go-fed/activity/streams/impl/activitystreams/type_move"
typenote "github.com/go-fed/activity/streams/impl/activitystreams/type_note"
typeobject "github.com/go-fed/activity/streams/impl/activitystreams/type_object"
typeoffer "github.com/go-fed/activity/streams/impl/activitystreams/type_offer"
typeorderedcollection "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollection"
typeorderedcollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollectionpage"
typeorganization "github.com/go-fed/activity/streams/impl/activitystreams/type_organization"
typepage "github.com/go-fed/activity/streams/impl/activitystreams/type_page"
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
typerelationship "github.com/go-fed/activity/streams/impl/activitystreams/type_relationship"
typeremove "github.com/go-fed/activity/streams/impl/activitystreams/type_remove"
typeservice "github.com/go-fed/activity/streams/impl/activitystreams/type_service"
typetentativeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativeaccept"
typetentativereject "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativereject"
typetombstone "github.com/go-fed/activity/streams/impl/activitystreams/type_tombstone"
typetravel "github.com/go-fed/activity/streams/impl/activitystreams/type_travel"
typeundo "github.com/go-fed/activity/streams/impl/activitystreams/type_undo"
typeupdate "github.com/go-fed/activity/streams/impl/activitystreams/type_update"
typevideo "github.com/go-fed/activity/streams/impl/activitystreams/type_video"
typeview "github.com/go-fed/activity/streams/impl/activitystreams/type_view"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ActivityStreamsAcceptIsDisjointWith returns true if Accept is disjoint with the
// other's type.
func ActivityStreamsAcceptIsDisjointWith(other vocab.Type) bool {
return typeaccept.AcceptIsDisjointWith(other)
}
// ActivityStreamsActivityIsDisjointWith returns true if Activity is disjoint with
// the other's type.
func ActivityStreamsActivityIsDisjointWith(other vocab.Type) bool {
return typeactivity.ActivityIsDisjointWith(other)
}
// ActivityStreamsAddIsDisjointWith returns true if Add is disjoint with the
// other's type.
func ActivityStreamsAddIsDisjointWith(other vocab.Type) bool {
return typeadd.AddIsDisjointWith(other)
}
// ActivityStreamsAnnounceIsDisjointWith returns true if Announce is disjoint with
// the other's type.
func ActivityStreamsAnnounceIsDisjointWith(other vocab.Type) bool {
return typeannounce.AnnounceIsDisjointWith(other)
}
// ActivityStreamsApplicationIsDisjointWith returns true if Application is
// disjoint with the other's type.
func ActivityStreamsApplicationIsDisjointWith(other vocab.Type) bool {
return typeapplication.ApplicationIsDisjointWith(other)
}
// ActivityStreamsArriveIsDisjointWith returns true if Arrive is disjoint with the
// other's type.
func ActivityStreamsArriveIsDisjointWith(other vocab.Type) bool {
return typearrive.ArriveIsDisjointWith(other)
}
// ActivityStreamsArticleIsDisjointWith returns true if Article is disjoint with
// the other's type.
func ActivityStreamsArticleIsDisjointWith(other vocab.Type) bool {
return typearticle.ArticleIsDisjointWith(other)
}
// ActivityStreamsAudioIsDisjointWith returns true if Audio is disjoint with the
// other's type.
func ActivityStreamsAudioIsDisjointWith(other vocab.Type) bool {
return typeaudio.AudioIsDisjointWith(other)
}
// ActivityStreamsBlockIsDisjointWith returns true if Block is disjoint with the
// other's type.
func ActivityStreamsBlockIsDisjointWith(other vocab.Type) bool {
return typeblock.BlockIsDisjointWith(other)
}
// ActivityStreamsCollectionIsDisjointWith returns true if Collection is disjoint
// with the other's type.
func ActivityStreamsCollectionIsDisjointWith(other vocab.Type) bool {
return typecollection.CollectionIsDisjointWith(other)
}
// ActivityStreamsCollectionPageIsDisjointWith returns true if CollectionPage is
// disjoint with the other's type.
func ActivityStreamsCollectionPageIsDisjointWith(other vocab.Type) bool {
return typecollectionpage.CollectionPageIsDisjointWith(other)
}
// ActivityStreamsCreateIsDisjointWith returns true if Create is disjoint with the
// other's type.
func ActivityStreamsCreateIsDisjointWith(other vocab.Type) bool {
return typecreate.CreateIsDisjointWith(other)
}
// ActivityStreamsDeleteIsDisjointWith returns true if Delete is disjoint with the
// other's type.
func ActivityStreamsDeleteIsDisjointWith(other vocab.Type) bool {
return typedelete.DeleteIsDisjointWith(other)
}
// ActivityStreamsDislikeIsDisjointWith returns true if Dislike is disjoint with
// the other's type.
func ActivityStreamsDislikeIsDisjointWith(other vocab.Type) bool {
return typedislike.DislikeIsDisjointWith(other)
}
// ActivityStreamsDocumentIsDisjointWith returns true if Document is disjoint with
// the other's type.
func ActivityStreamsDocumentIsDisjointWith(other vocab.Type) bool {
return typedocument.DocumentIsDisjointWith(other)
}
// ActivityStreamsEventIsDisjointWith returns true if Event is disjoint with the
// other's type.
func ActivityStreamsEventIsDisjointWith(other vocab.Type) bool {
return typeevent.EventIsDisjointWith(other)
}
// ActivityStreamsFlagIsDisjointWith returns true if Flag is disjoint with the
// other's type.
func ActivityStreamsFlagIsDisjointWith(other vocab.Type) bool {
return typeflag.FlagIsDisjointWith(other)
}
// ActivityStreamsFollowIsDisjointWith returns true if Follow is disjoint with the
// other's type.
func ActivityStreamsFollowIsDisjointWith(other vocab.Type) bool {
return typefollow.FollowIsDisjointWith(other)
}
// ActivityStreamsGroupIsDisjointWith returns true if Group is disjoint with the
// other's type.
func ActivityStreamsGroupIsDisjointWith(other vocab.Type) bool {
return typegroup.GroupIsDisjointWith(other)
}
// ActivityStreamsIgnoreIsDisjointWith returns true if Ignore is disjoint with the
// other's type.
func ActivityStreamsIgnoreIsDisjointWith(other vocab.Type) bool {
return typeignore.IgnoreIsDisjointWith(other)
}
// ActivityStreamsImageIsDisjointWith returns true if Image is disjoint with the
// other's type.
func ActivityStreamsImageIsDisjointWith(other vocab.Type) bool {
return typeimage.ImageIsDisjointWith(other)
}
// ActivityStreamsIntransitiveActivityIsDisjointWith returns true if
// IntransitiveActivity is disjoint with the other's type.
func ActivityStreamsIntransitiveActivityIsDisjointWith(other vocab.Type) bool {
return typeintransitiveactivity.IntransitiveActivityIsDisjointWith(other)
}
// ActivityStreamsInviteIsDisjointWith returns true if Invite is disjoint with the
// other's type.
func ActivityStreamsInviteIsDisjointWith(other vocab.Type) bool {
return typeinvite.InviteIsDisjointWith(other)
}
// ActivityStreamsJoinIsDisjointWith returns true if Join is disjoint with the
// other's type.
func ActivityStreamsJoinIsDisjointWith(other vocab.Type) bool {
return typejoin.JoinIsDisjointWith(other)
}
// ActivityStreamsLeaveIsDisjointWith returns true if Leave is disjoint with the
// other's type.
func ActivityStreamsLeaveIsDisjointWith(other vocab.Type) bool {
return typeleave.LeaveIsDisjointWith(other)
}
// ActivityStreamsLikeIsDisjointWith returns true if Like is disjoint with the
// other's type.
func ActivityStreamsLikeIsDisjointWith(other vocab.Type) bool {
return typelike.LikeIsDisjointWith(other)
}
// ActivityStreamsLinkIsDisjointWith returns true if Link is disjoint with the
// other's type.
func ActivityStreamsLinkIsDisjointWith(other vocab.Type) bool {
return typelink.LinkIsDisjointWith(other)
}
// ActivityStreamsListenIsDisjointWith returns true if Listen is disjoint with the
// other's type.
func ActivityStreamsListenIsDisjointWith(other vocab.Type) bool {
return typelisten.ListenIsDisjointWith(other)
}
// ActivityStreamsMentionIsDisjointWith returns true if Mention is disjoint with
// the other's type.
func ActivityStreamsMentionIsDisjointWith(other vocab.Type) bool {
return typemention.MentionIsDisjointWith(other)
}
// ActivityStreamsMoveIsDisjointWith returns true if Move is disjoint with the
// other's type.
func ActivityStreamsMoveIsDisjointWith(other vocab.Type) bool {
return typemove.MoveIsDisjointWith(other)
}
// ActivityStreamsNoteIsDisjointWith returns true if Note is disjoint with the
// other's type.
func ActivityStreamsNoteIsDisjointWith(other vocab.Type) bool {
return typenote.NoteIsDisjointWith(other)
}
// ActivityStreamsObjectIsDisjointWith returns true if Object is disjoint with the
// other's type.
func ActivityStreamsObjectIsDisjointWith(other vocab.Type) bool {
return typeobject.ObjectIsDisjointWith(other)
}
// ActivityStreamsOfferIsDisjointWith returns true if Offer is disjoint with the
// other's type.
func ActivityStreamsOfferIsDisjointWith(other vocab.Type) bool {
return typeoffer.OfferIsDisjointWith(other)
}
// ActivityStreamsOrderedCollectionIsDisjointWith returns true if
// OrderedCollection is disjoint with the other's type.
func ActivityStreamsOrderedCollectionIsDisjointWith(other vocab.Type) bool {
return typeorderedcollection.OrderedCollectionIsDisjointWith(other)
}
// ActivityStreamsOrderedCollectionPageIsDisjointWith returns true if
// OrderedCollectionPage is disjoint with the other's type.
func ActivityStreamsOrderedCollectionPageIsDisjointWith(other vocab.Type) bool {
return typeorderedcollectionpage.OrderedCollectionPageIsDisjointWith(other)
}
// ActivityStreamsOrganizationIsDisjointWith returns true if Organization is
// disjoint with the other's type.
func ActivityStreamsOrganizationIsDisjointWith(other vocab.Type) bool {
return typeorganization.OrganizationIsDisjointWith(other)
}
// ActivityStreamsPageIsDisjointWith returns true if Page is disjoint with the
// other's type.
func ActivityStreamsPageIsDisjointWith(other vocab.Type) bool {
return typepage.PageIsDisjointWith(other)
}
// ActivityStreamsPersonIsDisjointWith returns true if Person is disjoint with the
// other's type.
func ActivityStreamsPersonIsDisjointWith(other vocab.Type) bool {
return typeperson.PersonIsDisjointWith(other)
}
// ActivityStreamsPlaceIsDisjointWith returns true if Place is disjoint with the
// other's type.
func ActivityStreamsPlaceIsDisjointWith(other vocab.Type) bool {
return typeplace.PlaceIsDisjointWith(other)
}
// ActivityStreamsProfileIsDisjointWith returns true if Profile is disjoint with
// the other's type.
func ActivityStreamsProfileIsDisjointWith(other vocab.Type) bool {
return typeprofile.ProfileIsDisjointWith(other)
}
// ActivityStreamsQuestionIsDisjointWith returns true if Question is disjoint with
// the other's type.
func ActivityStreamsQuestionIsDisjointWith(other vocab.Type) bool {
return typequestion.QuestionIsDisjointWith(other)
}
// ActivityStreamsReadIsDisjointWith returns true if Read is disjoint with the
// other's type.
func ActivityStreamsReadIsDisjointWith(other vocab.Type) bool {
return typeread.ReadIsDisjointWith(other)
}
// ActivityStreamsRejectIsDisjointWith returns true if Reject is disjoint with the
// other's type.
func ActivityStreamsRejectIsDisjointWith(other vocab.Type) bool {
return typereject.RejectIsDisjointWith(other)
}
// ActivityStreamsRelationshipIsDisjointWith returns true if Relationship is
// disjoint with the other's type.
func ActivityStreamsRelationshipIsDisjointWith(other vocab.Type) bool {
return typerelationship.RelationshipIsDisjointWith(other)
}
// ActivityStreamsRemoveIsDisjointWith returns true if Remove is disjoint with the
// other's type.
func ActivityStreamsRemoveIsDisjointWith(other vocab.Type) bool {
return typeremove.RemoveIsDisjointWith(other)
}
// ActivityStreamsServiceIsDisjointWith returns true if Service is disjoint with
// the other's type.
func ActivityStreamsServiceIsDisjointWith(other vocab.Type) bool {
return typeservice.ServiceIsDisjointWith(other)
}
// ActivityStreamsTentativeAcceptIsDisjointWith returns true if TentativeAccept is
// disjoint with the other's type.
func ActivityStreamsTentativeAcceptIsDisjointWith(other vocab.Type) bool {
return typetentativeaccept.TentativeAcceptIsDisjointWith(other)
}
// ActivityStreamsTentativeRejectIsDisjointWith returns true if TentativeReject is
// disjoint with the other's type.
func ActivityStreamsTentativeRejectIsDisjointWith(other vocab.Type) bool {
return typetentativereject.TentativeRejectIsDisjointWith(other)
}
// ActivityStreamsTombstoneIsDisjointWith returns true if Tombstone is disjoint
// with the other's type.
func ActivityStreamsTombstoneIsDisjointWith(other vocab.Type) bool {
return typetombstone.TombstoneIsDisjointWith(other)
}
// ActivityStreamsTravelIsDisjointWith returns true if Travel is disjoint with the
// other's type.
func ActivityStreamsTravelIsDisjointWith(other vocab.Type) bool {
return typetravel.TravelIsDisjointWith(other)
}
// ActivityStreamsUndoIsDisjointWith returns true if Undo is disjoint with the
// other's type.
func ActivityStreamsUndoIsDisjointWith(other vocab.Type) bool {
return typeundo.UndoIsDisjointWith(other)
}
// ActivityStreamsUpdateIsDisjointWith returns true if Update is disjoint with the
// other's type.
func ActivityStreamsUpdateIsDisjointWith(other vocab.Type) bool {
return typeupdate.UpdateIsDisjointWith(other)
}
// ActivityStreamsVideoIsDisjointWith returns true if Video is disjoint with the
// other's type.
func ActivityStreamsVideoIsDisjointWith(other vocab.Type) bool {
return typevideo.VideoIsDisjointWith(other)
}
// ActivityStreamsViewIsDisjointWith returns true if View is disjoint with the
// other's type.
func ActivityStreamsViewIsDisjointWith(other vocab.Type) bool {
return typeview.ViewIsDisjointWith(other)
}

View file

@ -0,0 +1,439 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_accept"
typeactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_activity"
typeadd "github.com/go-fed/activity/streams/impl/activitystreams/type_add"
typeannounce "github.com/go-fed/activity/streams/impl/activitystreams/type_announce"
typeapplication "github.com/go-fed/activity/streams/impl/activitystreams/type_application"
typearrive "github.com/go-fed/activity/streams/impl/activitystreams/type_arrive"
typearticle "github.com/go-fed/activity/streams/impl/activitystreams/type_article"
typeaudio "github.com/go-fed/activity/streams/impl/activitystreams/type_audio"
typeblock "github.com/go-fed/activity/streams/impl/activitystreams/type_block"
typecollection "github.com/go-fed/activity/streams/impl/activitystreams/type_collection"
typecollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_collectionpage"
typecreate "github.com/go-fed/activity/streams/impl/activitystreams/type_create"
typedelete "github.com/go-fed/activity/streams/impl/activitystreams/type_delete"
typedislike "github.com/go-fed/activity/streams/impl/activitystreams/type_dislike"
typedocument "github.com/go-fed/activity/streams/impl/activitystreams/type_document"
typeevent "github.com/go-fed/activity/streams/impl/activitystreams/type_event"
typeflag "github.com/go-fed/activity/streams/impl/activitystreams/type_flag"
typefollow "github.com/go-fed/activity/streams/impl/activitystreams/type_follow"
typegroup "github.com/go-fed/activity/streams/impl/activitystreams/type_group"
typeignore "github.com/go-fed/activity/streams/impl/activitystreams/type_ignore"
typeimage "github.com/go-fed/activity/streams/impl/activitystreams/type_image"
typeintransitiveactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_intransitiveactivity"
typeinvite "github.com/go-fed/activity/streams/impl/activitystreams/type_invite"
typejoin "github.com/go-fed/activity/streams/impl/activitystreams/type_join"
typeleave "github.com/go-fed/activity/streams/impl/activitystreams/type_leave"
typelike "github.com/go-fed/activity/streams/impl/activitystreams/type_like"
typelink "github.com/go-fed/activity/streams/impl/activitystreams/type_link"
typelisten "github.com/go-fed/activity/streams/impl/activitystreams/type_listen"
typemention "github.com/go-fed/activity/streams/impl/activitystreams/type_mention"
typemove "github.com/go-fed/activity/streams/impl/activitystreams/type_move"
typenote "github.com/go-fed/activity/streams/impl/activitystreams/type_note"
typeobject "github.com/go-fed/activity/streams/impl/activitystreams/type_object"
typeoffer "github.com/go-fed/activity/streams/impl/activitystreams/type_offer"
typeorderedcollection "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollection"
typeorderedcollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollectionpage"
typeorganization "github.com/go-fed/activity/streams/impl/activitystreams/type_organization"
typepage "github.com/go-fed/activity/streams/impl/activitystreams/type_page"
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
typerelationship "github.com/go-fed/activity/streams/impl/activitystreams/type_relationship"
typeremove "github.com/go-fed/activity/streams/impl/activitystreams/type_remove"
typeservice "github.com/go-fed/activity/streams/impl/activitystreams/type_service"
typetentativeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativeaccept"
typetentativereject "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativereject"
typetombstone "github.com/go-fed/activity/streams/impl/activitystreams/type_tombstone"
typetravel "github.com/go-fed/activity/streams/impl/activitystreams/type_travel"
typeundo "github.com/go-fed/activity/streams/impl/activitystreams/type_undo"
typeupdate "github.com/go-fed/activity/streams/impl/activitystreams/type_update"
typevideo "github.com/go-fed/activity/streams/impl/activitystreams/type_video"
typeview "github.com/go-fed/activity/streams/impl/activitystreams/type_view"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ActivityStreamsAcceptIsExtendedBy returns true if the other's type extends from
// Accept. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsAcceptIsExtendedBy(other vocab.Type) bool {
return typeaccept.AcceptIsExtendedBy(other)
}
// ActivityStreamsActivityIsExtendedBy returns true if the other's type extends
// from Activity. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsActivityIsExtendedBy(other vocab.Type) bool {
return typeactivity.ActivityIsExtendedBy(other)
}
// ActivityStreamsAddIsExtendedBy returns true if the other's type extends from
// Add. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsAddIsExtendedBy(other vocab.Type) bool {
return typeadd.AddIsExtendedBy(other)
}
// ActivityStreamsAnnounceIsExtendedBy returns true if the other's type extends
// from Announce. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsAnnounceIsExtendedBy(other vocab.Type) bool {
return typeannounce.AnnounceIsExtendedBy(other)
}
// ActivityStreamsApplicationIsExtendedBy returns true if the other's type extends
// from Application. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsApplicationIsExtendedBy(other vocab.Type) bool {
return typeapplication.ApplicationIsExtendedBy(other)
}
// ActivityStreamsArriveIsExtendedBy returns true if the other's type extends from
// Arrive. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsArriveIsExtendedBy(other vocab.Type) bool {
return typearrive.ArriveIsExtendedBy(other)
}
// ActivityStreamsArticleIsExtendedBy returns true if the other's type extends
// from Article. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsArticleIsExtendedBy(other vocab.Type) bool {
return typearticle.ArticleIsExtendedBy(other)
}
// ActivityStreamsAudioIsExtendedBy returns true if the other's type extends from
// Audio. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsAudioIsExtendedBy(other vocab.Type) bool {
return typeaudio.AudioIsExtendedBy(other)
}
// ActivityStreamsBlockIsExtendedBy returns true if the other's type extends from
// Block. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsBlockIsExtendedBy(other vocab.Type) bool {
return typeblock.BlockIsExtendedBy(other)
}
// ActivityStreamsCollectionIsExtendedBy returns true if the other's type extends
// from Collection. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsCollectionIsExtendedBy(other vocab.Type) bool {
return typecollection.CollectionIsExtendedBy(other)
}
// ActivityStreamsCollectionPageIsExtendedBy returns true if the other's type
// extends from CollectionPage. Note that it returns false if the types are
// the same; see the "IsOrExtends" variant instead.
func ActivityStreamsCollectionPageIsExtendedBy(other vocab.Type) bool {
return typecollectionpage.CollectionPageIsExtendedBy(other)
}
// ActivityStreamsCreateIsExtendedBy returns true if the other's type extends from
// Create. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsCreateIsExtendedBy(other vocab.Type) bool {
return typecreate.CreateIsExtendedBy(other)
}
// ActivityStreamsDeleteIsExtendedBy returns true if the other's type extends from
// Delete. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsDeleteIsExtendedBy(other vocab.Type) bool {
return typedelete.DeleteIsExtendedBy(other)
}
// ActivityStreamsDislikeIsExtendedBy returns true if the other's type extends
// from Dislike. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsDislikeIsExtendedBy(other vocab.Type) bool {
return typedislike.DislikeIsExtendedBy(other)
}
// ActivityStreamsDocumentIsExtendedBy returns true if the other's type extends
// from Document. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsDocumentIsExtendedBy(other vocab.Type) bool {
return typedocument.DocumentIsExtendedBy(other)
}
// ActivityStreamsEventIsExtendedBy returns true if the other's type extends from
// Event. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsEventIsExtendedBy(other vocab.Type) bool {
return typeevent.EventIsExtendedBy(other)
}
// ActivityStreamsFlagIsExtendedBy returns true if the other's type extends from
// Flag. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsFlagIsExtendedBy(other vocab.Type) bool {
return typeflag.FlagIsExtendedBy(other)
}
// ActivityStreamsFollowIsExtendedBy returns true if the other's type extends from
// Follow. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsFollowIsExtendedBy(other vocab.Type) bool {
return typefollow.FollowIsExtendedBy(other)
}
// ActivityStreamsGroupIsExtendedBy returns true if the other's type extends from
// Group. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsGroupIsExtendedBy(other vocab.Type) bool {
return typegroup.GroupIsExtendedBy(other)
}
// ActivityStreamsIgnoreIsExtendedBy returns true if the other's type extends from
// Ignore. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsIgnoreIsExtendedBy(other vocab.Type) bool {
return typeignore.IgnoreIsExtendedBy(other)
}
// ActivityStreamsImageIsExtendedBy returns true if the other's type extends from
// Image. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsImageIsExtendedBy(other vocab.Type) bool {
return typeimage.ImageIsExtendedBy(other)
}
// ActivityStreamsIntransitiveActivityIsExtendedBy returns true if the other's
// type extends from IntransitiveActivity. Note that it returns false if the
// types are the same; see the "IsOrExtends" variant instead.
func ActivityStreamsIntransitiveActivityIsExtendedBy(other vocab.Type) bool {
return typeintransitiveactivity.IntransitiveActivityIsExtendedBy(other)
}
// ActivityStreamsInviteIsExtendedBy returns true if the other's type extends from
// Invite. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsInviteIsExtendedBy(other vocab.Type) bool {
return typeinvite.InviteIsExtendedBy(other)
}
// ActivityStreamsJoinIsExtendedBy returns true if the other's type extends from
// Join. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsJoinIsExtendedBy(other vocab.Type) bool {
return typejoin.JoinIsExtendedBy(other)
}
// ActivityStreamsLeaveIsExtendedBy returns true if the other's type extends from
// Leave. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsLeaveIsExtendedBy(other vocab.Type) bool {
return typeleave.LeaveIsExtendedBy(other)
}
// ActivityStreamsLikeIsExtendedBy returns true if the other's type extends from
// Like. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsLikeIsExtendedBy(other vocab.Type) bool {
return typelike.LikeIsExtendedBy(other)
}
// ActivityStreamsLinkIsExtendedBy returns true if the other's type extends from
// Link. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsLinkIsExtendedBy(other vocab.Type) bool {
return typelink.LinkIsExtendedBy(other)
}
// ActivityStreamsListenIsExtendedBy returns true if the other's type extends from
// Listen. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsListenIsExtendedBy(other vocab.Type) bool {
return typelisten.ListenIsExtendedBy(other)
}
// ActivityStreamsMentionIsExtendedBy returns true if the other's type extends
// from Mention. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsMentionIsExtendedBy(other vocab.Type) bool {
return typemention.MentionIsExtendedBy(other)
}
// ActivityStreamsMoveIsExtendedBy returns true if the other's type extends from
// Move. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsMoveIsExtendedBy(other vocab.Type) bool {
return typemove.MoveIsExtendedBy(other)
}
// ActivityStreamsNoteIsExtendedBy returns true if the other's type extends from
// Note. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsNoteIsExtendedBy(other vocab.Type) bool {
return typenote.NoteIsExtendedBy(other)
}
// ActivityStreamsObjectIsExtendedBy returns true if the other's type extends from
// Object. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsObjectIsExtendedBy(other vocab.Type) bool {
return typeobject.ObjectIsExtendedBy(other)
}
// ActivityStreamsOfferIsExtendedBy returns true if the other's type extends from
// Offer. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsOfferIsExtendedBy(other vocab.Type) bool {
return typeoffer.OfferIsExtendedBy(other)
}
// ActivityStreamsOrderedCollectionIsExtendedBy returns true if the other's type
// extends from OrderedCollection. Note that it returns false if the types are
// the same; see the "IsOrExtends" variant instead.
func ActivityStreamsOrderedCollectionIsExtendedBy(other vocab.Type) bool {
return typeorderedcollection.OrderedCollectionIsExtendedBy(other)
}
// ActivityStreamsOrderedCollectionPageIsExtendedBy returns true if the other's
// type extends from OrderedCollectionPage. Note that it returns false if the
// types are the same; see the "IsOrExtends" variant instead.
func ActivityStreamsOrderedCollectionPageIsExtendedBy(other vocab.Type) bool {
return typeorderedcollectionpage.OrderedCollectionPageIsExtendedBy(other)
}
// ActivityStreamsOrganizationIsExtendedBy returns true if the other's type
// extends from Organization. Note that it returns false if the types are the
// same; see the "IsOrExtends" variant instead.
func ActivityStreamsOrganizationIsExtendedBy(other vocab.Type) bool {
return typeorganization.OrganizationIsExtendedBy(other)
}
// ActivityStreamsPageIsExtendedBy returns true if the other's type extends from
// Page. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsPageIsExtendedBy(other vocab.Type) bool {
return typepage.PageIsExtendedBy(other)
}
// ActivityStreamsPersonIsExtendedBy returns true if the other's type extends from
// Person. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsPersonIsExtendedBy(other vocab.Type) bool {
return typeperson.PersonIsExtendedBy(other)
}
// ActivityStreamsPlaceIsExtendedBy returns true if the other's type extends from
// Place. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsPlaceIsExtendedBy(other vocab.Type) bool {
return typeplace.PlaceIsExtendedBy(other)
}
// ActivityStreamsProfileIsExtendedBy returns true if the other's type extends
// from Profile. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsProfileIsExtendedBy(other vocab.Type) bool {
return typeprofile.ProfileIsExtendedBy(other)
}
// ActivityStreamsQuestionIsExtendedBy returns true if the other's type extends
// from Question. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsQuestionIsExtendedBy(other vocab.Type) bool {
return typequestion.QuestionIsExtendedBy(other)
}
// ActivityStreamsReadIsExtendedBy returns true if the other's type extends from
// Read. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsReadIsExtendedBy(other vocab.Type) bool {
return typeread.ReadIsExtendedBy(other)
}
// ActivityStreamsRejectIsExtendedBy returns true if the other's type extends from
// Reject. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsRejectIsExtendedBy(other vocab.Type) bool {
return typereject.RejectIsExtendedBy(other)
}
// ActivityStreamsRelationshipIsExtendedBy returns true if the other's type
// extends from Relationship. Note that it returns false if the types are the
// same; see the "IsOrExtends" variant instead.
func ActivityStreamsRelationshipIsExtendedBy(other vocab.Type) bool {
return typerelationship.RelationshipIsExtendedBy(other)
}
// ActivityStreamsRemoveIsExtendedBy returns true if the other's type extends from
// Remove. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsRemoveIsExtendedBy(other vocab.Type) bool {
return typeremove.RemoveIsExtendedBy(other)
}
// ActivityStreamsServiceIsExtendedBy returns true if the other's type extends
// from Service. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsServiceIsExtendedBy(other vocab.Type) bool {
return typeservice.ServiceIsExtendedBy(other)
}
// ActivityStreamsTentativeAcceptIsExtendedBy returns true if the other's type
// extends from TentativeAccept. Note that it returns false if the types are
// the same; see the "IsOrExtends" variant instead.
func ActivityStreamsTentativeAcceptIsExtendedBy(other vocab.Type) bool {
return typetentativeaccept.TentativeAcceptIsExtendedBy(other)
}
// ActivityStreamsTentativeRejectIsExtendedBy returns true if the other's type
// extends from TentativeReject. Note that it returns false if the types are
// the same; see the "IsOrExtends" variant instead.
func ActivityStreamsTentativeRejectIsExtendedBy(other vocab.Type) bool {
return typetentativereject.TentativeRejectIsExtendedBy(other)
}
// ActivityStreamsTombstoneIsExtendedBy returns true if the other's type extends
// from Tombstone. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func ActivityStreamsTombstoneIsExtendedBy(other vocab.Type) bool {
return typetombstone.TombstoneIsExtendedBy(other)
}
// ActivityStreamsTravelIsExtendedBy returns true if the other's type extends from
// Travel. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsTravelIsExtendedBy(other vocab.Type) bool {
return typetravel.TravelIsExtendedBy(other)
}
// ActivityStreamsUndoIsExtendedBy returns true if the other's type extends from
// Undo. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsUndoIsExtendedBy(other vocab.Type) bool {
return typeundo.UndoIsExtendedBy(other)
}
// ActivityStreamsUpdateIsExtendedBy returns true if the other's type extends from
// Update. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsUpdateIsExtendedBy(other vocab.Type) bool {
return typeupdate.UpdateIsExtendedBy(other)
}
// ActivityStreamsVideoIsExtendedBy returns true if the other's type extends from
// Video. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsVideoIsExtendedBy(other vocab.Type) bool {
return typevideo.VideoIsExtendedBy(other)
}
// ActivityStreamsViewIsExtendedBy returns true if the other's type extends from
// View. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ActivityStreamsViewIsExtendedBy(other vocab.Type) bool {
return typeview.ViewIsExtendedBy(other)
}

View file

@ -0,0 +1,385 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_accept"
typeactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_activity"
typeadd "github.com/go-fed/activity/streams/impl/activitystreams/type_add"
typeannounce "github.com/go-fed/activity/streams/impl/activitystreams/type_announce"
typeapplication "github.com/go-fed/activity/streams/impl/activitystreams/type_application"
typearrive "github.com/go-fed/activity/streams/impl/activitystreams/type_arrive"
typearticle "github.com/go-fed/activity/streams/impl/activitystreams/type_article"
typeaudio "github.com/go-fed/activity/streams/impl/activitystreams/type_audio"
typeblock "github.com/go-fed/activity/streams/impl/activitystreams/type_block"
typecollection "github.com/go-fed/activity/streams/impl/activitystreams/type_collection"
typecollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_collectionpage"
typecreate "github.com/go-fed/activity/streams/impl/activitystreams/type_create"
typedelete "github.com/go-fed/activity/streams/impl/activitystreams/type_delete"
typedislike "github.com/go-fed/activity/streams/impl/activitystreams/type_dislike"
typedocument "github.com/go-fed/activity/streams/impl/activitystreams/type_document"
typeevent "github.com/go-fed/activity/streams/impl/activitystreams/type_event"
typeflag "github.com/go-fed/activity/streams/impl/activitystreams/type_flag"
typefollow "github.com/go-fed/activity/streams/impl/activitystreams/type_follow"
typegroup "github.com/go-fed/activity/streams/impl/activitystreams/type_group"
typeignore "github.com/go-fed/activity/streams/impl/activitystreams/type_ignore"
typeimage "github.com/go-fed/activity/streams/impl/activitystreams/type_image"
typeintransitiveactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_intransitiveactivity"
typeinvite "github.com/go-fed/activity/streams/impl/activitystreams/type_invite"
typejoin "github.com/go-fed/activity/streams/impl/activitystreams/type_join"
typeleave "github.com/go-fed/activity/streams/impl/activitystreams/type_leave"
typelike "github.com/go-fed/activity/streams/impl/activitystreams/type_like"
typelink "github.com/go-fed/activity/streams/impl/activitystreams/type_link"
typelisten "github.com/go-fed/activity/streams/impl/activitystreams/type_listen"
typemention "github.com/go-fed/activity/streams/impl/activitystreams/type_mention"
typemove "github.com/go-fed/activity/streams/impl/activitystreams/type_move"
typenote "github.com/go-fed/activity/streams/impl/activitystreams/type_note"
typeobject "github.com/go-fed/activity/streams/impl/activitystreams/type_object"
typeoffer "github.com/go-fed/activity/streams/impl/activitystreams/type_offer"
typeorderedcollection "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollection"
typeorderedcollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollectionpage"
typeorganization "github.com/go-fed/activity/streams/impl/activitystreams/type_organization"
typepage "github.com/go-fed/activity/streams/impl/activitystreams/type_page"
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
typerelationship "github.com/go-fed/activity/streams/impl/activitystreams/type_relationship"
typeremove "github.com/go-fed/activity/streams/impl/activitystreams/type_remove"
typeservice "github.com/go-fed/activity/streams/impl/activitystreams/type_service"
typetentativeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativeaccept"
typetentativereject "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativereject"
typetombstone "github.com/go-fed/activity/streams/impl/activitystreams/type_tombstone"
typetravel "github.com/go-fed/activity/streams/impl/activitystreams/type_travel"
typeundo "github.com/go-fed/activity/streams/impl/activitystreams/type_undo"
typeupdate "github.com/go-fed/activity/streams/impl/activitystreams/type_update"
typevideo "github.com/go-fed/activity/streams/impl/activitystreams/type_video"
typeview "github.com/go-fed/activity/streams/impl/activitystreams/type_view"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ActivityStreamsActivityStreamsAcceptExtends returns true if Accept extends from
// the other's type.
func ActivityStreamsActivityStreamsAcceptExtends(other vocab.Type) bool {
return typeaccept.ActivityStreamsAcceptExtends(other)
}
// ActivityStreamsActivityStreamsActivityExtends returns true if Activity extends
// from the other's type.
func ActivityStreamsActivityStreamsActivityExtends(other vocab.Type) bool {
return typeactivity.ActivityStreamsActivityExtends(other)
}
// ActivityStreamsActivityStreamsAddExtends returns true if Add extends from the
// other's type.
func ActivityStreamsActivityStreamsAddExtends(other vocab.Type) bool {
return typeadd.ActivityStreamsAddExtends(other)
}
// ActivityStreamsActivityStreamsAnnounceExtends returns true if Announce extends
// from the other's type.
func ActivityStreamsActivityStreamsAnnounceExtends(other vocab.Type) bool {
return typeannounce.ActivityStreamsAnnounceExtends(other)
}
// ActivityStreamsActivityStreamsApplicationExtends returns true if Application
// extends from the other's type.
func ActivityStreamsActivityStreamsApplicationExtends(other vocab.Type) bool {
return typeapplication.ActivityStreamsApplicationExtends(other)
}
// ActivityStreamsActivityStreamsArriveExtends returns true if Arrive extends from
// the other's type.
func ActivityStreamsActivityStreamsArriveExtends(other vocab.Type) bool {
return typearrive.ActivityStreamsArriveExtends(other)
}
// ActivityStreamsActivityStreamsArticleExtends returns true if Article extends
// from the other's type.
func ActivityStreamsActivityStreamsArticleExtends(other vocab.Type) bool {
return typearticle.ActivityStreamsArticleExtends(other)
}
// ActivityStreamsActivityStreamsAudioExtends returns true if Audio extends from
// the other's type.
func ActivityStreamsActivityStreamsAudioExtends(other vocab.Type) bool {
return typeaudio.ActivityStreamsAudioExtends(other)
}
// ActivityStreamsActivityStreamsBlockExtends returns true if Block extends from
// the other's type.
func ActivityStreamsActivityStreamsBlockExtends(other vocab.Type) bool {
return typeblock.ActivityStreamsBlockExtends(other)
}
// ActivityStreamsActivityStreamsCollectionExtends returns true if Collection
// extends from the other's type.
func ActivityStreamsActivityStreamsCollectionExtends(other vocab.Type) bool {
return typecollection.ActivityStreamsCollectionExtends(other)
}
// ActivityStreamsActivityStreamsCollectionPageExtends returns true if
// CollectionPage extends from the other's type.
func ActivityStreamsActivityStreamsCollectionPageExtends(other vocab.Type) bool {
return typecollectionpage.ActivityStreamsCollectionPageExtends(other)
}
// ActivityStreamsActivityStreamsCreateExtends returns true if Create extends from
// the other's type.
func ActivityStreamsActivityStreamsCreateExtends(other vocab.Type) bool {
return typecreate.ActivityStreamsCreateExtends(other)
}
// ActivityStreamsActivityStreamsDeleteExtends returns true if Delete extends from
// the other's type.
func ActivityStreamsActivityStreamsDeleteExtends(other vocab.Type) bool {
return typedelete.ActivityStreamsDeleteExtends(other)
}
// ActivityStreamsActivityStreamsDislikeExtends returns true if Dislike extends
// from the other's type.
func ActivityStreamsActivityStreamsDislikeExtends(other vocab.Type) bool {
return typedislike.ActivityStreamsDislikeExtends(other)
}
// ActivityStreamsActivityStreamsDocumentExtends returns true if Document extends
// from the other's type.
func ActivityStreamsActivityStreamsDocumentExtends(other vocab.Type) bool {
return typedocument.ActivityStreamsDocumentExtends(other)
}
// ActivityStreamsActivityStreamsEventExtends returns true if Event extends from
// the other's type.
func ActivityStreamsActivityStreamsEventExtends(other vocab.Type) bool {
return typeevent.ActivityStreamsEventExtends(other)
}
// ActivityStreamsActivityStreamsFlagExtends returns true if Flag extends from the
// other's type.
func ActivityStreamsActivityStreamsFlagExtends(other vocab.Type) bool {
return typeflag.ActivityStreamsFlagExtends(other)
}
// ActivityStreamsActivityStreamsFollowExtends returns true if Follow extends from
// the other's type.
func ActivityStreamsActivityStreamsFollowExtends(other vocab.Type) bool {
return typefollow.ActivityStreamsFollowExtends(other)
}
// ActivityStreamsActivityStreamsGroupExtends returns true if Group extends from
// the other's type.
func ActivityStreamsActivityStreamsGroupExtends(other vocab.Type) bool {
return typegroup.ActivityStreamsGroupExtends(other)
}
// ActivityStreamsActivityStreamsIgnoreExtends returns true if Ignore extends from
// the other's type.
func ActivityStreamsActivityStreamsIgnoreExtends(other vocab.Type) bool {
return typeignore.ActivityStreamsIgnoreExtends(other)
}
// ActivityStreamsActivityStreamsImageExtends returns true if Image extends from
// the other's type.
func ActivityStreamsActivityStreamsImageExtends(other vocab.Type) bool {
return typeimage.ActivityStreamsImageExtends(other)
}
// ActivityStreamsActivityStreamsIntransitiveActivityExtends returns true if
// IntransitiveActivity extends from the other's type.
func ActivityStreamsActivityStreamsIntransitiveActivityExtends(other vocab.Type) bool {
return typeintransitiveactivity.ActivityStreamsIntransitiveActivityExtends(other)
}
// ActivityStreamsActivityStreamsInviteExtends returns true if Invite extends from
// the other's type.
func ActivityStreamsActivityStreamsInviteExtends(other vocab.Type) bool {
return typeinvite.ActivityStreamsInviteExtends(other)
}
// ActivityStreamsActivityStreamsJoinExtends returns true if Join extends from the
// other's type.
func ActivityStreamsActivityStreamsJoinExtends(other vocab.Type) bool {
return typejoin.ActivityStreamsJoinExtends(other)
}
// ActivityStreamsActivityStreamsLeaveExtends returns true if Leave extends from
// the other's type.
func ActivityStreamsActivityStreamsLeaveExtends(other vocab.Type) bool {
return typeleave.ActivityStreamsLeaveExtends(other)
}
// ActivityStreamsActivityStreamsLikeExtends returns true if Like extends from the
// other's type.
func ActivityStreamsActivityStreamsLikeExtends(other vocab.Type) bool {
return typelike.ActivityStreamsLikeExtends(other)
}
// ActivityStreamsActivityStreamsLinkExtends returns true if Link extends from the
// other's type.
func ActivityStreamsActivityStreamsLinkExtends(other vocab.Type) bool {
return typelink.ActivityStreamsLinkExtends(other)
}
// ActivityStreamsActivityStreamsListenExtends returns true if Listen extends from
// the other's type.
func ActivityStreamsActivityStreamsListenExtends(other vocab.Type) bool {
return typelisten.ActivityStreamsListenExtends(other)
}
// ActivityStreamsActivityStreamsMentionExtends returns true if Mention extends
// from the other's type.
func ActivityStreamsActivityStreamsMentionExtends(other vocab.Type) bool {
return typemention.ActivityStreamsMentionExtends(other)
}
// ActivityStreamsActivityStreamsMoveExtends returns true if Move extends from the
// other's type.
func ActivityStreamsActivityStreamsMoveExtends(other vocab.Type) bool {
return typemove.ActivityStreamsMoveExtends(other)
}
// ActivityStreamsActivityStreamsNoteExtends returns true if Note extends from the
// other's type.
func ActivityStreamsActivityStreamsNoteExtends(other vocab.Type) bool {
return typenote.ActivityStreamsNoteExtends(other)
}
// ActivityStreamsActivityStreamsObjectExtends returns true if Object extends from
// the other's type.
func ActivityStreamsActivityStreamsObjectExtends(other vocab.Type) bool {
return typeobject.ActivityStreamsObjectExtends(other)
}
// ActivityStreamsActivityStreamsOfferExtends returns true if Offer extends from
// the other's type.
func ActivityStreamsActivityStreamsOfferExtends(other vocab.Type) bool {
return typeoffer.ActivityStreamsOfferExtends(other)
}
// ActivityStreamsActivityStreamsOrderedCollectionExtends returns true if
// OrderedCollection extends from the other's type.
func ActivityStreamsActivityStreamsOrderedCollectionExtends(other vocab.Type) bool {
return typeorderedcollection.ActivityStreamsOrderedCollectionExtends(other)
}
// ActivityStreamsActivityStreamsOrderedCollectionPageExtends returns true if
// OrderedCollectionPage extends from the other's type.
func ActivityStreamsActivityStreamsOrderedCollectionPageExtends(other vocab.Type) bool {
return typeorderedcollectionpage.ActivityStreamsOrderedCollectionPageExtends(other)
}
// ActivityStreamsActivityStreamsOrganizationExtends returns true if Organization
// extends from the other's type.
func ActivityStreamsActivityStreamsOrganizationExtends(other vocab.Type) bool {
return typeorganization.ActivityStreamsOrganizationExtends(other)
}
// ActivityStreamsActivityStreamsPageExtends returns true if Page extends from the
// other's type.
func ActivityStreamsActivityStreamsPageExtends(other vocab.Type) bool {
return typepage.ActivityStreamsPageExtends(other)
}
// ActivityStreamsActivityStreamsPersonExtends returns true if Person extends from
// the other's type.
func ActivityStreamsActivityStreamsPersonExtends(other vocab.Type) bool {
return typeperson.ActivityStreamsPersonExtends(other)
}
// ActivityStreamsActivityStreamsPlaceExtends returns true if Place extends from
// the other's type.
func ActivityStreamsActivityStreamsPlaceExtends(other vocab.Type) bool {
return typeplace.ActivityStreamsPlaceExtends(other)
}
// ActivityStreamsActivityStreamsProfileExtends returns true if Profile extends
// from the other's type.
func ActivityStreamsActivityStreamsProfileExtends(other vocab.Type) bool {
return typeprofile.ActivityStreamsProfileExtends(other)
}
// ActivityStreamsActivityStreamsQuestionExtends returns true if Question extends
// from the other's type.
func ActivityStreamsActivityStreamsQuestionExtends(other vocab.Type) bool {
return typequestion.ActivityStreamsQuestionExtends(other)
}
// ActivityStreamsActivityStreamsReadExtends returns true if Read extends from the
// other's type.
func ActivityStreamsActivityStreamsReadExtends(other vocab.Type) bool {
return typeread.ActivityStreamsReadExtends(other)
}
// ActivityStreamsActivityStreamsRejectExtends returns true if Reject extends from
// the other's type.
func ActivityStreamsActivityStreamsRejectExtends(other vocab.Type) bool {
return typereject.ActivityStreamsRejectExtends(other)
}
// ActivityStreamsActivityStreamsRelationshipExtends returns true if Relationship
// extends from the other's type.
func ActivityStreamsActivityStreamsRelationshipExtends(other vocab.Type) bool {
return typerelationship.ActivityStreamsRelationshipExtends(other)
}
// ActivityStreamsActivityStreamsRemoveExtends returns true if Remove extends from
// the other's type.
func ActivityStreamsActivityStreamsRemoveExtends(other vocab.Type) bool {
return typeremove.ActivityStreamsRemoveExtends(other)
}
// ActivityStreamsActivityStreamsServiceExtends returns true if Service extends
// from the other's type.
func ActivityStreamsActivityStreamsServiceExtends(other vocab.Type) bool {
return typeservice.ActivityStreamsServiceExtends(other)
}
// ActivityStreamsActivityStreamsTentativeAcceptExtends returns true if
// TentativeAccept extends from the other's type.
func ActivityStreamsActivityStreamsTentativeAcceptExtends(other vocab.Type) bool {
return typetentativeaccept.ActivityStreamsTentativeAcceptExtends(other)
}
// ActivityStreamsActivityStreamsTentativeRejectExtends returns true if
// TentativeReject extends from the other's type.
func ActivityStreamsActivityStreamsTentativeRejectExtends(other vocab.Type) bool {
return typetentativereject.ActivityStreamsTentativeRejectExtends(other)
}
// ActivityStreamsActivityStreamsTombstoneExtends returns true if Tombstone
// extends from the other's type.
func ActivityStreamsActivityStreamsTombstoneExtends(other vocab.Type) bool {
return typetombstone.ActivityStreamsTombstoneExtends(other)
}
// ActivityStreamsActivityStreamsTravelExtends returns true if Travel extends from
// the other's type.
func ActivityStreamsActivityStreamsTravelExtends(other vocab.Type) bool {
return typetravel.ActivityStreamsTravelExtends(other)
}
// ActivityStreamsActivityStreamsUndoExtends returns true if Undo extends from the
// other's type.
func ActivityStreamsActivityStreamsUndoExtends(other vocab.Type) bool {
return typeundo.ActivityStreamsUndoExtends(other)
}
// ActivityStreamsActivityStreamsUpdateExtends returns true if Update extends from
// the other's type.
func ActivityStreamsActivityStreamsUpdateExtends(other vocab.Type) bool {
return typeupdate.ActivityStreamsUpdateExtends(other)
}
// ActivityStreamsActivityStreamsVideoExtends returns true if Video extends from
// the other's type.
func ActivityStreamsActivityStreamsVideoExtends(other vocab.Type) bool {
return typevideo.ActivityStreamsVideoExtends(other)
}
// ActivityStreamsActivityStreamsViewExtends returns true if View extends from the
// other's type.
func ActivityStreamsActivityStreamsViewExtends(other vocab.Type) bool {
return typeview.ActivityStreamsViewExtends(other)
}

View file

@ -0,0 +1,388 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_accept"
typeactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_activity"
typeadd "github.com/go-fed/activity/streams/impl/activitystreams/type_add"
typeannounce "github.com/go-fed/activity/streams/impl/activitystreams/type_announce"
typeapplication "github.com/go-fed/activity/streams/impl/activitystreams/type_application"
typearrive "github.com/go-fed/activity/streams/impl/activitystreams/type_arrive"
typearticle "github.com/go-fed/activity/streams/impl/activitystreams/type_article"
typeaudio "github.com/go-fed/activity/streams/impl/activitystreams/type_audio"
typeblock "github.com/go-fed/activity/streams/impl/activitystreams/type_block"
typecollection "github.com/go-fed/activity/streams/impl/activitystreams/type_collection"
typecollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_collectionpage"
typecreate "github.com/go-fed/activity/streams/impl/activitystreams/type_create"
typedelete "github.com/go-fed/activity/streams/impl/activitystreams/type_delete"
typedislike "github.com/go-fed/activity/streams/impl/activitystreams/type_dislike"
typedocument "github.com/go-fed/activity/streams/impl/activitystreams/type_document"
typeevent "github.com/go-fed/activity/streams/impl/activitystreams/type_event"
typeflag "github.com/go-fed/activity/streams/impl/activitystreams/type_flag"
typefollow "github.com/go-fed/activity/streams/impl/activitystreams/type_follow"
typegroup "github.com/go-fed/activity/streams/impl/activitystreams/type_group"
typeignore "github.com/go-fed/activity/streams/impl/activitystreams/type_ignore"
typeimage "github.com/go-fed/activity/streams/impl/activitystreams/type_image"
typeintransitiveactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_intransitiveactivity"
typeinvite "github.com/go-fed/activity/streams/impl/activitystreams/type_invite"
typejoin "github.com/go-fed/activity/streams/impl/activitystreams/type_join"
typeleave "github.com/go-fed/activity/streams/impl/activitystreams/type_leave"
typelike "github.com/go-fed/activity/streams/impl/activitystreams/type_like"
typelink "github.com/go-fed/activity/streams/impl/activitystreams/type_link"
typelisten "github.com/go-fed/activity/streams/impl/activitystreams/type_listen"
typemention "github.com/go-fed/activity/streams/impl/activitystreams/type_mention"
typemove "github.com/go-fed/activity/streams/impl/activitystreams/type_move"
typenote "github.com/go-fed/activity/streams/impl/activitystreams/type_note"
typeobject "github.com/go-fed/activity/streams/impl/activitystreams/type_object"
typeoffer "github.com/go-fed/activity/streams/impl/activitystreams/type_offer"
typeorderedcollection "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollection"
typeorderedcollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollectionpage"
typeorganization "github.com/go-fed/activity/streams/impl/activitystreams/type_organization"
typepage "github.com/go-fed/activity/streams/impl/activitystreams/type_page"
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
typerelationship "github.com/go-fed/activity/streams/impl/activitystreams/type_relationship"
typeremove "github.com/go-fed/activity/streams/impl/activitystreams/type_remove"
typeservice "github.com/go-fed/activity/streams/impl/activitystreams/type_service"
typetentativeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativeaccept"
typetentativereject "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativereject"
typetombstone "github.com/go-fed/activity/streams/impl/activitystreams/type_tombstone"
typetravel "github.com/go-fed/activity/streams/impl/activitystreams/type_travel"
typeundo "github.com/go-fed/activity/streams/impl/activitystreams/type_undo"
typeupdate "github.com/go-fed/activity/streams/impl/activitystreams/type_update"
typevideo "github.com/go-fed/activity/streams/impl/activitystreams/type_video"
typeview "github.com/go-fed/activity/streams/impl/activitystreams/type_view"
vocab "github.com/go-fed/activity/streams/vocab"
)
// IsOrExtendsActivityStreamsAccept returns true if the other provided type is the
// Accept type or extends from the Accept type.
func IsOrExtendsActivityStreamsAccept(other vocab.Type) bool {
return typeaccept.IsOrExtendsAccept(other)
}
// IsOrExtendsActivityStreamsActivity returns true if the other provided type is
// the Activity type or extends from the Activity type.
func IsOrExtendsActivityStreamsActivity(other vocab.Type) bool {
return typeactivity.IsOrExtendsActivity(other)
}
// IsOrExtendsActivityStreamsAdd returns true if the other provided type is the
// Add type or extends from the Add type.
func IsOrExtendsActivityStreamsAdd(other vocab.Type) bool {
return typeadd.IsOrExtendsAdd(other)
}
// IsOrExtendsActivityStreamsAnnounce returns true if the other provided type is
// the Announce type or extends from the Announce type.
func IsOrExtendsActivityStreamsAnnounce(other vocab.Type) bool {
return typeannounce.IsOrExtendsAnnounce(other)
}
// IsOrExtendsActivityStreamsApplication returns true if the other provided type
// is the Application type or extends from the Application type.
func IsOrExtendsActivityStreamsApplication(other vocab.Type) bool {
return typeapplication.IsOrExtendsApplication(other)
}
// IsOrExtendsActivityStreamsArrive returns true if the other provided type is the
// Arrive type or extends from the Arrive type.
func IsOrExtendsActivityStreamsArrive(other vocab.Type) bool {
return typearrive.IsOrExtendsArrive(other)
}
// IsOrExtendsActivityStreamsArticle returns true if the other provided type is
// the Article type or extends from the Article type.
func IsOrExtendsActivityStreamsArticle(other vocab.Type) bool {
return typearticle.IsOrExtendsArticle(other)
}
// IsOrExtendsActivityStreamsAudio returns true if the other provided type is the
// Audio type or extends from the Audio type.
func IsOrExtendsActivityStreamsAudio(other vocab.Type) bool {
return typeaudio.IsOrExtendsAudio(other)
}
// IsOrExtendsActivityStreamsBlock returns true if the other provided type is the
// Block type or extends from the Block type.
func IsOrExtendsActivityStreamsBlock(other vocab.Type) bool {
return typeblock.IsOrExtendsBlock(other)
}
// IsOrExtendsActivityStreamsCollection returns true if the other provided type is
// the Collection type or extends from the Collection type.
func IsOrExtendsActivityStreamsCollection(other vocab.Type) bool {
return typecollection.IsOrExtendsCollection(other)
}
// IsOrExtendsActivityStreamsCollectionPage returns true if the other provided
// type is the CollectionPage type or extends from the CollectionPage type.
func IsOrExtendsActivityStreamsCollectionPage(other vocab.Type) bool {
return typecollectionpage.IsOrExtendsCollectionPage(other)
}
// IsOrExtendsActivityStreamsCreate returns true if the other provided type is the
// Create type or extends from the Create type.
func IsOrExtendsActivityStreamsCreate(other vocab.Type) bool {
return typecreate.IsOrExtendsCreate(other)
}
// IsOrExtendsActivityStreamsDelete returns true if the other provided type is the
// Delete type or extends from the Delete type.
func IsOrExtendsActivityStreamsDelete(other vocab.Type) bool {
return typedelete.IsOrExtendsDelete(other)
}
// IsOrExtendsActivityStreamsDislike returns true if the other provided type is
// the Dislike type or extends from the Dislike type.
func IsOrExtendsActivityStreamsDislike(other vocab.Type) bool {
return typedislike.IsOrExtendsDislike(other)
}
// IsOrExtendsActivityStreamsDocument returns true if the other provided type is
// the Document type or extends from the Document type.
func IsOrExtendsActivityStreamsDocument(other vocab.Type) bool {
return typedocument.IsOrExtendsDocument(other)
}
// IsOrExtendsActivityStreamsEvent returns true if the other provided type is the
// Event type or extends from the Event type.
func IsOrExtendsActivityStreamsEvent(other vocab.Type) bool {
return typeevent.IsOrExtendsEvent(other)
}
// IsOrExtendsActivityStreamsFlag returns true if the other provided type is the
// Flag type or extends from the Flag type.
func IsOrExtendsActivityStreamsFlag(other vocab.Type) bool {
return typeflag.IsOrExtendsFlag(other)
}
// IsOrExtendsActivityStreamsFollow returns true if the other provided type is the
// Follow type or extends from the Follow type.
func IsOrExtendsActivityStreamsFollow(other vocab.Type) bool {
return typefollow.IsOrExtendsFollow(other)
}
// IsOrExtendsActivityStreamsGroup returns true if the other provided type is the
// Group type or extends from the Group type.
func IsOrExtendsActivityStreamsGroup(other vocab.Type) bool {
return typegroup.IsOrExtendsGroup(other)
}
// IsOrExtendsActivityStreamsIgnore returns true if the other provided type is the
// Ignore type or extends from the Ignore type.
func IsOrExtendsActivityStreamsIgnore(other vocab.Type) bool {
return typeignore.IsOrExtendsIgnore(other)
}
// IsOrExtendsActivityStreamsImage returns true if the other provided type is the
// Image type or extends from the Image type.
func IsOrExtendsActivityStreamsImage(other vocab.Type) bool {
return typeimage.IsOrExtendsImage(other)
}
// IsOrExtendsActivityStreamsIntransitiveActivity returns true if the other
// provided type is the IntransitiveActivity type or extends from the
// IntransitiveActivity type.
func IsOrExtendsActivityStreamsIntransitiveActivity(other vocab.Type) bool {
return typeintransitiveactivity.IsOrExtendsIntransitiveActivity(other)
}
// IsOrExtendsActivityStreamsInvite returns true if the other provided type is the
// Invite type or extends from the Invite type.
func IsOrExtendsActivityStreamsInvite(other vocab.Type) bool {
return typeinvite.IsOrExtendsInvite(other)
}
// IsOrExtendsActivityStreamsJoin returns true if the other provided type is the
// Join type or extends from the Join type.
func IsOrExtendsActivityStreamsJoin(other vocab.Type) bool {
return typejoin.IsOrExtendsJoin(other)
}
// IsOrExtendsActivityStreamsLeave returns true if the other provided type is the
// Leave type or extends from the Leave type.
func IsOrExtendsActivityStreamsLeave(other vocab.Type) bool {
return typeleave.IsOrExtendsLeave(other)
}
// IsOrExtendsActivityStreamsLike returns true if the other provided type is the
// Like type or extends from the Like type.
func IsOrExtendsActivityStreamsLike(other vocab.Type) bool {
return typelike.IsOrExtendsLike(other)
}
// IsOrExtendsActivityStreamsLink returns true if the other provided type is the
// Link type or extends from the Link type.
func IsOrExtendsActivityStreamsLink(other vocab.Type) bool {
return typelink.IsOrExtendsLink(other)
}
// IsOrExtendsActivityStreamsListen returns true if the other provided type is the
// Listen type or extends from the Listen type.
func IsOrExtendsActivityStreamsListen(other vocab.Type) bool {
return typelisten.IsOrExtendsListen(other)
}
// IsOrExtendsActivityStreamsMention returns true if the other provided type is
// the Mention type or extends from the Mention type.
func IsOrExtendsActivityStreamsMention(other vocab.Type) bool {
return typemention.IsOrExtendsMention(other)
}
// IsOrExtendsActivityStreamsMove returns true if the other provided type is the
// Move type or extends from the Move type.
func IsOrExtendsActivityStreamsMove(other vocab.Type) bool {
return typemove.IsOrExtendsMove(other)
}
// IsOrExtendsActivityStreamsNote returns true if the other provided type is the
// Note type or extends from the Note type.
func IsOrExtendsActivityStreamsNote(other vocab.Type) bool {
return typenote.IsOrExtendsNote(other)
}
// IsOrExtendsActivityStreamsObject returns true if the other provided type is the
// Object type or extends from the Object type.
func IsOrExtendsActivityStreamsObject(other vocab.Type) bool {
return typeobject.IsOrExtendsObject(other)
}
// IsOrExtendsActivityStreamsOffer returns true if the other provided type is the
// Offer type or extends from the Offer type.
func IsOrExtendsActivityStreamsOffer(other vocab.Type) bool {
return typeoffer.IsOrExtendsOffer(other)
}
// IsOrExtendsActivityStreamsOrderedCollection returns true if the other provided
// type is the OrderedCollection type or extends from the OrderedCollection
// type.
func IsOrExtendsActivityStreamsOrderedCollection(other vocab.Type) bool {
return typeorderedcollection.IsOrExtendsOrderedCollection(other)
}
// IsOrExtendsActivityStreamsOrderedCollectionPage returns true if the other
// provided type is the OrderedCollectionPage type or extends from the
// OrderedCollectionPage type.
func IsOrExtendsActivityStreamsOrderedCollectionPage(other vocab.Type) bool {
return typeorderedcollectionpage.IsOrExtendsOrderedCollectionPage(other)
}
// IsOrExtendsActivityStreamsOrganization returns true if the other provided type
// is the Organization type or extends from the Organization type.
func IsOrExtendsActivityStreamsOrganization(other vocab.Type) bool {
return typeorganization.IsOrExtendsOrganization(other)
}
// IsOrExtendsActivityStreamsPage returns true if the other provided type is the
// Page type or extends from the Page type.
func IsOrExtendsActivityStreamsPage(other vocab.Type) bool {
return typepage.IsOrExtendsPage(other)
}
// IsOrExtendsActivityStreamsPerson returns true if the other provided type is the
// Person type or extends from the Person type.
func IsOrExtendsActivityStreamsPerson(other vocab.Type) bool {
return typeperson.IsOrExtendsPerson(other)
}
// IsOrExtendsActivityStreamsPlace returns true if the other provided type is the
// Place type or extends from the Place type.
func IsOrExtendsActivityStreamsPlace(other vocab.Type) bool {
return typeplace.IsOrExtendsPlace(other)
}
// IsOrExtendsActivityStreamsProfile returns true if the other provided type is
// the Profile type or extends from the Profile type.
func IsOrExtendsActivityStreamsProfile(other vocab.Type) bool {
return typeprofile.IsOrExtendsProfile(other)
}
// IsOrExtendsActivityStreamsQuestion returns true if the other provided type is
// the Question type or extends from the Question type.
func IsOrExtendsActivityStreamsQuestion(other vocab.Type) bool {
return typequestion.IsOrExtendsQuestion(other)
}
// IsOrExtendsActivityStreamsRead returns true if the other provided type is the
// Read type or extends from the Read type.
func IsOrExtendsActivityStreamsRead(other vocab.Type) bool {
return typeread.IsOrExtendsRead(other)
}
// IsOrExtendsActivityStreamsReject returns true if the other provided type is the
// Reject type or extends from the Reject type.
func IsOrExtendsActivityStreamsReject(other vocab.Type) bool {
return typereject.IsOrExtendsReject(other)
}
// IsOrExtendsActivityStreamsRelationship returns true if the other provided type
// is the Relationship type or extends from the Relationship type.
func IsOrExtendsActivityStreamsRelationship(other vocab.Type) bool {
return typerelationship.IsOrExtendsRelationship(other)
}
// IsOrExtendsActivityStreamsRemove returns true if the other provided type is the
// Remove type or extends from the Remove type.
func IsOrExtendsActivityStreamsRemove(other vocab.Type) bool {
return typeremove.IsOrExtendsRemove(other)
}
// IsOrExtendsActivityStreamsService returns true if the other provided type is
// the Service type or extends from the Service type.
func IsOrExtendsActivityStreamsService(other vocab.Type) bool {
return typeservice.IsOrExtendsService(other)
}
// IsOrExtendsActivityStreamsTentativeAccept returns true if the other provided
// type is the TentativeAccept type or extends from the TentativeAccept type.
func IsOrExtendsActivityStreamsTentativeAccept(other vocab.Type) bool {
return typetentativeaccept.IsOrExtendsTentativeAccept(other)
}
// IsOrExtendsActivityStreamsTentativeReject returns true if the other provided
// type is the TentativeReject type or extends from the TentativeReject type.
func IsOrExtendsActivityStreamsTentativeReject(other vocab.Type) bool {
return typetentativereject.IsOrExtendsTentativeReject(other)
}
// IsOrExtendsActivityStreamsTombstone returns true if the other provided type is
// the Tombstone type or extends from the Tombstone type.
func IsOrExtendsActivityStreamsTombstone(other vocab.Type) bool {
return typetombstone.IsOrExtendsTombstone(other)
}
// IsOrExtendsActivityStreamsTravel returns true if the other provided type is the
// Travel type or extends from the Travel type.
func IsOrExtendsActivityStreamsTravel(other vocab.Type) bool {
return typetravel.IsOrExtendsTravel(other)
}
// IsOrExtendsActivityStreamsUndo returns true if the other provided type is the
// Undo type or extends from the Undo type.
func IsOrExtendsActivityStreamsUndo(other vocab.Type) bool {
return typeundo.IsOrExtendsUndo(other)
}
// IsOrExtendsActivityStreamsUpdate returns true if the other provided type is the
// Update type or extends from the Update type.
func IsOrExtendsActivityStreamsUpdate(other vocab.Type) bool {
return typeupdate.IsOrExtendsUpdate(other)
}
// IsOrExtendsActivityStreamsVideo returns true if the other provided type is the
// Video type or extends from the Video type.
func IsOrExtendsActivityStreamsVideo(other vocab.Type) bool {
return typevideo.IsOrExtendsVideo(other)
}
// IsOrExtendsActivityStreamsView returns true if the other provided type is the
// View type or extends from the View type.
func IsOrExtendsActivityStreamsView(other vocab.Type) bool {
return typeview.IsOrExtendsView(other)
}

View file

@ -0,0 +1,504 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
propertyaccuracy "github.com/go-fed/activity/streams/impl/activitystreams/property_accuracy"
propertyactor "github.com/go-fed/activity/streams/impl/activitystreams/property_actor"
propertyaltitude "github.com/go-fed/activity/streams/impl/activitystreams/property_altitude"
propertyanyof "github.com/go-fed/activity/streams/impl/activitystreams/property_anyof"
propertyattachment "github.com/go-fed/activity/streams/impl/activitystreams/property_attachment"
propertyattributedto "github.com/go-fed/activity/streams/impl/activitystreams/property_attributedto"
propertyaudience "github.com/go-fed/activity/streams/impl/activitystreams/property_audience"
propertybcc "github.com/go-fed/activity/streams/impl/activitystreams/property_bcc"
propertybto "github.com/go-fed/activity/streams/impl/activitystreams/property_bto"
propertycc "github.com/go-fed/activity/streams/impl/activitystreams/property_cc"
propertyclosed "github.com/go-fed/activity/streams/impl/activitystreams/property_closed"
propertycontent "github.com/go-fed/activity/streams/impl/activitystreams/property_content"
propertycontext "github.com/go-fed/activity/streams/impl/activitystreams/property_context"
propertycurrent "github.com/go-fed/activity/streams/impl/activitystreams/property_current"
propertydeleted "github.com/go-fed/activity/streams/impl/activitystreams/property_deleted"
propertydescribes "github.com/go-fed/activity/streams/impl/activitystreams/property_describes"
propertyduration "github.com/go-fed/activity/streams/impl/activitystreams/property_duration"
propertyendtime "github.com/go-fed/activity/streams/impl/activitystreams/property_endtime"
propertyfirst "github.com/go-fed/activity/streams/impl/activitystreams/property_first"
propertyfollowers "github.com/go-fed/activity/streams/impl/activitystreams/property_followers"
propertyfollowing "github.com/go-fed/activity/streams/impl/activitystreams/property_following"
propertyformertype "github.com/go-fed/activity/streams/impl/activitystreams/property_formertype"
propertygenerator "github.com/go-fed/activity/streams/impl/activitystreams/property_generator"
propertyheight "github.com/go-fed/activity/streams/impl/activitystreams/property_height"
propertyhref "github.com/go-fed/activity/streams/impl/activitystreams/property_href"
propertyhreflang "github.com/go-fed/activity/streams/impl/activitystreams/property_hreflang"
propertyicon "github.com/go-fed/activity/streams/impl/activitystreams/property_icon"
propertyimage "github.com/go-fed/activity/streams/impl/activitystreams/property_image"
propertyinbox "github.com/go-fed/activity/streams/impl/activitystreams/property_inbox"
propertyinreplyto "github.com/go-fed/activity/streams/impl/activitystreams/property_inreplyto"
propertyinstrument "github.com/go-fed/activity/streams/impl/activitystreams/property_instrument"
propertyitems "github.com/go-fed/activity/streams/impl/activitystreams/property_items"
propertylast "github.com/go-fed/activity/streams/impl/activitystreams/property_last"
propertylatitude "github.com/go-fed/activity/streams/impl/activitystreams/property_latitude"
propertyliked "github.com/go-fed/activity/streams/impl/activitystreams/property_liked"
propertylikes "github.com/go-fed/activity/streams/impl/activitystreams/property_likes"
propertylocation "github.com/go-fed/activity/streams/impl/activitystreams/property_location"
propertylongitude "github.com/go-fed/activity/streams/impl/activitystreams/property_longitude"
propertymediatype "github.com/go-fed/activity/streams/impl/activitystreams/property_mediatype"
propertyname "github.com/go-fed/activity/streams/impl/activitystreams/property_name"
propertynext "github.com/go-fed/activity/streams/impl/activitystreams/property_next"
propertyobject "github.com/go-fed/activity/streams/impl/activitystreams/property_object"
propertyoneof "github.com/go-fed/activity/streams/impl/activitystreams/property_oneof"
propertyordereditems "github.com/go-fed/activity/streams/impl/activitystreams/property_ordereditems"
propertyorigin "github.com/go-fed/activity/streams/impl/activitystreams/property_origin"
propertyoutbox "github.com/go-fed/activity/streams/impl/activitystreams/property_outbox"
propertypartof "github.com/go-fed/activity/streams/impl/activitystreams/property_partof"
propertypreferredusername "github.com/go-fed/activity/streams/impl/activitystreams/property_preferredusername"
propertyprev "github.com/go-fed/activity/streams/impl/activitystreams/property_prev"
propertypreview "github.com/go-fed/activity/streams/impl/activitystreams/property_preview"
propertypublished "github.com/go-fed/activity/streams/impl/activitystreams/property_published"
propertyradius "github.com/go-fed/activity/streams/impl/activitystreams/property_radius"
propertyrel "github.com/go-fed/activity/streams/impl/activitystreams/property_rel"
propertyrelationship "github.com/go-fed/activity/streams/impl/activitystreams/property_relationship"
propertyreplies "github.com/go-fed/activity/streams/impl/activitystreams/property_replies"
propertyresult "github.com/go-fed/activity/streams/impl/activitystreams/property_result"
propertyshares "github.com/go-fed/activity/streams/impl/activitystreams/property_shares"
propertysource "github.com/go-fed/activity/streams/impl/activitystreams/property_source"
propertystartindex "github.com/go-fed/activity/streams/impl/activitystreams/property_startindex"
propertystarttime "github.com/go-fed/activity/streams/impl/activitystreams/property_starttime"
propertystreams "github.com/go-fed/activity/streams/impl/activitystreams/property_streams"
propertysubject "github.com/go-fed/activity/streams/impl/activitystreams/property_subject"
propertysummary "github.com/go-fed/activity/streams/impl/activitystreams/property_summary"
propertytag "github.com/go-fed/activity/streams/impl/activitystreams/property_tag"
propertytarget "github.com/go-fed/activity/streams/impl/activitystreams/property_target"
propertyto "github.com/go-fed/activity/streams/impl/activitystreams/property_to"
propertytotalitems "github.com/go-fed/activity/streams/impl/activitystreams/property_totalitems"
propertyunits "github.com/go-fed/activity/streams/impl/activitystreams/property_units"
propertyupdated "github.com/go-fed/activity/streams/impl/activitystreams/property_updated"
propertyurl "github.com/go-fed/activity/streams/impl/activitystreams/property_url"
propertywidth "github.com/go-fed/activity/streams/impl/activitystreams/property_width"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewActivityStreamsActivityStreamsAccuracyProperty creates a new
// ActivityStreamsAccuracyProperty
func NewActivityStreamsAccuracyProperty() vocab.ActivityStreamsAccuracyProperty {
return propertyaccuracy.NewActivityStreamsAccuracyProperty()
}
// NewActivityStreamsActivityStreamsActorProperty creates a new
// ActivityStreamsActorProperty
func NewActivityStreamsActorProperty() vocab.ActivityStreamsActorProperty {
return propertyactor.NewActivityStreamsActorProperty()
}
// NewActivityStreamsActivityStreamsAltitudeProperty creates a new
// ActivityStreamsAltitudeProperty
func NewActivityStreamsAltitudeProperty() vocab.ActivityStreamsAltitudeProperty {
return propertyaltitude.NewActivityStreamsAltitudeProperty()
}
// NewActivityStreamsActivityStreamsAnyOfProperty creates a new
// ActivityStreamsAnyOfProperty
func NewActivityStreamsAnyOfProperty() vocab.ActivityStreamsAnyOfProperty {
return propertyanyof.NewActivityStreamsAnyOfProperty()
}
// NewActivityStreamsActivityStreamsAttachmentProperty creates a new
// ActivityStreamsAttachmentProperty
func NewActivityStreamsAttachmentProperty() vocab.ActivityStreamsAttachmentProperty {
return propertyattachment.NewActivityStreamsAttachmentProperty()
}
// NewActivityStreamsActivityStreamsAttributedToProperty creates a new
// ActivityStreamsAttributedToProperty
func NewActivityStreamsAttributedToProperty() vocab.ActivityStreamsAttributedToProperty {
return propertyattributedto.NewActivityStreamsAttributedToProperty()
}
// NewActivityStreamsActivityStreamsAudienceProperty creates a new
// ActivityStreamsAudienceProperty
func NewActivityStreamsAudienceProperty() vocab.ActivityStreamsAudienceProperty {
return propertyaudience.NewActivityStreamsAudienceProperty()
}
// NewActivityStreamsActivityStreamsBccProperty creates a new
// ActivityStreamsBccProperty
func NewActivityStreamsBccProperty() vocab.ActivityStreamsBccProperty {
return propertybcc.NewActivityStreamsBccProperty()
}
// NewActivityStreamsActivityStreamsBtoProperty creates a new
// ActivityStreamsBtoProperty
func NewActivityStreamsBtoProperty() vocab.ActivityStreamsBtoProperty {
return propertybto.NewActivityStreamsBtoProperty()
}
// NewActivityStreamsActivityStreamsCcProperty creates a new
// ActivityStreamsCcProperty
func NewActivityStreamsCcProperty() vocab.ActivityStreamsCcProperty {
return propertycc.NewActivityStreamsCcProperty()
}
// NewActivityStreamsActivityStreamsClosedProperty creates a new
// ActivityStreamsClosedProperty
func NewActivityStreamsClosedProperty() vocab.ActivityStreamsClosedProperty {
return propertyclosed.NewActivityStreamsClosedProperty()
}
// NewActivityStreamsActivityStreamsContentProperty creates a new
// ActivityStreamsContentProperty
func NewActivityStreamsContentProperty() vocab.ActivityStreamsContentProperty {
return propertycontent.NewActivityStreamsContentProperty()
}
// NewActivityStreamsActivityStreamsContextProperty creates a new
// ActivityStreamsContextProperty
func NewActivityStreamsContextProperty() vocab.ActivityStreamsContextProperty {
return propertycontext.NewActivityStreamsContextProperty()
}
// NewActivityStreamsActivityStreamsCurrentProperty creates a new
// ActivityStreamsCurrentProperty
func NewActivityStreamsCurrentProperty() vocab.ActivityStreamsCurrentProperty {
return propertycurrent.NewActivityStreamsCurrentProperty()
}
// NewActivityStreamsActivityStreamsDeletedProperty creates a new
// ActivityStreamsDeletedProperty
func NewActivityStreamsDeletedProperty() vocab.ActivityStreamsDeletedProperty {
return propertydeleted.NewActivityStreamsDeletedProperty()
}
// NewActivityStreamsActivityStreamsDescribesProperty creates a new
// ActivityStreamsDescribesProperty
func NewActivityStreamsDescribesProperty() vocab.ActivityStreamsDescribesProperty {
return propertydescribes.NewActivityStreamsDescribesProperty()
}
// NewActivityStreamsActivityStreamsDurationProperty creates a new
// ActivityStreamsDurationProperty
func NewActivityStreamsDurationProperty() vocab.ActivityStreamsDurationProperty {
return propertyduration.NewActivityStreamsDurationProperty()
}
// NewActivityStreamsActivityStreamsEndTimeProperty creates a new
// ActivityStreamsEndTimeProperty
func NewActivityStreamsEndTimeProperty() vocab.ActivityStreamsEndTimeProperty {
return propertyendtime.NewActivityStreamsEndTimeProperty()
}
// NewActivityStreamsActivityStreamsFirstProperty creates a new
// ActivityStreamsFirstProperty
func NewActivityStreamsFirstProperty() vocab.ActivityStreamsFirstProperty {
return propertyfirst.NewActivityStreamsFirstProperty()
}
// NewActivityStreamsActivityStreamsFollowersProperty creates a new
// ActivityStreamsFollowersProperty
func NewActivityStreamsFollowersProperty() vocab.ActivityStreamsFollowersProperty {
return propertyfollowers.NewActivityStreamsFollowersProperty()
}
// NewActivityStreamsActivityStreamsFollowingProperty creates a new
// ActivityStreamsFollowingProperty
func NewActivityStreamsFollowingProperty() vocab.ActivityStreamsFollowingProperty {
return propertyfollowing.NewActivityStreamsFollowingProperty()
}
// NewActivityStreamsActivityStreamsFormerTypeProperty creates a new
// ActivityStreamsFormerTypeProperty
func NewActivityStreamsFormerTypeProperty() vocab.ActivityStreamsFormerTypeProperty {
return propertyformertype.NewActivityStreamsFormerTypeProperty()
}
// NewActivityStreamsActivityStreamsGeneratorProperty creates a new
// ActivityStreamsGeneratorProperty
func NewActivityStreamsGeneratorProperty() vocab.ActivityStreamsGeneratorProperty {
return propertygenerator.NewActivityStreamsGeneratorProperty()
}
// NewActivityStreamsActivityStreamsHeightProperty creates a new
// ActivityStreamsHeightProperty
func NewActivityStreamsHeightProperty() vocab.ActivityStreamsHeightProperty {
return propertyheight.NewActivityStreamsHeightProperty()
}
// NewActivityStreamsActivityStreamsHrefProperty creates a new
// ActivityStreamsHrefProperty
func NewActivityStreamsHrefProperty() vocab.ActivityStreamsHrefProperty {
return propertyhref.NewActivityStreamsHrefProperty()
}
// NewActivityStreamsActivityStreamsHreflangProperty creates a new
// ActivityStreamsHreflangProperty
func NewActivityStreamsHreflangProperty() vocab.ActivityStreamsHreflangProperty {
return propertyhreflang.NewActivityStreamsHreflangProperty()
}
// NewActivityStreamsActivityStreamsIconProperty creates a new
// ActivityStreamsIconProperty
func NewActivityStreamsIconProperty() vocab.ActivityStreamsIconProperty {
return propertyicon.NewActivityStreamsIconProperty()
}
// NewActivityStreamsActivityStreamsImageProperty creates a new
// ActivityStreamsImageProperty
func NewActivityStreamsImageProperty() vocab.ActivityStreamsImageProperty {
return propertyimage.NewActivityStreamsImageProperty()
}
// NewActivityStreamsActivityStreamsInReplyToProperty creates a new
// ActivityStreamsInReplyToProperty
func NewActivityStreamsInReplyToProperty() vocab.ActivityStreamsInReplyToProperty {
return propertyinreplyto.NewActivityStreamsInReplyToProperty()
}
// NewActivityStreamsActivityStreamsInboxProperty creates a new
// ActivityStreamsInboxProperty
func NewActivityStreamsInboxProperty() vocab.ActivityStreamsInboxProperty {
return propertyinbox.NewActivityStreamsInboxProperty()
}
// NewActivityStreamsActivityStreamsInstrumentProperty creates a new
// ActivityStreamsInstrumentProperty
func NewActivityStreamsInstrumentProperty() vocab.ActivityStreamsInstrumentProperty {
return propertyinstrument.NewActivityStreamsInstrumentProperty()
}
// NewActivityStreamsActivityStreamsItemsProperty creates a new
// ActivityStreamsItemsProperty
func NewActivityStreamsItemsProperty() vocab.ActivityStreamsItemsProperty {
return propertyitems.NewActivityStreamsItemsProperty()
}
// NewActivityStreamsActivityStreamsLastProperty creates a new
// ActivityStreamsLastProperty
func NewActivityStreamsLastProperty() vocab.ActivityStreamsLastProperty {
return propertylast.NewActivityStreamsLastProperty()
}
// NewActivityStreamsActivityStreamsLatitudeProperty creates a new
// ActivityStreamsLatitudeProperty
func NewActivityStreamsLatitudeProperty() vocab.ActivityStreamsLatitudeProperty {
return propertylatitude.NewActivityStreamsLatitudeProperty()
}
// NewActivityStreamsActivityStreamsLikedProperty creates a new
// ActivityStreamsLikedProperty
func NewActivityStreamsLikedProperty() vocab.ActivityStreamsLikedProperty {
return propertyliked.NewActivityStreamsLikedProperty()
}
// NewActivityStreamsActivityStreamsLikesProperty creates a new
// ActivityStreamsLikesProperty
func NewActivityStreamsLikesProperty() vocab.ActivityStreamsLikesProperty {
return propertylikes.NewActivityStreamsLikesProperty()
}
// NewActivityStreamsActivityStreamsLocationProperty creates a new
// ActivityStreamsLocationProperty
func NewActivityStreamsLocationProperty() vocab.ActivityStreamsLocationProperty {
return propertylocation.NewActivityStreamsLocationProperty()
}
// NewActivityStreamsActivityStreamsLongitudeProperty creates a new
// ActivityStreamsLongitudeProperty
func NewActivityStreamsLongitudeProperty() vocab.ActivityStreamsLongitudeProperty {
return propertylongitude.NewActivityStreamsLongitudeProperty()
}
// NewActivityStreamsActivityStreamsMediaTypeProperty creates a new
// ActivityStreamsMediaTypeProperty
func NewActivityStreamsMediaTypeProperty() vocab.ActivityStreamsMediaTypeProperty {
return propertymediatype.NewActivityStreamsMediaTypeProperty()
}
// NewActivityStreamsActivityStreamsNameProperty creates a new
// ActivityStreamsNameProperty
func NewActivityStreamsNameProperty() vocab.ActivityStreamsNameProperty {
return propertyname.NewActivityStreamsNameProperty()
}
// NewActivityStreamsActivityStreamsNextProperty creates a new
// ActivityStreamsNextProperty
func NewActivityStreamsNextProperty() vocab.ActivityStreamsNextProperty {
return propertynext.NewActivityStreamsNextProperty()
}
// NewActivityStreamsActivityStreamsObjectProperty creates a new
// ActivityStreamsObjectProperty
func NewActivityStreamsObjectProperty() vocab.ActivityStreamsObjectProperty {
return propertyobject.NewActivityStreamsObjectProperty()
}
// NewActivityStreamsActivityStreamsOneOfProperty creates a new
// ActivityStreamsOneOfProperty
func NewActivityStreamsOneOfProperty() vocab.ActivityStreamsOneOfProperty {
return propertyoneof.NewActivityStreamsOneOfProperty()
}
// NewActivityStreamsActivityStreamsOrderedItemsProperty creates a new
// ActivityStreamsOrderedItemsProperty
func NewActivityStreamsOrderedItemsProperty() vocab.ActivityStreamsOrderedItemsProperty {
return propertyordereditems.NewActivityStreamsOrderedItemsProperty()
}
// NewActivityStreamsActivityStreamsOriginProperty creates a new
// ActivityStreamsOriginProperty
func NewActivityStreamsOriginProperty() vocab.ActivityStreamsOriginProperty {
return propertyorigin.NewActivityStreamsOriginProperty()
}
// NewActivityStreamsActivityStreamsOutboxProperty creates a new
// ActivityStreamsOutboxProperty
func NewActivityStreamsOutboxProperty() vocab.ActivityStreamsOutboxProperty {
return propertyoutbox.NewActivityStreamsOutboxProperty()
}
// NewActivityStreamsActivityStreamsPartOfProperty creates a new
// ActivityStreamsPartOfProperty
func NewActivityStreamsPartOfProperty() vocab.ActivityStreamsPartOfProperty {
return propertypartof.NewActivityStreamsPartOfProperty()
}
// NewActivityStreamsActivityStreamsPreferredUsernameProperty creates a new
// ActivityStreamsPreferredUsernameProperty
func NewActivityStreamsPreferredUsernameProperty() vocab.ActivityStreamsPreferredUsernameProperty {
return propertypreferredusername.NewActivityStreamsPreferredUsernameProperty()
}
// NewActivityStreamsActivityStreamsPrevProperty creates a new
// ActivityStreamsPrevProperty
func NewActivityStreamsPrevProperty() vocab.ActivityStreamsPrevProperty {
return propertyprev.NewActivityStreamsPrevProperty()
}
// NewActivityStreamsActivityStreamsPreviewProperty creates a new
// ActivityStreamsPreviewProperty
func NewActivityStreamsPreviewProperty() vocab.ActivityStreamsPreviewProperty {
return propertypreview.NewActivityStreamsPreviewProperty()
}
// NewActivityStreamsActivityStreamsPublishedProperty creates a new
// ActivityStreamsPublishedProperty
func NewActivityStreamsPublishedProperty() vocab.ActivityStreamsPublishedProperty {
return propertypublished.NewActivityStreamsPublishedProperty()
}
// NewActivityStreamsActivityStreamsRadiusProperty creates a new
// ActivityStreamsRadiusProperty
func NewActivityStreamsRadiusProperty() vocab.ActivityStreamsRadiusProperty {
return propertyradius.NewActivityStreamsRadiusProperty()
}
// NewActivityStreamsActivityStreamsRelProperty creates a new
// ActivityStreamsRelProperty
func NewActivityStreamsRelProperty() vocab.ActivityStreamsRelProperty {
return propertyrel.NewActivityStreamsRelProperty()
}
// NewActivityStreamsActivityStreamsRelationshipProperty creates a new
// ActivityStreamsRelationshipProperty
func NewActivityStreamsRelationshipProperty() vocab.ActivityStreamsRelationshipProperty {
return propertyrelationship.NewActivityStreamsRelationshipProperty()
}
// NewActivityStreamsActivityStreamsRepliesProperty creates a new
// ActivityStreamsRepliesProperty
func NewActivityStreamsRepliesProperty() vocab.ActivityStreamsRepliesProperty {
return propertyreplies.NewActivityStreamsRepliesProperty()
}
// NewActivityStreamsActivityStreamsResultProperty creates a new
// ActivityStreamsResultProperty
func NewActivityStreamsResultProperty() vocab.ActivityStreamsResultProperty {
return propertyresult.NewActivityStreamsResultProperty()
}
// NewActivityStreamsActivityStreamsSharesProperty creates a new
// ActivityStreamsSharesProperty
func NewActivityStreamsSharesProperty() vocab.ActivityStreamsSharesProperty {
return propertyshares.NewActivityStreamsSharesProperty()
}
// NewActivityStreamsActivityStreamsSourceProperty creates a new
// ActivityStreamsSourceProperty
func NewActivityStreamsSourceProperty() vocab.ActivityStreamsSourceProperty {
return propertysource.NewActivityStreamsSourceProperty()
}
// NewActivityStreamsActivityStreamsStartIndexProperty creates a new
// ActivityStreamsStartIndexProperty
func NewActivityStreamsStartIndexProperty() vocab.ActivityStreamsStartIndexProperty {
return propertystartindex.NewActivityStreamsStartIndexProperty()
}
// NewActivityStreamsActivityStreamsStartTimeProperty creates a new
// ActivityStreamsStartTimeProperty
func NewActivityStreamsStartTimeProperty() vocab.ActivityStreamsStartTimeProperty {
return propertystarttime.NewActivityStreamsStartTimeProperty()
}
// NewActivityStreamsActivityStreamsStreamsProperty creates a new
// ActivityStreamsStreamsProperty
func NewActivityStreamsStreamsProperty() vocab.ActivityStreamsStreamsProperty {
return propertystreams.NewActivityStreamsStreamsProperty()
}
// NewActivityStreamsActivityStreamsSubjectProperty creates a new
// ActivityStreamsSubjectProperty
func NewActivityStreamsSubjectProperty() vocab.ActivityStreamsSubjectProperty {
return propertysubject.NewActivityStreamsSubjectProperty()
}
// NewActivityStreamsActivityStreamsSummaryProperty creates a new
// ActivityStreamsSummaryProperty
func NewActivityStreamsSummaryProperty() vocab.ActivityStreamsSummaryProperty {
return propertysummary.NewActivityStreamsSummaryProperty()
}
// NewActivityStreamsActivityStreamsTagProperty creates a new
// ActivityStreamsTagProperty
func NewActivityStreamsTagProperty() vocab.ActivityStreamsTagProperty {
return propertytag.NewActivityStreamsTagProperty()
}
// NewActivityStreamsActivityStreamsTargetProperty creates a new
// ActivityStreamsTargetProperty
func NewActivityStreamsTargetProperty() vocab.ActivityStreamsTargetProperty {
return propertytarget.NewActivityStreamsTargetProperty()
}
// NewActivityStreamsActivityStreamsToProperty creates a new
// ActivityStreamsToProperty
func NewActivityStreamsToProperty() vocab.ActivityStreamsToProperty {
return propertyto.NewActivityStreamsToProperty()
}
// NewActivityStreamsActivityStreamsTotalItemsProperty creates a new
// ActivityStreamsTotalItemsProperty
func NewActivityStreamsTotalItemsProperty() vocab.ActivityStreamsTotalItemsProperty {
return propertytotalitems.NewActivityStreamsTotalItemsProperty()
}
// NewActivityStreamsActivityStreamsUnitsProperty creates a new
// ActivityStreamsUnitsProperty
func NewActivityStreamsUnitsProperty() vocab.ActivityStreamsUnitsProperty {
return propertyunits.NewActivityStreamsUnitsProperty()
}
// NewActivityStreamsActivityStreamsUpdatedProperty creates a new
// ActivityStreamsUpdatedProperty
func NewActivityStreamsUpdatedProperty() vocab.ActivityStreamsUpdatedProperty {
return propertyupdated.NewActivityStreamsUpdatedProperty()
}
// NewActivityStreamsActivityStreamsUrlProperty creates a new
// ActivityStreamsUrlProperty
func NewActivityStreamsUrlProperty() vocab.ActivityStreamsUrlProperty {
return propertyurl.NewActivityStreamsUrlProperty()
}
// NewActivityStreamsActivityStreamsWidthProperty creates a new
// ActivityStreamsWidthProperty
func NewActivityStreamsWidthProperty() vocab.ActivityStreamsWidthProperty {
return propertywidth.NewActivityStreamsWidthProperty()
}

View file

@ -0,0 +1,334 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_accept"
typeactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_activity"
typeadd "github.com/go-fed/activity/streams/impl/activitystreams/type_add"
typeannounce "github.com/go-fed/activity/streams/impl/activitystreams/type_announce"
typeapplication "github.com/go-fed/activity/streams/impl/activitystreams/type_application"
typearrive "github.com/go-fed/activity/streams/impl/activitystreams/type_arrive"
typearticle "github.com/go-fed/activity/streams/impl/activitystreams/type_article"
typeaudio "github.com/go-fed/activity/streams/impl/activitystreams/type_audio"
typeblock "github.com/go-fed/activity/streams/impl/activitystreams/type_block"
typecollection "github.com/go-fed/activity/streams/impl/activitystreams/type_collection"
typecollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_collectionpage"
typecreate "github.com/go-fed/activity/streams/impl/activitystreams/type_create"
typedelete "github.com/go-fed/activity/streams/impl/activitystreams/type_delete"
typedislike "github.com/go-fed/activity/streams/impl/activitystreams/type_dislike"
typedocument "github.com/go-fed/activity/streams/impl/activitystreams/type_document"
typeevent "github.com/go-fed/activity/streams/impl/activitystreams/type_event"
typeflag "github.com/go-fed/activity/streams/impl/activitystreams/type_flag"
typefollow "github.com/go-fed/activity/streams/impl/activitystreams/type_follow"
typegroup "github.com/go-fed/activity/streams/impl/activitystreams/type_group"
typeignore "github.com/go-fed/activity/streams/impl/activitystreams/type_ignore"
typeimage "github.com/go-fed/activity/streams/impl/activitystreams/type_image"
typeintransitiveactivity "github.com/go-fed/activity/streams/impl/activitystreams/type_intransitiveactivity"
typeinvite "github.com/go-fed/activity/streams/impl/activitystreams/type_invite"
typejoin "github.com/go-fed/activity/streams/impl/activitystreams/type_join"
typeleave "github.com/go-fed/activity/streams/impl/activitystreams/type_leave"
typelike "github.com/go-fed/activity/streams/impl/activitystreams/type_like"
typelink "github.com/go-fed/activity/streams/impl/activitystreams/type_link"
typelisten "github.com/go-fed/activity/streams/impl/activitystreams/type_listen"
typemention "github.com/go-fed/activity/streams/impl/activitystreams/type_mention"
typemove "github.com/go-fed/activity/streams/impl/activitystreams/type_move"
typenote "github.com/go-fed/activity/streams/impl/activitystreams/type_note"
typeobject "github.com/go-fed/activity/streams/impl/activitystreams/type_object"
typeoffer "github.com/go-fed/activity/streams/impl/activitystreams/type_offer"
typeorderedcollection "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollection"
typeorderedcollectionpage "github.com/go-fed/activity/streams/impl/activitystreams/type_orderedcollectionpage"
typeorganization "github.com/go-fed/activity/streams/impl/activitystreams/type_organization"
typepage "github.com/go-fed/activity/streams/impl/activitystreams/type_page"
typeperson "github.com/go-fed/activity/streams/impl/activitystreams/type_person"
typeplace "github.com/go-fed/activity/streams/impl/activitystreams/type_place"
typeprofile "github.com/go-fed/activity/streams/impl/activitystreams/type_profile"
typequestion "github.com/go-fed/activity/streams/impl/activitystreams/type_question"
typeread "github.com/go-fed/activity/streams/impl/activitystreams/type_read"
typereject "github.com/go-fed/activity/streams/impl/activitystreams/type_reject"
typerelationship "github.com/go-fed/activity/streams/impl/activitystreams/type_relationship"
typeremove "github.com/go-fed/activity/streams/impl/activitystreams/type_remove"
typeservice "github.com/go-fed/activity/streams/impl/activitystreams/type_service"
typetentativeaccept "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativeaccept"
typetentativereject "github.com/go-fed/activity/streams/impl/activitystreams/type_tentativereject"
typetombstone "github.com/go-fed/activity/streams/impl/activitystreams/type_tombstone"
typetravel "github.com/go-fed/activity/streams/impl/activitystreams/type_travel"
typeundo "github.com/go-fed/activity/streams/impl/activitystreams/type_undo"
typeupdate "github.com/go-fed/activity/streams/impl/activitystreams/type_update"
typevideo "github.com/go-fed/activity/streams/impl/activitystreams/type_video"
typeview "github.com/go-fed/activity/streams/impl/activitystreams/type_view"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewActivityStreamsAccept creates a new ActivityStreamsAccept
func NewActivityStreamsAccept() vocab.ActivityStreamsAccept {
return typeaccept.NewActivityStreamsAccept()
}
// NewActivityStreamsActivity creates a new ActivityStreamsActivity
func NewActivityStreamsActivity() vocab.ActivityStreamsActivity {
return typeactivity.NewActivityStreamsActivity()
}
// NewActivityStreamsAdd creates a new ActivityStreamsAdd
func NewActivityStreamsAdd() vocab.ActivityStreamsAdd {
return typeadd.NewActivityStreamsAdd()
}
// NewActivityStreamsAnnounce creates a new ActivityStreamsAnnounce
func NewActivityStreamsAnnounce() vocab.ActivityStreamsAnnounce {
return typeannounce.NewActivityStreamsAnnounce()
}
// NewActivityStreamsApplication creates a new ActivityStreamsApplication
func NewActivityStreamsApplication() vocab.ActivityStreamsApplication {
return typeapplication.NewActivityStreamsApplication()
}
// NewActivityStreamsArrive creates a new ActivityStreamsArrive
func NewActivityStreamsArrive() vocab.ActivityStreamsArrive {
return typearrive.NewActivityStreamsArrive()
}
// NewActivityStreamsArticle creates a new ActivityStreamsArticle
func NewActivityStreamsArticle() vocab.ActivityStreamsArticle {
return typearticle.NewActivityStreamsArticle()
}
// NewActivityStreamsAudio creates a new ActivityStreamsAudio
func NewActivityStreamsAudio() vocab.ActivityStreamsAudio {
return typeaudio.NewActivityStreamsAudio()
}
// NewActivityStreamsBlock creates a new ActivityStreamsBlock
func NewActivityStreamsBlock() vocab.ActivityStreamsBlock {
return typeblock.NewActivityStreamsBlock()
}
// NewActivityStreamsCollection creates a new ActivityStreamsCollection
func NewActivityStreamsCollection() vocab.ActivityStreamsCollection {
return typecollection.NewActivityStreamsCollection()
}
// NewActivityStreamsCollectionPage creates a new ActivityStreamsCollectionPage
func NewActivityStreamsCollectionPage() vocab.ActivityStreamsCollectionPage {
return typecollectionpage.NewActivityStreamsCollectionPage()
}
// NewActivityStreamsCreate creates a new ActivityStreamsCreate
func NewActivityStreamsCreate() vocab.ActivityStreamsCreate {
return typecreate.NewActivityStreamsCreate()
}
// NewActivityStreamsDelete creates a new ActivityStreamsDelete
func NewActivityStreamsDelete() vocab.ActivityStreamsDelete {
return typedelete.NewActivityStreamsDelete()
}
// NewActivityStreamsDislike creates a new ActivityStreamsDislike
func NewActivityStreamsDislike() vocab.ActivityStreamsDislike {
return typedislike.NewActivityStreamsDislike()
}
// NewActivityStreamsDocument creates a new ActivityStreamsDocument
func NewActivityStreamsDocument() vocab.ActivityStreamsDocument {
return typedocument.NewActivityStreamsDocument()
}
// NewActivityStreamsEvent creates a new ActivityStreamsEvent
func NewActivityStreamsEvent() vocab.ActivityStreamsEvent {
return typeevent.NewActivityStreamsEvent()
}
// NewActivityStreamsFlag creates a new ActivityStreamsFlag
func NewActivityStreamsFlag() vocab.ActivityStreamsFlag {
return typeflag.NewActivityStreamsFlag()
}
// NewActivityStreamsFollow creates a new ActivityStreamsFollow
func NewActivityStreamsFollow() vocab.ActivityStreamsFollow {
return typefollow.NewActivityStreamsFollow()
}
// NewActivityStreamsGroup creates a new ActivityStreamsGroup
func NewActivityStreamsGroup() vocab.ActivityStreamsGroup {
return typegroup.NewActivityStreamsGroup()
}
// NewActivityStreamsIgnore creates a new ActivityStreamsIgnore
func NewActivityStreamsIgnore() vocab.ActivityStreamsIgnore {
return typeignore.NewActivityStreamsIgnore()
}
// NewActivityStreamsImage creates a new ActivityStreamsImage
func NewActivityStreamsImage() vocab.ActivityStreamsImage {
return typeimage.NewActivityStreamsImage()
}
// NewActivityStreamsIntransitiveActivity creates a new
// ActivityStreamsIntransitiveActivity
func NewActivityStreamsIntransitiveActivity() vocab.ActivityStreamsIntransitiveActivity {
return typeintransitiveactivity.NewActivityStreamsIntransitiveActivity()
}
// NewActivityStreamsInvite creates a new ActivityStreamsInvite
func NewActivityStreamsInvite() vocab.ActivityStreamsInvite {
return typeinvite.NewActivityStreamsInvite()
}
// NewActivityStreamsJoin creates a new ActivityStreamsJoin
func NewActivityStreamsJoin() vocab.ActivityStreamsJoin {
return typejoin.NewActivityStreamsJoin()
}
// NewActivityStreamsLeave creates a new ActivityStreamsLeave
func NewActivityStreamsLeave() vocab.ActivityStreamsLeave {
return typeleave.NewActivityStreamsLeave()
}
// NewActivityStreamsLike creates a new ActivityStreamsLike
func NewActivityStreamsLike() vocab.ActivityStreamsLike {
return typelike.NewActivityStreamsLike()
}
// NewActivityStreamsLink creates a new ActivityStreamsLink
func NewActivityStreamsLink() vocab.ActivityStreamsLink {
return typelink.NewActivityStreamsLink()
}
// NewActivityStreamsListen creates a new ActivityStreamsListen
func NewActivityStreamsListen() vocab.ActivityStreamsListen {
return typelisten.NewActivityStreamsListen()
}
// NewActivityStreamsMention creates a new ActivityStreamsMention
func NewActivityStreamsMention() vocab.ActivityStreamsMention {
return typemention.NewActivityStreamsMention()
}
// NewActivityStreamsMove creates a new ActivityStreamsMove
func NewActivityStreamsMove() vocab.ActivityStreamsMove {
return typemove.NewActivityStreamsMove()
}
// NewActivityStreamsNote creates a new ActivityStreamsNote
func NewActivityStreamsNote() vocab.ActivityStreamsNote {
return typenote.NewActivityStreamsNote()
}
// NewActivityStreamsObject creates a new ActivityStreamsObject
func NewActivityStreamsObject() vocab.ActivityStreamsObject {
return typeobject.NewActivityStreamsObject()
}
// NewActivityStreamsOffer creates a new ActivityStreamsOffer
func NewActivityStreamsOffer() vocab.ActivityStreamsOffer {
return typeoffer.NewActivityStreamsOffer()
}
// NewActivityStreamsOrderedCollection creates a new
// ActivityStreamsOrderedCollection
func NewActivityStreamsOrderedCollection() vocab.ActivityStreamsOrderedCollection {
return typeorderedcollection.NewActivityStreamsOrderedCollection()
}
// NewActivityStreamsOrderedCollectionPage creates a new
// ActivityStreamsOrderedCollectionPage
func NewActivityStreamsOrderedCollectionPage() vocab.ActivityStreamsOrderedCollectionPage {
return typeorderedcollectionpage.NewActivityStreamsOrderedCollectionPage()
}
// NewActivityStreamsOrganization creates a new ActivityStreamsOrganization
func NewActivityStreamsOrganization() vocab.ActivityStreamsOrganization {
return typeorganization.NewActivityStreamsOrganization()
}
// NewActivityStreamsPage creates a new ActivityStreamsPage
func NewActivityStreamsPage() vocab.ActivityStreamsPage {
return typepage.NewActivityStreamsPage()
}
// NewActivityStreamsPerson creates a new ActivityStreamsPerson
func NewActivityStreamsPerson() vocab.ActivityStreamsPerson {
return typeperson.NewActivityStreamsPerson()
}
// NewActivityStreamsPlace creates a new ActivityStreamsPlace
func NewActivityStreamsPlace() vocab.ActivityStreamsPlace {
return typeplace.NewActivityStreamsPlace()
}
// NewActivityStreamsProfile creates a new ActivityStreamsProfile
func NewActivityStreamsProfile() vocab.ActivityStreamsProfile {
return typeprofile.NewActivityStreamsProfile()
}
// NewActivityStreamsQuestion creates a new ActivityStreamsQuestion
func NewActivityStreamsQuestion() vocab.ActivityStreamsQuestion {
return typequestion.NewActivityStreamsQuestion()
}
// NewActivityStreamsRead creates a new ActivityStreamsRead
func NewActivityStreamsRead() vocab.ActivityStreamsRead {
return typeread.NewActivityStreamsRead()
}
// NewActivityStreamsReject creates a new ActivityStreamsReject
func NewActivityStreamsReject() vocab.ActivityStreamsReject {
return typereject.NewActivityStreamsReject()
}
// NewActivityStreamsRelationship creates a new ActivityStreamsRelationship
func NewActivityStreamsRelationship() vocab.ActivityStreamsRelationship {
return typerelationship.NewActivityStreamsRelationship()
}
// NewActivityStreamsRemove creates a new ActivityStreamsRemove
func NewActivityStreamsRemove() vocab.ActivityStreamsRemove {
return typeremove.NewActivityStreamsRemove()
}
// NewActivityStreamsService creates a new ActivityStreamsService
func NewActivityStreamsService() vocab.ActivityStreamsService {
return typeservice.NewActivityStreamsService()
}
// NewActivityStreamsTentativeAccept creates a new ActivityStreamsTentativeAccept
func NewActivityStreamsTentativeAccept() vocab.ActivityStreamsTentativeAccept {
return typetentativeaccept.NewActivityStreamsTentativeAccept()
}
// NewActivityStreamsTentativeReject creates a new ActivityStreamsTentativeReject
func NewActivityStreamsTentativeReject() vocab.ActivityStreamsTentativeReject {
return typetentativereject.NewActivityStreamsTentativeReject()
}
// NewActivityStreamsTombstone creates a new ActivityStreamsTombstone
func NewActivityStreamsTombstone() vocab.ActivityStreamsTombstone {
return typetombstone.NewActivityStreamsTombstone()
}
// NewActivityStreamsTravel creates a new ActivityStreamsTravel
func NewActivityStreamsTravel() vocab.ActivityStreamsTravel {
return typetravel.NewActivityStreamsTravel()
}
// NewActivityStreamsUndo creates a new ActivityStreamsUndo
func NewActivityStreamsUndo() vocab.ActivityStreamsUndo {
return typeundo.NewActivityStreamsUndo()
}
// NewActivityStreamsUpdate creates a new ActivityStreamsUpdate
func NewActivityStreamsUpdate() vocab.ActivityStreamsUpdate {
return typeupdate.NewActivityStreamsUpdate()
}
// NewActivityStreamsVideo creates a new ActivityStreamsVideo
func NewActivityStreamsVideo() vocab.ActivityStreamsVideo {
return typevideo.NewActivityStreamsVideo()
}
// NewActivityStreamsView creates a new ActivityStreamsView
func NewActivityStreamsView() vocab.ActivityStreamsView {
return typeview.NewActivityStreamsView()
}

View file

@ -0,0 +1,49 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typebranch "github.com/go-fed/activity/streams/impl/forgefed/type_branch"
typecommit "github.com/go-fed/activity/streams/impl/forgefed/type_commit"
typepush "github.com/go-fed/activity/streams/impl/forgefed/type_push"
typerepository "github.com/go-fed/activity/streams/impl/forgefed/type_repository"
typeticket "github.com/go-fed/activity/streams/impl/forgefed/type_ticket"
typeticketdependency "github.com/go-fed/activity/streams/impl/forgefed/type_ticketdependency"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ForgeFedBranchIsDisjointWith returns true if Branch is disjoint with the
// other's type.
func ForgeFedBranchIsDisjointWith(other vocab.Type) bool {
return typebranch.BranchIsDisjointWith(other)
}
// ForgeFedCommitIsDisjointWith returns true if Commit is disjoint with the
// other's type.
func ForgeFedCommitIsDisjointWith(other vocab.Type) bool {
return typecommit.CommitIsDisjointWith(other)
}
// ForgeFedPushIsDisjointWith returns true if Push is disjoint with the other's
// type.
func ForgeFedPushIsDisjointWith(other vocab.Type) bool {
return typepush.PushIsDisjointWith(other)
}
// ForgeFedRepositoryIsDisjointWith returns true if Repository is disjoint with
// the other's type.
func ForgeFedRepositoryIsDisjointWith(other vocab.Type) bool {
return typerepository.RepositoryIsDisjointWith(other)
}
// ForgeFedTicketIsDisjointWith returns true if Ticket is disjoint with the
// other's type.
func ForgeFedTicketIsDisjointWith(other vocab.Type) bool {
return typeticket.TicketIsDisjointWith(other)
}
// ForgeFedTicketDependencyIsDisjointWith returns true if TicketDependency is
// disjoint with the other's type.
func ForgeFedTicketDependencyIsDisjointWith(other vocab.Type) bool {
return typeticketdependency.TicketDependencyIsDisjointWith(other)
}

View file

@ -0,0 +1,55 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typebranch "github.com/go-fed/activity/streams/impl/forgefed/type_branch"
typecommit "github.com/go-fed/activity/streams/impl/forgefed/type_commit"
typepush "github.com/go-fed/activity/streams/impl/forgefed/type_push"
typerepository "github.com/go-fed/activity/streams/impl/forgefed/type_repository"
typeticket "github.com/go-fed/activity/streams/impl/forgefed/type_ticket"
typeticketdependency "github.com/go-fed/activity/streams/impl/forgefed/type_ticketdependency"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ForgeFedBranchIsExtendedBy returns true if the other's type extends from
// Branch. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ForgeFedBranchIsExtendedBy(other vocab.Type) bool {
return typebranch.BranchIsExtendedBy(other)
}
// ForgeFedCommitIsExtendedBy returns true if the other's type extends from
// Commit. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ForgeFedCommitIsExtendedBy(other vocab.Type) bool {
return typecommit.CommitIsExtendedBy(other)
}
// ForgeFedPushIsExtendedBy returns true if the other's type extends from Push.
// Note that it returns false if the types are the same; see the "IsOrExtends"
// variant instead.
func ForgeFedPushIsExtendedBy(other vocab.Type) bool {
return typepush.PushIsExtendedBy(other)
}
// ForgeFedRepositoryIsExtendedBy returns true if the other's type extends from
// Repository. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ForgeFedRepositoryIsExtendedBy(other vocab.Type) bool {
return typerepository.RepositoryIsExtendedBy(other)
}
// ForgeFedTicketIsExtendedBy returns true if the other's type extends from
// Ticket. Note that it returns false if the types are the same; see the
// "IsOrExtends" variant instead.
func ForgeFedTicketIsExtendedBy(other vocab.Type) bool {
return typeticket.TicketIsExtendedBy(other)
}
// ForgeFedTicketDependencyIsExtendedBy returns true if the other's type extends
// from TicketDependency. Note that it returns false if the types are the
// same; see the "IsOrExtends" variant instead.
func ForgeFedTicketDependencyIsExtendedBy(other vocab.Type) bool {
return typeticketdependency.TicketDependencyIsExtendedBy(other)
}

View file

@ -0,0 +1,48 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typebranch "github.com/go-fed/activity/streams/impl/forgefed/type_branch"
typecommit "github.com/go-fed/activity/streams/impl/forgefed/type_commit"
typepush "github.com/go-fed/activity/streams/impl/forgefed/type_push"
typerepository "github.com/go-fed/activity/streams/impl/forgefed/type_repository"
typeticket "github.com/go-fed/activity/streams/impl/forgefed/type_ticket"
typeticketdependency "github.com/go-fed/activity/streams/impl/forgefed/type_ticketdependency"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ForgeFedForgeFedBranchExtends returns true if Branch extends from the other's
// type.
func ForgeFedForgeFedBranchExtends(other vocab.Type) bool {
return typebranch.ForgeFedBranchExtends(other)
}
// ForgeFedForgeFedCommitExtends returns true if Commit extends from the other's
// type.
func ForgeFedForgeFedCommitExtends(other vocab.Type) bool {
return typecommit.ForgeFedCommitExtends(other)
}
// ForgeFedForgeFedPushExtends returns true if Push extends from the other's type.
func ForgeFedForgeFedPushExtends(other vocab.Type) bool {
return typepush.ForgeFedPushExtends(other)
}
// ForgeFedForgeFedRepositoryExtends returns true if Repository extends from the
// other's type.
func ForgeFedForgeFedRepositoryExtends(other vocab.Type) bool {
return typerepository.ForgeFedRepositoryExtends(other)
}
// ForgeFedForgeFedTicketExtends returns true if Ticket extends from the other's
// type.
func ForgeFedForgeFedTicketExtends(other vocab.Type) bool {
return typeticket.ForgeFedTicketExtends(other)
}
// ForgeFedForgeFedTicketDependencyExtends returns true if TicketDependency
// extends from the other's type.
func ForgeFedForgeFedTicketDependencyExtends(other vocab.Type) bool {
return typeticketdependency.ForgeFedTicketDependencyExtends(other)
}

View file

@ -0,0 +1,49 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typebranch "github.com/go-fed/activity/streams/impl/forgefed/type_branch"
typecommit "github.com/go-fed/activity/streams/impl/forgefed/type_commit"
typepush "github.com/go-fed/activity/streams/impl/forgefed/type_push"
typerepository "github.com/go-fed/activity/streams/impl/forgefed/type_repository"
typeticket "github.com/go-fed/activity/streams/impl/forgefed/type_ticket"
typeticketdependency "github.com/go-fed/activity/streams/impl/forgefed/type_ticketdependency"
vocab "github.com/go-fed/activity/streams/vocab"
)
// IsOrExtendsForgeFedBranch returns true if the other provided type is the Branch
// type or extends from the Branch type.
func IsOrExtendsForgeFedBranch(other vocab.Type) bool {
return typebranch.IsOrExtendsBranch(other)
}
// IsOrExtendsForgeFedCommit returns true if the other provided type is the Commit
// type or extends from the Commit type.
func IsOrExtendsForgeFedCommit(other vocab.Type) bool {
return typecommit.IsOrExtendsCommit(other)
}
// IsOrExtendsForgeFedPush returns true if the other provided type is the Push
// type or extends from the Push type.
func IsOrExtendsForgeFedPush(other vocab.Type) bool {
return typepush.IsOrExtendsPush(other)
}
// IsOrExtendsForgeFedRepository returns true if the other provided type is the
// Repository type or extends from the Repository type.
func IsOrExtendsForgeFedRepository(other vocab.Type) bool {
return typerepository.IsOrExtendsRepository(other)
}
// IsOrExtendsForgeFedTicket returns true if the other provided type is the Ticket
// type or extends from the Ticket type.
func IsOrExtendsForgeFedTicket(other vocab.Type) bool {
return typeticket.IsOrExtendsTicket(other)
}
// IsOrExtendsForgeFedTicketDependency returns true if the other provided type is
// the TicketDependency type or extends from the TicketDependency type.
func IsOrExtendsForgeFedTicketDependency(other vocab.Type) bool {
return typeticketdependency.IsOrExtendsTicketDependency(other)
}

View file

@ -0,0 +1,126 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
propertyassignedto "github.com/go-fed/activity/streams/impl/forgefed/property_assignedto"
propertycommitted "github.com/go-fed/activity/streams/impl/forgefed/property_committed"
propertycommittedby "github.com/go-fed/activity/streams/impl/forgefed/property_committedby"
propertydependants "github.com/go-fed/activity/streams/impl/forgefed/property_dependants"
propertydependedby "github.com/go-fed/activity/streams/impl/forgefed/property_dependedby"
propertydependencies "github.com/go-fed/activity/streams/impl/forgefed/property_dependencies"
propertydependson "github.com/go-fed/activity/streams/impl/forgefed/property_dependson"
propertydescription "github.com/go-fed/activity/streams/impl/forgefed/property_description"
propertyearlyitems "github.com/go-fed/activity/streams/impl/forgefed/property_earlyitems"
propertyfilesadded "github.com/go-fed/activity/streams/impl/forgefed/property_filesadded"
propertyfilesmodified "github.com/go-fed/activity/streams/impl/forgefed/property_filesmodified"
propertyfilesremoved "github.com/go-fed/activity/streams/impl/forgefed/property_filesremoved"
propertyforks "github.com/go-fed/activity/streams/impl/forgefed/property_forks"
propertyhash "github.com/go-fed/activity/streams/impl/forgefed/property_hash"
propertyisresolved "github.com/go-fed/activity/streams/impl/forgefed/property_isresolved"
propertyref "github.com/go-fed/activity/streams/impl/forgefed/property_ref"
propertyteam "github.com/go-fed/activity/streams/impl/forgefed/property_team"
propertyticketstrackedby "github.com/go-fed/activity/streams/impl/forgefed/property_ticketstrackedby"
propertytracksticketsfor "github.com/go-fed/activity/streams/impl/forgefed/property_tracksticketsfor"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewForgeFedForgeFedAssignedToProperty creates a new ForgeFedAssignedToProperty
func NewForgeFedAssignedToProperty() vocab.ForgeFedAssignedToProperty {
return propertyassignedto.NewForgeFedAssignedToProperty()
}
// NewForgeFedForgeFedCommittedProperty creates a new ForgeFedCommittedProperty
func NewForgeFedCommittedProperty() vocab.ForgeFedCommittedProperty {
return propertycommitted.NewForgeFedCommittedProperty()
}
// NewForgeFedForgeFedCommittedByProperty creates a new ForgeFedCommittedByProperty
func NewForgeFedCommittedByProperty() vocab.ForgeFedCommittedByProperty {
return propertycommittedby.NewForgeFedCommittedByProperty()
}
// NewForgeFedForgeFedDependantsProperty creates a new ForgeFedDependantsProperty
func NewForgeFedDependantsProperty() vocab.ForgeFedDependantsProperty {
return propertydependants.NewForgeFedDependantsProperty()
}
// NewForgeFedForgeFedDependedByProperty creates a new ForgeFedDependedByProperty
func NewForgeFedDependedByProperty() vocab.ForgeFedDependedByProperty {
return propertydependedby.NewForgeFedDependedByProperty()
}
// NewForgeFedForgeFedDependenciesProperty creates a new
// ForgeFedDependenciesProperty
func NewForgeFedDependenciesProperty() vocab.ForgeFedDependenciesProperty {
return propertydependencies.NewForgeFedDependenciesProperty()
}
// NewForgeFedForgeFedDependsOnProperty creates a new ForgeFedDependsOnProperty
func NewForgeFedDependsOnProperty() vocab.ForgeFedDependsOnProperty {
return propertydependson.NewForgeFedDependsOnProperty()
}
// NewForgeFedForgeFedDescriptionProperty creates a new ForgeFedDescriptionProperty
func NewForgeFedDescriptionProperty() vocab.ForgeFedDescriptionProperty {
return propertydescription.NewForgeFedDescriptionProperty()
}
// NewForgeFedForgeFedEarlyItemsProperty creates a new ForgeFedEarlyItemsProperty
func NewForgeFedEarlyItemsProperty() vocab.ForgeFedEarlyItemsProperty {
return propertyearlyitems.NewForgeFedEarlyItemsProperty()
}
// NewForgeFedForgeFedFilesAddedProperty creates a new ForgeFedFilesAddedProperty
func NewForgeFedFilesAddedProperty() vocab.ForgeFedFilesAddedProperty {
return propertyfilesadded.NewForgeFedFilesAddedProperty()
}
// NewForgeFedForgeFedFilesModifiedProperty creates a new
// ForgeFedFilesModifiedProperty
func NewForgeFedFilesModifiedProperty() vocab.ForgeFedFilesModifiedProperty {
return propertyfilesmodified.NewForgeFedFilesModifiedProperty()
}
// NewForgeFedForgeFedFilesRemovedProperty creates a new
// ForgeFedFilesRemovedProperty
func NewForgeFedFilesRemovedProperty() vocab.ForgeFedFilesRemovedProperty {
return propertyfilesremoved.NewForgeFedFilesRemovedProperty()
}
// NewForgeFedForgeFedForksProperty creates a new ForgeFedForksProperty
func NewForgeFedForksProperty() vocab.ForgeFedForksProperty {
return propertyforks.NewForgeFedForksProperty()
}
// NewForgeFedForgeFedHashProperty creates a new ForgeFedHashProperty
func NewForgeFedHashProperty() vocab.ForgeFedHashProperty {
return propertyhash.NewForgeFedHashProperty()
}
// NewForgeFedForgeFedIsResolvedProperty creates a new ForgeFedIsResolvedProperty
func NewForgeFedIsResolvedProperty() vocab.ForgeFedIsResolvedProperty {
return propertyisresolved.NewForgeFedIsResolvedProperty()
}
// NewForgeFedForgeFedRefProperty creates a new ForgeFedRefProperty
func NewForgeFedRefProperty() vocab.ForgeFedRefProperty {
return propertyref.NewForgeFedRefProperty()
}
// NewForgeFedForgeFedTeamProperty creates a new ForgeFedTeamProperty
func NewForgeFedTeamProperty() vocab.ForgeFedTeamProperty {
return propertyteam.NewForgeFedTeamProperty()
}
// NewForgeFedForgeFedTicketsTrackedByProperty creates a new
// ForgeFedTicketsTrackedByProperty
func NewForgeFedTicketsTrackedByProperty() vocab.ForgeFedTicketsTrackedByProperty {
return propertyticketstrackedby.NewForgeFedTicketsTrackedByProperty()
}
// NewForgeFedForgeFedTracksTicketsForProperty creates a new
// ForgeFedTracksTicketsForProperty
func NewForgeFedTracksTicketsForProperty() vocab.ForgeFedTracksTicketsForProperty {
return propertytracksticketsfor.NewForgeFedTracksTicketsForProperty()
}

View file

@ -0,0 +1,43 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typebranch "github.com/go-fed/activity/streams/impl/forgefed/type_branch"
typecommit "github.com/go-fed/activity/streams/impl/forgefed/type_commit"
typepush "github.com/go-fed/activity/streams/impl/forgefed/type_push"
typerepository "github.com/go-fed/activity/streams/impl/forgefed/type_repository"
typeticket "github.com/go-fed/activity/streams/impl/forgefed/type_ticket"
typeticketdependency "github.com/go-fed/activity/streams/impl/forgefed/type_ticketdependency"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewForgeFedBranch creates a new ForgeFedBranch
func NewForgeFedBranch() vocab.ForgeFedBranch {
return typebranch.NewForgeFedBranch()
}
// NewForgeFedCommit creates a new ForgeFedCommit
func NewForgeFedCommit() vocab.ForgeFedCommit {
return typecommit.NewForgeFedCommit()
}
// NewForgeFedPush creates a new ForgeFedPush
func NewForgeFedPush() vocab.ForgeFedPush {
return typepush.NewForgeFedPush()
}
// NewForgeFedRepository creates a new ForgeFedRepository
func NewForgeFedRepository() vocab.ForgeFedRepository {
return typerepository.NewForgeFedRepository()
}
// NewForgeFedTicket creates a new ForgeFedTicket
func NewForgeFedTicket() vocab.ForgeFedTicket {
return typeticket.NewForgeFedTicket()
}
// NewForgeFedTicketDependency creates a new ForgeFedTicketDependency
func NewForgeFedTicketDependency() vocab.ForgeFedTicketDependency {
return typeticketdependency.NewForgeFedTicketDependency()
}

View file

@ -0,0 +1,19 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
propertyid "github.com/go-fed/activity/streams/impl/jsonld/property_id"
propertytype "github.com/go-fed/activity/streams/impl/jsonld/property_type"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewJSONLDJSONLDTypeProperty creates a new JSONLDTypeProperty
func NewJSONLDTypeProperty() vocab.JSONLDTypeProperty {
return propertytype.NewJSONLDTypeProperty()
}
// NewJSONLDJSONLDIdProperty creates a new JSONLDIdProperty
func NewJSONLDIdProperty() vocab.JSONLDIdProperty {
return propertyid.NewJSONLDIdProperty()
}

View file

@ -0,0 +1,20 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeemoji "github.com/go-fed/activity/streams/impl/toot/type_emoji"
typeidentityproof "github.com/go-fed/activity/streams/impl/toot/type_identityproof"
vocab "github.com/go-fed/activity/streams/vocab"
)
// TootEmojiIsDisjointWith returns true if Emoji is disjoint with the other's type.
func TootEmojiIsDisjointWith(other vocab.Type) bool {
return typeemoji.EmojiIsDisjointWith(other)
}
// TootIdentityProofIsDisjointWith returns true if IdentityProof is disjoint with
// the other's type.
func TootIdentityProofIsDisjointWith(other vocab.Type) bool {
return typeidentityproof.IdentityProofIsDisjointWith(other)
}

View file

@ -0,0 +1,23 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeemoji "github.com/go-fed/activity/streams/impl/toot/type_emoji"
typeidentityproof "github.com/go-fed/activity/streams/impl/toot/type_identityproof"
vocab "github.com/go-fed/activity/streams/vocab"
)
// TootEmojiIsExtendedBy returns true if the other's type extends from Emoji. Note
// that it returns false if the types are the same; see the "IsOrExtends"
// variant instead.
func TootEmojiIsExtendedBy(other vocab.Type) bool {
return typeemoji.EmojiIsExtendedBy(other)
}
// TootIdentityProofIsExtendedBy returns true if the other's type extends from
// IdentityProof. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func TootIdentityProofIsExtendedBy(other vocab.Type) bool {
return typeidentityproof.IdentityProofIsExtendedBy(other)
}

View file

@ -0,0 +1,20 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeemoji "github.com/go-fed/activity/streams/impl/toot/type_emoji"
typeidentityproof "github.com/go-fed/activity/streams/impl/toot/type_identityproof"
vocab "github.com/go-fed/activity/streams/vocab"
)
// TootTootEmojiExtends returns true if Emoji extends from the other's type.
func TootTootEmojiExtends(other vocab.Type) bool {
return typeemoji.TootEmojiExtends(other)
}
// TootTootIdentityProofExtends returns true if IdentityProof extends from the
// other's type.
func TootTootIdentityProofExtends(other vocab.Type) bool {
return typeidentityproof.TootIdentityProofExtends(other)
}

View file

@ -0,0 +1,21 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeemoji "github.com/go-fed/activity/streams/impl/toot/type_emoji"
typeidentityproof "github.com/go-fed/activity/streams/impl/toot/type_identityproof"
vocab "github.com/go-fed/activity/streams/vocab"
)
// IsOrExtendsTootEmoji returns true if the other provided type is the Emoji type
// or extends from the Emoji type.
func IsOrExtendsTootEmoji(other vocab.Type) bool {
return typeemoji.IsOrExtendsEmoji(other)
}
// IsOrExtendsTootIdentityProof returns true if the other provided type is the
// IdentityProof type or extends from the IdentityProof type.
func IsOrExtendsTootIdentityProof(other vocab.Type) bool {
return typeidentityproof.IsOrExtendsIdentityProof(other)
}

View file

@ -0,0 +1,44 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
propertyblurhash "github.com/go-fed/activity/streams/impl/toot/property_blurhash"
propertydiscoverable "github.com/go-fed/activity/streams/impl/toot/property_discoverable"
propertyfeatured "github.com/go-fed/activity/streams/impl/toot/property_featured"
propertysignaturealgorithm "github.com/go-fed/activity/streams/impl/toot/property_signaturealgorithm"
propertysignaturevalue "github.com/go-fed/activity/streams/impl/toot/property_signaturevalue"
propertyvoterscount "github.com/go-fed/activity/streams/impl/toot/property_voterscount"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewTootTootBlurhashProperty creates a new TootBlurhashProperty
func NewTootBlurhashProperty() vocab.TootBlurhashProperty {
return propertyblurhash.NewTootBlurhashProperty()
}
// NewTootTootDiscoverableProperty creates a new TootDiscoverableProperty
func NewTootDiscoverableProperty() vocab.TootDiscoverableProperty {
return propertydiscoverable.NewTootDiscoverableProperty()
}
// NewTootTootFeaturedProperty creates a new TootFeaturedProperty
func NewTootFeaturedProperty() vocab.TootFeaturedProperty {
return propertyfeatured.NewTootFeaturedProperty()
}
// NewTootTootSignatureAlgorithmProperty creates a new
// TootSignatureAlgorithmProperty
func NewTootSignatureAlgorithmProperty() vocab.TootSignatureAlgorithmProperty {
return propertysignaturealgorithm.NewTootSignatureAlgorithmProperty()
}
// NewTootTootSignatureValueProperty creates a new TootSignatureValueProperty
func NewTootSignatureValueProperty() vocab.TootSignatureValueProperty {
return propertysignaturevalue.NewTootSignatureValueProperty()
}
// NewTootTootVotersCountProperty creates a new TootVotersCountProperty
func NewTootVotersCountProperty() vocab.TootVotersCountProperty {
return propertyvoterscount.NewTootVotersCountProperty()
}

View file

@ -0,0 +1,19 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typeemoji "github.com/go-fed/activity/streams/impl/toot/type_emoji"
typeidentityproof "github.com/go-fed/activity/streams/impl/toot/type_identityproof"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewTootEmoji creates a new TootEmoji
func NewTootEmoji() vocab.TootEmoji {
return typeemoji.NewTootEmoji()
}
// NewTootIdentityProof creates a new TootIdentityProof
func NewTootIdentityProof() vocab.TootIdentityProof {
return typeidentityproof.NewTootIdentityProof()
}

View file

@ -0,0 +1,14 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typepublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/type_publickey"
vocab "github.com/go-fed/activity/streams/vocab"
)
// W3IDSecurityV1PublicKeyIsDisjointWith returns true if PublicKey is disjoint
// with the other's type.
func W3IDSecurityV1PublicKeyIsDisjointWith(other vocab.Type) bool {
return typepublickey.PublicKeyIsDisjointWith(other)
}

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typepublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/type_publickey"
vocab "github.com/go-fed/activity/streams/vocab"
)
// W3IDSecurityV1PublicKeyIsExtendedBy returns true if the other's type extends
// from PublicKey. Note that it returns false if the types are the same; see
// the "IsOrExtends" variant instead.
func W3IDSecurityV1PublicKeyIsExtendedBy(other vocab.Type) bool {
return typepublickey.PublicKeyIsExtendedBy(other)
}

View file

@ -0,0 +1,14 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typepublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/type_publickey"
vocab "github.com/go-fed/activity/streams/vocab"
)
// W3IDSecurityV1W3IDSecurityV1PublicKeyExtends returns true if PublicKey extends
// from the other's type.
func W3IDSecurityV1W3IDSecurityV1PublicKeyExtends(other vocab.Type) bool {
return typepublickey.W3IDSecurityV1PublicKeyExtends(other)
}

View file

@ -0,0 +1,14 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typepublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/type_publickey"
vocab "github.com/go-fed/activity/streams/vocab"
)
// IsOrExtendsW3IDSecurityV1PublicKey returns true if the other provided type is
// the PublicKey type or extends from the PublicKey type.
func IsOrExtendsW3IDSecurityV1PublicKey(other vocab.Type) bool {
return typepublickey.IsOrExtendsPublicKey(other)
}

View file

@ -0,0 +1,28 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
propertyowner "github.com/go-fed/activity/streams/impl/w3idsecurityv1/property_owner"
propertypublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/property_publickey"
propertypublickeypem "github.com/go-fed/activity/streams/impl/w3idsecurityv1/property_publickeypem"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewW3IDSecurityV1W3IDSecurityV1OwnerProperty creates a new
// W3IDSecurityV1OwnerProperty
func NewW3IDSecurityV1OwnerProperty() vocab.W3IDSecurityV1OwnerProperty {
return propertyowner.NewW3IDSecurityV1OwnerProperty()
}
// NewW3IDSecurityV1W3IDSecurityV1PublicKeyProperty creates a new
// W3IDSecurityV1PublicKeyProperty
func NewW3IDSecurityV1PublicKeyProperty() vocab.W3IDSecurityV1PublicKeyProperty {
return propertypublickey.NewW3IDSecurityV1PublicKeyProperty()
}
// NewW3IDSecurityV1W3IDSecurityV1PublicKeyPemProperty creates a new
// W3IDSecurityV1PublicKeyPemProperty
func NewW3IDSecurityV1PublicKeyPemProperty() vocab.W3IDSecurityV1PublicKeyPemProperty {
return propertypublickeypem.NewW3IDSecurityV1PublicKeyPemProperty()
}

View file

@ -0,0 +1,13 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
typepublickey "github.com/go-fed/activity/streams/impl/w3idsecurityv1/type_publickey"
vocab "github.com/go-fed/activity/streams/vocab"
)
// NewW3IDSecurityV1PublicKey creates a new W3IDSecurityV1PublicKey
func NewW3IDSecurityV1PublicKey() vocab.W3IDSecurityV1PublicKey {
return typepublickey.NewW3IDSecurityV1PublicKey()
}

View file

@ -0,0 +1,244 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
"context"
"errors"
vocab "github.com/go-fed/activity/streams/vocab"
)
// ErrNoCallbackMatch indicates a Resolver could not match the ActivityStreams value to a callback function.
var ErrNoCallbackMatch error = errors.New("activity stream did not match the callback function")
// ErrUnhandledType indicates that an ActivityStreams value has a type that is not handled by the code that has been generated.
var ErrUnhandledType error = errors.New("activity stream did not match any known types")
// ErrPredicateUnmatched indicates that a predicate is accepting a type or interface that does not match an ActivityStreams value's type or interface.
var ErrPredicateUnmatched error = errors.New("activity stream did not match type demanded by predicate")
// errCannotTypeAssertType indicates that the 'type' property returned by the ActivityStreams value cannot be type-asserted to its interface form.
var errCannotTypeAssertType error = errors.New("activity stream type cannot be asserted to its interface")
// ActivityStreamsInterface represents any ActivityStream value code-generated by
// go-fed or compatible with the generated interfaces.
type ActivityStreamsInterface interface {
// GetTypeName returns the ActiivtyStreams value's type.
GetTypeName() string
// VocabularyURI returns the vocabulary's URI as a string.
VocabularyURI() string
}
// Resolver represents any TypeResolver.
type Resolver interface {
// Resolve will attempt to resolve an untyped ActivityStreams value into a
// Go concrete type.
Resolve(ctx context.Context, o ActivityStreamsInterface) error
}
// IsUnmatchedErr is true when the error indicates that a Resolver was
// unsuccessful due to the ActivityStreams value not matching its callbacks or
// predicates.
func IsUnmatchedErr(err error) bool {
return err == ErrPredicateUnmatched || err == ErrUnhandledType || err == ErrNoCallbackMatch
}
// ToType attempts to resolve the generic JSON map into a Type.
func ToType(c context.Context, m map[string]interface{}) (t vocab.Type, err error) {
var r *JSONResolver
r, err = NewJSONResolver(func(ctx context.Context, i vocab.ActivityStreamsAccept) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsActivity) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsAdd) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsAnnounce) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsApplication) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsArrive) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsArticle) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsAudio) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsBlock) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ForgeFedBranch) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsCollection) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsCollectionPage) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ForgeFedCommit) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsCreate) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsDelete) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsDislike) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsDocument) error {
t = i
return nil
}, func(ctx context.Context, i vocab.TootEmoji) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsEvent) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsFlag) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsFollow) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsGroup) error {
t = i
return nil
}, func(ctx context.Context, i vocab.TootIdentityProof) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsIgnore) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsImage) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsIntransitiveActivity) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsInvite) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsJoin) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsLeave) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsLike) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsLink) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsListen) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsMention) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsMove) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsNote) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsObject) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsOffer) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsOrderedCollection) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsOrderedCollectionPage) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsOrganization) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsPage) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsPerson) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsPlace) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsProfile) error {
t = i
return nil
}, func(ctx context.Context, i vocab.W3IDSecurityV1PublicKey) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ForgeFedPush) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsQuestion) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsRead) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsReject) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsRelationship) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsRemove) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ForgeFedRepository) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsService) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsTentativeAccept) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsTentativeReject) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ForgeFedTicket) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ForgeFedTicketDependency) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsTombstone) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsTravel) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsUndo) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsUpdate) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsVideo) error {
t = i
return nil
}, func(ctx context.Context, i vocab.ActivityStreamsView) error {
t = i
return nil
})
if err != nil {
return
}
err = r.Resolve(c, m)
return
}

View file

@ -0,0 +1,881 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
"context"
"errors"
vocab "github.com/go-fed/activity/streams/vocab"
)
// TypePredicatedResolver resolves ActivityStreams values if the value satisfies a
// predicate condition based on its type.
type TypePredicatedResolver struct {
delegate Resolver
predicate interface{}
}
// NewTypePredicatedResolver creates a new Resolver that applies a predicate to an
// ActivityStreams value to determine whether to Resolve or not. The
// ActivityStreams value's type is examined to determine if the predicate can
// apply itself to the value. This guarantees the predicate will receive a
// concrete value whose underlying ActivityStreams type matches the concrete
// interface name. The predicate function must be of the form:
//
// func(context.Context, <TypeInterface>) (bool, error)
//
// where TypeInterface is the code-generated interface for an ActivityStreams
// type. An error is returned if the predicate does not match this signature.
func NewTypePredicatedResolver(delegate Resolver, predicate interface{}) (*TypePredicatedResolver, error) {
// The predicate must satisfy one known predicate function signature, or else we will generate a runtime error instead of silently fail.
switch predicate.(type) {
case func(context.Context, vocab.ActivityStreamsAccept) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsActivity) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsAdd) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsAnnounce) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsApplication) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsArrive) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsArticle) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsAudio) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsBlock) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ForgeFedBranch) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsCollection) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsCollectionPage) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ForgeFedCommit) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsCreate) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsDelete) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsDislike) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsDocument) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.TootEmoji) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsEvent) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsFlag) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsFollow) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsGroup) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.TootIdentityProof) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsIgnore) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsImage) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsIntransitiveActivity) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsInvite) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsJoin) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsLeave) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsLike) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsLink) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsListen) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsMention) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsMove) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsNote) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsObject) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsOffer) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrderedCollection) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrderedCollectionPage) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrganization) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsPage) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsPerson) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsPlace) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsProfile) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.W3IDSecurityV1PublicKey) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ForgeFedPush) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsQuestion) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsRead) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsReject) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsRelationship) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsRemove) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ForgeFedRepository) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsService) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsTentativeAccept) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsTentativeReject) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ForgeFedTicket) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ForgeFedTicketDependency) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsTombstone) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsTravel) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsUndo) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsUpdate) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsVideo) (bool, error):
// Do nothing, this predicate has a correct signature.
case func(context.Context, vocab.ActivityStreamsView) (bool, error):
// Do nothing, this predicate has a correct signature.
default:
return nil, errors.New("the predicate function is of the wrong signature and would never be called")
}
return &TypePredicatedResolver{
delegate: delegate,
predicate: predicate,
}, nil
}
// Apply uses a predicate to determine whether to resolve the ActivityStreams
// value. The predicate's signature is matched with the ActivityStreams
// value's type. This strictly assures that the predicate will only be passed
// ActivityStream objects whose type matches its interface. Returns an error
// if the ActivityStreams type does not match the predicate, is not a type
// handled by the generated code, or the resolver returns an error. Returns
// true if the predicate returned true.
func (this TypePredicatedResolver) Apply(ctx context.Context, o ActivityStreamsInterface) (bool, error) {
var predicatePasses bool
var err error
if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Accept" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsAccept) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsAccept); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Activity" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsActivity) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsActivity); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Add" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsAdd) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsAdd); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Announce" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsAnnounce) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsAnnounce); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Application" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsApplication) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsApplication); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Arrive" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsArrive) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsArrive); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Article" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsArticle) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsArticle); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Audio" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsAudio) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsAudio); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Block" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsBlock) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsBlock); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Branch" {
if fn, ok := this.predicate.(func(context.Context, vocab.ForgeFedBranch) (bool, error)); ok {
if v, ok := o.(vocab.ForgeFedBranch); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Collection" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsCollection) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsCollection); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "CollectionPage" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsCollectionPage) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsCollectionPage); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Commit" {
if fn, ok := this.predicate.(func(context.Context, vocab.ForgeFedCommit) (bool, error)); ok {
if v, ok := o.(vocab.ForgeFedCommit); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Create" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsCreate) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsCreate); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Delete" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsDelete) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsDelete); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Dislike" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsDislike) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsDislike); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Document" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsDocument) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsDocument); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "http://joinmastodon.org/ns" && o.GetTypeName() == "Emoji" {
if fn, ok := this.predicate.(func(context.Context, vocab.TootEmoji) (bool, error)); ok {
if v, ok := o.(vocab.TootEmoji); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Event" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsEvent) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsEvent); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Flag" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsFlag) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsFlag); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Follow" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsFollow) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsFollow); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Group" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsGroup) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsGroup); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "http://joinmastodon.org/ns" && o.GetTypeName() == "IdentityProof" {
if fn, ok := this.predicate.(func(context.Context, vocab.TootIdentityProof) (bool, error)); ok {
if v, ok := o.(vocab.TootIdentityProof); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Ignore" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsIgnore) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsIgnore); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Image" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsImage) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsImage); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "IntransitiveActivity" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsIntransitiveActivity) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsIntransitiveActivity); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Invite" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsInvite) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsInvite); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Join" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsJoin) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsJoin); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Leave" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsLeave) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsLeave); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Like" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsLike) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsLike); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Link" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsLink) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsLink); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Listen" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsListen) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsListen); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Mention" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsMention) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsMention); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Move" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsMove) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsMove); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Note" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsNote) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsNote); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Object" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsObject) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsObject); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Offer" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsOffer) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsOffer); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "OrderedCollection" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsOrderedCollection) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsOrderedCollection); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "OrderedCollectionPage" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsOrderedCollectionPage) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsOrderedCollectionPage); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Organization" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsOrganization) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsOrganization); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Page" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsPage) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsPage); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Person" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsPerson) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsPerson); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Place" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsPlace) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsPlace); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Profile" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsProfile) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsProfile); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://w3id.org/security/v1" && o.GetTypeName() == "PublicKey" {
if fn, ok := this.predicate.(func(context.Context, vocab.W3IDSecurityV1PublicKey) (bool, error)); ok {
if v, ok := o.(vocab.W3IDSecurityV1PublicKey); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Push" {
if fn, ok := this.predicate.(func(context.Context, vocab.ForgeFedPush) (bool, error)); ok {
if v, ok := o.(vocab.ForgeFedPush); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Question" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsQuestion) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsQuestion); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Read" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsRead) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsRead); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Reject" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsReject) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsReject); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Relationship" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsRelationship) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsRelationship); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Remove" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsRemove) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsRemove); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Repository" {
if fn, ok := this.predicate.(func(context.Context, vocab.ForgeFedRepository) (bool, error)); ok {
if v, ok := o.(vocab.ForgeFedRepository); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Service" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsService) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsService); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "TentativeAccept" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsTentativeAccept) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsTentativeAccept); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "TentativeReject" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsTentativeReject) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsTentativeReject); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Ticket" {
if fn, ok := this.predicate.(func(context.Context, vocab.ForgeFedTicket) (bool, error)); ok {
if v, ok := o.(vocab.ForgeFedTicket); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "TicketDependency" {
if fn, ok := this.predicate.(func(context.Context, vocab.ForgeFedTicketDependency) (bool, error)); ok {
if v, ok := o.(vocab.ForgeFedTicketDependency); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Tombstone" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsTombstone) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsTombstone); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Travel" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsTravel) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsTravel); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Undo" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsUndo) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsUndo); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Update" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsUpdate) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsUpdate); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Video" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsVideo) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsVideo); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "View" {
if fn, ok := this.predicate.(func(context.Context, vocab.ActivityStreamsView) (bool, error)); ok {
if v, ok := o.(vocab.ActivityStreamsView); ok {
predicatePasses, err = fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return false, errCannotTypeAssertType
}
} else {
return false, ErrPredicateUnmatched
}
} else {
return false, ErrUnhandledType
}
if err != nil {
return predicatePasses, err
}
if predicatePasses {
return true, this.delegate.Resolve(ctx, o)
} else {
return false, nil
}
}

View file

@ -0,0 +1,744 @@
// Code generated by astool. DO NOT EDIT.
package streams
import (
"context"
"errors"
vocab "github.com/go-fed/activity/streams/vocab"
)
// TypeResolver resolves ActivityStreams values based on their type name.
type TypeResolver struct {
callbacks []interface{}
}
// NewTypeResolver creates a new Resolver that examines the type of an
// ActivityStream value to determine what callback function to pass the
// concretely typed value. The callback is guaranteed to receive a value whose
// underlying ActivityStreams type matches the concrete interface name in its
// signature. The callback functions must be of the form:
//
// func(context.Context, <TypeInterface>) error
//
// where TypeInterface is the code-generated interface for an ActivityStream
// type. An error is returned if a callback function does not match this
// signature.
func NewTypeResolver(callbacks ...interface{}) (*TypeResolver, error) {
for _, cb := range callbacks {
// Each callback function must satisfy one known function signature, or else we will generate a runtime error instead of silently fail.
switch cb.(type) {
case func(context.Context, vocab.ActivityStreamsAccept) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsActivity) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsAdd) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsAnnounce) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsApplication) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsArrive) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsArticle) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsAudio) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsBlock) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedBranch) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsCollection) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsCollectionPage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedCommit) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsCreate) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsDelete) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsDislike) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsDocument) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.TootEmoji) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsEvent) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsFlag) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsFollow) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsGroup) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.TootIdentityProof) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsIgnore) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsImage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsIntransitiveActivity) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsInvite) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsJoin) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsLeave) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsLike) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsLink) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsListen) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsMention) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsMove) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsNote) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsObject) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOffer) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrderedCollection) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrderedCollectionPage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsOrganization) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPage) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPerson) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsPlace) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsProfile) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.W3IDSecurityV1PublicKey) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedPush) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsQuestion) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRead) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsReject) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRelationship) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsRemove) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedRepository) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsService) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTentativeAccept) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTentativeReject) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedTicket) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ForgeFedTicketDependency) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTombstone) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsTravel) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsUndo) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsUpdate) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsVideo) error:
// Do nothing, this callback has a correct signature.
case func(context.Context, vocab.ActivityStreamsView) error:
// Do nothing, this callback has a correct signature.
default:
return nil, errors.New("a callback function is of the wrong signature and would never be called")
}
}
return &TypeResolver{callbacks: callbacks}, nil
}
// Resolve applies the first callback function whose signature accepts the
// ActivityStreams value's type. This strictly assures that the callback
// function will only be passed ActivityStream objects whose type matches its
// interface. Returns an error if the ActivityStreams type does not match
// callbackers, is not a type handled by the generated code, or the value
// passed in is not go-fed compatible.
func (this TypeResolver) Resolve(ctx context.Context, o ActivityStreamsInterface) error {
for _, i := range this.callbacks {
if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Accept" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAccept) error); ok {
if v, ok := o.(vocab.ActivityStreamsAccept); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Activity" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsActivity) error); ok {
if v, ok := o.(vocab.ActivityStreamsActivity); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Add" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAdd) error); ok {
if v, ok := o.(vocab.ActivityStreamsAdd); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Announce" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAnnounce) error); ok {
if v, ok := o.(vocab.ActivityStreamsAnnounce); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Application" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsApplication) error); ok {
if v, ok := o.(vocab.ActivityStreamsApplication); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Arrive" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsArrive) error); ok {
if v, ok := o.(vocab.ActivityStreamsArrive); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Article" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsArticle) error); ok {
if v, ok := o.(vocab.ActivityStreamsArticle); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Audio" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsAudio) error); ok {
if v, ok := o.(vocab.ActivityStreamsAudio); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Block" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsBlock) error); ok {
if v, ok := o.(vocab.ActivityStreamsBlock); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Branch" {
if fn, ok := i.(func(context.Context, vocab.ForgeFedBranch) error); ok {
if v, ok := o.(vocab.ForgeFedBranch); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Collection" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsCollection) error); ok {
if v, ok := o.(vocab.ActivityStreamsCollection); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "CollectionPage" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsCollectionPage) error); ok {
if v, ok := o.(vocab.ActivityStreamsCollectionPage); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Commit" {
if fn, ok := i.(func(context.Context, vocab.ForgeFedCommit) error); ok {
if v, ok := o.(vocab.ForgeFedCommit); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Create" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsCreate) error); ok {
if v, ok := o.(vocab.ActivityStreamsCreate); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Delete" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsDelete) error); ok {
if v, ok := o.(vocab.ActivityStreamsDelete); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Dislike" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsDislike) error); ok {
if v, ok := o.(vocab.ActivityStreamsDislike); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Document" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsDocument) error); ok {
if v, ok := o.(vocab.ActivityStreamsDocument); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "http://joinmastodon.org/ns" && o.GetTypeName() == "Emoji" {
if fn, ok := i.(func(context.Context, vocab.TootEmoji) error); ok {
if v, ok := o.(vocab.TootEmoji); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Event" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsEvent) error); ok {
if v, ok := o.(vocab.ActivityStreamsEvent); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Flag" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsFlag) error); ok {
if v, ok := o.(vocab.ActivityStreamsFlag); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Follow" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsFollow) error); ok {
if v, ok := o.(vocab.ActivityStreamsFollow); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Group" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsGroup) error); ok {
if v, ok := o.(vocab.ActivityStreamsGroup); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "http://joinmastodon.org/ns" && o.GetTypeName() == "IdentityProof" {
if fn, ok := i.(func(context.Context, vocab.TootIdentityProof) error); ok {
if v, ok := o.(vocab.TootIdentityProof); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Ignore" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsIgnore) error); ok {
if v, ok := o.(vocab.ActivityStreamsIgnore); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Image" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsImage) error); ok {
if v, ok := o.(vocab.ActivityStreamsImage); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "IntransitiveActivity" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsIntransitiveActivity) error); ok {
if v, ok := o.(vocab.ActivityStreamsIntransitiveActivity); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Invite" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsInvite) error); ok {
if v, ok := o.(vocab.ActivityStreamsInvite); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Join" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsJoin) error); ok {
if v, ok := o.(vocab.ActivityStreamsJoin); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Leave" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsLeave) error); ok {
if v, ok := o.(vocab.ActivityStreamsLeave); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Like" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsLike) error); ok {
if v, ok := o.(vocab.ActivityStreamsLike); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Link" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsLink) error); ok {
if v, ok := o.(vocab.ActivityStreamsLink); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Listen" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsListen) error); ok {
if v, ok := o.(vocab.ActivityStreamsListen); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Mention" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsMention) error); ok {
if v, ok := o.(vocab.ActivityStreamsMention); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Move" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsMove) error); ok {
if v, ok := o.(vocab.ActivityStreamsMove); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Note" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsNote) error); ok {
if v, ok := o.(vocab.ActivityStreamsNote); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Object" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsObject) error); ok {
if v, ok := o.(vocab.ActivityStreamsObject); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Offer" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOffer) error); ok {
if v, ok := o.(vocab.ActivityStreamsOffer); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "OrderedCollection" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOrderedCollection) error); ok {
if v, ok := o.(vocab.ActivityStreamsOrderedCollection); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "OrderedCollectionPage" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOrderedCollectionPage) error); ok {
if v, ok := o.(vocab.ActivityStreamsOrderedCollectionPage); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Organization" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsOrganization) error); ok {
if v, ok := o.(vocab.ActivityStreamsOrganization); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Page" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPage) error); ok {
if v, ok := o.(vocab.ActivityStreamsPage); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Person" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPerson) error); ok {
if v, ok := o.(vocab.ActivityStreamsPerson); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Place" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsPlace) error); ok {
if v, ok := o.(vocab.ActivityStreamsPlace); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Profile" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsProfile) error); ok {
if v, ok := o.(vocab.ActivityStreamsProfile); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://w3id.org/security/v1" && o.GetTypeName() == "PublicKey" {
if fn, ok := i.(func(context.Context, vocab.W3IDSecurityV1PublicKey) error); ok {
if v, ok := o.(vocab.W3IDSecurityV1PublicKey); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Push" {
if fn, ok := i.(func(context.Context, vocab.ForgeFedPush) error); ok {
if v, ok := o.(vocab.ForgeFedPush); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Question" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsQuestion) error); ok {
if v, ok := o.(vocab.ActivityStreamsQuestion); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Read" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsRead) error); ok {
if v, ok := o.(vocab.ActivityStreamsRead); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Reject" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsReject) error); ok {
if v, ok := o.(vocab.ActivityStreamsReject); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Relationship" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsRelationship) error); ok {
if v, ok := o.(vocab.ActivityStreamsRelationship); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Remove" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsRemove) error); ok {
if v, ok := o.(vocab.ActivityStreamsRemove); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Repository" {
if fn, ok := i.(func(context.Context, vocab.ForgeFedRepository) error); ok {
if v, ok := o.(vocab.ForgeFedRepository); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Service" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsService) error); ok {
if v, ok := o.(vocab.ActivityStreamsService); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "TentativeAccept" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTentativeAccept) error); ok {
if v, ok := o.(vocab.ActivityStreamsTentativeAccept); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "TentativeReject" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTentativeReject) error); ok {
if v, ok := o.(vocab.ActivityStreamsTentativeReject); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "Ticket" {
if fn, ok := i.(func(context.Context, vocab.ForgeFedTicket) error); ok {
if v, ok := o.(vocab.ForgeFedTicket); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://forgefed.peers.community/ns" && o.GetTypeName() == "TicketDependency" {
if fn, ok := i.(func(context.Context, vocab.ForgeFedTicketDependency) error); ok {
if v, ok := o.(vocab.ForgeFedTicketDependency); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Tombstone" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTombstone) error); ok {
if v, ok := o.(vocab.ActivityStreamsTombstone); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Travel" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsTravel) error); ok {
if v, ok := o.(vocab.ActivityStreamsTravel); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Undo" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsUndo) error); ok {
if v, ok := o.(vocab.ActivityStreamsUndo); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Update" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsUpdate) error); ok {
if v, ok := o.(vocab.ActivityStreamsUpdate); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "Video" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsVideo) error); ok {
if v, ok := o.(vocab.ActivityStreamsVideo); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else if o.VocabularyURI() == "https://www.w3.org/ns/activitystreams" && o.GetTypeName() == "View" {
if fn, ok := i.(func(context.Context, vocab.ActivityStreamsView) error); ok {
if v, ok := o.(vocab.ActivityStreamsView); ok {
return fn(ctx, v)
} else {
// This occurs when the value is either not a go-fed type and is improperly satisfying various interfaces, or there is a bug in the go-fed generated code.
return errCannotTypeAssertType
}
}
} else {
return ErrUnhandledType
}
}
return ErrNoCallbackMatch
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyaccuracy contains the implementation for the accuracy property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyaccuracy

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package propertyaccuracy
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface{}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,203 @@
// Code generated by astool. DO NOT EDIT.
package propertyaccuracy
import (
"fmt"
float "github.com/go-fed/activity/streams/values/float"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsAccuracyProperty is the functional property "accuracy". It is
// permitted to be a single default-valued value type.
type ActivityStreamsAccuracyProperty struct {
xmlschemaFloatMember float64
hasFloatMember bool
unknown interface{}
iri *url.URL
alias string
}
// DeserializeAccuracyProperty creates a "accuracy" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeAccuracyProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsAccuracyProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "accuracy"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "accuracy")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsAccuracyProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if v, err := float.DeserializeFloat(i); err == nil {
this := &ActivityStreamsAccuracyProperty{
alias: alias,
hasFloatMember: true,
xmlschemaFloatMember: v,
}
return this, nil
}
this := &ActivityStreamsAccuracyProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsAccuracyProperty creates a new accuracy property.
func NewActivityStreamsAccuracyProperty() *ActivityStreamsAccuracyProperty {
return &ActivityStreamsAccuracyProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling IsXMLSchemaFloat
// afterwards will return false.
func (this *ActivityStreamsAccuracyProperty) Clear() {
this.unknown = nil
this.iri = nil
this.hasFloatMember = false
}
// Get returns the value of this property. When IsXMLSchemaFloat returns false,
// Get will return any arbitrary value.
func (this ActivityStreamsAccuracyProperty) Get() float64 {
return this.xmlschemaFloatMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return any arbitrary value.
func (this ActivityStreamsAccuracyProperty) GetIRI() *url.URL {
return this.iri
}
// HasAny returns true if the value or IRI is set.
func (this ActivityStreamsAccuracyProperty) HasAny() bool {
return this.IsXMLSchemaFloat() || this.iri != nil
}
// IsIRI returns true if this property is an IRI.
func (this ActivityStreamsAccuracyProperty) IsIRI() bool {
return this.iri != nil
}
// IsXMLSchemaFloat returns true if this property is set and not an IRI.
func (this ActivityStreamsAccuracyProperty) IsXMLSchemaFloat() bool {
return this.hasFloatMember
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsAccuracyProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsAccuracyProperty) KindIndex() int {
if this.IsXMLSchemaFloat() {
return 0
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsAccuracyProperty) LessThan(o vocab.ActivityStreamsAccuracyProperty) bool {
// LessThan comparison for if either or both are IRIs.
if this.IsIRI() && o.IsIRI() {
return this.iri.String() < o.GetIRI().String()
} else if this.IsIRI() {
// IRIs are always less than other values, none, or unknowns
return true
} else if o.IsIRI() {
// This other, none, or unknown value is always greater than IRIs
return false
}
// LessThan comparison for the single value or unknown value.
if !this.IsXMLSchemaFloat() && !o.IsXMLSchemaFloat() {
// Both are unknowns.
return false
} else if this.IsXMLSchemaFloat() && !o.IsXMLSchemaFloat() {
// Values are always greater than unknown values.
return false
} else if !this.IsXMLSchemaFloat() && o.IsXMLSchemaFloat() {
// Unknowns are always less than known values.
return true
} else {
// Actual comparison.
return float.LessFloat(this.Get(), o.Get())
}
}
// Name returns the name of this property: "accuracy".
func (this ActivityStreamsAccuracyProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "accuracy"
} else {
return "accuracy"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsAccuracyProperty) Serialize() (interface{}, error) {
if this.IsXMLSchemaFloat() {
return float.SerializeFloat(this.Get())
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// Set sets the value of this property. Calling IsXMLSchemaFloat afterwards will
// return true.
func (this *ActivityStreamsAccuracyProperty) Set(v float64) {
this.Clear()
this.xmlschemaFloatMember = v
this.hasFloatMember = true
}
// SetIRI sets the value of this property. Calling IsIRI afterwards will return
// true.
func (this *ActivityStreamsAccuracyProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyactor contains the implementation for the actor property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyactor

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertyactor
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyaltitude contains the implementation for the altitude property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyaltitude

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package propertyaltitude
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface{}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,203 @@
// Code generated by astool. DO NOT EDIT.
package propertyaltitude
import (
"fmt"
float "github.com/go-fed/activity/streams/values/float"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsAltitudeProperty is the functional property "altitude". It is
// permitted to be a single default-valued value type.
type ActivityStreamsAltitudeProperty struct {
xmlschemaFloatMember float64
hasFloatMember bool
unknown interface{}
iri *url.URL
alias string
}
// DeserializeAltitudeProperty creates a "altitude" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeAltitudeProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsAltitudeProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "altitude"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "altitude")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsAltitudeProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if v, err := float.DeserializeFloat(i); err == nil {
this := &ActivityStreamsAltitudeProperty{
alias: alias,
hasFloatMember: true,
xmlschemaFloatMember: v,
}
return this, nil
}
this := &ActivityStreamsAltitudeProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsAltitudeProperty creates a new altitude property.
func NewActivityStreamsAltitudeProperty() *ActivityStreamsAltitudeProperty {
return &ActivityStreamsAltitudeProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling IsXMLSchemaFloat
// afterwards will return false.
func (this *ActivityStreamsAltitudeProperty) Clear() {
this.unknown = nil
this.iri = nil
this.hasFloatMember = false
}
// Get returns the value of this property. When IsXMLSchemaFloat returns false,
// Get will return any arbitrary value.
func (this ActivityStreamsAltitudeProperty) Get() float64 {
return this.xmlschemaFloatMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return any arbitrary value.
func (this ActivityStreamsAltitudeProperty) GetIRI() *url.URL {
return this.iri
}
// HasAny returns true if the value or IRI is set.
func (this ActivityStreamsAltitudeProperty) HasAny() bool {
return this.IsXMLSchemaFloat() || this.iri != nil
}
// IsIRI returns true if this property is an IRI.
func (this ActivityStreamsAltitudeProperty) IsIRI() bool {
return this.iri != nil
}
// IsXMLSchemaFloat returns true if this property is set and not an IRI.
func (this ActivityStreamsAltitudeProperty) IsXMLSchemaFloat() bool {
return this.hasFloatMember
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsAltitudeProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsAltitudeProperty) KindIndex() int {
if this.IsXMLSchemaFloat() {
return 0
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsAltitudeProperty) LessThan(o vocab.ActivityStreamsAltitudeProperty) bool {
// LessThan comparison for if either or both are IRIs.
if this.IsIRI() && o.IsIRI() {
return this.iri.String() < o.GetIRI().String()
} else if this.IsIRI() {
// IRIs are always less than other values, none, or unknowns
return true
} else if o.IsIRI() {
// This other, none, or unknown value is always greater than IRIs
return false
}
// LessThan comparison for the single value or unknown value.
if !this.IsXMLSchemaFloat() && !o.IsXMLSchemaFloat() {
// Both are unknowns.
return false
} else if this.IsXMLSchemaFloat() && !o.IsXMLSchemaFloat() {
// Values are always greater than unknown values.
return false
} else if !this.IsXMLSchemaFloat() && o.IsXMLSchemaFloat() {
// Unknowns are always less than known values.
return true
} else {
// Actual comparison.
return float.LessFloat(this.Get(), o.Get())
}
}
// Name returns the name of this property: "altitude".
func (this ActivityStreamsAltitudeProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "altitude"
} else {
return "altitude"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsAltitudeProperty) Serialize() (interface{}, error) {
if this.IsXMLSchemaFloat() {
return float.SerializeFloat(this.Get())
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// Set sets the value of this property. Calling IsXMLSchemaFloat afterwards will
// return true.
func (this *ActivityStreamsAltitudeProperty) Set(v float64) {
this.Clear()
this.xmlschemaFloatMember = v
this.hasFloatMember = true
}
// SetIRI sets the value of this property. Calling IsIRI afterwards will return
// true.
func (this *ActivityStreamsAltitudeProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyanyof contains the implementation for the anyOf property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyanyof

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertyanyof
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyattachment contains the implementation for the attachment
// property. All applications are strongly encouraged to use the interface
// instead of this concrete definition. The interfaces allow applications to
// consume only the types and properties needed and be independent of the
// go-fed implementation if another alternative implementation is created.
// This package is code-generated and subject to the same license as the
// go-fed tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyattachment

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertyattachment
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyattributedto contains the implementation for the attributedTo
// property. All applications are strongly encouraged to use the interface
// instead of this concrete definition. The interfaces allow applications to
// consume only the types and properties needed and be independent of the
// go-fed implementation if another alternative implementation is created.
// This package is code-generated and subject to the same license as the
// go-fed tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyattributedto

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertyattributedto
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyaudience contains the implementation for the audience property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyaudience

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertyaudience
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertybcc contains the implementation for the bcc property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertybcc

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertybcc
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertybto contains the implementation for the bto property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertybto

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertybto
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertycc contains the implementation for the cc property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertycc

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertycc
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyclosed contains the implementation for the closed property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyclosed

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertyclosed
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertycontent contains the implementation for the content property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertycontent

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package propertycontent
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface{}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,668 @@
// Code generated by astool. DO NOT EDIT.
package propertycontent
import (
"fmt"
langstring "github.com/go-fed/activity/streams/values/langString"
string1 "github.com/go-fed/activity/streams/values/string"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsContentPropertyIterator is an iterator for a property. It is
// permitted to be one of multiple value types. At most, one type of value can
// be present, or none at all. Setting a value will clear the other types of
// values so that only one of the 'Is' methods will return true. It is
// possible to clear all values, so that this property is empty.
type ActivityStreamsContentPropertyIterator struct {
xmlschemaStringMember string
hasStringMember bool
rdfLangStringMember map[string]string
unknown interface{}
iri *url.URL
alias string
myIdx int
parent vocab.ActivityStreamsContentProperty
}
// NewActivityStreamsContentPropertyIterator creates a new ActivityStreamsContent
// property.
func NewActivityStreamsContentPropertyIterator() *ActivityStreamsContentPropertyIterator {
return &ActivityStreamsContentPropertyIterator{alias: ""}
}
// deserializeActivityStreamsContentPropertyIterator creates an iterator from an
// element that has been unmarshalled from a text or binary format.
func deserializeActivityStreamsContentPropertyIterator(i interface{}, aliasMap map[string]string) (*ActivityStreamsContentPropertyIterator, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsContentPropertyIterator{
alias: alias,
iri: u,
}
return this, nil
}
}
if v, err := string1.DeserializeString(i); err == nil {
this := &ActivityStreamsContentPropertyIterator{
alias: alias,
hasStringMember: true,
xmlschemaStringMember: v,
}
return this, nil
} else if v, err := langstring.DeserializeLangString(i); err == nil {
this := &ActivityStreamsContentPropertyIterator{
alias: alias,
rdfLangStringMember: v,
}
return this, nil
}
this := &ActivityStreamsContentPropertyIterator{
alias: alias,
unknown: i,
}
return this, nil
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return an arbitrary value.
func (this ActivityStreamsContentPropertyIterator) GetIRI() *url.URL {
return this.iri
}
// GetLanguage returns the value for the specified BCP47 language code, or an
// empty string if it is either not a language map or no value is present.
func (this ActivityStreamsContentPropertyIterator) GetLanguage(bcp47 string) string {
if this.rdfLangStringMember == nil {
return ""
} else if v, ok := this.rdfLangStringMember[bcp47]; ok {
return v
} else {
return ""
}
}
// GetRDFLangString returns the value of this property. When IsRDFLangString
// returns false, GetRDFLangString will return an arbitrary value.
func (this ActivityStreamsContentPropertyIterator) GetRDFLangString() map[string]string {
return this.rdfLangStringMember
}
// GetXMLSchemaString returns the value of this property. When IsXMLSchemaString
// returns false, GetXMLSchemaString will return an arbitrary value.
func (this ActivityStreamsContentPropertyIterator) GetXMLSchemaString() string {
return this.xmlschemaStringMember
}
// HasAny returns true if any of the values are set, except for the natural
// language map. When true, the specific has, getter, and setter methods may
// be used to determine what kind of value there is to access and set this
// property. To determine if the property was set as a natural language map,
// use the IsRDFLangString method instead.
func (this ActivityStreamsContentPropertyIterator) HasAny() bool {
return this.IsXMLSchemaString() ||
this.IsRDFLangString() ||
this.iri != nil
}
// HasLanguage returns true if the natural language map has an entry for the
// specified BCP47 language code.
func (this ActivityStreamsContentPropertyIterator) HasLanguage(bcp47 string) bool {
if this.rdfLangStringMember == nil {
return false
} else {
_, ok := this.rdfLangStringMember[bcp47]
return ok
}
}
// IsIRI returns true if this property is an IRI. When true, use GetIRI and SetIRI
// to access and set this property
func (this ActivityStreamsContentPropertyIterator) IsIRI() bool {
return this.iri != nil
}
// IsRDFLangString returns true if this property has a type of "langString". When
// true, use the GetRDFLangString and SetRDFLangString methods to access and
// set this property.. To determine if the property was set as a natural
// language map, use the IsRDFLangString method instead.
func (this ActivityStreamsContentPropertyIterator) IsRDFLangString() bool {
return this.rdfLangStringMember != nil
}
// IsXMLSchemaString returns true if this property has a type of "string". When
// true, use the GetXMLSchemaString and SetXMLSchemaString methods to access
// and set this property.. To determine if the property was set as a natural
// language map, use the IsRDFLangString method instead.
func (this ActivityStreamsContentPropertyIterator) IsXMLSchemaString() bool {
return this.hasStringMember
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsContentPropertyIterator) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsContentPropertyIterator) KindIndex() int {
if this.IsXMLSchemaString() {
return 0
}
if this.IsRDFLangString() {
return 1
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsContentPropertyIterator) LessThan(o vocab.ActivityStreamsContentPropertyIterator) bool {
idx1 := this.KindIndex()
idx2 := o.KindIndex()
if idx1 < idx2 {
return true
} else if idx1 > idx2 {
return false
} else if this.IsXMLSchemaString() {
return string1.LessString(this.GetXMLSchemaString(), o.GetXMLSchemaString())
} else if this.IsRDFLangString() {
return langstring.LessLangString(this.GetRDFLangString(), o.GetRDFLangString())
} else if this.IsIRI() {
return this.iri.String() < o.GetIRI().String()
}
return false
}
// Name returns the name of this property: "ActivityStreamsContent".
func (this ActivityStreamsContentPropertyIterator) Name() string {
if this.IsRDFLangString() {
return "ActivityStreamsContentMap"
} else {
return "ActivityStreamsContent"
}
}
// Next returns the next iterator, or nil if there is no next iterator.
func (this ActivityStreamsContentPropertyIterator) Next() vocab.ActivityStreamsContentPropertyIterator {
if this.myIdx+1 >= this.parent.Len() {
return nil
} else {
return this.parent.At(this.myIdx + 1)
}
}
// Prev returns the previous iterator, or nil if there is no previous iterator.
func (this ActivityStreamsContentPropertyIterator) Prev() vocab.ActivityStreamsContentPropertyIterator {
if this.myIdx-1 < 0 {
return nil
} else {
return this.parent.At(this.myIdx - 1)
}
}
// SetIRI sets the value of this property. Calling IsIRI afterwards returns true.
func (this *ActivityStreamsContentPropertyIterator) SetIRI(v *url.URL) {
this.clear()
this.iri = v
}
// SetLanguage sets the value for the specified BCP47 language code.
func (this *ActivityStreamsContentPropertyIterator) SetLanguage(bcp47, value string) {
this.hasStringMember = false
this.rdfLangStringMember = nil
this.unknown = nil
this.iri = nil
if this.rdfLangStringMember == nil {
this.rdfLangStringMember = make(map[string]string)
}
this.rdfLangStringMember[bcp47] = value
}
// SetRDFLangString sets the value of this property and clears the natural
// language map. Calling IsRDFLangString afterwards will return true. Calling
// IsRDFLangString afterwards returns false.
func (this *ActivityStreamsContentPropertyIterator) SetRDFLangString(v map[string]string) {
this.clear()
this.rdfLangStringMember = v
}
// SetXMLSchemaString sets the value of this property and clears the natural
// language map. Calling IsXMLSchemaString afterwards will return true.
// Calling IsRDFLangString afterwards returns false.
func (this *ActivityStreamsContentPropertyIterator) SetXMLSchemaString(v string) {
this.clear()
this.xmlschemaStringMember = v
this.hasStringMember = true
}
// clear ensures no value and no language map for this property is set. Calling
// HasAny or any of the 'Is' methods afterwards will return false.
func (this *ActivityStreamsContentPropertyIterator) clear() {
this.hasStringMember = false
this.rdfLangStringMember = nil
this.unknown = nil
this.iri = nil
this.rdfLangStringMember = nil
}
// serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsContentPropertyIterator) serialize() (interface{}, error) {
if this.IsXMLSchemaString() {
return string1.SerializeString(this.GetXMLSchemaString())
} else if this.IsRDFLangString() {
return langstring.SerializeLangString(this.GetRDFLangString())
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// ActivityStreamsContentProperty is the non-functional property "content". It is
// permitted to have one or more values, and of different value types.
type ActivityStreamsContentProperty struct {
properties []*ActivityStreamsContentPropertyIterator
alias string
}
// DeserializeContentProperty creates a "content" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeContentProperty(m map[string]interface{}, aliasMap map[string]string) (vocab.ActivityStreamsContentProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "content"
if len(alias) > 0 {
propName = fmt.Sprintf("%s:%s", alias, "content")
}
i, ok := m[propName]
if !ok {
// Attempt to find the map instead.
i, ok = m[propName+"Map"]
}
if ok {
this := &ActivityStreamsContentProperty{
alias: alias,
properties: []*ActivityStreamsContentPropertyIterator{},
}
if list, ok := i.([]interface{}); ok {
for _, iterator := range list {
if p, err := deserializeActivityStreamsContentPropertyIterator(iterator, aliasMap); err != nil {
return this, err
} else if p != nil {
this.properties = append(this.properties, p)
}
}
} else {
if p, err := deserializeActivityStreamsContentPropertyIterator(i, aliasMap); err != nil {
return this, err
} else if p != nil {
this.properties = append(this.properties, p)
}
}
// Set up the properties for iteration.
for idx, ele := range this.properties {
ele.parent = this
ele.myIdx = idx
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsContentProperty creates a new content property.
func NewActivityStreamsContentProperty() *ActivityStreamsContentProperty {
return &ActivityStreamsContentProperty{alias: ""}
}
// AppendIRI appends an IRI value to the back of a list of the property "content"
func (this *ActivityStreamsContentProperty) AppendIRI(v *url.URL) {
this.properties = append(this.properties, &ActivityStreamsContentPropertyIterator{
alias: this.alias,
iri: v,
myIdx: this.Len(),
parent: this,
})
}
// AppendRDFLangString appends a langString value to the back of a list of the
// property "content". Invalidates iterators that are traversing using Prev.
func (this *ActivityStreamsContentProperty) AppendRDFLangString(v map[string]string) {
this.properties = append(this.properties, &ActivityStreamsContentPropertyIterator{
alias: this.alias,
myIdx: this.Len(),
parent: this,
rdfLangStringMember: v,
})
}
// AppendXMLSchemaString appends a string value to the back of a list of the
// property "content". Invalidates iterators that are traversing using Prev.
func (this *ActivityStreamsContentProperty) AppendXMLSchemaString(v string) {
this.properties = append(this.properties, &ActivityStreamsContentPropertyIterator{
alias: this.alias,
hasStringMember: true,
myIdx: this.Len(),
parent: this,
xmlschemaStringMember: v,
})
}
// At returns the property value for the specified index. Panics if the index is
// out of bounds.
func (this ActivityStreamsContentProperty) At(index int) vocab.ActivityStreamsContentPropertyIterator {
return this.properties[index]
}
// Begin returns the first iterator, or nil if empty. Can be used with the
// iterator's Next method and this property's End method to iterate from front
// to back through all values.
func (this ActivityStreamsContentProperty) Begin() vocab.ActivityStreamsContentPropertyIterator {
if this.Empty() {
return nil
} else {
return this.properties[0]
}
}
// Empty returns returns true if there are no elements.
func (this ActivityStreamsContentProperty) Empty() bool {
return this.Len() == 0
}
// End returns beyond-the-last iterator, which is nil. Can be used with the
// iterator's Next method and this property's Begin method to iterate from
// front to back through all values.
func (this ActivityStreamsContentProperty) End() vocab.ActivityStreamsContentPropertyIterator {
return nil
}
// Insert inserts an IRI value at the specified index for a property "content".
// Existing elements at that index and higher are shifted back once.
// Invalidates all iterators.
func (this *ActivityStreamsContentProperty) InsertIRI(idx int, v *url.URL) {
this.properties = append(this.properties, nil)
copy(this.properties[idx+1:], this.properties[idx:])
this.properties[idx] = &ActivityStreamsContentPropertyIterator{
alias: this.alias,
iri: v,
myIdx: idx,
parent: this,
}
for i := idx; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// InsertRDFLangString inserts a langString value at the specified index for a
// property "content". Existing elements at that index and higher are shifted
// back once. Invalidates all iterators.
func (this *ActivityStreamsContentProperty) InsertRDFLangString(idx int, v map[string]string) {
this.properties = append(this.properties, nil)
copy(this.properties[idx+1:], this.properties[idx:])
this.properties[idx] = &ActivityStreamsContentPropertyIterator{
alias: this.alias,
myIdx: idx,
parent: this,
rdfLangStringMember: v,
}
for i := idx; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// InsertXMLSchemaString inserts a string value at the specified index for a
// property "content". Existing elements at that index and higher are shifted
// back once. Invalidates all iterators.
func (this *ActivityStreamsContentProperty) InsertXMLSchemaString(idx int, v string) {
this.properties = append(this.properties, nil)
copy(this.properties[idx+1:], this.properties[idx:])
this.properties[idx] = &ActivityStreamsContentPropertyIterator{
alias: this.alias,
hasStringMember: true,
myIdx: idx,
parent: this,
xmlschemaStringMember: v,
}
for i := idx; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsContentProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
for _, elem := range this.properties {
child := elem.JSONLDContext()
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API method specifically needed only for alternate implementations
// for go-fed. Applications should not use this method. Panics if the index is
// out of bounds.
func (this ActivityStreamsContentProperty) KindIndex(idx int) int {
return this.properties[idx].KindIndex()
}
// Len returns the number of values that exist for the "content" property.
func (this ActivityStreamsContentProperty) Len() (length int) {
return len(this.properties)
}
// Less computes whether another property is less than this one. Mixing types
// results in a consistent but arbitrary ordering
func (this ActivityStreamsContentProperty) Less(i, j int) bool {
idx1 := this.KindIndex(i)
idx2 := this.KindIndex(j)
if idx1 < idx2 {
return true
} else if idx1 == idx2 {
if idx1 == 0 {
lhs := this.properties[i].GetXMLSchemaString()
rhs := this.properties[j].GetXMLSchemaString()
return string1.LessString(lhs, rhs)
} else if idx1 == 1 {
lhs := this.properties[i].GetRDFLangString()
rhs := this.properties[j].GetRDFLangString()
return langstring.LessLangString(lhs, rhs)
} else if idx1 == -2 {
lhs := this.properties[i].GetIRI()
rhs := this.properties[j].GetIRI()
return lhs.String() < rhs.String()
}
}
return false
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsContentProperty) LessThan(o vocab.ActivityStreamsContentProperty) bool {
l1 := this.Len()
l2 := o.Len()
l := l1
if l2 < l1 {
l = l2
}
for i := 0; i < l; i++ {
if this.properties[i].LessThan(o.At(i)) {
return true
} else if o.At(i).LessThan(this.properties[i]) {
return false
}
}
return l1 < l2
}
// Name returns the name of this property ("content") with any alias.
func (this ActivityStreamsContentProperty) Name() string {
if this.Len() == 1 && this.At(0).IsRDFLangString() {
return "contentMap"
} else {
return "content"
}
}
// PrependIRI prepends an IRI value to the front of a list of the property
// "content".
func (this *ActivityStreamsContentProperty) PrependIRI(v *url.URL) {
this.properties = append([]*ActivityStreamsContentPropertyIterator{{
alias: this.alias,
iri: v,
myIdx: 0,
parent: this,
}}, this.properties...)
for i := 1; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// PrependRDFLangString prepends a langString value to the front of a list of the
// property "content". Invalidates all iterators.
func (this *ActivityStreamsContentProperty) PrependRDFLangString(v map[string]string) {
this.properties = append([]*ActivityStreamsContentPropertyIterator{{
alias: this.alias,
myIdx: 0,
parent: this,
rdfLangStringMember: v,
}}, this.properties...)
for i := 1; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// PrependXMLSchemaString prepends a string value to the front of a list of the
// property "content". Invalidates all iterators.
func (this *ActivityStreamsContentProperty) PrependXMLSchemaString(v string) {
this.properties = append([]*ActivityStreamsContentPropertyIterator{{
alias: this.alias,
hasStringMember: true,
myIdx: 0,
parent: this,
xmlschemaStringMember: v,
}}, this.properties...)
for i := 1; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// Remove deletes an element at the specified index from a list of the property
// "content", regardless of its type. Panics if the index is out of bounds.
// Invalidates all iterators.
func (this *ActivityStreamsContentProperty) Remove(idx int) {
(this.properties)[idx].parent = nil
copy((this.properties)[idx:], (this.properties)[idx+1:])
(this.properties)[len(this.properties)-1] = &ActivityStreamsContentPropertyIterator{}
this.properties = (this.properties)[:len(this.properties)-1]
for i := idx; i < this.Len(); i++ {
(this.properties)[i].myIdx = i
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsContentProperty) Serialize() (interface{}, error) {
s := make([]interface{}, 0, len(this.properties))
for _, iterator := range this.properties {
if b, err := iterator.serialize(); err != nil {
return s, err
} else {
s = append(s, b)
}
}
// Shortcut: if serializing one value, don't return an array -- pretty sure other Fediverse software would choke on a "type" value with array, for example.
if len(s) == 1 {
return s[0], nil
}
return s, nil
}
// SetIRI sets an IRI value to be at the specified index for the property
// "content". Panics if the index is out of bounds.
func (this *ActivityStreamsContentProperty) SetIRI(idx int, v *url.URL) {
(this.properties)[idx].parent = nil
(this.properties)[idx] = &ActivityStreamsContentPropertyIterator{
alias: this.alias,
iri: v,
myIdx: idx,
parent: this,
}
}
// SetRDFLangString sets a langString value to be at the specified index for the
// property "content". Panics if the index is out of bounds. Invalidates all
// iterators.
func (this *ActivityStreamsContentProperty) SetRDFLangString(idx int, v map[string]string) {
(this.properties)[idx].parent = nil
(this.properties)[idx] = &ActivityStreamsContentPropertyIterator{
alias: this.alias,
myIdx: idx,
parent: this,
rdfLangStringMember: v,
}
}
// SetXMLSchemaString sets a string value to be at the specified index for the
// property "content". Panics if the index is out of bounds. Invalidates all
// iterators.
func (this *ActivityStreamsContentProperty) SetXMLSchemaString(idx int, v string) {
(this.properties)[idx].parent = nil
(this.properties)[idx] = &ActivityStreamsContentPropertyIterator{
alias: this.alias,
hasStringMember: true,
myIdx: idx,
parent: this,
xmlschemaStringMember: v,
}
}
// Swap swaps the location of values at two indices for the "content" property.
func (this ActivityStreamsContentProperty) Swap(i, j int) {
this.properties[i], this.properties[j] = this.properties[j], this.properties[i]
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertycontext contains the implementation for the context property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertycontext

View file

@ -0,0 +1,265 @@
// Code generated by astool. DO NOT EDIT.
package propertycontext
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertycurrent contains the implementation for the current property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertycurrent

View file

@ -0,0 +1,35 @@
// Code generated by astool. DO NOT EDIT.
package propertycurrent
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,359 @@
// Code generated by astool. DO NOT EDIT.
package propertycurrent
import (
"fmt"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsCurrentProperty is the functional property "current". It is
// permitted to be one of multiple value types. At most, one type of value can
// be present, or none at all. Setting a value will clear the other types of
// values so that only one of the 'Is' methods will return true. It is
// possible to clear all values, so that this property is empty.
type ActivityStreamsCurrentProperty struct {
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
activitystreamsLinkMember vocab.ActivityStreamsLink
activitystreamsMentionMember vocab.ActivityStreamsMention
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
unknown interface{}
iri *url.URL
alias string
}
// DeserializeCurrentProperty creates a "current" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeCurrentProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsCurrentProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "current"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "current")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsCurrentProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if m, ok := i.(map[string]interface{}); ok {
if v, err := mgr.DeserializeCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsCurrentProperty{
activitystreamsCollectionPageMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeLinkActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsCurrentProperty{
activitystreamsLinkMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsCurrentProperty{
activitystreamsMentionMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeOrderedCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsCurrentProperty{
activitystreamsOrderedCollectionPageMember: v,
alias: alias,
}
return this, nil
}
}
this := &ActivityStreamsCurrentProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsCurrentProperty creates a new current property.
func NewActivityStreamsCurrentProperty() *ActivityStreamsCurrentProperty {
return &ActivityStreamsCurrentProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling HasAny or any of the
// 'Is' methods afterwards will return false.
func (this *ActivityStreamsCurrentProperty) Clear() {
this.activitystreamsCollectionPageMember = nil
this.activitystreamsLinkMember = nil
this.activitystreamsMentionMember = nil
this.activitystreamsOrderedCollectionPageMember = nil
this.unknown = nil
this.iri = nil
}
// GetActivityStreamsCollectionPage returns the value of this property. When
// IsActivityStreamsCollectionPage returns false,
// GetActivityStreamsCollectionPage will return an arbitrary value.
func (this ActivityStreamsCurrentProperty) GetActivityStreamsCollectionPage() vocab.ActivityStreamsCollectionPage {
return this.activitystreamsCollectionPageMember
}
// GetActivityStreamsLink returns the value of this property. When
// IsActivityStreamsLink returns false, GetActivityStreamsLink will return an
// arbitrary value.
func (this ActivityStreamsCurrentProperty) GetActivityStreamsLink() vocab.ActivityStreamsLink {
return this.activitystreamsLinkMember
}
// GetActivityStreamsMention returns the value of this property. When
// IsActivityStreamsMention returns false, GetActivityStreamsMention will
// return an arbitrary value.
func (this ActivityStreamsCurrentProperty) GetActivityStreamsMention() vocab.ActivityStreamsMention {
return this.activitystreamsMentionMember
}
// GetActivityStreamsOrderedCollectionPage returns the value of this property.
// When IsActivityStreamsOrderedCollectionPage returns false,
// GetActivityStreamsOrderedCollectionPage will return an arbitrary value.
func (this ActivityStreamsCurrentProperty) GetActivityStreamsOrderedCollectionPage() vocab.ActivityStreamsOrderedCollectionPage {
return this.activitystreamsOrderedCollectionPageMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return an arbitrary value.
func (this ActivityStreamsCurrentProperty) GetIRI() *url.URL {
return this.iri
}
// GetType returns the value in this property as a Type. Returns nil if the value
// is not an ActivityStreams type, such as an IRI or another value.
func (this ActivityStreamsCurrentProperty) GetType() vocab.Type {
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage()
}
if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink()
}
if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention()
}
if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage()
}
return nil
}
// HasAny returns true if any of the different values is set.
func (this ActivityStreamsCurrentProperty) HasAny() bool {
return this.IsActivityStreamsCollectionPage() ||
this.IsActivityStreamsLink() ||
this.IsActivityStreamsMention() ||
this.IsActivityStreamsOrderedCollectionPage() ||
this.iri != nil
}
// IsActivityStreamsCollectionPage returns true if this property has a type of
// "CollectionPage". When true, use the GetActivityStreamsCollectionPage and
// SetActivityStreamsCollectionPage methods to access and set this property.
func (this ActivityStreamsCurrentProperty) IsActivityStreamsCollectionPage() bool {
return this.activitystreamsCollectionPageMember != nil
}
// IsActivityStreamsLink returns true if this property has a type of "Link". When
// true, use the GetActivityStreamsLink and SetActivityStreamsLink methods to
// access and set this property.
func (this ActivityStreamsCurrentProperty) IsActivityStreamsLink() bool {
return this.activitystreamsLinkMember != nil
}
// IsActivityStreamsMention returns true if this property has a type of "Mention".
// When true, use the GetActivityStreamsMention and SetActivityStreamsMention
// methods to access and set this property.
func (this ActivityStreamsCurrentProperty) IsActivityStreamsMention() bool {
return this.activitystreamsMentionMember != nil
}
// IsActivityStreamsOrderedCollectionPage returns true if this property has a type
// of "OrderedCollectionPage". When true, use the
// GetActivityStreamsOrderedCollectionPage and
// SetActivityStreamsOrderedCollectionPage methods to access and set this
// property.
func (this ActivityStreamsCurrentProperty) IsActivityStreamsOrderedCollectionPage() bool {
return this.activitystreamsOrderedCollectionPageMember != nil
}
// IsIRI returns true if this property is an IRI. When true, use GetIRI and SetIRI
// to access and set this property
func (this ActivityStreamsCurrentProperty) IsIRI() bool {
return this.iri != nil
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsCurrentProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
if this.IsActivityStreamsCollectionPage() {
child = this.GetActivityStreamsCollectionPage().JSONLDContext()
} else if this.IsActivityStreamsLink() {
child = this.GetActivityStreamsLink().JSONLDContext()
} else if this.IsActivityStreamsMention() {
child = this.GetActivityStreamsMention().JSONLDContext()
} else if this.IsActivityStreamsOrderedCollectionPage() {
child = this.GetActivityStreamsOrderedCollectionPage().JSONLDContext()
}
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsCurrentProperty) KindIndex() int {
if this.IsActivityStreamsCollectionPage() {
return 0
}
if this.IsActivityStreamsLink() {
return 1
}
if this.IsActivityStreamsMention() {
return 2
}
if this.IsActivityStreamsOrderedCollectionPage() {
return 3
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsCurrentProperty) LessThan(o vocab.ActivityStreamsCurrentProperty) bool {
idx1 := this.KindIndex()
idx2 := o.KindIndex()
if idx1 < idx2 {
return true
} else if idx1 > idx2 {
return false
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().LessThan(o.GetActivityStreamsCollectionPage())
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().LessThan(o.GetActivityStreamsLink())
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().LessThan(o.GetActivityStreamsMention())
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().LessThan(o.GetActivityStreamsOrderedCollectionPage())
} else if this.IsIRI() {
return this.iri.String() < o.GetIRI().String()
}
return false
}
// Name returns the name of this property: "current".
func (this ActivityStreamsCurrentProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "current"
} else {
return "current"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsCurrentProperty) Serialize() (interface{}, error) {
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().Serialize()
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().Serialize()
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().Serialize()
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().Serialize()
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// SetActivityStreamsCollectionPage sets the value of this property. Calling
// IsActivityStreamsCollectionPage afterwards returns true.
func (this *ActivityStreamsCurrentProperty) SetActivityStreamsCollectionPage(v vocab.ActivityStreamsCollectionPage) {
this.Clear()
this.activitystreamsCollectionPageMember = v
}
// SetActivityStreamsLink sets the value of this property. Calling
// IsActivityStreamsLink afterwards returns true.
func (this *ActivityStreamsCurrentProperty) SetActivityStreamsLink(v vocab.ActivityStreamsLink) {
this.Clear()
this.activitystreamsLinkMember = v
}
// SetActivityStreamsMention sets the value of this property. Calling
// IsActivityStreamsMention afterwards returns true.
func (this *ActivityStreamsCurrentProperty) SetActivityStreamsMention(v vocab.ActivityStreamsMention) {
this.Clear()
this.activitystreamsMentionMember = v
}
// SetActivityStreamsOrderedCollectionPage sets the value of this property.
// Calling IsActivityStreamsOrderedCollectionPage afterwards returns true.
func (this *ActivityStreamsCurrentProperty) SetActivityStreamsOrderedCollectionPage(v vocab.ActivityStreamsOrderedCollectionPage) {
this.Clear()
this.activitystreamsOrderedCollectionPageMember = v
}
// SetIRI sets the value of this property. Calling IsIRI afterwards returns true.
func (this *ActivityStreamsCurrentProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}
// SetType attempts to set the property for the arbitrary type. Returns an error
// if it is not a valid type to set on this property.
func (this *ActivityStreamsCurrentProperty) SetType(t vocab.Type) error {
if v, ok := t.(vocab.ActivityStreamsCollectionPage); ok {
this.SetActivityStreamsCollectionPage(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsLink); ok {
this.SetActivityStreamsLink(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsMention); ok {
this.SetActivityStreamsMention(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsOrderedCollectionPage); ok {
this.SetActivityStreamsOrderedCollectionPage(v)
return nil
}
return fmt.Errorf("illegal type to set on current property: %T", t)
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertydeleted contains the implementation for the deleted property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertydeleted

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package propertydeleted
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface{}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,204 @@
// Code generated by astool. DO NOT EDIT.
package propertydeleted
import (
"fmt"
datetime "github.com/go-fed/activity/streams/values/dateTime"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
"time"
)
// ActivityStreamsDeletedProperty is the functional property "deleted". It is
// permitted to be a single default-valued value type.
type ActivityStreamsDeletedProperty struct {
xmlschemaDateTimeMember time.Time
hasDateTimeMember bool
unknown interface{}
iri *url.URL
alias string
}
// DeserializeDeletedProperty creates a "deleted" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeDeletedProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsDeletedProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "deleted"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "deleted")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsDeletedProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if v, err := datetime.DeserializeDateTime(i); err == nil {
this := &ActivityStreamsDeletedProperty{
alias: alias,
hasDateTimeMember: true,
xmlschemaDateTimeMember: v,
}
return this, nil
}
this := &ActivityStreamsDeletedProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsDeletedProperty creates a new deleted property.
func NewActivityStreamsDeletedProperty() *ActivityStreamsDeletedProperty {
return &ActivityStreamsDeletedProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling IsXMLSchemaDateTime
// afterwards will return false.
func (this *ActivityStreamsDeletedProperty) Clear() {
this.unknown = nil
this.iri = nil
this.hasDateTimeMember = false
}
// Get returns the value of this property. When IsXMLSchemaDateTime returns false,
// Get will return any arbitrary value.
func (this ActivityStreamsDeletedProperty) Get() time.Time {
return this.xmlschemaDateTimeMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return any arbitrary value.
func (this ActivityStreamsDeletedProperty) GetIRI() *url.URL {
return this.iri
}
// HasAny returns true if the value or IRI is set.
func (this ActivityStreamsDeletedProperty) HasAny() bool {
return this.IsXMLSchemaDateTime() || this.iri != nil
}
// IsIRI returns true if this property is an IRI.
func (this ActivityStreamsDeletedProperty) IsIRI() bool {
return this.iri != nil
}
// IsXMLSchemaDateTime returns true if this property is set and not an IRI.
func (this ActivityStreamsDeletedProperty) IsXMLSchemaDateTime() bool {
return this.hasDateTimeMember
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsDeletedProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsDeletedProperty) KindIndex() int {
if this.IsXMLSchemaDateTime() {
return 0
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsDeletedProperty) LessThan(o vocab.ActivityStreamsDeletedProperty) bool {
// LessThan comparison for if either or both are IRIs.
if this.IsIRI() && o.IsIRI() {
return this.iri.String() < o.GetIRI().String()
} else if this.IsIRI() {
// IRIs are always less than other values, none, or unknowns
return true
} else if o.IsIRI() {
// This other, none, or unknown value is always greater than IRIs
return false
}
// LessThan comparison for the single value or unknown value.
if !this.IsXMLSchemaDateTime() && !o.IsXMLSchemaDateTime() {
// Both are unknowns.
return false
} else if this.IsXMLSchemaDateTime() && !o.IsXMLSchemaDateTime() {
// Values are always greater than unknown values.
return false
} else if !this.IsXMLSchemaDateTime() && o.IsXMLSchemaDateTime() {
// Unknowns are always less than known values.
return true
} else {
// Actual comparison.
return datetime.LessDateTime(this.Get(), o.Get())
}
}
// Name returns the name of this property: "deleted".
func (this ActivityStreamsDeletedProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "deleted"
} else {
return "deleted"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsDeletedProperty) Serialize() (interface{}, error) {
if this.IsXMLSchemaDateTime() {
return datetime.SerializeDateTime(this.Get())
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// Set sets the value of this property. Calling IsXMLSchemaDateTime afterwards
// will return true.
func (this *ActivityStreamsDeletedProperty) Set(v time.Time) {
this.Clear()
this.xmlschemaDateTimeMember = v
this.hasDateTimeMember = true
}
// SetIRI sets the value of this property. Calling IsIRI afterwards will return
// true.
func (this *ActivityStreamsDeletedProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertydescribes contains the implementation for the describes
// property. All applications are strongly encouraged to use the interface
// instead of this concrete definition. The interfaces allow applications to
// consume only the types and properties needed and be independent of the
// go-fed implementation if another alternative implementation is created.
// This package is code-generated and subject to the same license as the
// go-fed tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertydescribes

View file

@ -0,0 +1,257 @@
// Code generated by astool. DO NOT EDIT.
package propertydescribes
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyduration contains the implementation for the duration property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyduration

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package propertyduration
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface{}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,204 @@
// Code generated by astool. DO NOT EDIT.
package propertyduration
import (
"fmt"
duration "github.com/go-fed/activity/streams/values/duration"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
"time"
)
// ActivityStreamsDurationProperty is the functional property "duration". It is
// permitted to be a single default-valued value type.
type ActivityStreamsDurationProperty struct {
xmlschemaDurationMember time.Duration
hasDurationMember bool
unknown interface{}
iri *url.URL
alias string
}
// DeserializeDurationProperty creates a "duration" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeDurationProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsDurationProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "duration"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "duration")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsDurationProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if v, err := duration.DeserializeDuration(i); err == nil {
this := &ActivityStreamsDurationProperty{
alias: alias,
hasDurationMember: true,
xmlschemaDurationMember: v,
}
return this, nil
}
this := &ActivityStreamsDurationProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsDurationProperty creates a new duration property.
func NewActivityStreamsDurationProperty() *ActivityStreamsDurationProperty {
return &ActivityStreamsDurationProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling IsXMLSchemaDuration
// afterwards will return false.
func (this *ActivityStreamsDurationProperty) Clear() {
this.unknown = nil
this.iri = nil
this.hasDurationMember = false
}
// Get returns the value of this property. When IsXMLSchemaDuration returns false,
// Get will return any arbitrary value.
func (this ActivityStreamsDurationProperty) Get() time.Duration {
return this.xmlschemaDurationMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return any arbitrary value.
func (this ActivityStreamsDurationProperty) GetIRI() *url.URL {
return this.iri
}
// HasAny returns true if the value or IRI is set.
func (this ActivityStreamsDurationProperty) HasAny() bool {
return this.IsXMLSchemaDuration() || this.iri != nil
}
// IsIRI returns true if this property is an IRI.
func (this ActivityStreamsDurationProperty) IsIRI() bool {
return this.iri != nil
}
// IsXMLSchemaDuration returns true if this property is set and not an IRI.
func (this ActivityStreamsDurationProperty) IsXMLSchemaDuration() bool {
return this.hasDurationMember
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsDurationProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsDurationProperty) KindIndex() int {
if this.IsXMLSchemaDuration() {
return 0
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsDurationProperty) LessThan(o vocab.ActivityStreamsDurationProperty) bool {
// LessThan comparison for if either or both are IRIs.
if this.IsIRI() && o.IsIRI() {
return this.iri.String() < o.GetIRI().String()
} else if this.IsIRI() {
// IRIs are always less than other values, none, or unknowns
return true
} else if o.IsIRI() {
// This other, none, or unknown value is always greater than IRIs
return false
}
// LessThan comparison for the single value or unknown value.
if !this.IsXMLSchemaDuration() && !o.IsXMLSchemaDuration() {
// Both are unknowns.
return false
} else if this.IsXMLSchemaDuration() && !o.IsXMLSchemaDuration() {
// Values are always greater than unknown values.
return false
} else if !this.IsXMLSchemaDuration() && o.IsXMLSchemaDuration() {
// Unknowns are always less than known values.
return true
} else {
// Actual comparison.
return duration.LessDuration(this.Get(), o.Get())
}
}
// Name returns the name of this property: "duration".
func (this ActivityStreamsDurationProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "duration"
} else {
return "duration"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsDurationProperty) Serialize() (interface{}, error) {
if this.IsXMLSchemaDuration() {
return duration.SerializeDuration(this.Get())
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// Set sets the value of this property. Calling IsXMLSchemaDuration afterwards
// will return true.
func (this *ActivityStreamsDurationProperty) Set(v time.Duration) {
this.Clear()
this.xmlschemaDurationMember = v
this.hasDurationMember = true
}
// SetIRI sets the value of this property. Calling IsIRI afterwards will return
// true.
func (this *ActivityStreamsDurationProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyendtime contains the implementation for the endTime property.
// All applications are strongly encouraged to use the interface instead of
// this concrete definition. The interfaces allow applications to consume only
// the types and properties needed and be independent of the go-fed
// implementation if another alternative implementation is created. This
// package is code-generated and subject to the same license as the go-fed
// tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyendtime

View file

@ -0,0 +1,15 @@
// Code generated by astool. DO NOT EDIT.
package propertyendtime
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface{}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,204 @@
// Code generated by astool. DO NOT EDIT.
package propertyendtime
import (
"fmt"
datetime "github.com/go-fed/activity/streams/values/dateTime"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
"time"
)
// ActivityStreamsEndTimeProperty is the functional property "endTime". It is
// permitted to be a single default-valued value type.
type ActivityStreamsEndTimeProperty struct {
xmlschemaDateTimeMember time.Time
hasDateTimeMember bool
unknown interface{}
iri *url.URL
alias string
}
// DeserializeEndTimeProperty creates a "endTime" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeEndTimeProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsEndTimeProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "endTime"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "endTime")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsEndTimeProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if v, err := datetime.DeserializeDateTime(i); err == nil {
this := &ActivityStreamsEndTimeProperty{
alias: alias,
hasDateTimeMember: true,
xmlschemaDateTimeMember: v,
}
return this, nil
}
this := &ActivityStreamsEndTimeProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsEndTimeProperty creates a new endTime property.
func NewActivityStreamsEndTimeProperty() *ActivityStreamsEndTimeProperty {
return &ActivityStreamsEndTimeProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling IsXMLSchemaDateTime
// afterwards will return false.
func (this *ActivityStreamsEndTimeProperty) Clear() {
this.unknown = nil
this.iri = nil
this.hasDateTimeMember = false
}
// Get returns the value of this property. When IsXMLSchemaDateTime returns false,
// Get will return any arbitrary value.
func (this ActivityStreamsEndTimeProperty) Get() time.Time {
return this.xmlschemaDateTimeMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return any arbitrary value.
func (this ActivityStreamsEndTimeProperty) GetIRI() *url.URL {
return this.iri
}
// HasAny returns true if the value or IRI is set.
func (this ActivityStreamsEndTimeProperty) HasAny() bool {
return this.IsXMLSchemaDateTime() || this.iri != nil
}
// IsIRI returns true if this property is an IRI.
func (this ActivityStreamsEndTimeProperty) IsIRI() bool {
return this.iri != nil
}
// IsXMLSchemaDateTime returns true if this property is set and not an IRI.
func (this ActivityStreamsEndTimeProperty) IsXMLSchemaDateTime() bool {
return this.hasDateTimeMember
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsEndTimeProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsEndTimeProperty) KindIndex() int {
if this.IsXMLSchemaDateTime() {
return 0
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsEndTimeProperty) LessThan(o vocab.ActivityStreamsEndTimeProperty) bool {
// LessThan comparison for if either or both are IRIs.
if this.IsIRI() && o.IsIRI() {
return this.iri.String() < o.GetIRI().String()
} else if this.IsIRI() {
// IRIs are always less than other values, none, or unknowns
return true
} else if o.IsIRI() {
// This other, none, or unknown value is always greater than IRIs
return false
}
// LessThan comparison for the single value or unknown value.
if !this.IsXMLSchemaDateTime() && !o.IsXMLSchemaDateTime() {
// Both are unknowns.
return false
} else if this.IsXMLSchemaDateTime() && !o.IsXMLSchemaDateTime() {
// Values are always greater than unknown values.
return false
} else if !this.IsXMLSchemaDateTime() && o.IsXMLSchemaDateTime() {
// Unknowns are always less than known values.
return true
} else {
// Actual comparison.
return datetime.LessDateTime(this.Get(), o.Get())
}
}
// Name returns the name of this property: "endTime".
func (this ActivityStreamsEndTimeProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "endTime"
} else {
return "endTime"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsEndTimeProperty) Serialize() (interface{}, error) {
if this.IsXMLSchemaDateTime() {
return datetime.SerializeDateTime(this.Get())
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// Set sets the value of this property. Calling IsXMLSchemaDateTime afterwards
// will return true.
func (this *ActivityStreamsEndTimeProperty) Set(v time.Time) {
this.Clear()
this.xmlschemaDateTimeMember = v
this.hasDateTimeMember = true
}
// SetIRI sets the value of this property. Calling IsIRI afterwards will return
// true.
func (this *ActivityStreamsEndTimeProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyfirst contains the implementation for the first property. All
// applications are strongly encouraged to use the interface instead of this
// concrete definition. The interfaces allow applications to consume only the
// types and properties needed and be independent of the go-fed implementation
// if another alternative implementation is created. This package is
// code-generated and subject to the same license as the go-fed tool used to
// generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyfirst

View file

@ -0,0 +1,35 @@
// Code generated by astool. DO NOT EDIT.
package propertyfirst
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeLinkActivityStreams returns the deserialization method for
// the "ActivityStreamsLink" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLinkActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLink, error)
// DeserializeMentionActivityStreams returns the deserialization method
// for the "ActivityStreamsMention" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeMentionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMention, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,359 @@
// Code generated by astool. DO NOT EDIT.
package propertyfirst
import (
"fmt"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsFirstProperty is the functional property "first". It is
// permitted to be one of multiple value types. At most, one type of value can
// be present, or none at all. Setting a value will clear the other types of
// values so that only one of the 'Is' methods will return true. It is
// possible to clear all values, so that this property is empty.
type ActivityStreamsFirstProperty struct {
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
activitystreamsLinkMember vocab.ActivityStreamsLink
activitystreamsMentionMember vocab.ActivityStreamsMention
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
unknown interface{}
iri *url.URL
alias string
}
// DeserializeFirstProperty creates a "first" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeFirstProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsFirstProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "first"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "first")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsFirstProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if m, ok := i.(map[string]interface{}); ok {
if v, err := mgr.DeserializeCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFirstProperty{
activitystreamsCollectionPageMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeLinkActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFirstProperty{
activitystreamsLinkMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeMentionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFirstProperty{
activitystreamsMentionMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeOrderedCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFirstProperty{
activitystreamsOrderedCollectionPageMember: v,
alias: alias,
}
return this, nil
}
}
this := &ActivityStreamsFirstProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsFirstProperty creates a new first property.
func NewActivityStreamsFirstProperty() *ActivityStreamsFirstProperty {
return &ActivityStreamsFirstProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling HasAny or any of the
// 'Is' methods afterwards will return false.
func (this *ActivityStreamsFirstProperty) Clear() {
this.activitystreamsCollectionPageMember = nil
this.activitystreamsLinkMember = nil
this.activitystreamsMentionMember = nil
this.activitystreamsOrderedCollectionPageMember = nil
this.unknown = nil
this.iri = nil
}
// GetActivityStreamsCollectionPage returns the value of this property. When
// IsActivityStreamsCollectionPage returns false,
// GetActivityStreamsCollectionPage will return an arbitrary value.
func (this ActivityStreamsFirstProperty) GetActivityStreamsCollectionPage() vocab.ActivityStreamsCollectionPage {
return this.activitystreamsCollectionPageMember
}
// GetActivityStreamsLink returns the value of this property. When
// IsActivityStreamsLink returns false, GetActivityStreamsLink will return an
// arbitrary value.
func (this ActivityStreamsFirstProperty) GetActivityStreamsLink() vocab.ActivityStreamsLink {
return this.activitystreamsLinkMember
}
// GetActivityStreamsMention returns the value of this property. When
// IsActivityStreamsMention returns false, GetActivityStreamsMention will
// return an arbitrary value.
func (this ActivityStreamsFirstProperty) GetActivityStreamsMention() vocab.ActivityStreamsMention {
return this.activitystreamsMentionMember
}
// GetActivityStreamsOrderedCollectionPage returns the value of this property.
// When IsActivityStreamsOrderedCollectionPage returns false,
// GetActivityStreamsOrderedCollectionPage will return an arbitrary value.
func (this ActivityStreamsFirstProperty) GetActivityStreamsOrderedCollectionPage() vocab.ActivityStreamsOrderedCollectionPage {
return this.activitystreamsOrderedCollectionPageMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return an arbitrary value.
func (this ActivityStreamsFirstProperty) GetIRI() *url.URL {
return this.iri
}
// GetType returns the value in this property as a Type. Returns nil if the value
// is not an ActivityStreams type, such as an IRI or another value.
func (this ActivityStreamsFirstProperty) GetType() vocab.Type {
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage()
}
if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink()
}
if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention()
}
if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage()
}
return nil
}
// HasAny returns true if any of the different values is set.
func (this ActivityStreamsFirstProperty) HasAny() bool {
return this.IsActivityStreamsCollectionPage() ||
this.IsActivityStreamsLink() ||
this.IsActivityStreamsMention() ||
this.IsActivityStreamsOrderedCollectionPage() ||
this.iri != nil
}
// IsActivityStreamsCollectionPage returns true if this property has a type of
// "CollectionPage". When true, use the GetActivityStreamsCollectionPage and
// SetActivityStreamsCollectionPage methods to access and set this property.
func (this ActivityStreamsFirstProperty) IsActivityStreamsCollectionPage() bool {
return this.activitystreamsCollectionPageMember != nil
}
// IsActivityStreamsLink returns true if this property has a type of "Link". When
// true, use the GetActivityStreamsLink and SetActivityStreamsLink methods to
// access and set this property.
func (this ActivityStreamsFirstProperty) IsActivityStreamsLink() bool {
return this.activitystreamsLinkMember != nil
}
// IsActivityStreamsMention returns true if this property has a type of "Mention".
// When true, use the GetActivityStreamsMention and SetActivityStreamsMention
// methods to access and set this property.
func (this ActivityStreamsFirstProperty) IsActivityStreamsMention() bool {
return this.activitystreamsMentionMember != nil
}
// IsActivityStreamsOrderedCollectionPage returns true if this property has a type
// of "OrderedCollectionPage". When true, use the
// GetActivityStreamsOrderedCollectionPage and
// SetActivityStreamsOrderedCollectionPage methods to access and set this
// property.
func (this ActivityStreamsFirstProperty) IsActivityStreamsOrderedCollectionPage() bool {
return this.activitystreamsOrderedCollectionPageMember != nil
}
// IsIRI returns true if this property is an IRI. When true, use GetIRI and SetIRI
// to access and set this property
func (this ActivityStreamsFirstProperty) IsIRI() bool {
return this.iri != nil
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsFirstProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
if this.IsActivityStreamsCollectionPage() {
child = this.GetActivityStreamsCollectionPage().JSONLDContext()
} else if this.IsActivityStreamsLink() {
child = this.GetActivityStreamsLink().JSONLDContext()
} else if this.IsActivityStreamsMention() {
child = this.GetActivityStreamsMention().JSONLDContext()
} else if this.IsActivityStreamsOrderedCollectionPage() {
child = this.GetActivityStreamsOrderedCollectionPage().JSONLDContext()
}
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsFirstProperty) KindIndex() int {
if this.IsActivityStreamsCollectionPage() {
return 0
}
if this.IsActivityStreamsLink() {
return 1
}
if this.IsActivityStreamsMention() {
return 2
}
if this.IsActivityStreamsOrderedCollectionPage() {
return 3
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsFirstProperty) LessThan(o vocab.ActivityStreamsFirstProperty) bool {
idx1 := this.KindIndex()
idx2 := o.KindIndex()
if idx1 < idx2 {
return true
} else if idx1 > idx2 {
return false
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().LessThan(o.GetActivityStreamsCollectionPage())
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().LessThan(o.GetActivityStreamsLink())
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().LessThan(o.GetActivityStreamsMention())
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().LessThan(o.GetActivityStreamsOrderedCollectionPage())
} else if this.IsIRI() {
return this.iri.String() < o.GetIRI().String()
}
return false
}
// Name returns the name of this property: "first".
func (this ActivityStreamsFirstProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "first"
} else {
return "first"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsFirstProperty) Serialize() (interface{}, error) {
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().Serialize()
} else if this.IsActivityStreamsLink() {
return this.GetActivityStreamsLink().Serialize()
} else if this.IsActivityStreamsMention() {
return this.GetActivityStreamsMention().Serialize()
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().Serialize()
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// SetActivityStreamsCollectionPage sets the value of this property. Calling
// IsActivityStreamsCollectionPage afterwards returns true.
func (this *ActivityStreamsFirstProperty) SetActivityStreamsCollectionPage(v vocab.ActivityStreamsCollectionPage) {
this.Clear()
this.activitystreamsCollectionPageMember = v
}
// SetActivityStreamsLink sets the value of this property. Calling
// IsActivityStreamsLink afterwards returns true.
func (this *ActivityStreamsFirstProperty) SetActivityStreamsLink(v vocab.ActivityStreamsLink) {
this.Clear()
this.activitystreamsLinkMember = v
}
// SetActivityStreamsMention sets the value of this property. Calling
// IsActivityStreamsMention afterwards returns true.
func (this *ActivityStreamsFirstProperty) SetActivityStreamsMention(v vocab.ActivityStreamsMention) {
this.Clear()
this.activitystreamsMentionMember = v
}
// SetActivityStreamsOrderedCollectionPage sets the value of this property.
// Calling IsActivityStreamsOrderedCollectionPage afterwards returns true.
func (this *ActivityStreamsFirstProperty) SetActivityStreamsOrderedCollectionPage(v vocab.ActivityStreamsOrderedCollectionPage) {
this.Clear()
this.activitystreamsOrderedCollectionPageMember = v
}
// SetIRI sets the value of this property. Calling IsIRI afterwards returns true.
func (this *ActivityStreamsFirstProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}
// SetType attempts to set the property for the arbitrary type. Returns an error
// if it is not a valid type to set on this property.
func (this *ActivityStreamsFirstProperty) SetType(t vocab.Type) error {
if v, ok := t.(vocab.ActivityStreamsCollectionPage); ok {
this.SetActivityStreamsCollectionPage(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsLink); ok {
this.SetActivityStreamsLink(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsMention); ok {
this.SetActivityStreamsMention(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsOrderedCollectionPage); ok {
this.SetActivityStreamsOrderedCollectionPage(v)
return nil
}
return fmt.Errorf("illegal type to set on first property: %T", t)
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyfollowers contains the implementation for the followers
// property. All applications are strongly encouraged to use the interface
// instead of this concrete definition. The interfaces allow applications to
// consume only the types and properties needed and be independent of the
// go-fed implementation if another alternative implementation is created.
// This package is code-generated and subject to the same license as the
// go-fed tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyfollowers

View file

@ -0,0 +1,35 @@
// Code generated by astool. DO NOT EDIT.
package propertyfollowers
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,360 @@
// Code generated by astool. DO NOT EDIT.
package propertyfollowers
import (
"fmt"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsFollowersProperty is the functional property "followers". It is
// permitted to be one of multiple value types. At most, one type of value can
// be present, or none at all. Setting a value will clear the other types of
// values so that only one of the 'Is' methods will return true. It is
// possible to clear all values, so that this property is empty.
type ActivityStreamsFollowersProperty struct {
activitystreamsOrderedCollectionMember vocab.ActivityStreamsOrderedCollection
activitystreamsCollectionMember vocab.ActivityStreamsCollection
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
unknown interface{}
iri *url.URL
alias string
}
// DeserializeFollowersProperty creates a "followers" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeFollowersProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsFollowersProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "followers"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "followers")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsFollowersProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if m, ok := i.(map[string]interface{}); ok {
if v, err := mgr.DeserializeOrderedCollectionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowersProperty{
activitystreamsOrderedCollectionMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeCollectionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowersProperty{
activitystreamsCollectionMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowersProperty{
activitystreamsCollectionPageMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeOrderedCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowersProperty{
activitystreamsOrderedCollectionPageMember: v,
alias: alias,
}
return this, nil
}
}
this := &ActivityStreamsFollowersProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsFollowersProperty creates a new followers property.
func NewActivityStreamsFollowersProperty() *ActivityStreamsFollowersProperty {
return &ActivityStreamsFollowersProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling HasAny or any of the
// 'Is' methods afterwards will return false.
func (this *ActivityStreamsFollowersProperty) Clear() {
this.activitystreamsOrderedCollectionMember = nil
this.activitystreamsCollectionMember = nil
this.activitystreamsCollectionPageMember = nil
this.activitystreamsOrderedCollectionPageMember = nil
this.unknown = nil
this.iri = nil
}
// GetActivityStreamsCollection returns the value of this property. When
// IsActivityStreamsCollection returns false, GetActivityStreamsCollection
// will return an arbitrary value.
func (this ActivityStreamsFollowersProperty) GetActivityStreamsCollection() vocab.ActivityStreamsCollection {
return this.activitystreamsCollectionMember
}
// GetActivityStreamsCollectionPage returns the value of this property. When
// IsActivityStreamsCollectionPage returns false,
// GetActivityStreamsCollectionPage will return an arbitrary value.
func (this ActivityStreamsFollowersProperty) GetActivityStreamsCollectionPage() vocab.ActivityStreamsCollectionPage {
return this.activitystreamsCollectionPageMember
}
// GetActivityStreamsOrderedCollection returns the value of this property. When
// IsActivityStreamsOrderedCollection returns false,
// GetActivityStreamsOrderedCollection will return an arbitrary value.
func (this ActivityStreamsFollowersProperty) GetActivityStreamsOrderedCollection() vocab.ActivityStreamsOrderedCollection {
return this.activitystreamsOrderedCollectionMember
}
// GetActivityStreamsOrderedCollectionPage returns the value of this property.
// When IsActivityStreamsOrderedCollectionPage returns false,
// GetActivityStreamsOrderedCollectionPage will return an arbitrary value.
func (this ActivityStreamsFollowersProperty) GetActivityStreamsOrderedCollectionPage() vocab.ActivityStreamsOrderedCollectionPage {
return this.activitystreamsOrderedCollectionPageMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return an arbitrary value.
func (this ActivityStreamsFollowersProperty) GetIRI() *url.URL {
return this.iri
}
// GetType returns the value in this property as a Type. Returns nil if the value
// is not an ActivityStreams type, such as an IRI or another value.
func (this ActivityStreamsFollowersProperty) GetType() vocab.Type {
if this.IsActivityStreamsOrderedCollection() {
return this.GetActivityStreamsOrderedCollection()
}
if this.IsActivityStreamsCollection() {
return this.GetActivityStreamsCollection()
}
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage()
}
if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage()
}
return nil
}
// HasAny returns true if any of the different values is set.
func (this ActivityStreamsFollowersProperty) HasAny() bool {
return this.IsActivityStreamsOrderedCollection() ||
this.IsActivityStreamsCollection() ||
this.IsActivityStreamsCollectionPage() ||
this.IsActivityStreamsOrderedCollectionPage() ||
this.iri != nil
}
// IsActivityStreamsCollection returns true if this property has a type of
// "Collection". When true, use the GetActivityStreamsCollection and
// SetActivityStreamsCollection methods to access and set this property.
func (this ActivityStreamsFollowersProperty) IsActivityStreamsCollection() bool {
return this.activitystreamsCollectionMember != nil
}
// IsActivityStreamsCollectionPage returns true if this property has a type of
// "CollectionPage". When true, use the GetActivityStreamsCollectionPage and
// SetActivityStreamsCollectionPage methods to access and set this property.
func (this ActivityStreamsFollowersProperty) IsActivityStreamsCollectionPage() bool {
return this.activitystreamsCollectionPageMember != nil
}
// IsActivityStreamsOrderedCollection returns true if this property has a type of
// "OrderedCollection". When true, use the GetActivityStreamsOrderedCollection
// and SetActivityStreamsOrderedCollection methods to access and set this
// property.
func (this ActivityStreamsFollowersProperty) IsActivityStreamsOrderedCollection() bool {
return this.activitystreamsOrderedCollectionMember != nil
}
// IsActivityStreamsOrderedCollectionPage returns true if this property has a type
// of "OrderedCollectionPage". When true, use the
// GetActivityStreamsOrderedCollectionPage and
// SetActivityStreamsOrderedCollectionPage methods to access and set this
// property.
func (this ActivityStreamsFollowersProperty) IsActivityStreamsOrderedCollectionPage() bool {
return this.activitystreamsOrderedCollectionPageMember != nil
}
// IsIRI returns true if this property is an IRI. When true, use GetIRI and SetIRI
// to access and set this property
func (this ActivityStreamsFollowersProperty) IsIRI() bool {
return this.iri != nil
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsFollowersProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
if this.IsActivityStreamsOrderedCollection() {
child = this.GetActivityStreamsOrderedCollection().JSONLDContext()
} else if this.IsActivityStreamsCollection() {
child = this.GetActivityStreamsCollection().JSONLDContext()
} else if this.IsActivityStreamsCollectionPage() {
child = this.GetActivityStreamsCollectionPage().JSONLDContext()
} else if this.IsActivityStreamsOrderedCollectionPage() {
child = this.GetActivityStreamsOrderedCollectionPage().JSONLDContext()
}
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsFollowersProperty) KindIndex() int {
if this.IsActivityStreamsOrderedCollection() {
return 0
}
if this.IsActivityStreamsCollection() {
return 1
}
if this.IsActivityStreamsCollectionPage() {
return 2
}
if this.IsActivityStreamsOrderedCollectionPage() {
return 3
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsFollowersProperty) LessThan(o vocab.ActivityStreamsFollowersProperty) bool {
idx1 := this.KindIndex()
idx2 := o.KindIndex()
if idx1 < idx2 {
return true
} else if idx1 > idx2 {
return false
} else if this.IsActivityStreamsOrderedCollection() {
return this.GetActivityStreamsOrderedCollection().LessThan(o.GetActivityStreamsOrderedCollection())
} else if this.IsActivityStreamsCollection() {
return this.GetActivityStreamsCollection().LessThan(o.GetActivityStreamsCollection())
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().LessThan(o.GetActivityStreamsCollectionPage())
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().LessThan(o.GetActivityStreamsOrderedCollectionPage())
} else if this.IsIRI() {
return this.iri.String() < o.GetIRI().String()
}
return false
}
// Name returns the name of this property: "followers".
func (this ActivityStreamsFollowersProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "followers"
} else {
return "followers"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsFollowersProperty) Serialize() (interface{}, error) {
if this.IsActivityStreamsOrderedCollection() {
return this.GetActivityStreamsOrderedCollection().Serialize()
} else if this.IsActivityStreamsCollection() {
return this.GetActivityStreamsCollection().Serialize()
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().Serialize()
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().Serialize()
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// SetActivityStreamsCollection sets the value of this property. Calling
// IsActivityStreamsCollection afterwards returns true.
func (this *ActivityStreamsFollowersProperty) SetActivityStreamsCollection(v vocab.ActivityStreamsCollection) {
this.Clear()
this.activitystreamsCollectionMember = v
}
// SetActivityStreamsCollectionPage sets the value of this property. Calling
// IsActivityStreamsCollectionPage afterwards returns true.
func (this *ActivityStreamsFollowersProperty) SetActivityStreamsCollectionPage(v vocab.ActivityStreamsCollectionPage) {
this.Clear()
this.activitystreamsCollectionPageMember = v
}
// SetActivityStreamsOrderedCollection sets the value of this property. Calling
// IsActivityStreamsOrderedCollection afterwards returns true.
func (this *ActivityStreamsFollowersProperty) SetActivityStreamsOrderedCollection(v vocab.ActivityStreamsOrderedCollection) {
this.Clear()
this.activitystreamsOrderedCollectionMember = v
}
// SetActivityStreamsOrderedCollectionPage sets the value of this property.
// Calling IsActivityStreamsOrderedCollectionPage afterwards returns true.
func (this *ActivityStreamsFollowersProperty) SetActivityStreamsOrderedCollectionPage(v vocab.ActivityStreamsOrderedCollectionPage) {
this.Clear()
this.activitystreamsOrderedCollectionPageMember = v
}
// SetIRI sets the value of this property. Calling IsIRI afterwards returns true.
func (this *ActivityStreamsFollowersProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}
// SetType attempts to set the property for the arbitrary type. Returns an error
// if it is not a valid type to set on this property.
func (this *ActivityStreamsFollowersProperty) SetType(t vocab.Type) error {
if v, ok := t.(vocab.ActivityStreamsOrderedCollection); ok {
this.SetActivityStreamsOrderedCollection(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsCollection); ok {
this.SetActivityStreamsCollection(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsCollectionPage); ok {
this.SetActivityStreamsCollectionPage(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsOrderedCollectionPage); ok {
this.SetActivityStreamsOrderedCollectionPage(v)
return nil
}
return fmt.Errorf("illegal type to set on followers property: %T", t)
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyfollowing contains the implementation for the following
// property. All applications are strongly encouraged to use the interface
// instead of this concrete definition. The interfaces allow applications to
// consume only the types and properties needed and be independent of the
// go-fed implementation if another alternative implementation is created.
// This package is code-generated and subject to the same license as the
// go-fed tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyfollowing

View file

@ -0,0 +1,35 @@
// Code generated by astool. DO NOT EDIT.
package propertyfollowing
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

View file

@ -0,0 +1,360 @@
// Code generated by astool. DO NOT EDIT.
package propertyfollowing
import (
"fmt"
vocab "github.com/go-fed/activity/streams/vocab"
"net/url"
)
// ActivityStreamsFollowingProperty is the functional property "following". It is
// permitted to be one of multiple value types. At most, one type of value can
// be present, or none at all. Setting a value will clear the other types of
// values so that only one of the 'Is' methods will return true. It is
// possible to clear all values, so that this property is empty.
type ActivityStreamsFollowingProperty struct {
activitystreamsOrderedCollectionMember vocab.ActivityStreamsOrderedCollection
activitystreamsCollectionMember vocab.ActivityStreamsCollection
activitystreamsCollectionPageMember vocab.ActivityStreamsCollectionPage
activitystreamsOrderedCollectionPageMember vocab.ActivityStreamsOrderedCollectionPage
unknown interface{}
iri *url.URL
alias string
}
// DeserializeFollowingProperty creates a "following" property from an interface
// representation that has been unmarshalled from a text or binary format.
func DeserializeFollowingProperty(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsFollowingProperty, error) {
alias := ""
if a, ok := aliasMap["https://www.w3.org/ns/activitystreams"]; ok {
alias = a
}
propName := "following"
if len(alias) > 0 {
// Use alias both to find the property, and set within the property.
propName = fmt.Sprintf("%s:%s", alias, "following")
}
i, ok := m[propName]
if ok {
if s, ok := i.(string); ok {
u, err := url.Parse(s)
// If error exists, don't error out -- skip this and treat as unknown string ([]byte) at worst
// Also, if no scheme exists, don't treat it as a URL -- net/url is greedy
if err == nil && len(u.Scheme) > 0 {
this := &ActivityStreamsFollowingProperty{
alias: alias,
iri: u,
}
return this, nil
}
}
if m, ok := i.(map[string]interface{}); ok {
if v, err := mgr.DeserializeOrderedCollectionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowingProperty{
activitystreamsOrderedCollectionMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeCollectionActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowingProperty{
activitystreamsCollectionMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowingProperty{
activitystreamsCollectionPageMember: v,
alias: alias,
}
return this, nil
} else if v, err := mgr.DeserializeOrderedCollectionPageActivityStreams()(m, aliasMap); err == nil {
this := &ActivityStreamsFollowingProperty{
activitystreamsOrderedCollectionPageMember: v,
alias: alias,
}
return this, nil
}
}
this := &ActivityStreamsFollowingProperty{
alias: alias,
unknown: i,
}
return this, nil
}
return nil, nil
}
// NewActivityStreamsFollowingProperty creates a new following property.
func NewActivityStreamsFollowingProperty() *ActivityStreamsFollowingProperty {
return &ActivityStreamsFollowingProperty{alias: ""}
}
// Clear ensures no value of this property is set. Calling HasAny or any of the
// 'Is' methods afterwards will return false.
func (this *ActivityStreamsFollowingProperty) Clear() {
this.activitystreamsOrderedCollectionMember = nil
this.activitystreamsCollectionMember = nil
this.activitystreamsCollectionPageMember = nil
this.activitystreamsOrderedCollectionPageMember = nil
this.unknown = nil
this.iri = nil
}
// GetActivityStreamsCollection returns the value of this property. When
// IsActivityStreamsCollection returns false, GetActivityStreamsCollection
// will return an arbitrary value.
func (this ActivityStreamsFollowingProperty) GetActivityStreamsCollection() vocab.ActivityStreamsCollection {
return this.activitystreamsCollectionMember
}
// GetActivityStreamsCollectionPage returns the value of this property. When
// IsActivityStreamsCollectionPage returns false,
// GetActivityStreamsCollectionPage will return an arbitrary value.
func (this ActivityStreamsFollowingProperty) GetActivityStreamsCollectionPage() vocab.ActivityStreamsCollectionPage {
return this.activitystreamsCollectionPageMember
}
// GetActivityStreamsOrderedCollection returns the value of this property. When
// IsActivityStreamsOrderedCollection returns false,
// GetActivityStreamsOrderedCollection will return an arbitrary value.
func (this ActivityStreamsFollowingProperty) GetActivityStreamsOrderedCollection() vocab.ActivityStreamsOrderedCollection {
return this.activitystreamsOrderedCollectionMember
}
// GetActivityStreamsOrderedCollectionPage returns the value of this property.
// When IsActivityStreamsOrderedCollectionPage returns false,
// GetActivityStreamsOrderedCollectionPage will return an arbitrary value.
func (this ActivityStreamsFollowingProperty) GetActivityStreamsOrderedCollectionPage() vocab.ActivityStreamsOrderedCollectionPage {
return this.activitystreamsOrderedCollectionPageMember
}
// GetIRI returns the IRI of this property. When IsIRI returns false, GetIRI will
// return an arbitrary value.
func (this ActivityStreamsFollowingProperty) GetIRI() *url.URL {
return this.iri
}
// GetType returns the value in this property as a Type. Returns nil if the value
// is not an ActivityStreams type, such as an IRI or another value.
func (this ActivityStreamsFollowingProperty) GetType() vocab.Type {
if this.IsActivityStreamsOrderedCollection() {
return this.GetActivityStreamsOrderedCollection()
}
if this.IsActivityStreamsCollection() {
return this.GetActivityStreamsCollection()
}
if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage()
}
if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage()
}
return nil
}
// HasAny returns true if any of the different values is set.
func (this ActivityStreamsFollowingProperty) HasAny() bool {
return this.IsActivityStreamsOrderedCollection() ||
this.IsActivityStreamsCollection() ||
this.IsActivityStreamsCollectionPage() ||
this.IsActivityStreamsOrderedCollectionPage() ||
this.iri != nil
}
// IsActivityStreamsCollection returns true if this property has a type of
// "Collection". When true, use the GetActivityStreamsCollection and
// SetActivityStreamsCollection methods to access and set this property.
func (this ActivityStreamsFollowingProperty) IsActivityStreamsCollection() bool {
return this.activitystreamsCollectionMember != nil
}
// IsActivityStreamsCollectionPage returns true if this property has a type of
// "CollectionPage". When true, use the GetActivityStreamsCollectionPage and
// SetActivityStreamsCollectionPage methods to access and set this property.
func (this ActivityStreamsFollowingProperty) IsActivityStreamsCollectionPage() bool {
return this.activitystreamsCollectionPageMember != nil
}
// IsActivityStreamsOrderedCollection returns true if this property has a type of
// "OrderedCollection". When true, use the GetActivityStreamsOrderedCollection
// and SetActivityStreamsOrderedCollection methods to access and set this
// property.
func (this ActivityStreamsFollowingProperty) IsActivityStreamsOrderedCollection() bool {
return this.activitystreamsOrderedCollectionMember != nil
}
// IsActivityStreamsOrderedCollectionPage returns true if this property has a type
// of "OrderedCollectionPage". When true, use the
// GetActivityStreamsOrderedCollectionPage and
// SetActivityStreamsOrderedCollectionPage methods to access and set this
// property.
func (this ActivityStreamsFollowingProperty) IsActivityStreamsOrderedCollectionPage() bool {
return this.activitystreamsOrderedCollectionPageMember != nil
}
// IsIRI returns true if this property is an IRI. When true, use GetIRI and SetIRI
// to access and set this property
func (this ActivityStreamsFollowingProperty) IsIRI() bool {
return this.iri != nil
}
// JSONLDContext returns the JSONLD URIs required in the context string for this
// property and the specific values that are set. The value in the map is the
// alias used to import the property's value or values.
func (this ActivityStreamsFollowingProperty) JSONLDContext() map[string]string {
m := map[string]string{"https://www.w3.org/ns/activitystreams": this.alias}
var child map[string]string
if this.IsActivityStreamsOrderedCollection() {
child = this.GetActivityStreamsOrderedCollection().JSONLDContext()
} else if this.IsActivityStreamsCollection() {
child = this.GetActivityStreamsCollection().JSONLDContext()
} else if this.IsActivityStreamsCollectionPage() {
child = this.GetActivityStreamsCollectionPage().JSONLDContext()
} else if this.IsActivityStreamsOrderedCollectionPage() {
child = this.GetActivityStreamsOrderedCollectionPage().JSONLDContext()
}
/*
Since the literal maps in this function are determined at
code-generation time, this loop should not overwrite an existing key with a
new value.
*/
for k, v := range child {
m[k] = v
}
return m
}
// KindIndex computes an arbitrary value for indexing this kind of value. This is
// a leaky API detail only for folks looking to replace the go-fed
// implementation. Applications should not use this method.
func (this ActivityStreamsFollowingProperty) KindIndex() int {
if this.IsActivityStreamsOrderedCollection() {
return 0
}
if this.IsActivityStreamsCollection() {
return 1
}
if this.IsActivityStreamsCollectionPage() {
return 2
}
if this.IsActivityStreamsOrderedCollectionPage() {
return 3
}
if this.IsIRI() {
return -2
}
return -1
}
// LessThan compares two instances of this property with an arbitrary but stable
// comparison. Applications should not use this because it is only meant to
// help alternative implementations to go-fed to be able to normalize
// nonfunctional properties.
func (this ActivityStreamsFollowingProperty) LessThan(o vocab.ActivityStreamsFollowingProperty) bool {
idx1 := this.KindIndex()
idx2 := o.KindIndex()
if idx1 < idx2 {
return true
} else if idx1 > idx2 {
return false
} else if this.IsActivityStreamsOrderedCollection() {
return this.GetActivityStreamsOrderedCollection().LessThan(o.GetActivityStreamsOrderedCollection())
} else if this.IsActivityStreamsCollection() {
return this.GetActivityStreamsCollection().LessThan(o.GetActivityStreamsCollection())
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().LessThan(o.GetActivityStreamsCollectionPage())
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().LessThan(o.GetActivityStreamsOrderedCollectionPage())
} else if this.IsIRI() {
return this.iri.String() < o.GetIRI().String()
}
return false
}
// Name returns the name of this property: "following".
func (this ActivityStreamsFollowingProperty) Name() string {
if len(this.alias) > 0 {
return this.alias + ":" + "following"
} else {
return "following"
}
}
// Serialize converts this into an interface representation suitable for
// marshalling into a text or binary format. Applications should not need this
// function as most typical use cases serialize types instead of individual
// properties. It is exposed for alternatives to go-fed implementations to use.
func (this ActivityStreamsFollowingProperty) Serialize() (interface{}, error) {
if this.IsActivityStreamsOrderedCollection() {
return this.GetActivityStreamsOrderedCollection().Serialize()
} else if this.IsActivityStreamsCollection() {
return this.GetActivityStreamsCollection().Serialize()
} else if this.IsActivityStreamsCollectionPage() {
return this.GetActivityStreamsCollectionPage().Serialize()
} else if this.IsActivityStreamsOrderedCollectionPage() {
return this.GetActivityStreamsOrderedCollectionPage().Serialize()
} else if this.IsIRI() {
return this.iri.String(), nil
}
return this.unknown, nil
}
// SetActivityStreamsCollection sets the value of this property. Calling
// IsActivityStreamsCollection afterwards returns true.
func (this *ActivityStreamsFollowingProperty) SetActivityStreamsCollection(v vocab.ActivityStreamsCollection) {
this.Clear()
this.activitystreamsCollectionMember = v
}
// SetActivityStreamsCollectionPage sets the value of this property. Calling
// IsActivityStreamsCollectionPage afterwards returns true.
func (this *ActivityStreamsFollowingProperty) SetActivityStreamsCollectionPage(v vocab.ActivityStreamsCollectionPage) {
this.Clear()
this.activitystreamsCollectionPageMember = v
}
// SetActivityStreamsOrderedCollection sets the value of this property. Calling
// IsActivityStreamsOrderedCollection afterwards returns true.
func (this *ActivityStreamsFollowingProperty) SetActivityStreamsOrderedCollection(v vocab.ActivityStreamsOrderedCollection) {
this.Clear()
this.activitystreamsOrderedCollectionMember = v
}
// SetActivityStreamsOrderedCollectionPage sets the value of this property.
// Calling IsActivityStreamsOrderedCollectionPage afterwards returns true.
func (this *ActivityStreamsFollowingProperty) SetActivityStreamsOrderedCollectionPage(v vocab.ActivityStreamsOrderedCollectionPage) {
this.Clear()
this.activitystreamsOrderedCollectionPageMember = v
}
// SetIRI sets the value of this property. Calling IsIRI afterwards returns true.
func (this *ActivityStreamsFollowingProperty) SetIRI(v *url.URL) {
this.Clear()
this.iri = v
}
// SetType attempts to set the property for the arbitrary type. Returns an error
// if it is not a valid type to set on this property.
func (this *ActivityStreamsFollowingProperty) SetType(t vocab.Type) error {
if v, ok := t.(vocab.ActivityStreamsOrderedCollection); ok {
this.SetActivityStreamsOrderedCollection(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsCollection); ok {
this.SetActivityStreamsCollection(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsCollectionPage); ok {
this.SetActivityStreamsCollectionPage(v)
return nil
}
if v, ok := t.(vocab.ActivityStreamsOrderedCollectionPage); ok {
this.SetActivityStreamsOrderedCollectionPage(v)
return nil
}
return fmt.Errorf("illegal type to set on following property: %T", t)
}

View file

@ -0,0 +1,17 @@
// Code generated by astool. DO NOT EDIT.
// Package propertyformertype contains the implementation for the formerType
// property. All applications are strongly encouraged to use the interface
// instead of this concrete definition. The interfaces allow applications to
// consume only the types and properties needed and be independent of the
// go-fed implementation if another alternative implementation is created.
// This package is code-generated and subject to the same license as the
// go-fed tool used to generate it.
//
// This package is independent of other types' and properties' implementations
// by having a Manager injected into it to act as a factory for the concrete
// implementations. The implementations have been generated into their own
// separate subpackages for each vocabulary.
//
// Strongly consider using the interfaces instead of this package.
package propertyformertype

View file

@ -0,0 +1,257 @@
// Code generated by astool. DO NOT EDIT.
package propertyformertype
import vocab "github.com/go-fed/activity/streams/vocab"
var mgr privateManager
// privateManager abstracts the code-generated manager that provides access to
// concrete implementations.
type privateManager interface {
// DeserializeAcceptActivityStreams returns the deserialization method for
// the "ActivityStreamsAccept" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAccept, error)
// DeserializeActivityActivityStreams returns the deserialization method
// for the "ActivityStreamsActivity" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsActivity, error)
// DeserializeAddActivityStreams returns the deserialization method for
// the "ActivityStreamsAdd" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeAddActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAdd, error)
// DeserializeAnnounceActivityStreams returns the deserialization method
// for the "ActivityStreamsAnnounce" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAnnounceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAnnounce, error)
// DeserializeApplicationActivityStreams returns the deserialization
// method for the "ActivityStreamsApplication" non-functional property
// in the vocabulary "ActivityStreams"
DeserializeApplicationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsApplication, error)
// DeserializeArriveActivityStreams returns the deserialization method for
// the "ActivityStreamsArrive" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArriveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArrive, error)
// DeserializeArticleActivityStreams returns the deserialization method
// for the "ActivityStreamsArticle" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeArticleActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsArticle, error)
// DeserializeAudioActivityStreams returns the deserialization method for
// the "ActivityStreamsAudio" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeAudioActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsAudio, error)
// DeserializeBlockActivityStreams returns the deserialization method for
// the "ActivityStreamsBlock" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeBlockActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsBlock, error)
// DeserializeBranchForgeFed returns the deserialization method for the
// "ForgeFedBranch" non-functional property in the vocabulary
// "ForgeFed"
DeserializeBranchForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedBranch, error)
// DeserializeCollectionActivityStreams returns the deserialization method
// for the "ActivityStreamsCollection" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollection, error)
// DeserializeCollectionPageActivityStreams returns the deserialization
// method for the "ActivityStreamsCollectionPage" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCollectionPage, error)
// DeserializeCommitForgeFed returns the deserialization method for the
// "ForgeFedCommit" non-functional property in the vocabulary
// "ForgeFed"
DeserializeCommitForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedCommit, error)
// DeserializeCreateActivityStreams returns the deserialization method for
// the "ActivityStreamsCreate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeCreateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsCreate, error)
// DeserializeDeleteActivityStreams returns the deserialization method for
// the "ActivityStreamsDelete" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDeleteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDelete, error)
// DeserializeDislikeActivityStreams returns the deserialization method
// for the "ActivityStreamsDislike" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDislikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDislike, error)
// DeserializeDocumentActivityStreams returns the deserialization method
// for the "ActivityStreamsDocument" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeDocumentActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsDocument, error)
// DeserializeEmojiToot returns the deserialization method for the
// "TootEmoji" non-functional property in the vocabulary "Toot"
DeserializeEmojiToot() func(map[string]interface{}, map[string]string) (vocab.TootEmoji, error)
// DeserializeEventActivityStreams returns the deserialization method for
// the "ActivityStreamsEvent" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeEventActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsEvent, error)
// DeserializeFlagActivityStreams returns the deserialization method for
// the "ActivityStreamsFlag" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeFlagActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFlag, error)
// DeserializeFollowActivityStreams returns the deserialization method for
// the "ActivityStreamsFollow" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeFollowActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsFollow, error)
// DeserializeGroupActivityStreams returns the deserialization method for
// the "ActivityStreamsGroup" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeGroupActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsGroup, error)
// DeserializeIdentityProofToot returns the deserialization method for the
// "TootIdentityProof" non-functional property in the vocabulary "Toot"
DeserializeIdentityProofToot() func(map[string]interface{}, map[string]string) (vocab.TootIdentityProof, error)
// DeserializeIgnoreActivityStreams returns the deserialization method for
// the "ActivityStreamsIgnore" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeIgnoreActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIgnore, error)
// DeserializeImageActivityStreams returns the deserialization method for
// the "ActivityStreamsImage" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeImageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsImage, error)
// DeserializeIntransitiveActivityActivityStreams returns the
// deserialization method for the
// "ActivityStreamsIntransitiveActivity" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeIntransitiveActivityActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsIntransitiveActivity, error)
// DeserializeInviteActivityStreams returns the deserialization method for
// the "ActivityStreamsInvite" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeInviteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsInvite, error)
// DeserializeJoinActivityStreams returns the deserialization method for
// the "ActivityStreamsJoin" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeJoinActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsJoin, error)
// DeserializeLeaveActivityStreams returns the deserialization method for
// the "ActivityStreamsLeave" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeLeaveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLeave, error)
// DeserializeLikeActivityStreams returns the deserialization method for
// the "ActivityStreamsLike" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeLikeActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsLike, error)
// DeserializeListenActivityStreams returns the deserialization method for
// the "ActivityStreamsListen" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeListenActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsListen, error)
// DeserializeMoveActivityStreams returns the deserialization method for
// the "ActivityStreamsMove" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeMoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsMove, error)
// DeserializeNoteActivityStreams returns the deserialization method for
// the "ActivityStreamsNote" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeNoteActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsNote, error)
// DeserializeObjectActivityStreams returns the deserialization method for
// the "ActivityStreamsObject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeObjectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsObject, error)
// DeserializeOfferActivityStreams returns the deserialization method for
// the "ActivityStreamsOffer" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeOfferActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOffer, error)
// DeserializeOrderedCollectionActivityStreams returns the deserialization
// method for the "ActivityStreamsOrderedCollection" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrderedCollectionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollection, error)
// DeserializeOrderedCollectionPageActivityStreams returns the
// deserialization method for the
// "ActivityStreamsOrderedCollectionPage" non-functional property in
// the vocabulary "ActivityStreams"
DeserializeOrderedCollectionPageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrderedCollectionPage, error)
// DeserializeOrganizationActivityStreams returns the deserialization
// method for the "ActivityStreamsOrganization" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeOrganizationActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsOrganization, error)
// DeserializePageActivityStreams returns the deserialization method for
// the "ActivityStreamsPage" non-functional property in the vocabulary
// "ActivityStreams"
DeserializePageActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPage, error)
// DeserializePersonActivityStreams returns the deserialization method for
// the "ActivityStreamsPerson" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePersonActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPerson, error)
// DeserializePlaceActivityStreams returns the deserialization method for
// the "ActivityStreamsPlace" non-functional property in the
// vocabulary "ActivityStreams"
DeserializePlaceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsPlace, error)
// DeserializeProfileActivityStreams returns the deserialization method
// for the "ActivityStreamsProfile" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeProfileActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsProfile, 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)
// DeserializeQuestionActivityStreams returns the deserialization method
// for the "ActivityStreamsQuestion" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeQuestionActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsQuestion, error)
// DeserializeReadActivityStreams returns the deserialization method for
// the "ActivityStreamsRead" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeReadActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRead, error)
// DeserializeRejectActivityStreams returns the deserialization method for
// the "ActivityStreamsReject" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsReject, error)
// DeserializeRelationshipActivityStreams returns the deserialization
// method for the "ActivityStreamsRelationship" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeRelationshipActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRelationship, error)
// DeserializeRemoveActivityStreams returns the deserialization method for
// the "ActivityStreamsRemove" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeRemoveActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsRemove, error)
// DeserializeRepositoryForgeFed returns the deserialization method for
// the "ForgeFedRepository" non-functional property in the vocabulary
// "ForgeFed"
DeserializeRepositoryForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedRepository, error)
// DeserializeServiceActivityStreams returns the deserialization method
// for the "ActivityStreamsService" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeServiceActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsService, error)
// DeserializeTentativeAcceptActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeAccept" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeAcceptActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeAccept, error)
// DeserializeTentativeRejectActivityStreams returns the deserialization
// method for the "ActivityStreamsTentativeReject" non-functional
// property in the vocabulary "ActivityStreams"
DeserializeTentativeRejectActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTentativeReject, error)
// DeserializeTicketDependencyForgeFed returns the deserialization method
// for the "ForgeFedTicketDependency" non-functional property in the
// vocabulary "ForgeFed"
DeserializeTicketDependencyForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicketDependency, error)
// DeserializeTicketForgeFed returns the deserialization method for the
// "ForgeFedTicket" non-functional property in the vocabulary
// "ForgeFed"
DeserializeTicketForgeFed() func(map[string]interface{}, map[string]string) (vocab.ForgeFedTicket, error)
// DeserializeTombstoneActivityStreams returns the deserialization method
// for the "ActivityStreamsTombstone" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTombstoneActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTombstone, error)
// DeserializeTravelActivityStreams returns the deserialization method for
// the "ActivityStreamsTravel" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeTravelActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsTravel, error)
// DeserializeUndoActivityStreams returns the deserialization method for
// the "ActivityStreamsUndo" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeUndoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUndo, error)
// DeserializeUpdateActivityStreams returns the deserialization method for
// the "ActivityStreamsUpdate" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeUpdateActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsUpdate, error)
// DeserializeVideoActivityStreams returns the deserialization method for
// the "ActivityStreamsVideo" non-functional property in the
// vocabulary "ActivityStreams"
DeserializeVideoActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsVideo, error)
// DeserializeViewActivityStreams returns the deserialization method for
// the "ActivityStreamsView" non-functional property in the vocabulary
// "ActivityStreams"
DeserializeViewActivityStreams() func(map[string]interface{}, map[string]string) (vocab.ActivityStreamsView, error)
}
// SetManager sets the manager package-global variable. For internal use only, do
// not use as part of Application behavior. Must be called at golang init time.
func SetManager(m privateManager) {
mgr = m
}

Some files were not shown because too many files have changed in this diff Show more