activity

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPayloadFromActivity

func GetPayloadFromActivity(activity *Activity) (*subject.Payload, error)

GetPayloadFromActivity gets payload from activity.

Types

type Activity

type Activity struct {
	Context      interface{}       `json:"@context,omitempty"`
	Type         string            `json:"type,omitempty"`
	AttributedTo string            `json:"attributedTo,omitempty"`
	Published    *util.TimeWrapper `json:"published,omitempty"`
	Parent       []string          `json:"parent,omitempty"`
	Attachment   []Attachment      `json:"attachment,omitempty"`
}

Activity defines anchor activity.

func BuildActivityFromPayload

func BuildActivityFromPayload(payload *subject.Payload) (*Activity, error)

BuildActivityFromPayload builds activity from payload.

type Attachment

type Attachment struct {
	Type      string        `json:"type,omitempty"`
	Generator string        `json:"generator,omitempty"`
	URL       string        `json:"url,omitempty"`
	Resources []interface{} `json:"resources,omitempty"`
}

Attachment defines anchor activity attachment.

type Resource

type Resource struct {
	ID             string `json:"id,omitempty"`
	PreviousAnchor string `json:"previousAnchor,omitempty"`
	Type           string `json:"type,omitempty"`
}

Resource defines resource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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