Documentation ¶
Overview ¶
The restore package provides data structures important to restoring DNS proxy rules. This package serves as a central source for these structures. Note that these are marshaled as JSON and any changes need to be compatible across an upgrade!
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPRule ¶
type IPRule struct { Re RuleRegex IPs map[string]struct{} // IPs, nil set is wildcard and allows all IPs! }
IPRule stores the allowed destination IPs for a DNS names matching a regex
type RuleRegex ¶
type RuleRegex struct {
Pattern *string
}
RuleRegex is a wrapper for a pointer to a string so that we can define marshalers for it.
func (RuleRegex) MarshalText ¶
MarshalText marshals RuleRegex as string
func (*RuleRegex) UnmarshalText ¶
UnmarshalText unmarshals json into a RuleRegex This must have a pointer receiver, otherwise the RuleRegex remains empty.
Click to show internal directories.
Click to hide internal directories.