typedocument

package
v1.4.0-gts Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package typedocument contains the implementation for the Document type. 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivityStreamsDocumentExtends

func ActivityStreamsDocumentExtends(other vocab.Type) bool

ActivityStreamsDocumentExtends returns true if the Document type extends from the other type.

func DocumentIsDisjointWith

func DocumentIsDisjointWith(other vocab.Type) bool

DocumentIsDisjointWith returns true if the other provided type is disjoint with the Document type.

func DocumentIsExtendedBy

func DocumentIsExtendedBy(other vocab.Type) bool

DocumentIsExtendedBy returns true if the other provided type extends from the Document type. Note that it returns false if the types are the same; see the "IsOrExtendsDocument" variant instead.

func IsOrExtendsDocument

func IsOrExtendsDocument(other vocab.Type) bool

IsOrExtendsDocument returns true if the other provided type is the Document type or extends from the Document type.

func SetManager

func SetManager(m privateManager)

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 SetTypePropertyConstructor

func SetTypePropertyConstructor(f func() vocab.JSONLDTypeProperty)

SetTypePropertyConstructor sets the "type" property's constructor in the package-global variable. For internal use only, do not use as part of Application behavior. Must be called at golang init time. Permits ActivityStreams types to correctly set their "type" property at construction time, so users don't have to remember to do so each time. It is dependency injected so other go-fed compatible implementations could inject their own type.

Types

type ActivityStreamsDocument

type ActivityStreamsDocument struct {
	ActivityStreamsAltitude     vocab.ActivityStreamsAltitudeProperty
	ActivityStreamsAttachment   vocab.ActivityStreamsAttachmentProperty
	ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty
	ActivityStreamsAudience     vocab.ActivityStreamsAudienceProperty
	ActivityStreamsBcc          vocab.ActivityStreamsBccProperty
	TootBlurhash                vocab.TootBlurhashProperty
	ActivityStreamsBto          vocab.ActivityStreamsBtoProperty
	ActivityStreamsCc           vocab.ActivityStreamsCcProperty
	ActivityStreamsContent      vocab.ActivityStreamsContentProperty
	ActivityStreamsContext      vocab.ActivityStreamsContextProperty
	ActivityStreamsDuration     vocab.ActivityStreamsDurationProperty
	ActivityStreamsEndTime      vocab.ActivityStreamsEndTimeProperty
	ActivityStreamsGenerator    vocab.ActivityStreamsGeneratorProperty
	ActivityStreamsIcon         vocab.ActivityStreamsIconProperty
	JSONLDId                    vocab.JSONLDIdProperty
	ActivityStreamsImage        vocab.ActivityStreamsImageProperty
	ActivityStreamsInReplyTo    vocab.ActivityStreamsInReplyToProperty
	ActivityStreamsLikes        vocab.ActivityStreamsLikesProperty
	ActivityStreamsLocation     vocab.ActivityStreamsLocationProperty
	ActivityStreamsMediaType    vocab.ActivityStreamsMediaTypeProperty
	ActivityStreamsName         vocab.ActivityStreamsNameProperty
	ActivityStreamsObject       vocab.ActivityStreamsObjectProperty
	ActivityStreamsPreview      vocab.ActivityStreamsPreviewProperty
	ActivityStreamsPublished    vocab.ActivityStreamsPublishedProperty
	ActivityStreamsReplies      vocab.ActivityStreamsRepliesProperty
	ActivityStreamsSensitive    vocab.ActivityStreamsSensitiveProperty
	ActivityStreamsShares       vocab.ActivityStreamsSharesProperty
	ActivityStreamsSource       vocab.ActivityStreamsSourceProperty
	ActivityStreamsStartTime    vocab.ActivityStreamsStartTimeProperty
	ActivityStreamsSummary      vocab.ActivityStreamsSummaryProperty
	ActivityStreamsTag          vocab.ActivityStreamsTagProperty
	ActivityStreamsTo           vocab.ActivityStreamsToProperty
	JSONLDType                  vocab.JSONLDTypeProperty
	ActivityStreamsUpdated      vocab.ActivityStreamsUpdatedProperty
	ActivityStreamsUrl          vocab.ActivityStreamsUrlProperty
	// contains filtered or unexported fields
}

Represents a document of any kind.

Example 49 (https://www.w3.org/TR/activitystreams-vocabulary/#ex48-jsonld):

{
  "name": "4Q Sales Forecast",
  "type": "Document",
  "url": "http://example.org/4q-sales-forecast.pdf"
}

func DeserializeDocument

func DeserializeDocument(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsDocument, error)

DeserializeDocument creates a Document from a map representation that has been unmarshalled from a text or binary format.

func NewActivityStreamsDocument

func NewActivityStreamsDocument() *ActivityStreamsDocument

NewActivityStreamsDocument creates a new Document type

func (ActivityStreamsDocument) GetActivityStreamsAltitude

func (this ActivityStreamsDocument) GetActivityStreamsAltitude() vocab.ActivityStreamsAltitudeProperty

GetActivityStreamsAltitude returns the "altitude" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsAttachment

func (this ActivityStreamsDocument) GetActivityStreamsAttachment() vocab.ActivityStreamsAttachmentProperty

GetActivityStreamsAttachment returns the "attachment" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsAttributedTo

func (this ActivityStreamsDocument) GetActivityStreamsAttributedTo() vocab.ActivityStreamsAttributedToProperty

GetActivityStreamsAttributedTo returns the "attributedTo" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsAudience

func (this ActivityStreamsDocument) GetActivityStreamsAudience() vocab.ActivityStreamsAudienceProperty

GetActivityStreamsAudience returns the "audience" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsBcc

func (this ActivityStreamsDocument) GetActivityStreamsBcc() vocab.ActivityStreamsBccProperty

GetActivityStreamsBcc returns the "bcc" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsBto

func (this ActivityStreamsDocument) GetActivityStreamsBto() vocab.ActivityStreamsBtoProperty

GetActivityStreamsBto returns the "bto" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsCc

func (this ActivityStreamsDocument) GetActivityStreamsCc() vocab.ActivityStreamsCcProperty

GetActivityStreamsCc returns the "cc" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsContent

func (this ActivityStreamsDocument) GetActivityStreamsContent() vocab.ActivityStreamsContentProperty

GetActivityStreamsContent returns the "content" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsContext

func (this ActivityStreamsDocument) GetActivityStreamsContext() vocab.ActivityStreamsContextProperty

GetActivityStreamsContext returns the "context" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsDuration

func (this ActivityStreamsDocument) GetActivityStreamsDuration() vocab.ActivityStreamsDurationProperty

GetActivityStreamsDuration returns the "duration" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsEndTime

func (this ActivityStreamsDocument) GetActivityStreamsEndTime() vocab.ActivityStreamsEndTimeProperty

GetActivityStreamsEndTime returns the "endTime" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsGenerator

func (this ActivityStreamsDocument) GetActivityStreamsGenerator() vocab.ActivityStreamsGeneratorProperty

GetActivityStreamsGenerator returns the "generator" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsIcon

func (this ActivityStreamsDocument) GetActivityStreamsIcon() vocab.ActivityStreamsIconProperty

GetActivityStreamsIcon returns the "icon" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsImage

func (this ActivityStreamsDocument) GetActivityStreamsImage() vocab.ActivityStreamsImageProperty

GetActivityStreamsImage returns the "image" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsInReplyTo

func (this ActivityStreamsDocument) GetActivityStreamsInReplyTo() vocab.ActivityStreamsInReplyToProperty

GetActivityStreamsInReplyTo returns the "inReplyTo" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsLikes

func (this ActivityStreamsDocument) GetActivityStreamsLikes() vocab.ActivityStreamsLikesProperty

GetActivityStreamsLikes returns the "likes" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsLocation

func (this ActivityStreamsDocument) GetActivityStreamsLocation() vocab.ActivityStreamsLocationProperty

GetActivityStreamsLocation returns the "location" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsMediaType

func (this ActivityStreamsDocument) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty

GetActivityStreamsMediaType returns the "mediaType" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsName

func (this ActivityStreamsDocument) GetActivityStreamsName() vocab.ActivityStreamsNameProperty

GetActivityStreamsName returns the "name" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsObject

func (this ActivityStreamsDocument) GetActivityStreamsObject() vocab.ActivityStreamsObjectProperty

GetActivityStreamsObject returns the "object" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsPreview

func (this ActivityStreamsDocument) GetActivityStreamsPreview() vocab.ActivityStreamsPreviewProperty

GetActivityStreamsPreview returns the "preview" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsPublished

func (this ActivityStreamsDocument) GetActivityStreamsPublished() vocab.ActivityStreamsPublishedProperty

GetActivityStreamsPublished returns the "published" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsReplies

func (this ActivityStreamsDocument) GetActivityStreamsReplies() vocab.ActivityStreamsRepliesProperty

GetActivityStreamsReplies returns the "replies" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsSensitive

func (this ActivityStreamsDocument) GetActivityStreamsSensitive() vocab.ActivityStreamsSensitiveProperty

GetActivityStreamsSensitive returns the "sensitive" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsShares

func (this ActivityStreamsDocument) GetActivityStreamsShares() vocab.ActivityStreamsSharesProperty

GetActivityStreamsShares returns the "shares" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsSource

func (this ActivityStreamsDocument) GetActivityStreamsSource() vocab.ActivityStreamsSourceProperty

GetActivityStreamsSource returns the "source" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsStartTime

func (this ActivityStreamsDocument) GetActivityStreamsStartTime() vocab.ActivityStreamsStartTimeProperty

GetActivityStreamsStartTime returns the "startTime" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsSummary

func (this ActivityStreamsDocument) GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty

GetActivityStreamsSummary returns the "summary" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsTag

func (this ActivityStreamsDocument) GetActivityStreamsTag() vocab.ActivityStreamsTagProperty

GetActivityStreamsTag returns the "tag" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsTo

func (this ActivityStreamsDocument) GetActivityStreamsTo() vocab.ActivityStreamsToProperty

GetActivityStreamsTo returns the "to" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsUpdated

func (this ActivityStreamsDocument) GetActivityStreamsUpdated() vocab.ActivityStreamsUpdatedProperty

GetActivityStreamsUpdated returns the "updated" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetActivityStreamsUrl

func (this ActivityStreamsDocument) GetActivityStreamsUrl() vocab.ActivityStreamsUrlProperty

GetActivityStreamsUrl returns the "url" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetJSONLDId

func (this ActivityStreamsDocument) GetJSONLDId() vocab.JSONLDIdProperty

GetJSONLDId returns the "id" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetJSONLDType

func (this ActivityStreamsDocument) GetJSONLDType() vocab.JSONLDTypeProperty

GetJSONLDType returns the "type" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetTootBlurhash

func (this ActivityStreamsDocument) GetTootBlurhash() vocab.TootBlurhashProperty

GetTootBlurhash returns the "blurhash" property if it exists, and nil otherwise.

func (ActivityStreamsDocument) GetTypeName

func (this ActivityStreamsDocument) GetTypeName() string

GetTypeName returns the name of this type.

func (ActivityStreamsDocument) GetUnknownProperties

func (this ActivityStreamsDocument) GetUnknownProperties() map[string]interface{}

GetUnknownProperties returns the unknown properties for the Document type. Note that this should not be used by app developers. It is only used to help determine which implementation is LessThan the other. Developers who are creating a different implementation of this type's interface can use this method in their LessThan implementation, but routine ActivityPub applications should not use this to bypass the code generation tool.

func (ActivityStreamsDocument) IsExtending

func (this ActivityStreamsDocument) IsExtending(other vocab.Type) bool

IsExtending returns true if the Document type extends from the other type.

func (ActivityStreamsDocument) JSONLDContext

func (this ActivityStreamsDocument) JSONLDContext() map[string]string

JSONLDContext returns the JSONLD URIs required in the context string for this type and the specific properties that are set. The value in the map is the alias used to import the type and its properties.

func (ActivityStreamsDocument) LessThan

LessThan computes if this Document is lesser, with an arbitrary but stable determination.

func (ActivityStreamsDocument) Serialize

func (this ActivityStreamsDocument) Serialize() (map[string]interface{}, error)

Serialize converts this into an interface representation suitable for marshalling into a text or binary format.

func (*ActivityStreamsDocument) SetActivityStreamsAltitude

func (this *ActivityStreamsDocument) SetActivityStreamsAltitude(i vocab.ActivityStreamsAltitudeProperty)

SetActivityStreamsAltitude sets the "altitude" property.

func (*ActivityStreamsDocument) SetActivityStreamsAttachment

func (this *ActivityStreamsDocument) SetActivityStreamsAttachment(i vocab.ActivityStreamsAttachmentProperty)

SetActivityStreamsAttachment sets the "attachment" property.

func (*ActivityStreamsDocument) SetActivityStreamsAttributedTo

func (this *ActivityStreamsDocument) SetActivityStreamsAttributedTo(i vocab.ActivityStreamsAttributedToProperty)

SetActivityStreamsAttributedTo sets the "attributedTo" property.

func (*ActivityStreamsDocument) SetActivityStreamsAudience

func (this *ActivityStreamsDocument) SetActivityStreamsAudience(i vocab.ActivityStreamsAudienceProperty)

SetActivityStreamsAudience sets the "audience" property.

func (*ActivityStreamsDocument) SetActivityStreamsBcc

func (this *ActivityStreamsDocument) SetActivityStreamsBcc(i vocab.ActivityStreamsBccProperty)

SetActivityStreamsBcc sets the "bcc" property.

func (*ActivityStreamsDocument) SetActivityStreamsBto

func (this *ActivityStreamsDocument) SetActivityStreamsBto(i vocab.ActivityStreamsBtoProperty)

SetActivityStreamsBto sets the "bto" property.

func (*ActivityStreamsDocument) SetActivityStreamsCc

func (this *ActivityStreamsDocument) SetActivityStreamsCc(i vocab.ActivityStreamsCcProperty)

SetActivityStreamsCc sets the "cc" property.

func (*ActivityStreamsDocument) SetActivityStreamsContent

func (this *ActivityStreamsDocument) SetActivityStreamsContent(i vocab.ActivityStreamsContentProperty)

SetActivityStreamsContent sets the "content" property.

func (*ActivityStreamsDocument) SetActivityStreamsContext

func (this *ActivityStreamsDocument) SetActivityStreamsContext(i vocab.ActivityStreamsContextProperty)

SetActivityStreamsContext sets the "context" property.

func (*ActivityStreamsDocument) SetActivityStreamsDuration

func (this *ActivityStreamsDocument) SetActivityStreamsDuration(i vocab.ActivityStreamsDurationProperty)

SetActivityStreamsDuration sets the "duration" property.

func (*ActivityStreamsDocument) SetActivityStreamsEndTime

func (this *ActivityStreamsDocument) SetActivityStreamsEndTime(i vocab.ActivityStreamsEndTimeProperty)

SetActivityStreamsEndTime sets the "endTime" property.

func (*ActivityStreamsDocument) SetActivityStreamsGenerator

func (this *ActivityStreamsDocument) SetActivityStreamsGenerator(i vocab.ActivityStreamsGeneratorProperty)

SetActivityStreamsGenerator sets the "generator" property.

func (*ActivityStreamsDocument) SetActivityStreamsIcon

func (this *ActivityStreamsDocument) SetActivityStreamsIcon(i vocab.ActivityStreamsIconProperty)

SetActivityStreamsIcon sets the "icon" property.

func (*ActivityStreamsDocument) SetActivityStreamsImage

func (this *ActivityStreamsDocument) SetActivityStreamsImage(i vocab.ActivityStreamsImageProperty)

SetActivityStreamsImage sets the "image" property.

func (*ActivityStreamsDocument) SetActivityStreamsInReplyTo

func (this *ActivityStreamsDocument) SetActivityStreamsInReplyTo(i vocab.ActivityStreamsInReplyToProperty)

SetActivityStreamsInReplyTo sets the "inReplyTo" property.

func (*ActivityStreamsDocument) SetActivityStreamsLikes

func (this *ActivityStreamsDocument) SetActivityStreamsLikes(i vocab.ActivityStreamsLikesProperty)

SetActivityStreamsLikes sets the "likes" property.

func (*ActivityStreamsDocument) SetActivityStreamsLocation

func (this *ActivityStreamsDocument) SetActivityStreamsLocation(i vocab.ActivityStreamsLocationProperty)

SetActivityStreamsLocation sets the "location" property.

func (*ActivityStreamsDocument) SetActivityStreamsMediaType

func (this *ActivityStreamsDocument) SetActivityStreamsMediaType(i vocab.ActivityStreamsMediaTypeProperty)

SetActivityStreamsMediaType sets the "mediaType" property.

func (*ActivityStreamsDocument) SetActivityStreamsName

func (this *ActivityStreamsDocument) SetActivityStreamsName(i vocab.ActivityStreamsNameProperty)

SetActivityStreamsName sets the "name" property.

func (*ActivityStreamsDocument) SetActivityStreamsObject

func (this *ActivityStreamsDocument) SetActivityStreamsObject(i vocab.ActivityStreamsObjectProperty)

SetActivityStreamsObject sets the "object" property.

func (*ActivityStreamsDocument) SetActivityStreamsPreview

func (this *ActivityStreamsDocument) SetActivityStreamsPreview(i vocab.ActivityStreamsPreviewProperty)

SetActivityStreamsPreview sets the "preview" property.

func (*ActivityStreamsDocument) SetActivityStreamsPublished

func (this *ActivityStreamsDocument) SetActivityStreamsPublished(i vocab.ActivityStreamsPublishedProperty)

SetActivityStreamsPublished sets the "published" property.

func (*ActivityStreamsDocument) SetActivityStreamsReplies

func (this *ActivityStreamsDocument) SetActivityStreamsReplies(i vocab.ActivityStreamsRepliesProperty)

SetActivityStreamsReplies sets the "replies" property.

func (*ActivityStreamsDocument) SetActivityStreamsSensitive

func (this *ActivityStreamsDocument) SetActivityStreamsSensitive(i vocab.ActivityStreamsSensitiveProperty)

SetActivityStreamsSensitive sets the "sensitive" property.

func (*ActivityStreamsDocument) SetActivityStreamsShares

func (this *ActivityStreamsDocument) SetActivityStreamsShares(i vocab.ActivityStreamsSharesProperty)

SetActivityStreamsShares sets the "shares" property.

func (*ActivityStreamsDocument) SetActivityStreamsSource

func (this *ActivityStreamsDocument) SetActivityStreamsSource(i vocab.ActivityStreamsSourceProperty)

SetActivityStreamsSource sets the "source" property.

func (*ActivityStreamsDocument) SetActivityStreamsStartTime

func (this *ActivityStreamsDocument) SetActivityStreamsStartTime(i vocab.ActivityStreamsStartTimeProperty)

SetActivityStreamsStartTime sets the "startTime" property.

func (*ActivityStreamsDocument) SetActivityStreamsSummary

func (this *ActivityStreamsDocument) SetActivityStreamsSummary(i vocab.ActivityStreamsSummaryProperty)

SetActivityStreamsSummary sets the "summary" property.

func (*ActivityStreamsDocument) SetActivityStreamsTag

func (this *ActivityStreamsDocument) SetActivityStreamsTag(i vocab.ActivityStreamsTagProperty)

SetActivityStreamsTag sets the "tag" property.

func (*ActivityStreamsDocument) SetActivityStreamsTo

func (this *ActivityStreamsDocument) SetActivityStreamsTo(i vocab.ActivityStreamsToProperty)

SetActivityStreamsTo sets the "to" property.

func (*ActivityStreamsDocument) SetActivityStreamsUpdated

func (this *ActivityStreamsDocument) SetActivityStreamsUpdated(i vocab.ActivityStreamsUpdatedProperty)

SetActivityStreamsUpdated sets the "updated" property.

func (*ActivityStreamsDocument) SetActivityStreamsUrl

func (this *ActivityStreamsDocument) SetActivityStreamsUrl(i vocab.ActivityStreamsUrlProperty)

SetActivityStreamsUrl sets the "url" property.

func (*ActivityStreamsDocument) SetJSONLDId

func (this *ActivityStreamsDocument) SetJSONLDId(i vocab.JSONLDIdProperty)

SetJSONLDId sets the "id" property.

func (*ActivityStreamsDocument) SetJSONLDType

func (this *ActivityStreamsDocument) SetJSONLDType(i vocab.JSONLDTypeProperty)

SetJSONLDType sets the "type" property.

func (*ActivityStreamsDocument) SetTootBlurhash

func (this *ActivityStreamsDocument) SetTootBlurhash(i vocab.TootBlurhashProperty)

SetTootBlurhash sets the "blurhash" property.

func (ActivityStreamsDocument) VocabularyURI

func (this ActivityStreamsDocument) VocabularyURI() string

VocabularyURI returns the vocabulary's URI as a string.

Jump to

Keyboard shortcuts

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