Documentation
¶
Overview ¶
Package sherlock inspects a URL for any and all available metadata, using as many methods as possible: ActivityStreams, Open Graph, Twitter Cards, oEmbed, and native HTML signals.
The work happens in the sub-packages. Webpage metadata extraction is the metadata sub-package, whose Get function fetches a URL once and returns an oEmbed-adjacent Preview. ActivityStreams loading is a stack of client middlewares -- activitypub, tombstone, webfinger, bridgyfed, and tagspub -- each implementing hannibal's streams.Client interface.
This root package holds only what those sub-packages and their callers share: AuthorizedFetch, which signs an outbound request according to the ActivityPub Authorized Fetch convention, and the address classifiers that decide whether a value looks like something Sherlock could resolve.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizedFetch ¶ added in v0.8.0
func AuthorizedFetch(publicKeyID string, privateKey crypto.PrivateKey) remote.Option
AuthorizedFetch is a remote.Option that signs all outbound requests according to the ActivityPub "Authorized Fetch" convention: https://funfedi.dev/testing_tools/http_signatures/
func IsValidAddress ¶ added in v0.6.5
IsValidAddress returns TRUE for values that Sherlock THINKS it should be able to process: @username@host.tld and https://host.tld/username addresses.
func IsValidUsername ¶ added in v0.8.19
IsValidUsername returns TRUE if the value is at least three characters of letters, digits, or underscores.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package activitypub provides a Sherlock client middleware that loads ActivityPub/ActivityStream documents directly from their canonical URLs.
|
Package activitypub provides a Sherlock client middleware that loads ActivityPub/ActivityStream documents directly from their canonical URLs. |
|
Package bridgyfed is a Sherlock adapter that attempts to translate a Bluesky-looking value into an ActivityPub actor via Bridgy Fed.
|
Package bridgyfed is a Sherlock adapter that attempts to translate a Bluesky-looking value into an ActivityPub actor via Bridgy Fed. |
|
Package metadata fetches a web page once and extracts an oEmbed-adjacent Preview from every source the page carries: ActivityStreams, Open Graph, Twitter Cards, oEmbed, and HTML natives.
|
Package metadata fetches a web page once and extracts an oEmbed-adjacent Preview from every source the page carries: ActivityStreams, Open Graph, Twitter Cards, oEmbed, and HTML natives. |
|
Package tagspub attempts to translate a tag-looking value into a tags.pub ActivityPub actor
|
Package tagspub attempts to translate a tag-looking value into a tags.pub ActivityPub actor |
|
Package tombstone is a Sherlock client middleware that turns a "Gone" (HTTP 410) response into a synthetic ActivityStreams Tombstone document.
|
Package tombstone is a Sherlock client middleware that turns a "Gone" (HTTP 410) response into a synthetic ActivityStreams Tombstone document. |
|
Package webfinger identifies values that seem like usernames and uses WebFinger to try to resolve them into ActivityPub URLs
|
Package webfinger identifies values that seem like usernames and uses WebFinger to try to resolve them into ActivityPub URLs |