fediverse

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package fediverse has some of the Fediverse-related functions.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotBookmark = errors.New("fediverse: not a bookmark")
)

Functions

func FetchBookmarkAsRepost added in v1.3.0

func FetchBookmarkAsRepost(uri string) (*types.Bookmark, error)

FetchBookmarkAsRepost fetches a bookmark on the given address somehow. First, it tries to get a Note ActivityPub object formatted with Betula rules. If it fails to do so, it resorts to the readpage method.

func OurID

func OurID() string

func RenderRemoteBookmarks added in v1.3.0

func RenderRemoteBookmarks(raws []types.RemoteBookmark) (renders []types.RenderedRemoteBookmark)

func RequestActorByID

func RequestActorByID(actorID string) (*types.Actor, error)

RequestActorByID fetches the actor activity on the specified address. The returned value might be from the cache and perhaps stale.

func RequestActorByNickname

func RequestActorByNickname(nickname string) (*types.Actor, error)

RequestActorByNickname returns actor by string like @bouncepaw@links.bouncepaw.com or bouncepaw@links.bouncepaw.com. The returned value might be from the cache and perhaps stale.

func RequestActorInboxByID

func RequestActorInboxByID(actorID string) string

func VerifyRequest

func VerifyRequest(rq *http.Request, content []byte) bool

VerifyRequest returns true if the request is alright. This function makes HTTP requests on your behalf to retrieve the public key.

Types

This section is empty.

Directories

Path Synopsis
Package activities provides generation of JSON activities and activity data extraction from JSON.
Package activities provides generation of JSON activities and activity data extraction from JSON.
Package signing manages HTTP signatures and managing a pair of private and public keys.
Package signing manages HTTP signatures and managing a pair of private and public keys.

Jump to

Keyboard shortcuts

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