activitypub

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
	Context interface{} `json:"@context"`
	ID      string      `json:"id"`
	Actor   string      `json:"actor"`
	Type    string      `json:"type"`
	Object  interface{} `json:"object"`
	To      []string    `json:"to"`
	Cc      []string    `json:"cc"`
}

Activity : ActivityPub Activity.

func (*Activity) GenerateAnnounce added in v0.2.0

func (activity *Activity) GenerateAnnounce(host *url.URL) Activity

GenerateAnnounce : Generate Announce of activity.

func (*Activity) GenerateResponse added in v0.2.0

func (activity *Activity) GenerateResponse(host *url.URL, responseType string) Activity

GenerateResponse : Generate activity response.

func (*Activity) NestedActivity added in v0.2.0

func (activity *Activity) NestedActivity() (*Activity, error)

NestedActivity : Unwrap nested activity.

type Actor

type Actor struct {
	Context           interface{} `json:"@context"`
	ID                string      `json:"id"`
	Type              string      `json:"type"`
	PreferredUsername string      `json:"preferredUsername"`
	Inbox             string      `json:"inbox"`
	Endpoints         *Endpoints  `json:"endpoints"`
	PublicKey         PublicKey   `json:"publicKey"`
}

Actor : ActivityPub Actor.

func (*Actor) GenerateSelfKey added in v0.2.0

func (actor *Actor) GenerateSelfKey(hostname *url.URL, publickey *rsa.PublicKey)

GenerateSelfKey : Generate relay Actor from Publickey.

func (*Actor) RetrieveRemoteActor added in v0.2.0

func (actor *Actor) RetrieveRemoteActor(url string, uaString string, cache *cache.Cache) error

RetrieveRemoteActor : Retrieve Actor from remote instance.

type Endpoints added in v0.1.0

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

Endpoints : Contains SharedInbox address.

type PublicKey

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

PublicKey : Activity Certificate.

type Signature

type Signature struct {
	Type           string `json:"type"`
	Creator        string `json:"creator"`
	Created        string `json:"created"`
	SignatureValue string `json:"signatureValue"`
}

Signature : ActivityPub Header Signature.

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

WebfingerLink : Webfinger Link Resource.

type WebfingerResource

type WebfingerResource struct {
	Subject string          `json:"subject"`
	Links   []WebfingerLink `json:"links"`
}

WebfingerResource : Webfinger Resource.

func (*WebfingerResource) GenerateFromActor added in v0.2.0

func (resource *WebfingerResource) GenerateFromActor(hostname *url.URL, actor *Actor)

GenerateFromActor : Generate Webfinger resource from Actor.

Jump to

Keyboard shortcuts

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