Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Version uint16
Length uint16
Contents ConfigContents
}
The structure of ECHConfig:
struct {
uint16 version;
uint16 length;
select (ECHConfig.version) {
case 0xfe0d: ECHConfigContents contents;
}
} ECHConfig;
func (Config) MarshalBinary ¶
MarshalBinary marshals Config c into a byte slice and appends to data.
func (*Config) UnmarshalBinary ¶
UnmarshalBinary removes the first bytes from data and unmarshals into Config c.
type ConfigContents ¶
type ConfigContents struct {
KeyConfig hpke.KeyConfig
MaximumNameLength uint8
PublicName string
Extensions ConfigExtensions
}
struct {
HpkeKeyConfig key_config;
uint8 maximum_name_length;
opaque public_name<1..255>;
ECHConfigExtension extensions<0..2^16-1>;
} ECHConfigContents;
func (ConfigContents) MarshalBinary ¶
func (cc ConfigContents) MarshalBinary(data *[]byte)
MarshalBinary marshals ConfigContents cc into a byte slice and appends to data.
func (*ConfigContents) UnmarshalBinary ¶
func (cc *ConfigContents) UnmarshalBinary(data *[]byte) error
UnmarshalBinary removes the first bytes from data and unmarshals into ConfigContents cc.
type ConfigExtension ¶
type ConfigExtension struct {
Type ConfigExtensionType
Data []byte
}
struct {
ECHConfigExtensionType type;
opaque data<0..2^16-1>;
} ECHConfigExtension;
func (ConfigExtension) MarshalBinary ¶
func (ce ConfigExtension) MarshalBinary(data *[]byte)
MarshalBinary marshals ConfigExtension ce into a byte slice and appends to data.
func (*ConfigExtension) UnmarshalBinary ¶
func (ce *ConfigExtension) UnmarshalBinary(data *[]byte) error
UnmarshalBinary removes the first bytes from data and unmarshals into ConfigExtension ce.
type ConfigExtensionType ¶
type ConfigExtensionType uint16
func (ConfigExtensionType) MarshalBinary ¶
func (c ConfigExtensionType) MarshalBinary(data *[]byte)
MarshalBinary marshals ConfigExtensionType c into a byte slice and appends to data.
func (*ConfigExtensionType) UnmarshalBinary ¶
func (c *ConfigExtensionType) UnmarshalBinary(data *[]byte) error
UnmarshalBinary removes the first two bytes from data and unmarshals into ConfigExtensionType c.
type ConfigExtensions ¶
type ConfigExtensions []ConfigExtension
func (ConfigExtensions) MarshalBinary ¶
func (ces ConfigExtensions) MarshalBinary(data *[]byte)
MarshalBinary marshals ConfigExtensions ces into a byte slice and appends to data.
func (*ConfigExtensions) UnmarshalBinary ¶
func (ces *ConfigExtensions) UnmarshalBinary(data *[]byte) error
UnmarshalBinary removes the first bytes from data and unmarshals into ConfigExtensions ces.
type ConfigList ¶
type ConfigList []Config
func LookupHTTPS ¶
func LookupHTTPS(name string) (ConfigList, error)
LookupHTTPS performs dns lookup of name with query type HTTPS.
func (ConfigList) MarshalBinary ¶
func (cl ConfigList) MarshalBinary(data *[]byte)
MarshalBinary marshals ConfigList cl into a byte slice and appends to data.
func (*ConfigList) UnmarshalBinary ¶
func (cl *ConfigList) UnmarshalBinary(data []byte) error
UnmarshalText removes the bytes from data and unmarshals into ConfigList cl.
func (*ConfigList) UnmarshalText ¶
func (cl *ConfigList) UnmarshalText(text []byte) error
UnmarshalText unmarshals a base64 encoded ECHConfigList into ConfigList cl.