Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessRule ¶
AccessRule defines a pattern and the corresponding auth key
func (*AccessRule) CheckAuth ¶
func (a *AccessRule) CheckAuth(token string) bool
CheckAuth validate a given token against the AccessRule token
type AccessRules ¶
type AccessRules []*AccessRule
AccessRules is a list of AccessRules
func NewAccessRulesFromConfig ¶
func NewAccessRulesFromConfig(accessRulesCfg config.AccessRules) (AccessRules, error)
NewAccessRulesFromConfig creates AccessRules from configuration
func (AccessRules) Search ¶
func (a AccessRules) Search(fqdn string) *AccessRule
Search for a access rule by FQDN
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern is a glob-like string for AccessRule
func CompilePattern ¶
CompilePattern creates a Pattern form a given string
func MustCompilePattern ¶
MustCompilePattern creates a Pattern form a given string. Panics in case of an error
type Proxy ¶
type Proxy struct { Logger *zap.Logger Provider dns.Provider AccessRules AccessRules }
Proxy handles incoming request and calls the DNS provider API.
type Remote ¶
type Remote struct { Addr string // Addr is the address of the client Name string // Name is the name of the client. This depends on the client and can be for example go/lego for lego }
Remote holds information about the remote client.
type Request ¶
type Request struct { Action string // Action for the current request. Can be present or cleanup AuthToken string // AuthToken for the current request Challenge dns.Challenge // Challenge for the current request Remote Remote // Remote information for the current request }
Request holds information about the request.
Click to show internal directories.
Click to hide internal directories.