typepublickey

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Overview

Package typepublickey contains the implementation for the PublicKey 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 IsOrExtendsPublicKey

func IsOrExtendsPublicKey(other vocab.Type) bool

IsOrExtendsPublicKey returns true if the other provided type is the PublicKey type or extends from the PublicKey type.

func PublicKeyIsDisjointWith

func PublicKeyIsDisjointWith(other vocab.Type) bool

PublicKeyIsDisjointWith returns true if the other provided type is disjoint with the PublicKey type.

func PublicKeyIsExtendedBy

func PublicKeyIsExtendedBy(other vocab.Type) bool

PublicKeyIsExtendedBy returns true if the other provided type extends from the PublicKey type. Note that it returns false if the types are the same; see the "IsOrExtendsPublicKey" 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.

func W3IDSecurityV1PublicKeyExtends

func W3IDSecurityV1PublicKeyExtends(other vocab.Type) bool

W3IDSecurityV1PublicKeyExtends returns true if the PublicKey type extends from the other type.

Types

type W3IDSecurityV1PublicKey

type W3IDSecurityV1PublicKey struct {
	JSONLDId                   vocab.JSONLDIdProperty
	W3IDSecurityV1Owner        vocab.W3IDSecurityV1OwnerProperty
	W3IDSecurityV1PublicKeyPem vocab.W3IDSecurityV1PublicKeyPemProperty
	// contains filtered or unexported fields
}

A public key represents a public cryptographical key for a user

func DeserializePublicKey

func DeserializePublicKey(m map[string]interface{}, aliasMap map[string]string) (*W3IDSecurityV1PublicKey, error)

DeserializePublicKey creates a PublicKey from a map representation that has been unmarshalled from a text or binary format.

func NewW3IDSecurityV1PublicKey

func NewW3IDSecurityV1PublicKey() *W3IDSecurityV1PublicKey

NewW3IDSecurityV1PublicKey creates a new PublicKey type

func (W3IDSecurityV1PublicKey) GetJSONLDId

func (this W3IDSecurityV1PublicKey) GetJSONLDId() vocab.JSONLDIdProperty

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

func (W3IDSecurityV1PublicKey) GetTypeName

func (this W3IDSecurityV1PublicKey) GetTypeName() string

GetTypeName returns the name of this type.

func (W3IDSecurityV1PublicKey) GetUnknownProperties

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

GetUnknownProperties returns the unknown properties for the PublicKey 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 (W3IDSecurityV1PublicKey) GetW3IDSecurityV1Owner

func (this W3IDSecurityV1PublicKey) GetW3IDSecurityV1Owner() vocab.W3IDSecurityV1OwnerProperty

GetW3IDSecurityV1Owner returns the "owner" property if it exists, and nil otherwise.

func (W3IDSecurityV1PublicKey) GetW3IDSecurityV1PublicKeyPem

func (this W3IDSecurityV1PublicKey) GetW3IDSecurityV1PublicKeyPem() vocab.W3IDSecurityV1PublicKeyPemProperty

GetW3IDSecurityV1PublicKeyPem returns the "publicKeyPem" property if it exists, and nil otherwise.

func (W3IDSecurityV1PublicKey) IsExtending

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

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

func (W3IDSecurityV1PublicKey) JSONLDContext

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

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

func (W3IDSecurityV1PublicKey) Serialize

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

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

func (*W3IDSecurityV1PublicKey) SetJSONLDId

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

SetJSONLDId sets the "id" property.

func (*W3IDSecurityV1PublicKey) SetW3IDSecurityV1Owner

func (this *W3IDSecurityV1PublicKey) SetW3IDSecurityV1Owner(i vocab.W3IDSecurityV1OwnerProperty)

SetW3IDSecurityV1Owner sets the "owner" property.

func (*W3IDSecurityV1PublicKey) SetW3IDSecurityV1PublicKeyPem

func (this *W3IDSecurityV1PublicKey) SetW3IDSecurityV1PublicKeyPem(i vocab.W3IDSecurityV1PublicKeyPemProperty)

SetW3IDSecurityV1PublicKeyPem sets the "publicKeyPem" property.

func (W3IDSecurityV1PublicKey) VocabularyURI

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