dns

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// PurposeAuthentication is the DNS representation of the authentication purpose
	PurposeAuthentication = "auth"

	// PurposeAssertionMethod is the DNS representation of the assertion method purpose
	PurposeAssertionMethod = "asm"

	// PurposeCapabilityDeletion is the DNS representation of the capability delegation purpose
	PurposeCapabilityDeletion = "del"

	// PurposeCapabilityInvocation is the DNS representation of the capability invocation purpose
	PurposeCapabilityInvocation = "inv"

	// PurposeKeyAgreement is the DNS representation of the key agreement purpose
	PurposeKeyAgreement = "agm"

	// DNSLabelVerificationMethod is the DNS representation of the verification method property
	DNSLabelVerificationMethod = "vm"

	// DNSLabelService is the DNS representation of the service property
	DNSLabelService = "srv"

	// DNSLabelController is the DNS representation of the controller property
	DNSLabelController = "cnt"

	// DNSLabelAlsoKnownAs is the DNS representation of the AKA property
	DNSLabelAlsoKnownAs = "aka"
)

Variables

This section is empty.

Functions

func MarshalDIDDocument

func MarshalDIDDocument(d *didcore.Document) ([]byte, error)

MarshalDIDDocument packs a DID document into a TXT DNS resource records and adds to the DNS message Answers

func MarshalService

func MarshalService(dhtDNSkey string, s didcore.Service, msg *dnsmessage.Message) error

MarshalService packs a service into a TXT DNS resource record and adds to the DNS message Answers

func MarshalVerificationMethod

func MarshalVerificationMethod(vm *didcore.VerificationMethod) (string, error)

MarshalVerificationMethod packs a verification method into a TXT DNS resource record and adds to the DNS message Answers

func UnmarshalDIDDocument

func UnmarshalDIDDocument(payload []byte) (*didcore.Document, error)

UnmarshalDIDDocument unpacks the TXT DNS resource records and returns a DID document

func UnmarshalService

func UnmarshalService(data string, s *didcore.Service) error

UnmarshalService unpacks the TXT DNS resource encoded service

func UnmarshalVerificationMethod

func UnmarshalVerificationMethod(data string, did string, vm *didcore.VerificationMethod) error

UnmarshalVerificationMethod unpacks the TXT DNS resource encoded verification method

Types

This section is empty.

Jump to

Keyboard shortcuts

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