typecanreply

package
v1.7.0-gts Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package typecanreply contains the implementation for the CanReply 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 CanReplyIsDisjointWith

func CanReplyIsDisjointWith(other vocab.Type) bool

CanReplyIsDisjointWith returns true if the other provided type is disjoint with the CanReply type.

func CanReplyIsExtendedBy

func CanReplyIsExtendedBy(other vocab.Type) bool

CanReplyIsExtendedBy returns true if the other provided type extends from the CanReply type. Note that it returns false if the types are the same; see the "IsOrExtendsCanReply" variant instead.

func GoToSocialCanReplyExtends

func GoToSocialCanReplyExtends(other vocab.Type) bool

GoToSocialCanReplyExtends returns true if the CanReply type extends from the other type.

func IsOrExtendsCanReply

func IsOrExtendsCanReply(other vocab.Type) bool

IsOrExtendsCanReply returns true if the other provided type is the CanReply type or extends from the CanReply 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 GoToSocialCanReply

type GoToSocialCanReply struct {
	GoToSocialAlways           vocab.GoToSocialAlwaysProperty
	GoToSocialApprovalRequired vocab.GoToSocialApprovalRequiredProperty
	JSONLDId                   vocab.JSONLDIdProperty
	// contains filtered or unexported fields
}

func DeserializeCanReply

func DeserializeCanReply(m map[string]interface{}, aliasMap map[string]string) (*GoToSocialCanReply, error)

DeserializeCanReply creates a CanReply from a map representation that has been unmarshalled from a text or binary format.

func NewGoToSocialCanReply

func NewGoToSocialCanReply() *GoToSocialCanReply

NewGoToSocialCanReply creates a new CanReply type

func (GoToSocialCanReply) GetGoToSocialAlways

func (this GoToSocialCanReply) GetGoToSocialAlways() vocab.GoToSocialAlwaysProperty

GetGoToSocialAlways returns the "always" property if it exists, and nil otherwise.

func (GoToSocialCanReply) GetGoToSocialApprovalRequired

func (this GoToSocialCanReply) GetGoToSocialApprovalRequired() vocab.GoToSocialApprovalRequiredProperty

GetGoToSocialApprovalRequired returns the "approvalRequired" property if it exists, and nil otherwise.

func (GoToSocialCanReply) GetJSONLDId

func (this GoToSocialCanReply) GetJSONLDId() vocab.JSONLDIdProperty

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

func (GoToSocialCanReply) GetTypeName

func (this GoToSocialCanReply) GetTypeName() string

GetTypeName returns the name of this type.

func (GoToSocialCanReply) GetUnknownProperties

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

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

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

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

func (GoToSocialCanReply) JSONLDContext

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

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

func (GoToSocialCanReply) Serialize

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

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

func (*GoToSocialCanReply) SetGoToSocialAlways

func (this *GoToSocialCanReply) SetGoToSocialAlways(i vocab.GoToSocialAlwaysProperty)

SetGoToSocialAlways sets the "always" property.

func (*GoToSocialCanReply) SetGoToSocialApprovalRequired

func (this *GoToSocialCanReply) SetGoToSocialApprovalRequired(i vocab.GoToSocialApprovalRequiredProperty)

SetGoToSocialApprovalRequired sets the "approvalRequired" property.

func (*GoToSocialCanReply) SetJSONLDId

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

SetJSONLDId sets the "id" property.

func (GoToSocialCanReply) VocabularyURI

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