Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct { // IpAddrSource - describe where from to take client IP address IpAddrSource IpAddrSource `yaml:"ip-source"` // Middlewares additionally do some checks for incoming requests // Like password protection or DDoS prevention Middlewares map[string]middleware.InterfaceWrapper `yaml:"middlewares"` DurationSeconds common.DurationSeconds `yaml:"duration"` Port uint16 `yaml:"port"` Protocol firewallField.Protocol `yaml:"protocol"` ResponseCodeOnSuccess uint16 `yaml:"response-code-on-success"` }
func EndpointNewFromConfig ¶
func (*Endpoint) RegisterMiddlewares ¶
func (ctx *Endpoint) RegisterMiddlewares(input http.HandlerFunc) http.HandlerFunc
func (*Endpoint) SetDefaults ¶
func (ctx *Endpoint) SetDefaults()
type IpAddrSource ¶
type IpAddrSource struct { Type IpSourceType `yaml:"type"` FieldName string `yaml:"field-name"` }
func (*IpAddrSource) GetFromRequest ¶
func (ctx *IpAddrSource) GetFromRequest(r *http.Request) (firewallField.Address, error)
func (*IpAddrSource) SetDefaults ¶
func (ctx *IpAddrSource) SetDefaults()
type IpSourceType ¶
type IpSourceType string
const ( IP_SOURCE_TYPE_WEB_SERVER IpSourceType = "web-server" IP_SOURCE_TYPE_HTTP_HEADERS IpSourceType = "http-headers" IP_SOURCE_TYPE_HTTP_REQUEST_PARAM IpSourceType = "http-request-param" )
func (*IpSourceType) UnmarshalYAML ¶
func (ctx *IpSourceType) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.