webfinger

package
v0.0.0-...-4c68550 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *instance.FederationConfig) *Client
func (c *Client) GetWebfingerLinks(account string) ([]map[string]interface{}, error)

func (*Client) MakeWebFingerRequestResponseFromData

func (c *Client) MakeWebFingerRequestResponseFromData(data []map[string]interface{}) WebfingerProfileRequestResponse

MakeWebFingerRequestResponseFromData converts WebFinger data to an easier to use model.

func (*Client) MakeWebfingerResponse

func (c *Client) MakeWebfingerResponse(account string, inbox string, host string) WebfingerResponse

MakeWebfingerResponse will create a new Webfinger response.

type Link struct {
	Rel  string `json:"rel"`
	Type string `json:"type"`
	Href string `json:"href"`
}

Link represents a Webfinger response Link entity.

type WebfingerProfileRequestResponse

type WebfingerProfileRequestResponse struct {
	Self string
}

WebfingerProfileRequestResponse represents a Webfinger profile request response.

type WebfingerResponse

type WebfingerResponse struct {
	Aliases []string `json:"aliases"`
	Subject string   `json:"subject"`
	Links   []Link   `json:"links"`
}

WebfingerResponse represents a Webfinger response.

Jump to

Keyboard shortcuts

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