package module
Version: v0.0.0-...-baccd6f Latest Latest

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 8 Imported by: 0



Build Status Go Report Card Go Reference

go.mills.io/webmention is a Go library that implements support for the IndieWeb WebMention protocol. Both client and server support are included.

Quick Start



go.mills.io/webmention is licensed under the terms of the MIT license



Package webmention implements the IndieWeb WebMention protocol



This section is empty.


This section is empty.


This section is empty.


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 struct {
	URL    *url.URL
	Params map[string][]string

Link is a URL with one or more optional parameters for example: link: <https://twtxt.net/webmention>; rel="webmention"

func GetHeaderLinks(headers []string) []*Link

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 {
	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

Jump to

Keyboard shortcuts

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