MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / HTTPClientConfiguration

Struct HTTPClientConfiguration

config/http.go:286–317  ·  view source on GitHub ↗

HTTPClientConfiguration is the configuration structure for HTTP clients

Source from the content-addressed store, hash-verified

284
285// HTTPClientConfiguration is the configuration structure for HTTP clients
286type HTTPClientConfiguration struct {
287 // URL is the base URL for requests.
288 URL string `json:"url" yaml:"url" comment:"Base URL of the server to connect."`
289
290 // AllowRedirects sets if the client should honor HTTP redirects. Defaults to false.
291 AllowRedirects bool `json:"allowRedirects" yaml:"allowRedirects" comment:""`
292
293 // Timeout is the time the client should wait for a response.
294 Timeout time.Duration `json:"timeout" yaml:"timeout" comment:"HTTP call timeout." default:"2s"`
295
296 // CACert is either the CA certificate to expect on the server in PEM format
297 // or the name of a file containing the PEM.
298 CACert string `json:"cacert" yaml:"cacert" comment:"CA certificate in PEM format to use for host verification."`
299
300 // ClientCert is a PEM containing an x509 certificate to present to the server or a file name containing the PEM.
301 ClientCert string `json:"cert" yaml:"cert" comment:"Client certificate file in PEM format."`
302
303 // ClientKey is a PEM containing a private key to use to connect the server or a file name containing the PEM.
304 ClientKey string `json:"key" yaml:"key" comment:"Client key file in PEM format."`
305
306 // TLSVersion is the minimum TLS version to use.
307 TLSVersion TLSVersion `json:"tlsVersion" yaml:"tlsVersion" default:"1.3"`
308
309 // ECDHCurves is the list of curve algorithms to support.
310 ECDHCurves ECDHCurveList `json:"curves" yaml:"curves" default:"[\"x25519\",\"secp256r1\",\"secp384r1\",\"secp521r1\"]"`
311
312 // CipherSuites is a list of supported cipher suites.
313 CipherSuites CipherSuiteList `json:"cipher" yaml:"cipher" default:"[\"TLS_AES_128_GCM_SHA256\",\"TLS_AES_256_GCM_SHA384\",\"TLS_CHACHA20_POLY1305_SHA256\",\"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\",\"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256\"]"`
314
315 // RequestEncoding is the means by which the request body is encoded. It defaults to JSON encoding.
316 RequestEncoding RequestEncoding `json:"-" yaml:"-"`
317}
318
319// HTTPClientCerts is a structure that holds the client certificates after successfully calling ValidateWithCerts
320type HTTPClientCerts struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected