remote

package
v0.0.0-...-4c68550 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchAccountAsActor

func FetchAccountAsActor(ctx context.Context, req *http.Request) (*models.Actor, error)

Types

type ActivityStreamAccount

type ActivityStreamAccount interface {
	GetJSONLDId() vocab.JSONLDIdProperty
	GetTypeName() string
	GetActivityStreamsPreferredUsername() vocab.ActivityStreamsPreferredUsernameProperty
	GetActivityStreamsIcon() vocab.ActivityStreamsIconProperty
	GetActivityStreamsName() vocab.ActivityStreamsNameProperty
	GetActivityStreamsImage() vocab.ActivityStreamsImageProperty
	GetActivityStreamsSummary() vocab.ActivityStreamsSummaryProperty
	GetActivityStreamsAttachment() vocab.ActivityStreamsAttachmentProperty
	SetActivityStreamsSummary(vocab.ActivityStreamsSummaryProperty)
	GetTootDiscoverable() vocab.TootDiscoverableProperty
	GetActivityStreamsUrl() vocab.ActivityStreamsUrlProperty
	GetW3IDSecurityV1PublicKey() vocab.W3IDSecurityV1PublicKeyProperty
	GetActivityStreamsInbox() vocab.ActivityStreamsInboxProperty
	GetActivityStreamsOutbox() vocab.ActivityStreamsOutboxProperty
	GetActivityStreamsFollowing() vocab.ActivityStreamsFollowingProperty
	GetActivityStreamsFollowers() vocab.ActivityStreamsFollowersProperty
	GetTootFeatured() vocab.TootFeaturedProperty
	GetActivityStreamsManuallyApprovesFollowers() vocab.ActivityStreamsManuallyApprovesFollowersProperty
	GetActivityStreamsEndpoints() vocab.ActivityStreamsEndpointsProperty
	GetActivityStreamsTag() vocab.ActivityStreamsTagProperty
}

type Resolver

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

func NewResolver

func NewResolver(config *instance.FederationConfig, signer *crypto.Signer) *Resolver

func (*Resolver) GetResolvedActorFromActorProperty

func (r *Resolver) GetResolvedActorFromActorProperty(actor vocab.ActivityStreamsActorProperty) (models.Actor, error)

GetResolvedActorFromActorProperty resolve an external actor property to a fully populated internal actor representation.

func (*Resolver) GetResolvedActorFromIRI

func (r *Resolver) GetResolvedActorFromIRI(personOrServiceIRI string) (models.Actor, error)

GetResolvedActorFromIRI will resolve an IRI string to a fully populated actor.

func (*Resolver) GetResolvedPublicKeyFromIRI

func (r *Resolver) GetResolvedPublicKeyFromIRI(publicKeyIRI string) (vocab.W3IDSecurityV1PublicKey, error)

GetResolvedPublicKeyFromIRI will resolve a publicKey IRI string to a vocab.W3IDSecurityV1PublicKey.

func (*Resolver) Resolve

func (r *Resolver) Resolve(c context.Context, data []byte, callbacks ...interface{}) error

Resolve will translate a raw ActivityPub payload and fire the callback associated with that activity type.

func (*Resolver) ResolveIRI

func (r *Resolver) ResolveIRI(c context.Context, iri string, callbacks ...interface{}) error

ResolveIRI will resolve an IRI ahd call the correct callback for the resolved type.

Jump to

Keyboard shortcuts

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