Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ChallengeDefaultSettings = ChallengeSettings{ PassAction: string(policy.RuleActionPASS), FailAction: string(policy.RuleActionDENY), }
View Source
var CodeDefaultSettings = CodeSettings{}
View Source
var ContextDefaultSettings = ContextSettings{}
View Source
var ProxyDefaultSettings = ProxySettings{}
View Source
var Register = make(map[policy.RuleAction]NewFunc)
Functions ¶
This section is empty.
Types ¶
type Challenge ¶
type Challenge struct { RuleHash string Code int Continue bool Challenges []*challenge.Registration PassAction policy.RuleAction PassActionHandler Handler FailAction policy.RuleAction FailActionHandler Handler }
type ChallengeSettings ¶
type ChallengeSettings struct { Code int `yaml:"http-code"` Challenges []string `yaml:"challenges"` PassAction string `yaml:"pass"` PassSettings ast.Node `yaml:"pass-settings"` // FailAction Executed in case no challenges match or FailAction string `yaml:"fail"` FailSettings ast.Node `yaml:"fail-settings"` }
type CodeSettings ¶
type CodeSettings struct {
Code int `yaml:"http-code"`
}
type ContextSettings ¶ added in v0.7.0
type Handler ¶
type Handler interface { // Handle An incoming request. // If next is true, continue processing // If next is false, stop processing. If passing to a backend, done() must be called beforehand to set headers. Handle(logger *slog.Logger, w http.ResponseWriter, r *http.Request, done func() (backend http.Handler)) (next bool, err error) }
type ProxySettings ¶
Click to show internal directories.
Click to hide internal directories.