http

package
v0.52.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 4 Imported by: 4

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

func (h *Config) UnmarshalJSON(data []byte) error

func (*Config) UnmarshalYAML

func (h *Config) UnmarshalYAML(unmarshal func(any) error) error

type Proxy

type Proxy struct {
	Kind string `json:"kind" yaml:"kind"`
	Spec Config `json:"spec" yaml:"spec"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL