ap

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package ap contains models and utilities for working with activitypub/activitystreams representations.

It is built on top of go-fed/activity.

Index

Constants

View Source
const (
	ActivityAccept          = "Accept"          // ActivityStreamsAccept https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept
	ActivityAdd             = "Add"             // ActivityStreamsAdd https://www.w3.org/TR/activitystreams-vocabulary/#dfn-add
	ActivityAnnounce        = "Announce"        // ActivityStreamsAnnounce https://www.w3.org/TR/activitystreams-vocabulary/#dfn-announce
	ActivityArrive          = "Arrive"          // ActivityStreamsArrive https://www.w3.org/TR/activitystreams-vocabulary/#dfn-arrive
	ActivityBlock           = "Block"           // ActivityStreamsBlock https://www.w3.org/TR/activitystreams-vocabulary/#dfn-block
	ActivityCreate          = "Create"          // ActivityStreamsCreate https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create
	ActivityDelete          = "Delete"          // ActivityStreamsDelete https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete
	ActivityDislike         = "Dislike"         // ActivityStreamsDislike https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike
	ActivityFlag            = "Flag"            // ActivityStreamsFlag https://www.w3.org/TR/activitystreams-vocabulary/#dfn-flag
	ActivityFollow          = "Follow"          // ActivityStreamsFollow https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow
	ActivityIgnore          = "Ignore"          // ActivityStreamsIgnore https://www.w3.org/TR/activitystreams-vocabulary/#dfn-ignore
	ActivityInvite          = "Invite"          // ActivityStreamsInvite https://www.w3.org/TR/activitystreams-vocabulary/#dfn-invite
	ActivityJoin            = "Join"            // ActivityStreamsJoin https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join
	ActivityLeave           = "Leave"           // ActivityStreamsLeave https://www.w3.org/TR/activitystreams-vocabulary/#dfn-leave
	ActivityLike            = "Like"            // ActivityStreamsLike https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like
	ActivityListen          = "Listen"          // ActivityStreamsListen https://www.w3.org/TR/activitystreams-vocabulary/#dfn-listen
	ActivityMove            = "Move"            // ActivityStreamsMove https://www.w3.org/TR/activitystreams-vocabulary/#dfn-move
	ActivityOffer           = "Offer"           // ActivityStreamsOffer https://www.w3.org/TR/activitystreams-vocabulary/#dfn-offer
	ActivityQuestion        = "Question"        // ActivityStreamsQuestion https://www.w3.org/TR/activitystreams-vocabulary/#dfn-question
	ActivityReject          = "Reject"          // ActivityStreamsReject https://www.w3.org/TR/activitystreams-vocabulary/#dfn-reject
	ActivityRead            = "Read"            // ActivityStreamsRead https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read
	ActivityRemove          = "Remove"          // ActivityStreamsRemove https://www.w3.org/TR/activitystreams-vocabulary/#dfn-remove
	ActivityTentativeReject = "TentativeReject" // ActivityStreamsTentativeReject https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativereject
	ActivityTentativeAccept = "TentativeAccept" // ActivityStreamsTentativeAccept https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tentativeaccept
	ActivityTravel          = "Travel"          // ActivityStreamsTravel https://www.w3.org/TR/activitystreams-vocabulary/#dfn-travel
	ActivityUndo            = "Undo"            // ActivityStreamsUndo https://www.w3.org/TR/activitystreams-vocabulary/#dfn-undo
	ActivityUpdate          = "Update"          // ActivityStreamsUpdate https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update
	ActivityView            = "View"            // ActivityStreamsView https://www.w3.org/TR/activitystreams-vocabulary/#dfn-view

	ActorApplication  = "Application"  // ActivityStreamsApplication https://www.w3.org/TR/activitystreams-vocabulary/#dfn-application
	ActorGroup        = "Group"        // ActivityStreamsGroup https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group
	ActorOrganization = "Organization" // ActivityStreamsOrganization https://www.w3.org/TR/activitystreams-vocabulary/#dfn-organization
	ActorPerson       = "Person"       // ActivityStreamsPerson https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person
	ActorService      = "Service"      // ActivityStreamsService https://www.w3.org/TR/activitystreams-vocabulary/#dfn-service

	ObjectArticle           = "Article"           // ActivityStreamsArticle https://www.w3.org/TR/activitystreams-vocabulary/#dfn-article
	ObjectAudio             = "Audio"             // ActivityStreamsAudio https://www.w3.org/TR/activitystreams-vocabulary/#dfn-audio
	ObjectDocument          = "Document"          // ActivityStreamsDocument https://www.w3.org/TR/activitystreams-vocabulary/#dfn-document
	ObjectEvent             = "Event"             // ActivityStreamsEvent https://www.w3.org/TR/activitystreams-vocabulary/#dfn-event
	ObjectImage             = "Image"             // ActivityStreamsImage https://www.w3.org/TR/activitystreams-vocabulary/#dfn-image
	ObjectNote              = "Note"              // ActivityStreamsNote https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note
	ObjectPage              = "Page"              // ActivityStreamsPage https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page
	ObjectPlace             = "Place"             // ActivityStreamsPlace https://www.w3.org/TR/activitystreams-vocabulary/#dfn-place
	ObjectProfile           = "Profile"           // ActivityStreamsProfile https://www.w3.org/TR/activitystreams-vocabulary/#dfn-profile
	ObjectRelationship      = "Relationship"      // ActivityStreamsRelationship https://www.w3.org/TR/activitystreams-vocabulary/#dfn-relationship
	ObjectTombstone         = "Tombstone"         // ActivityStreamsTombstone https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone
	ObjectVideo             = "Video"             // ActivityStreamsVideo https://www.w3.org/TR/activitystreams-vocabulary/#dfn-video
	ObjectCollection        = "Collection"        // ActivityStreamsCollection https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection
	ObjectCollectionPage    = "CollectionPage"    // ActivityStreamsCollectionPage https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collectionpage
	ObjectOrderedCollection = "OrderedCollection" // ActivityStreamsOrderedCollection https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection
)

https://www.w3.org/TR/activitystreams-vocabulary

Variables

This section is empty.

Functions

func ExtractActor

func ExtractActor(i WithActor) (*url.URL, error)

ExtractActor extracts the actor ID/IRI from an interface WithActor.

func ExtractAttachment

func ExtractAttachment(i Attachmentable) (*gtsmodel.MediaAttachment, error)

ExtractAttachment returns a gts model of an attachment from an attachmentable interface.

func ExtractAttributedTo

func ExtractAttributedTo(i WithAttributedTo) (*url.URL, error)

ExtractAttributedTo returns the URL of the actor that the withAttributedTo is attributed to.

func ExtractBlurhash added in v0.2.0

func ExtractBlurhash(i WithBlurhash) string

ExtractBlurhash extracts the blurhash value (if present) from a WithBlurhash interface.

func ExtractCCs

func ExtractCCs(i WithCC) ([]*url.URL, error)

ExtractCCs returns a list of URIs that the activity addresses as CC.

func ExtractContent

func ExtractContent(i WithContent) string

ExtractContent returns a string representation of the interface's Content property, or an empty string if no Content is found.

func ExtractDiscoverable

func ExtractDiscoverable(i WithDiscoverable) (bool, error)

ExtractDiscoverable extracts the Discoverable boolean of an interface.

func ExtractEmoji

func ExtractEmoji(i Emojiable) (*gtsmodel.Emoji, error)

ExtractEmoji ...

func ExtractEmojis

func ExtractEmojis(i WithTag) ([]*gtsmodel.Emoji, error)

ExtractEmojis returns a slice of emojis on the interface.

func ExtractFields added in v0.9.0

func ExtractFields(i WithAttachment) []*gtsmodel.Field

func ExtractHashtag

func ExtractHashtag(i Hashtaggable) (*gtsmodel.Tag, error)

ExtractHashtag returns a gtsmodel tag from a hashtaggable.

func ExtractHashtags

func ExtractHashtags(i WithTag) ([]*gtsmodel.Tag, error)

ExtractHashtags returns a slice of tags on the interface.

func ExtractIconURL

func ExtractIconURL(i WithIcon) (*url.URL, error)

ExtractIconURL extracts a URL to a supported image file from something like:

"icon": {
  "mediaType": "image/jpeg",
  "type": "Image",
  "url": "http://example.org/path/to/some/file.jpeg"
},

func ExtractImageURL

func ExtractImageURL(i WithImage) (*url.URL, error)

ExtractImageURL extracts a URL to a supported image file from something like:

"image": {
  "mediaType": "image/jpeg",
  "type": "Image",
  "url": "http://example.org/path/to/some/file.jpeg"
},

func ExtractInReplyToURI

func ExtractInReplyToURI(i WithInReplyTo) *url.URL

ExtractInReplyToURI extracts the inReplyToURI property (if present) from an interface.

func ExtractMention

func ExtractMention(i Mentionable) (*gtsmodel.Mention, error)

ExtractMention extracts a gts model mention from a Mentionable.

func ExtractMentions

func ExtractMentions(i WithTag) ([]*gtsmodel.Mention, error)

ExtractMentions extracts a slice of gtsmodel Mentions from a WithTag interface.

func ExtractName

func ExtractName(i WithName) string

ExtractName returns a string representation of an interface's name property, or an empty string if this is not found.

func ExtractObject

func ExtractObject(i WithObject) (*url.URL, error)

ExtractObject extracts the first URL object from a WithObject interface.

func ExtractObjects added in v0.7.0

func ExtractObjects(i WithObject) ([]*url.URL, error)

ExtractObjects extracts a slice of URL objects from a WithObject interface.

func ExtractPreferredUsername

func ExtractPreferredUsername(i WithPreferredUsername) (string, error)

ExtractPreferredUsername returns a string representation of an interface's preferredUsername property.

func ExtractPublicKeyForOwner

func ExtractPublicKeyForOwner(i WithPublicKey, forOwner *url.URL) (*rsa.PublicKey, *url.URL, error)

ExtractPublicKeyForOwner extracts the public key from an interface, as long as it belongs to the specified owner. It will return the public key itself, the id/URL of the public key, or an error if something goes wrong.

func ExtractPublished

func ExtractPublished(i WithPublished) (time.Time, error)

ExtractPublished extracts the publication time of an activity.

func ExtractSensitive

func ExtractSensitive(withSensitive WithSensitive) bool

ExtractSensitive extracts whether or not an item is 'sensitive'. If no sensitive property is set on the item at all, or if this property isn't a boolean, then false will be returned by default.

func ExtractSharedInbox added in v0.5.0

func ExtractSharedInbox(withEndpoints WithEndpoints) *url.URL

ExtractSharedInbox extracts the sharedInbox URI properly from an Actor. Returns nil if this property is not set.

func ExtractSummary

func ExtractSummary(i WithSummary) string

ExtractSummary extracts the summary/content warning of an interface. Will return an empty string if no summary was present.

func ExtractTos

func ExtractTos(i WithTo) ([]*url.URL, error)

ExtractTos returns a list of URIs that the activity addresses as To.

func ExtractURL

func ExtractURL(i WithURL) (*url.URL, error)

ExtractURL extracts the URL property of an interface.

func ExtractURLItems

func ExtractURLItems(i WithItems) []*url.URL

ExtractURLItems extracts a slice of URLs from a property that has withItems.

func ExtractVisibility

func ExtractVisibility(addressable Addressable, actorFollowersURI string) (gtsmodel.Visibility, error)

ExtractVisibility extracts the gtsmodel.Visibility of a given addressable with a To and CC property.

ActorFollowersURI is needed to check whether the visibility is FollowersOnly or not. The passed-in value should just be the string value representation of the followers URI of the actor who created the activity, eg https://example.org/users/whoever/followers.

func NormalizeIncomingActivityObject added in v0.9.0

func NormalizeIncomingActivityObject(activity pub.Activity, rawJSON map[string]interface{})

NormalizeIncomingActivityObject normalizes the 'object'.'content' field of the given Activity.

The rawActivity map should the freshly deserialized json representation of the Activity.

This function is a noop if the type passed in is anything except a Create or Update with a Statusable or Accountable as its Object.

func NormalizeIncomingAttachments added in v0.9.0

func NormalizeIncomingAttachments(item WithAttachment, rawJSON map[string]interface{})

NormalizeIncomingAttachments normalizes all attachments (if any) of the given item, replacing the 'name' (aka content warning) field of each attachment with the raw 'name' value from the raw json object map.

noop if there are no attachments; noop if attachment is not a format we can understand.

func NormalizeIncomingContent added in v0.9.0

func NormalizeIncomingContent(item WithSetContent, rawJSON map[string]interface{})

NormalizeIncomingContent replaces the Content of the given item with the raw 'content' value from the raw json object map.

noop if there was no content in the json object map or the content was not a plain string.

func NormalizeIncomingName added in v0.9.0

func NormalizeIncomingName(item WithSetName, rawJSON map[string]interface{})

NormalizeIncomingName replaces the Name of the given item with the raw 'name' value from the raw json object map.

noop if there was no name in the json object map or the name was not a plain string.

func NormalizeIncomingSummary added in v0.9.0

func NormalizeIncomingSummary(item WithSetSummary, rawJSON map[string]interface{})

NormalizeIncomingSummary replaces the Summary of the given item with the raw 'summary' value from the raw json object map.

noop if there was no summary in the json object map or the summary was not a plain string.

func Serialize added in v0.9.0

func Serialize(t vocab.Type) (m map[string]interface{}, e error)

Serialize is a custom serializer for ActivityStreams types.

In most cases, it will simply call the go-fed streams.Serialize function under the hood. However, if custom serialization is required on a specific type (eg for inter-implementation compatibility), it can be inserted into the switch as necessary.

Callers should always call this function instead of streams.Serialize, unless there's a very good reason to do otherwise.

Currently, the following things will be custom serialized:

  • OrderedCollection: 'orderedItems' property will always be made into an array.
  • Any Accountable type: 'attachment' property will always be made into an array.
  • Update: any Accountable 'object's set on an update will be custom serialized as above.

Types

type Accountable

Accountable represents the minimum activitypub interface for representing an 'account'. This interface is fulfilled by: Person, Application, Organization, Service, and Group

func ResolveAccountable added in v0.8.0

func ResolveAccountable(ctx context.Context, b []byte) (Accountable, error)

ResolveStatusable tries to resolve the given bytes into an ActivityPub Accountable representation. It will then perform normalization on the Accountable.

Works for: Application, Group, Organization, Person, Service

type Addressable

type Addressable interface {
	WithTo
	WithCC
}

Addressable represents the minimum interface for an addressed activity.

type Announceable

Announceable represents the minimum interface for an activitystreams 'announce' activity.

type Attachmentable

Attachmentable represents the minimum activitypub interface for representing a 'mediaAttachment'. This interface is fulfilled by: Audio, Document, Image, Video

type Blockable

type Blockable interface {
	WithJSONLDId
	WithTypeName

	WithActor
	WithObject
}

Blockable represents the minimum interface for an activitystreams 'block' activity.

type CollectionPageable

type CollectionPageable interface {
	WithJSONLDId
	WithTypeName

	WithNext
	WithPartOf
	WithItems
}

CollectionPageable represents the minimum interface for an activitystreams 'CollectionPage' object.

type ContextKey added in v0.2.0

type ContextKey string

ContextKey is a type used specifically for settings values on contexts within go-fed AP request chains

const (
	// ContextReceivingAccount can be used the set and retrieve the account being interacted with / receiving an activity in their inbox.
	ContextReceivingAccount ContextKey = "receivingAccount"
	// ContextRequestingAccount can be used to set and retrieve the account of an incoming federation request.
	// This will often be the actor of the instance that's posting the request.
	ContextRequestingAccount ContextKey = "requestingAccount"
	// ContextOtherInvolvedIRIs can be used to set and retrieve a slice of all IRIs that are 'involved' in an Activity without being
	// the receivingAccount or the requestingAccount. In other words, people or notes who are CC'ed or Replied To by an Activity.
	ContextOtherInvolvedIRIs ContextKey = "otherInvolvedIRIs"
	// ContextRequestingPublicKeyVerifier can be used to set and retrieve the public key verifier of an incoming federation request.
	ContextRequestingPublicKeyVerifier ContextKey = "requestingPublicKeyVerifier"
	// ContextRequestingPublicKeySignature can be used to set and retrieve the value of the signature header of an incoming federation request.
	ContextRequestingPublicKeySignature ContextKey = "requestingPublicKeySignature"
)

type Emojiable

type Emojiable interface {
	WithJSONLDId
	WithTypeName
	WithName
	WithUpdated
	WithIcon
}

Emojiable represents the minimum interface for an 'emoji' tag.

type ErrWrongType added in v0.8.0

type ErrWrongType struct {
	// contains filtered or unexported fields
}

ErrWrongType indicates that we tried to resolve a type into an interface that it's not compatible with, eg a Person into a Statusable.

func (*ErrWrongType) Error added in v0.8.0

func (err *ErrWrongType) Error() string

type Flaggable added in v0.7.0

Flaggable represents the minimum interface for an activitystreams 'Flag' activity.

type Followable

type Followable interface {
	WithJSONLDId
	WithTypeName

	WithActor
	WithObject
}

Followable represents the minimum interface for an activitystreams 'follow' activity.

type Hashtaggable

type Hashtaggable interface {
	WithTypeName
	WithHref
	WithName
}

Hashtaggable represents the minimum activitypub interface for representing a 'hashtag' tag.

type Likeable

type Likeable interface {
	WithJSONLDId
	WithTypeName

	WithActor
	WithObject
}

Likeable represents the minimum interface for an activitystreams 'like' activity.

type Mentionable

type Mentionable interface {
	WithName
	WithHref
}

Mentionable represents the minimum interface for a 'mention' tag.

type ReplyToable added in v0.3.4

type ReplyToable interface {
	WithInReplyTo
}

ReplyToable represents the minimum interface for an Activity that can be InReplyTo another activity.

type Statusable

Statusable represents the minimum activitypub interface for representing a 'status'. This interface is fulfilled by: Article, Document, Image, Video, Note, Page, Event, Place, Mention, Profile

func ResolveStatusable added in v0.8.0

func ResolveStatusable(ctx context.Context, b []byte) (Statusable, error)

ResolveStatusable tries to resolve the given bytes into an ActivityPub Statusable representation. It will then perform normalization on the Statusable.

Works for: Article, Document, Image, Video, Note, Page, Event, Place, Profile

type WithActor

type WithActor interface {
	GetActivityStreamsActor() vocab.ActivityStreamsActorProperty
}

WithActor represents an activity with ActivityStreamsActorProperty

type WithAttachment

type WithAttachment interface {
	GetActivityStreamsAttachment() vocab.ActivityStreamsAttachmentProperty
}

WithAttachment represents an activity with ActivityStreamsAttachmentProperty

type WithAttributedTo

type WithAttributedTo interface {
	GetActivityStreamsAttributedTo() vocab.ActivityStreamsAttributedToProperty
}

WithAttributedTo represents an activity with ActivityStreamsAttributedToProperty

type WithBlurhash added in v0.2.0

type WithBlurhash interface {
	GetTootBlurhash() vocab.TootBlurhashProperty
}

WithBlurhash represents an activity with TootBlurhashProperty

type WithCC

type WithCC interface {
	GetActivityStreamsCc() vocab.ActivityStreamsCcProperty
}

WithCC represents an activity with ActivityStreamsCcProperty

type WithContent

type WithContent interface {
	GetActivityStreamsContent() vocab.ActivityStreamsContentProperty
}

WithContent represents an activity with ActivityStreamsContentProperty

type WithConversation

type WithConversation interface {
}

WithConversation ...

type WithDiscoverable

type WithDiscoverable interface {
	GetTootDiscoverable() vocab.TootDiscoverableProperty
}

WithDiscoverable represents an activity with TootDiscoverableProperty

type WithEndpoints added in v0.5.0

type WithEndpoints interface {
	GetActivityStreamsEndpoints() vocab.ActivityStreamsEndpointsProperty
}

WithEndpoints represents a Person or profile with the endpoints property

type WithFeatured

type WithFeatured interface {
	GetTootFeatured() vocab.TootFeaturedProperty
}

WithFeatured represents an activity with TootFeaturedProperty

type WithFollowers

type WithFollowers interface {
	GetActivityStreamsFollowers() vocab.ActivityStreamsFollowersProperty
}

WithFollowers represents an activity with ActivityStreamsFollowersProperty

type WithFollowing

type WithFollowing interface {
	GetActivityStreamsFollowing() vocab.ActivityStreamsFollowingProperty
}

WithFollowing represents an activity with ActivityStreamsFollowingProperty

type WithHref

type WithHref interface {
	GetActivityStreamsHref() vocab.ActivityStreamsHrefProperty
}

WithHref represents an activity with ActivityStreamsHrefProperty

type WithIcon

type WithIcon interface {
	GetActivityStreamsIcon() vocab.ActivityStreamsIconProperty
}

WithIcon represents an activity with ActivityStreamsIconProperty

type WithImage

type WithImage interface {
	GetActivityStreamsImage() vocab.ActivityStreamsImageProperty
}

WithImage represents an activity with ActivityStreamsImageProperty

type WithInReplyTo

type WithInReplyTo interface {
	GetActivityStreamsInReplyTo() vocab.ActivityStreamsInReplyToProperty
}

WithInReplyTo represents an activity with ActivityStreamsInReplyToProperty

type WithInbox

type WithInbox interface {
	GetActivityStreamsInbox() vocab.ActivityStreamsInboxProperty
}

WithInbox represents an activity with ActivityStreamsInboxProperty

type WithItems

type WithItems interface {
	GetActivityStreamsItems() vocab.ActivityStreamsItemsProperty
}

WithItems represents an activity with ActivityStreamsItemsProperty

type WithJSONLDId

type WithJSONLDId interface {
	GetJSONLDId() vocab.JSONLDIdProperty
}

WithJSONLDId represents an activity with JSONLDIdProperty

type WithManuallyApprovesFollowers

type WithManuallyApprovesFollowers interface {
	GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty
}

WithManuallyApprovesFollowers represents a Person or profile with the ManuallyApprovesFollowers property.

type WithMediaType

type WithMediaType interface {
	GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty
}

WithMediaType represents an activity with ActivityStreamsMediaTypeProperty

type WithName

type WithName interface {
	GetActivityStreamsName() vocab.ActivityStreamsNameProperty
}

WithName represents an activity with ActivityStreamsNameProperty

type WithNext

type WithNext interface {
	GetActivityStreamsNext() vocab.ActivityStreamsNextProperty
}

WithNext represents an activity with ActivityStreamsNextProperty

type WithObject

type WithObject interface {
	GetActivityStreamsObject() vocab.ActivityStreamsObjectProperty
}

WithObject represents an activity with ActivityStreamsObjectProperty

type WithOutbox

type WithOutbox interface {
	GetActivityStreamsOutbox() vocab.ActivityStreamsOutboxProperty
}

WithOutbox represents an activity with ActivityStreamsOutboxProperty

type WithPartOf

type WithPartOf interface {
	GetActivityStreamsPartOf() vocab.ActivityStreamsPartOfProperty
}

WithPartOf represents an activity with ActivityStreamsPartOfProperty

type WithPreferredUsername

type WithPreferredUsername interface {
	GetActivityStreamsPreferredUsername() vocab.ActivityStreamsPreferredUsernameProperty
}

WithPreferredUsername represents an activity with ActivityStreamsPreferredUsernameProperty

type WithPublicKey

type WithPublicKey interface {
	GetW3IDSecurityV1PublicKey() vocab.W3IDSecurityV1PublicKeyProperty
}

WithPublicKey represents an activity with W3IDSecurityV1PublicKeyProperty

type WithPublished

type WithPublished interface {
	GetActivityStreamsPublished() vocab.ActivityStreamsPublishedProperty
}

WithPublished represents an activity with ActivityStreamsPublishedProperty

type WithReplies

type WithReplies interface {
	GetActivityStreamsReplies() vocab.ActivityStreamsRepliesProperty
}

WithReplies represents an activity with ActivityStreamsRepliesProperty

type WithSensitive

type WithSensitive interface {
	GetActivityStreamsSensitive() vocab.ActivityStreamsSensitiveProperty
}

WithSensitive represents an activity with ActivityStreamsSensitiveProperty

type WithSetContent added in v0.8.0

type WithSetContent interface {
	SetActivityStreamsContent(vocab.ActivityStreamsContentProperty)
}

WithSetContent represents an activity that can have content set on it.

type WithSetName added in v0.9.0

type WithSetName interface {
	SetActivityStreamsName(vocab.ActivityStreamsNameProperty)
}

WithSetName represents an activity with a settable ActivityStreamsNameProperty

type WithSetSummary added in v0.9.0

type WithSetSummary interface {
	SetActivityStreamsSummary(vocab.ActivityStreamsSummaryProperty)
}

WithSetSummary represents an activity that can have summary set on it.

type WithSummary

type WithSummary interface {
	GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty
}

WithSummary represents an activity with ActivityStreamsSummaryProperty

type WithTag

type WithTag interface {
	GetActivityStreamsTag() vocab.ActivityStreamsTagProperty
}

WithTag represents an activity with ActivityStreamsTagProperty

type WithTo

type WithTo interface {
	GetActivityStreamsTo() vocab.ActivityStreamsToProperty
}

WithTo represents an activity with ActivityStreamsToProperty

type WithTypeName

type WithTypeName interface {
	GetTypeName() string
}

WithTypeName represents an activity with a type name

type WithURL

type WithURL interface {
	GetActivityStreamsUrl() vocab.ActivityStreamsUrlProperty
}

WithURL represents an activity with ActivityStreamsUrlProperty

type WithUpdated

type WithUpdated interface {
	GetActivityStreamsUpdated() vocab.ActivityStreamsUpdatedProperty
}

WithUpdated represents an activity with ActivityStreamsUpdatedProperty

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL