discovery

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package discovery provides identity discovery via DNS records, well-known endpoints, and APIs. It discovers linked profiles from personal domains through various verification methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractDomain

func ExtractDomain(urlStr string) string

ExtractDomain extracts the domain from a URL, stripping www. prefix and lowercasing.

func IsKnownSocialDomain

func IsKnownSocialDomain(domain string) bool

IsKnownSocialDomain returns true if the domain belongs to a known social platform.

Types

type Discoverer

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

Discoverer finds linked identities for a domain.

func New

func New(logger *slog.Logger) *Discoverer

New creates a new Discoverer.

func (*Discoverer) DiscoverAll

func (d *Discoverer) DiscoverAll(ctx context.Context, domain string) []Result

DiscoverAll runs all discovery methods for a domain and returns found identities.

func (*Discoverer) LookupBluesky

func (d *Discoverer) LookupBluesky(ctx context.Context, domain string) *Result

LookupBluesky checks DNS TXT records for AT Protocol (Bluesky) verification.

func (*Discoverer) LookupKeybase

func (d *Discoverer) LookupKeybase(ctx context.Context, domain string) *Result

LookupKeybase queries the Keybase API to find a user who has verified a domain.

func (*Discoverer) LookupMatrix

func (d *Discoverer) LookupMatrix(ctx context.Context, domain string) *Result

LookupMatrix checks the Matrix well-known endpoint to see if the domain hosts a homeserver.

func (*Discoverer) LookupNostr

func (d *Discoverer) LookupNostr(ctx context.Context, domain string) *Result

LookupNostr checks the NIP-05 well-known endpoint for Nostr verification.

func (*Discoverer) LookupWebFinger

func (d *Discoverer) LookupWebFinger(ctx context.Context, email string) *Result

LookupWebFinger queries WebFinger to discover Fediverse profiles from email addresses.

type Result

type Result struct {
	Platform string // e.g., "keybase", "bluesky", "nostr", "fediverse"
	URL      string // Profile URL
	Username string // Username if available
}

Result represents a discovered identity.

Jump to

Keyboard shortcuts

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