Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { VirtualHosts []VirtualHost `yaml:"hosts"` Htpasswd string `yaml:"htpasswd"` // contains filtered or unexported fields }
Config represents the base configuration file
func (*Config) Find ¶
func (c *Config) Find(name string) (*VirtualHost, error)
Find particular VirtualHost configuration
func (*Config) NewBasicAuthenticator ¶ added in v0.0.3
type Prometheus ¶
type Prometheus struct { Upstream upstream `yaml:"upstream"` Matchers matchers `yaml:"matcher,omitempty"` Headers map[string]string `yaml:"headers,omitempty"` }
Prometheus guard configuration
func (*Prometheus) URL ¶ added in v0.0.3
func (p *Prometheus) URL() *url.URL
func (*Prometheus) UpdateRequest ¶ added in v0.0.5
func (p *Prometheus) UpdateRequest(req *http.Request)
AddHeaders adds custom headers to request
type VirtualHost ¶
type VirtualHost struct { Username string `yaml:"username"` Prometheus Prometheus `yaml:"prometheus,omitempty"` }
VirtualHost is a basic configuration unit
Click to show internal directories.
Click to hide internal directories.