Documentation
¶
Overview ¶
Package proxyconf is the shared proxy settings object (C-03.FR-19, C-02.FR-22): whether a client uses a proxy of its own, its type, address and username, stored as `proxy jsonb`, and its password, a Secret stored beside it with the helper of internal/keyring. It validates an update and turns the stored object into the proxy of an outbound client (S-009). OIDC settings use it first; Connections, outgoing webhook Destinations and the outgoing heartbeat reuse it.
Index ¶
Constants ¶
const ( TypeHTTP = string(outbound.ProxyHTTP) TypeHTTPS = string(outbound.ProxyHTTPS) TypeSOCKS5 = string(outbound.ProxySOCKS5) )
The proxy types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool `json:"enabled"`
Type string `json:"type,omitempty"`
Address string `json:"address,omitempty"`
Username *string `json:"username,omitempty"`
}
Config is the proxy object as stored in `proxy jsonb`, without its password. A disabled proxy may keep its type, address and username, so that switching it off and on again keeps them.
type FieldError ¶
FieldError is a field of the proxy object that is not valid, at a JSON pointer relative to the object.
func (*FieldError) Error ¶
func (e *FieldError) Error() string
type Input ¶
type Input struct {
Enabled bool
Type *string
Address *string
UsernameSet bool
Username *string
Password keyring.SecretInput
}
Input is the proxy object of an update: an omitted type, address or username keeps the stored one, a null username clears it, and the password follows the rule of every Secret field.