activitypub

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor added in v1.2.0

type Actor struct {
	Context   []string  `json:"@context"`
	ID        string    `json:"id"`
	Type      string    `json:"type"`
	Inbox     string    `json:"inbox"`
	Outbox    string    `json:"outbox"`
	PublicKey PublicKey `json:"publicKey"`
	Endpoints EndPoint  `json:"endpoints"`
}

type Attachment

type Attachment struct {
	Type      string `json:"type"`
	URL       string `json:"url"`
	MediaType string `json:"mediaType"`
}

Attachment represents an attachment to an ActivityPub object.

type EndPoint added in v1.2.0

type EndPoint struct {
	SharedInbox string `json:"sharedInbox"`
}

type InstanceInfo added in v1.2.0

type InstanceInfo struct {
	URI         string `json:"uri"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

InstanceInfo represents instance-specific information response.

type NodeInfo added in v1.2.0

type NodeInfo struct {
	Links []NodeInfoLink `json:"links"`
}

NodeInfo represents the node information response structure

type NodeInfoDetails added in v1.2.0

type NodeInfoDetails struct {
	Version           string        `json:"version"`
	Software          SoftwareInfo  `json:"software"`
	Protocols         []string      `json:"protocols"`
	Services          ServicesInfo  `json:"services"`
	OpenRegistrations bool          `json:"openRegistrations"`
	Usage             NodeUsageInfo `json:"usage"`
}

NodeInfoDetails represents detailed node information.

type NodeInfoLink struct {
	Rel  string `json:"rel"`
	Href string `json:"href"`
}

NodeInfoLink represents a link in NodeInfo.

type NodeUsageInfo added in v1.2.0

type NodeUsageInfo struct {
	Users UsersInfo `json:"users"`
}

NodeUsageInfo contains usage statistics for a node.

type Note

type Note struct {
	ID        string   `json:"id"`
	Type      string   `json:"type"`
	Content   string   `json:"content"`
	Published string   `json:"published,omitempty"`
	To        []string `json:"to,omitempty"`
	CC        []string `json:"cc,omitempty"`
	Tag       []Tag    `json:"tag,omitempty"`
}

Note represents a note object in ActivityPub.

type Object

type Object struct {
	Context    interface{}            `json:"@context,omitempty"`
	ID         string                 `json:"id"`
	Type       string                 `json:"type"`
	Actor      string                 `json:"actor,omitempty"`
	Object     interface{}            `json:"object,omitempty"`
	Target     interface{}            `json:"target,omitempty"`
	Result     interface{}            `json:"result,omitempty"`
	Origin     interface{}            `json:"origin,omitempty"`
	Instrument interface{}            `json:"instrument,omitempty"`
	Published  string                 `json:"published,omitempty"`
	To         []string               `json:"to,omitempty"`
	CC         []string               `json:"cc,omitempty"`
	Bto        []string               `json:"bto,omitempty"`
	Bcc        []string               `json:"bcc,omitempty"`
	Attachment interface{}            `json:"attachment,omitempty"`
	Tag        interface{}            `json:"tag,omitempty"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

Object represents a general ActivityPub object or activity.

type PublicKey added in v1.2.0

type PublicKey struct {
	ID           string `json:"id"`
	Owner        string `json:"owner"`
	PublicKeyPem string `json:"publicKeyPem"`
}

type ServicesInfo added in v1.2.0

type ServicesInfo struct {
	Inbound  []string `json:"inbound"`
	Outbound []string `json:"outbound"`
}

ServicesInfo represents the inbound and outbound services of a node.

type SoftwareInfo added in v1.2.0

type SoftwareInfo struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

SoftwareInfo provides software details in NodeInfo.

type StatusResponse

type StatusResponse struct {
	Object struct {
		Published  time.Time    `json:"published"`
		Content    string       `json:"content"`
		Attachment []Attachment `json:"attachment"`
		Tag        []Tag        `json:"tag"`
	} `json:"object"`
}

StatusResponse represents a status response from an ActivityPub server.

type StatusResult

type StatusResult struct {
	Content     string
	Timestamp   string
	Attachments []Attachment
	Tags        []Tag
}

StatusResult represents the result of a status request.

type Tag

type Tag struct {
	Type string `json:"type"`
	Name string `json:"name"`
	Href string `json:"href"`
}

Tag represents a tag in an ActivityPub object.

type UsersInfo added in v1.2.0

type UsersInfo struct {
	Total int `json:"total"`
}

UsersInfo provides user statistics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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