Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedEndpoint ¶
type AllowedEndpoint struct {
EndpointPattern common.Regexp `json:"endpoint_pattern" yaml:"endpoint_pattern"`
Method string `json:"method" yaml:"method"`
}
func (*AllowedEndpoint) UnmarshalJSON ¶
func (h *AllowedEndpoint) UnmarshalJSON(data []byte) error
func (*AllowedEndpoint) UnmarshalYAML ¶
func (h *AllowedEndpoint) UnmarshalYAML(unmarshal func(interface{}) error) error
type Auth ¶
type Auth struct {
InsecureTLS bool `json:"insecure_tls,omitempty" yaml:"insecure_tls,omitempty"`
BearerToken string `json:"bearer_token,omitempty" yaml:"bearer_token,omitempty"`
BasicAuth *BasicAuth `json:"basic_auth,omitempty" yaml:"basic_auth,omitempty"`
CaCert string `json:"ca_cert,omitempty" yaml:"ca_cert,omitempty"`
}
func (*Auth) UnmarshalJSON ¶
func (*Auth) UnmarshalYAML ¶
type BasicAuth ¶
type BasicAuth struct {
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"password,omitempty"`
// PasswordFile is a path to a file that contains a password
PasswordFile string `json:"password_file" yaml:"password_file,omitempty"`
}
func (*BasicAuth) GetPassword ¶
func (*BasicAuth) UnmarshalJSON ¶
func (*BasicAuth) UnmarshalYAML ¶
type Config ¶
type Config struct {
// URL is the url required to contact the datasource
URL *url.URL `json:"url" yaml:"url"`
// AllowedEndpoints is a list of tuple of http method and http endpoint that will be accessible.
// If not set, then everything is accessible.
AllowedEndpoints []AllowedEndpoint `json:"allowed_endpoints,omitempty" yaml:"allowed_endpoints,omitempty"`
// Headers can be used to provide additional header that needs to be forwarded when requesting the datasource
// When defined, it's impossible to set the value of Access with 'browser'
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
// Secret is the name of the secret that should be used for the proxy or discovery configuration
// It will contain any sensitive information such as password, token, certificate.
Secret string `json:"secret,omitempty" yaml:"secret,omitempty"`
}
func ValidateAndExtract ¶ added in v0.12.0
func (Config) MarshalJSON ¶
func (Config) MarshalYAML ¶
func (*Config) UnmarshalJSON ¶
func (*Config) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.