Documentation
¶
Overview ¶
Package traefik_webfinger implements a Traefik middleware for handling WebFinger requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDomainRequired = errors.New("domain must be specified") ErrResourceDomainMatch = errors.New("resource does not match configured domain") ErrSubjectRequired = errors.New("subject is required for resource") ErrRelRequired = errors.New("rel is required for links in resource") )
Define static errors.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// The domain this WebFinger service is responsible for
Domain string `json:"domain,omitempty" yaml:"domain"`
// Default resources and their links
Resources map[string]WebFingerResponse `json:"resources,omitempty" yaml:"resources"`
// Whether to pass through to the backend service if resource not found
Passthrough bool `json:"passthrough,omitempty" yaml:"passthrough"`
}
Config defines the plugin configuration structure.
func CreateConfig ¶
func CreateConfig() *Config
CreateConfig creates a new default plugin configuration.
type WebFinger ¶
type WebFinger struct {
// contains filtered or unexported fields
}
WebFinger is the middleware plugin implementation.
type WebFingerLink ¶
type WebFingerLink struct {
Rel string `json:"rel"`
Type string `json:"type,omitempty"`
Href string `json:"href,omitempty"`
Titles map[string]string `json:"titles,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
}
WebFingerLink represents a link in the WebFinger response.
type WebFingerResponse ¶
type WebFingerResponse struct {
Subject string `json:"subject"`
Aliases []string `json:"aliases,omitempty"`
Links []WebFingerLink `json:"links,omitempty"`
}
WebFingerResponse represents the WebFinger JSON response according to RFC 7033.
Click to show internal directories.
Click to hide internal directories.