Documentation ¶
Overview ¶
Public-Key Addressable Resource Records
Index ¶
Constants ¶
View Source
const ( // Maximum allowed length of an encoded DNS packet. MaxPacketLength = 1000 // Maximum allowed length of an encoded payload. MaxPayloadLength = MaxPacketLength + payloadHeaderLength )
Variables ¶
View Source
var ( // Error that is returned when length of encoded packet is too large. ErrPacketTooLarge = errors.New("pkarr: packet is too large") // Error that is returned when parsing a malformed Pkarr record. ErrInvalidPayload = errors.New("pkarr: invalid payload") )
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record represents a signed DNS record.
func FromPayload ¶
FromPayload parses a Record in a wire format. Returns ErrPacketTooLarge if the payload is too large and ErrInvalidPayload otherwise.
func New ¶
func New(key ed25519.PrivateKey, m dnsmessage.Message, t time.Time) (Record, error)
New encodes and signs DNS record m. If length of the encoded record is larger than MaxPacketLength, ErrPacketTooLarge is returned.
func (Record) Message ¶
func (sp Record) Message() dnsmessage.Message
Message returns the underlying DNS record.
func (Record) Payload ¶
Payload returns an encoded version of Record that is sent over the HTTP relay.
Click to show internal directories.
Click to hide internal directories.