object

package
v0.0.0-...-19a598b Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCollection

func ParseCollection(ctx context.Context, object vocab.Type) (vocab.ActivityStreamsCollection, error)

func ParseEvent

func ParseEvent(ctx context.Context, object vocab.Type) (vocab.ActivityStreamsEvent, error)

func ParseNote

func ParseNote(ctx context.Context, object vocab.Type) (vocab.ActivityStreamsNote, error)

func WrapInAccept

func WrapInAccept(activityID *url.URL, actorID *url.URL) (vocab.ActivityStreamsAccept, error)

WrapInAccept accepts an activity ID and wraps it in an Accept activity. WrapInAccept does not handle ID assignment.

func WrapInCreate

func WrapInCreate(ctx context.Context, object Object, actor vocab.Type) (vocab.ActivityStreamsCreate, error)

WrapInCreate accepts objects and wraps an object in a Create activity. WrapInCreate does not handle ID assignment.

func WrapInInvite

WrapInInvite accepts an event and wraps the event in an Invite activity. WrapInInvite does not handle ID assignment or determining targets.

Types

type Object

type Object interface {
	vocab.Type
	GetActivityStreamsPublished() vocab.ActivityStreamsPublishedProperty
	GetActivityStreamsTo() vocab.ActivityStreamsToProperty
	GetActivityStreamsCc() vocab.ActivityStreamsCcProperty
	GetActivityStreamsInReplyTo() vocab.ActivityStreamsInReplyToProperty
}

func ParseObject

func ParseObject(ctx context.Context, rawObject vocab.Type) (Object, error)

Jump to

Keyboard shortcuts

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