Documentation
¶
Index ¶
Constants ¶
View Source
const (
ProxyKindName = "httpproxy"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedEndpoint ¶
type AllowedEndpoint struct {
EndpointPattern common.Regexp `json:"endpointPattern" yaml:"endpointPattern"`
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(any) error) error
type Config ¶
type Config struct {
// URL is the url required to contact the datasource
URL *common.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:"allowedEndpoints,omitempty" yaml:"allowedEndpoints,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 (*Config) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.