dns

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nip05Regex = regexp.MustCompile(`^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$`)

Functions

func Fetch

func Fetch(c Ctx, account S) (resp *WellKnownResponse, name S, err error)

func IsValidIdentifier

func IsValidIdentifier(input S) bool

Types

type B

type B = []byte

func StringSliceToByteSlice

func StringSliceToByteSlice(ss []S) (bs []B)

type Ctx

type Ctx = context.T

type E

type E = error

func QueryIdentifier

func QueryIdentifier(c Ctx, account S) (prf *pointers.Profile, err E)

type N

type N = int

type S

type S = string

func NormalizeIdentifier

func NormalizeIdentifier(account S) S

func ParseIdentifier

func ParseIdentifier(account S) (name, domain S, err error)

type WellKnownResponse

type WellKnownResponse struct {
	Names  map[S]S   `json:"names"`
	Relays map[S][]S `json:"relays,omitempty"`
	NIP46  map[S][]S `json:"nip46,omitempty"`
}

func NewWellKnownResponse

func NewWellKnownResponse() *WellKnownResponse

Jump to

Keyboard shortcuts

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