typemention

package
v1.6.0-gts Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package typemention contains the implementation for the Mention 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 ActivityStreamsMentionExtends

func ActivityStreamsMentionExtends(other vocab.Type) bool

ActivityStreamsMentionExtends returns true if the Mention type extends from the other type.

func IsOrExtendsMention

func IsOrExtendsMention(other vocab.Type) bool

IsOrExtendsMention returns true if the other provided type is the Mention type or extends from the Mention type.

func MentionIsDisjointWith

func MentionIsDisjointWith(other vocab.Type) bool

MentionIsDisjointWith returns true if the other provided type is disjoint with the Mention type.

func MentionIsExtendedBy

func MentionIsExtendedBy(other vocab.Type) bool

MentionIsExtendedBy returns true if the other provided type extends from the Mention type. Note that it returns false if the types are the same; see the "IsOrExtendsMention" variant instead.

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 ActivityStreamsMention

type ActivityStreamsMention struct {
	ActivityStreamsAttributedTo vocab.ActivityStreamsAttributedToProperty
	ActivityStreamsHeight       vocab.ActivityStreamsHeightProperty
	ActivityStreamsHref         vocab.ActivityStreamsHrefProperty
	ActivityStreamsHreflang     vocab.ActivityStreamsHreflangProperty
	JSONLDId                    vocab.JSONLDIdProperty
	ActivityStreamsMediaType    vocab.ActivityStreamsMediaTypeProperty
	ActivityStreamsName         vocab.ActivityStreamsNameProperty
	ActivityStreamsPreview      vocab.ActivityStreamsPreviewProperty
	ActivityStreamsRel          vocab.ActivityStreamsRelProperty
	ActivityStreamsSummary      vocab.ActivityStreamsSummaryProperty
	JSONLDType                  vocab.JSONLDTypeProperty
	ActivityStreamsWidth        vocab.ActivityStreamsWidthProperty
	// contains filtered or unexported fields
}

A specialized Link that represents an @mention.

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

{
  "name": "Joe",
  "summary": "Mention of Joe by Carrie in her note",
  "type": "Mention",
  "url": "http://example.org/joe"
}

func DeserializeMention

func DeserializeMention(m map[string]interface{}, aliasMap map[string]string) (*ActivityStreamsMention, error)

DeserializeMention creates a Mention from a map representation that has been unmarshalled from a text or binary format.

func NewActivityStreamsMention

func NewActivityStreamsMention() *ActivityStreamsMention

NewActivityStreamsMention creates a new Mention type

func (ActivityStreamsMention) GetActivityStreamsAttributedTo

func (this ActivityStreamsMention) GetActivityStreamsAttributedTo() vocab.ActivityStreamsAttributedToProperty

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

func (ActivityStreamsMention) GetActivityStreamsHeight

func (this ActivityStreamsMention) GetActivityStreamsHeight() vocab.ActivityStreamsHeightProperty

GetActivityStreamsHeight returns the "height" property if it exists, and nil otherwise.

func (ActivityStreamsMention) GetActivityStreamsHref

func (this ActivityStreamsMention) GetActivityStreamsHref() vocab.ActivityStreamsHrefProperty

GetActivityStreamsHref returns the "href" property if it exists, and nil otherwise.

func (ActivityStreamsMention) GetActivityStreamsHreflang

func (this ActivityStreamsMention) GetActivityStreamsHreflang() vocab.ActivityStreamsHreflangProperty

GetActivityStreamsHreflang returns the "hreflang" property if it exists, and nil otherwise.

func (ActivityStreamsMention) GetActivityStreamsMediaType

func (this ActivityStreamsMention) GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty

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

func (ActivityStreamsMention) GetActivityStreamsName

func (this ActivityStreamsMention) GetActivityStreamsName() vocab.ActivityStreamsNameProperty

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

func (ActivityStreamsMention) GetActivityStreamsPreview

func (this ActivityStreamsMention) GetActivityStreamsPreview() vocab.ActivityStreamsPreviewProperty

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

func (ActivityStreamsMention) GetActivityStreamsRel

func (this ActivityStreamsMention) GetActivityStreamsRel() vocab.ActivityStreamsRelProperty

GetActivityStreamsRel returns the "rel" property if it exists, and nil otherwise.

func (ActivityStreamsMention) GetActivityStreamsSummary

func (this ActivityStreamsMention) GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty

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

func (ActivityStreamsMention) GetActivityStreamsWidth

func (this ActivityStreamsMention) GetActivityStreamsWidth() vocab.ActivityStreamsWidthProperty

GetActivityStreamsWidth returns the "width" property if it exists, and nil otherwise.

func (ActivityStreamsMention) GetJSONLDId

func (this ActivityStreamsMention) GetJSONLDId() vocab.JSONLDIdProperty

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

func (ActivityStreamsMention) GetJSONLDType

func (this ActivityStreamsMention) GetJSONLDType() vocab.JSONLDTypeProperty

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

func (ActivityStreamsMention) GetTypeName

func (this ActivityStreamsMention) GetTypeName() string

GetTypeName returns the name of this type.

func (ActivityStreamsMention) GetUnknownProperties

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

GetUnknownProperties returns the unknown properties for the Mention 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 (ActivityStreamsMention) IsExtending

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

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

func (ActivityStreamsMention) JSONLDContext

func (this ActivityStreamsMention) 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 (ActivityStreamsMention) LessThan

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

func (ActivityStreamsMention) Serialize

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

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

func (*ActivityStreamsMention) SetActivityStreamsAttributedTo

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

SetActivityStreamsAttributedTo sets the "attributedTo" property.

func (*ActivityStreamsMention) SetActivityStreamsHeight

func (this *ActivityStreamsMention) SetActivityStreamsHeight(i vocab.ActivityStreamsHeightProperty)

SetActivityStreamsHeight sets the "height" property.

func (*ActivityStreamsMention) SetActivityStreamsHref

func (this *ActivityStreamsMention) SetActivityStreamsHref(i vocab.ActivityStreamsHrefProperty)

SetActivityStreamsHref sets the "href" property.

func (*ActivityStreamsMention) SetActivityStreamsHreflang

func (this *ActivityStreamsMention) SetActivityStreamsHreflang(i vocab.ActivityStreamsHreflangProperty)

SetActivityStreamsHreflang sets the "hreflang" property.

func (*ActivityStreamsMention) SetActivityStreamsMediaType

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

SetActivityStreamsMediaType sets the "mediaType" property.

func (*ActivityStreamsMention) SetActivityStreamsName

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

SetActivityStreamsName sets the "name" property.

func (*ActivityStreamsMention) SetActivityStreamsPreview

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

SetActivityStreamsPreview sets the "preview" property.

func (*ActivityStreamsMention) SetActivityStreamsRel

func (this *ActivityStreamsMention) SetActivityStreamsRel(i vocab.ActivityStreamsRelProperty)

SetActivityStreamsRel sets the "rel" property.

func (*ActivityStreamsMention) SetActivityStreamsSummary

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

SetActivityStreamsSummary sets the "summary" property.

func (*ActivityStreamsMention) SetActivityStreamsWidth

func (this *ActivityStreamsMention) SetActivityStreamsWidth(i vocab.ActivityStreamsWidthProperty)

SetActivityStreamsWidth sets the "width" property.

func (*ActivityStreamsMention) SetJSONLDId

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

SetJSONLDId sets the "id" property.

func (*ActivityStreamsMention) SetJSONLDType

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

SetJSONLDType sets the "type" property.

func (ActivityStreamsMention) VocabularyURI

func (this ActivityStreamsMention) 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