dataModel

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSSDEventMessage

type DNSSDEventMessage struct {
	ServiceInfo DNSSDServiceInfo `json:"service_info"`
	EventType   EventType        `json:"event_type"`
}

func (DNSSDEventMessage) MarshalJSON

func (e DNSSDEventMessage) MarshalJSON() ([]byte, error)

type DNSSDInfo

type DNSSDInfo struct {
	ApiVersion  json.Number          `json:"api_version"`
	Services    []string             `json:"services"`
	ErrorStatus node.NodeErrorStatus `json:"error_status"`
}

type DNSSDServiceInfo

type DNSSDServiceInfo struct {

	// DNS label pair according to rfc6763.
	ServiceName string `json:"type,omitempty"`

	Domain string `json:"domain,omitempty"`

	Priority json.Number `json:"priority,omitempty"`

	Weight json.Number `json:"weight,omitempty"`

	Ttl json.Number `json:"ttl,omitempty"`

	Port uint16 `json:"port,omitempty"`

	Hostname string `json:"hostname,omitempty"`

	Name string `json:"name,omitempty"`

	Addresses []net.IP `json:"addresses,omitempty"`

	TxtRecord any `json:"txt_record,omitempty"`
}

DnssdServiceInfo - https://www.rfc-editor.org/rfc/rfc2782

func (DNSSDServiceInfo) MarshalJSON

func (m DNSSDServiceInfo) MarshalJSON() ([]byte, error)

func (*DNSSDServiceInfo) UnmarshalJSON

func (m *DNSSDServiceInfo) UnmarshalJSON(data []byte) error

type DNSSDTxtRecord

type DNSSDTxtRecord = []string

type DNSSDTxtRecord = map[string]string

type DNSSDTxtRecordHttps

type DNSSDTxtRecordHttps struct {
	Format          string               `json:"format,omitempty"`
	ApiVersion      json.Number          `json:"api_version,omitempty"`
	ApplicationName string               `json:"application_name,omitempty"`
	ElementName     string               `json:"element_name,omitempty"`
	ProductName     string               `json:"product_name,omitempty"`
	ErrorStatus     node.NodeErrorStatus `json:"error_status,omitempty"`
}

func (DNSSDTxtRecordHttps) String

type EventType

type EventType string
const (
	ADD EventType = "ADD"
	RMV EventType = "RMV"
	SRV EventType = "SRV"
)

Jump to

Keyboard shortcuts

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