ncdomain

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: GPL-3.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorFunc

type ErrorFunc func(err error, isWarning bool)

type ResolveFunc

type ResolveFunc func(name string) (string, error)

type Value

type Value struct {
	TLSAGenerated []x509.Certificate // Certs can be dehydrated in the blockchain, they will be put here without SAN values.  SAN must be filled in before use.
	// contains filtered or unexported fields
}

func ParseValue

func ParseValue(name, jsonValue string, resolve ResolveFunc, errFunc ErrorFunc) (value *Value)

Call to convert a given JSON value to a parsed Namecoin domain value.

If ResolveFunc is given, it will be called to obtain the values for domains referenced by "import" and "delegate" statements. The name passed is in Namecoin form (e.g. "d/example"). The JSON value or an error should be returned. If no ResolveFunc is passed, "import" and "delegate" statements always fail.

Returns nil if the JSON could not be parsed. For all other errors processing continues and recovers as much as possible; errFunc is called for all errors and warnings if specified.

func (*Value) RRs

func (v *Value) RRs(out []dns.RR, suffix, apexSuffix string) ([]dns.RR, error)

func (*Value) RRsRecursive

func (v *Value) RRsRecursive(out []dns.RR, suffix, apexSuffix string) ([]dns.RR, error)

func (*Value) String

func (v *Value) String() string

Jump to

Keyboard shortcuts

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