Documentation
¶
Overview ¶
Package webmention implements the IndieWeb WebMention protocol
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(source, target *url.URL, sourceData *microformats.Data)
Callback is a function that is called on receipt of a processed incoming webmention Use this to perform function calls of inboudn webmentions. The source and target URL(s) as well as any discovered and parsed microformats data found on the source page are passed to the function.
type Link ¶
Link is a URL with one or more optional parameters for example: link: <https://twtxt.net/webmention>; rel="webmention"
func GetHeaderLinks ¶
GetHeaderLinks parses a slice of `Link:` HTTP headers (without the "Link:" prefix) into a slice of `Link`(s) used for discovering the webmention endpoints of a target URL.
type WebMention ¶
type WebMention interface { http.Handler Notify(target *url.URL, source *url.URL) SetCallback(fn Callback) }
WebMention defines an interface for handling inbound and outbound webmentions which must implement the `http.Handler` interface and a few methods for sending outbound notifications to a webmention target and setting a callback function for received inbound webmentions from a source.
func New ¶
func New() WebMention
New creates a new default WebMention processor for handling inbound and outbound webmentions